SyncTeX – Synchronization between TeX and DVI/PDF

SyncTeX is a method for synchronization between (La)TeX source and its DVI/PDF file.  It is well and officially supported in TeXLive 2008. More information on using SyncTeX on Mac OS can be found here. This post targets Emacs+AucTeX (excellent LaTeX editor) and Skim (excellent PDF viewer) on Mac OS. Carbon Emacs (i.e. Emacs for Mac OS) can be downloaded from its website or from Apple’s website. Skim is located here.

Assuming that you already have Skim and Emacs+AucTeX up and running, this is how you enable SyncTeX in your LaTeX files and synchronize between them and their PDF files:

  • To enable SyncTeX in your LaTeX files, first you must have TeXLive 2008 (or any TeX distribution that supports SyncTeX) installed in your system. When you compile your LaTeX files, use the switch -synctex=1 in your call to latex. Alternatively, you can add a line \synctex=1 in the preamble of the master TeX file. The PDF file compiled from your LaTeX source will be accompanied by a SyncTeX file of the same name, which contains information necessary for the synchronization.
  • In Emacs, you must start the Emacs Server by issuing command server-start (M-x server-start <ENTER>).
  • You must configure Skim to synchronize with Emacs: menu Preferences/Sync/Preset to Emacs.
  • Open the PDF file in Skim. In Skim, hold Shift-Apple and click on any text in the PDF to go directly to the corresponding LaTeX source in Emacs.

That’s easy!

This entry was posted in LaTeX, MacOS and tagged , , , . Bookmark the permalink.

3 Responses to SyncTeX – Synchronization between TeX and DVI/PDF

  1. Pingback: Synchronization with SyncTeX « TRUONG on LaTeX

  2. Kevin says:

    Too bad it can’t go back to the point in the org-mode file that generated the tex file :-/

  3. mankoff says:

    @Kevin I think synctex can work with org although I have not yet been successful myself. See and my recent post to the org list here:

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s