wiki:Latex/SyncPdf

Synchronize Tex Editor and PDF viewer

This is a pretty cool feature and helps when proof reading or checking spelling:

  • Forward search: After build, your tex editor will open the pdf viewer at exactly the line in the pdf which the tex editor shows.
  • Inverse search: Select a line in the pdf viewer, then the tex editor will jump to exactly that line in the tex source.

This requires some tool setup. Here's one example:

Texlipse + SumatraPDF (Windows)

Texlipse + Skim (Mac)

  • texlipse:
    • pdflatex arguments: add -synctex=1
      • or put \synctex=1 in your tex file
    • viewer command: /Applications/Skim.app/Contents/SharedSupport/displayline
    • viewer arguments: %line "%file" "%texfile"
    • inverse search support: viewer runs external command
    • viewer supports forward search: checked
  • skim Sync panel:
    • show the changes in the file
    • custom support to PDFSync
    • command: java
    • parameters: -classpath /Developer/eclipse/plugins/net.sourceforge.texlipse_1.4.0/texlipse.jar net.sourceforge.texlipse.viewer.util.FileLocationClient -f %file -l %line
      • (adapt eclipse and texlipse path to right version number)

Then:

  • In Texlipse Cmd+4 -> open pdf at that position
  • In Skim Shift-Cmd-Cklick -> open tex file at that position