When viewing a pdf of a long LaTeX document, it can sometimes be difficult to find where a certain equation or a line in the pdf is located in the source code, as there are no page numbers in the source code (Unlike visual word processors). I wonder if there is a simple way to find such a location.
-
7There is, it's called SyncTeX. If you provide more information about your setup (operating system, editor, compiler, viewer), you'll get more targeted help.– JakeCommented Sep 13, 2011 at 3:19
-
4I often find it helpful to search by a word/phrase/equation that will be (relatively) unique to that part of the document. Even the most basic editors have search- if you use a powerful editor, such as vim, then you can even search for regexps– cmhughesCommented Sep 13, 2011 at 3:46
-
Since you have some responses below that seem to answer your question, please consider marking one of them as ‘Accepted’ by clicking on the tickmark below their vote count (see How do you accept an answer?). This shows which answer helped you most, and it assigns reputation points to the author of the answer (and to you!). It's part of this site's idea to identify good questions and answers through upvotes and acceptance of answers.– jub0bsCommented Jan 28, 2014 at 0:52
2 Answers
TexWorks
uses the -synctex
option which allows you to right click and select view source
which takes you back to the source of that line, or right click in the LaTeX source and jump the appropriate spot in the PDF.
Most IDEs will also provide this sort of functionality, so if you use an good IDE you can cross reference between the PDF and the LaTeX source. Am sure you could just add this to the command line if you are compiling your documents that way.
See LaTeX Editors/IDEs for a list of these. Which editor and environment do you use?
Under MS Windows, SumatraPDF is a viewer which works fine with SyncTeX (while Acrobat doesn't support this), usable in various editors like TeXnicCenter or Emacs.