Syncing between PDF and LaTeX source
This article concerns the
See other variants:

Texpad allows you to synchronise your LaTeX source with the output PDF. There are two ways you may choose to do so, a continuous scroll lock or a one-off sync.

One off syncing

To sync in a one off manner, then please hold the - Cmd button on your keyboard and click in the editor or the pdf.

  • PDF to LaTeX source: Cmd-clicking on the pdf will jump to that line in the editor pane. You can also use the right-click context menu at any point in the cursor and select the option “Synchronise PDF”.
  • LaTeX source to PDF: Either clicking on the outline view, or Cmd-clicking on the text will jump to that point in the pdf.

Note that in versions older than 1.5, a simple click was the default behaviour to go from PDF to editor. If you prefer that option, please use the Single-click PDF sync with editor option in the PDF Viewer pane of your Preferences.

In either case the other pane will be synchronised as precisely as possible. When syncing from editor to PDF, a light blue box will flash over the matching text, and when syncing PDF to editor, the cursor position will be set as closely as possible, often to the character.

Scroll lock

It can be useful when editing a document to keep the PDF and editor panes permanently in sync. You can do this by turning the scroll lock on from the right of the popup PDF toolbar. This will scroll the top of the two panes to match each other as you scroll.


Texpad uses SyncTeX

Please note that you will need a modern TeX distribution for this to work. As always, we suggest you download the latest version of MacTeX. If your distribution supports SyncTeX, Texpad will typeset the project with SyncTeX information automatically to enable the sync. SyncTeX is a technology built into recent TeX typesetters that generates a file with the information necessary to convert a position in the typeset PDF with a position in the editor source. As long as your TeX distribution creates the SyncTeX database then Texpad will use it. MacTeX has had SyncTeX built in since 2008 so it is overwhelmingly likely that your distribution supports SyncTeX. SyncTeX is not compatible with all LaTeX document classes; Beamer, for example, often causes trouble.