Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am working on a pretty big latex project (a book) and I'd like to be able to quickly find the corresponding .tex file and line number, when having the resulting PDF in front of me.

Being open-source, people come with "content fixes", yet they tell me things about the content. I am able to find it rapidly in the PDF, but it's harder to find where in the .tex source the paragraph I'm interested in is.

The reported lines in the pdf do not need to be precise, and for each and every line in the source. An orientative line number per paragraph would suffice.

Are there any solutions to this?

share|improve this question
    
A regular search (Ctrl+F) is usually best, since TeX's engine works opposite to usual convention - it grabs an entire paragraph first before breaking it into lines that stretch across the page. –  Werner Jul 16 '12 at 15:39
2  
Assuming you are creating the PDF from a .tex source, this is exactly what SyncTeX is for. Which editor do you use? –  Joseph Wright Jul 16 '12 at 15:43
    
If I understood your question correctly, then what you are trying to do ist called forward-inverse-search. Which editor are you using? And which PDF Viewer? –  matth Jul 16 '12 at 15:43
1  
I do not know how much vim and gvim differ, but this question might already help you: tex.stackexchange.com/questions/2941/… –  matth Jul 16 '12 at 15:49
1  
If you just want to give it a try, you could also experiment with TeXworks or Texmaker. Both support forward-inverse-search out of the box (on Windows, Linux and Mac). –  matth Jul 16 '12 at 21:50
show 2 more comments

3 Answers 3

If you use TeXLive and the editor TeXMaker you are able to find the position of a word in the PDF file by: 1. Compile the whole document in TeXMaker 2. In the embeded pdfviewer (right-hand side) marke a word and right-click it, then you see a context menu jump to source or something like that, just click it and the cursor of the editor jumps to the source.

Link to texmaker : http://www.xm1math.net/texmaker/

share|improve this answer
    
PS: manual to config the editor: xm1math.net/texmaker/doc.html#SECTION0 –  lazyboy Aug 22 '12 at 21:26
add comment

Which system do you use? I have MikTeX 2.9, Windows 7 and the editor TeXnicCenter 2.0 Alpha. I configured TeXnicCenter to use SumatraPDF instead of Adobe Reader. On the Sourceforge project site of TeXnicCenter are tutorials available in English, French and German, how to do this, see in http://sourceforge.net/projects/texniccenter/files/Tutorials/

TeXnicCenter has a nice feature to administrate your TeX project for you. In this combination of programs I can click in SumatraPDF into the displayed pdf file and TeXnicCenter shows me the tex code in the corresponding tex file and vice versa.

share|improve this answer
add comment

To be a bit more general:

You need one of the LaTeX Editors/IDEs, that supports the Synctex feature. And in the settings you have to add, of course, the switch--synctex=-1 or --synctex=1 to pdflatex/lualatex/xelatex command line call – with the negative number a <jobname>.synctex file will be generated, with the positive number it additionally will be gzipped.

Further you need a PDF Viewer, that supports backward search. You should search in the documentation of your favorite TeX editor for known compatibility issues.

A TeX editor together with an own previewer, where it works out of the box, is shipped out together with MiKTeX and TeXlive, its name is TeXworks.

Some information, how several TeX editors should be configured to work with SumatraPDF, can be found on http://william.famille-blum.org/blog/static.php?page=static081010-000413.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.