Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#561 Revision

open
nobody
None
1
2013-11-28
2013-10-11
Anonymous
No

Thank you very much for this great software I use since (almost) its beginning :)

However, I would like to know if there is a way (I haven't found it) to share my PhD Thesis with my supervisor so that he can mark it easily.
Please don't stone me, but I think about the revision tool in MS Word that is very relevant for this kind of work.

What do ou think about the possibilty of adding comments directly in the embeded PDF viewer (or even in any PDF viewer) that will write them in the .tex with the classical %?

Thanks again for the software.
Best regards.

Discussion

  • Tim Hoffmann
    Tim Hoffmann
    2013-10-11

    You've got a point there. Review processes are currently not well developed for tex documents, which was bothering me as well.

    Adding comments in the internal view doesn't help much. Then you could almost as easily jump to the code and directly add a % comment.

    So here is the solution I came up with: The next release (in a few days) will contain basic PDF annotation support. Then, your supervisor can add annotations in the PDF Viewer of his choice. You'll be able to go through the lists of annotations in the TXS viewer and from there jump to the source code.

    It's a start. However, there are still some limitations to this approach:

    • The PDF rendering library we use (poppler) has issues with some annotations generated by some programs (luckly at least Adobe Reader works fine).
    • Synctex is linenumber based. If you edit the source and insert or remove lines you will jump to incorrect positions when going from PDF to source. But not all hope is lost. There are ideas how to solve this in the future.
    • And of course, the annotations are gone, once you compile the file anew.

    Following your suggestion, it would be conceivable to copy all annotations into comments of the file. But I don't think this will make it into the upcoming release.

    Feedback is welcome.

     
  • Denis Bitouzé
    Denis Bitouzé
    2013-10-11

    Le vendredi 11/10/13 à 16h10,
    "Tim Hoffmann" t_hoffmann@users.sf.net a écrit :

    Following your suggestion, it would be conceivable to copy all
    annotations into comments of the file. But I don't think this will
    make it into the upcoming release.

    This could be very unsecure that a PDF file could change the content of
    your source files, no?
    --
    Denis

     
    • Tim Hoffmann
      Tim Hoffmann
      2013-10-12

      Where do you see a security issue? It would be a function like "Import comments from PDF". In a simple form, it would just add some # TODO lines to the source code.

       
  • Denis Bitouzé
    Denis Bitouzé
    2013-10-13

    Le samedi 12/10/13 à 17h50,
    "Tim Hoffmann" t_hoffmann@users.sf.net a écrit :

    Where do you see a security issue? It would be a function like
    "Import comments from PDF". In a simple form, it would just add some
    # TODO

    % TODO I guess ;)

    lines to the source code.

    Maybe I'm wrong, but I'm not sure I would like my source code to be
    changed by an external application, even by explicitly calling a
    function.
    --
    Denis

     
  • Tim Hoffmann
    Tim Hoffmann
    2013-10-13

    % TODO I guess ;)

    Of course. Been using python a lot lately ;)

    Editors are about changing source code, and if the task is more complex, why not let the editor help you and do more than process your key strokes? We already have such things: Create Label for sections, the table templates, table column alignment, Insert Graphics Wizard (on existing figures), to name a few. The function proposed above is even less dangerous because it only adds comments :).

    Maybe you feel uncomfortable because you give up some control over your source code. When using these more complex functions, you'll have to trust the editor that it does the correct thing. While programming such functions, I'm thinking carefully for not to introduce errors. As with all software, one cannot guarantee that it's 100% bug-free (in particular not for an open source project with limited resources). However, it would be tested under standard conditions and if something should really go wrong, first there's undo and for the worst case it's good to have a recent backup anyway.

    In all, I consider the danger very little compared to the productivity gain of the above mentionend functionality. Still, if you don't want your source changed, you don't have to use it. Moreover, alternative ideas on a PDF-tex review workflow are highly welcome.

     
  • Denis Bitouzé
    Denis Bitouzé
    2013-10-13

    Le dimanche 13/10/13 à 10h43,
    "Tim Hoffmann" t_hoffmann@users.sf.net a écrit :

    % TODO I guess ;)

    Of course. Been using python a lot lately ;)

    ;)

    Editors are about changing source code, and if the task is more
    complex, why not let the editor help you and do more than process
    your key strokes? We already have such things: Create Label for
    sections, the table templates, table column alignment, Insert
    Graphics Wizard (on existing figures), to name a few. The function
    proposed above is even less dangerous because it only adds
    comments :).

    Okay.

    Maybe you feel uncomfortable because you give up some control over
    your source code. When using these more complex functions, you'll
    have to trust the editor that it does the correct thing. While
    programming such functions, I'm thinking carefully for not to
    introduce errors. As with all software, one cannot guarantee that
    it's 100% bug-free (in particular not for an open source project with
    limited resources). However, it would be tested under standard
    conditions and if something should really go wrong, first there's
    undo and for the worst case it's good to have a recent backup anyway.

    Okay.

    In all, I consider the danger very little compared to the
    productivity gain of the above mentionend functionality. Still, if
    you don't want your source changed, you don't have to use it.

    Yes.

    Thinking more deeply about this, and reading your arguments, I concede I
    was maybe too feebleness :)

    Moreover, alternative ideas on a PDF-tex review workflow are highly
    welcome.

    I've nothing to propose for the moment.

    Denis

     
  • I was also wandering how it would be possible to go through a review process which feels almost easy for everyone. I am studying computer science and use to latex-type my lecture notes, before sharing the result with other students, and a collaborative way of doing things that would not require everyone to "learn" latex is a much-desired feature.

    Currently, some people anotate the generated pdf files and I compare both versions with tools like diffpdf. Some others are more used to programming-like stuff, so they are able to edit my latex file and directly send me a diff file containing only their changes.
    Maybe the pdf-annotations could be saved in a diff-like external file, so they're both here and not inside the original file,and can be kept from compilation to compilation. Of course, this would be hard to export to another latex editor, but sharing the compiled pdf version should be sufficient to show the annotations.

    Instead of pdf annotations, I was thinking of partial modifications : one of the main reason people don't look at my latex files is that it does too much look like code, even for large text-only paragraphs, because it is surrounded by tags. It would be easier for some people to be able to almost directly modify the displayed the text, and I think it could be in the following way (for non-total noobs) : one would highlight the part they want to comment, remove, complete or change, then press ctrl+right click (or anything else easy to grasp), in order to display some kind of editing dialog box containing the latex code corresponding to the highlighted selection with an "update file" button. It would clearly be less "frightening" than doing ctrl+left click and being surrounded by strange markup when the point was just to add some precisions to the text. Within this dialog box, two kind of behaviour can be thought of : those who just edit plainly the pdf, and those who are familiar with markups and would know that the file uses a package helping review, let's say like changes. The second ones would be able to write their comments or modifications through the use of one of the package-defined dedicated environment, as seen in this example.

    Once again, we would probably use diff files to see immediately what was changed and easily integrate changes brought by many reviewers (a thing for which synctex is totally useless when trying to use it with classical pdf annotations).

    Obviously, pdf annotation is great for reviewers, whereas file modification corresponds more to collaborative work, but I really think they can be thought as complementary. An why not, in some far future, add to the dialog box I was thinking a small wysiwyg feature ?

    Anyway, thanks a lot for this wonderful software :-D !

     
    • Tim Hoffmann
      Tim Hoffmann
      2013-11-29

      Thanks for sharing your thoughts. I agree that collaboration and review differ in some aspects and therefore may need different tools.

      For review it's most important to get the users adopt an appropriate workflow. PDF annotations are likely the most easy solution.

      The reviewer only needs to see the result and comments on it. It's a significant advantage that the reviewer doesn't need TeXstudio/LaTeX or anything special. On Windows (which likely is the largest user group), almost anybody has Adobe Acrobat or Adobe Reader.

      Maybe it's not the optimal solution for the author, but it can get people started.

      I don't think diff-like annotations are viable for maintaining annotations between compilations. Text-diffs works because you store unchanged context. Not sure if this is possible with annotations in PDF. Page and position is not sufficient as reference because the underlying PDF changes during a compilation. IMHO the only way to maintain the information is to import the annotations into the tex source code. Actually, that's something I've planned for the future.

      Advanced: Multiple annotations from different reviewers: One could do the following: Get all copys of the reviewers back, extract the annotations and merge them in the originally distributed PDF. Here it is sufficient to have page and position of the annotation.

      As for the proposed "partial modifications": I have some doubt, that it's much easier for non-total noobs. You still have a big program with source and PDF and with a lot of functions you don't understand. But more importantly, you still go from the PDF (text) to the source including the limitations and caveats of synctex. When there are automatisms to insert code into the source (either your proposed dialogs or the above mentioned annotation import) I feel better if this is supervised by the author (who knows TeX) rather than by a non-total noobs.
      Note also, that there are more advanced PDF annotations like strike-out, insert text, replace text (not in Adobe Reader, but in Acrobat and other programs).

      For collaboration I'd suggest a (D)VCS. If collaborators can't use TeX, it will always be a more review-like workflow.

      In all, currently I don't see the big advantage of the 'partial modifications'. With (D)VCS and PDF annotations we cover both ends of the spectrum of usecases. In both we can still do a lot of improvements. I think, your proposal of 'partial modifications' is conceptually good, but doesn't generate so much benefit compared to the necessary effort. After all, we have only a limited time for the project and there are a lot more ideas for other parts of TXS. But of course contributions are welcome in case you would like to explore that topic further yourself.