# What exactly is SyncTeX?

I stumbled upon these SyncTeX files in my directories and wanted to know what they are for. I searched this site and the internet and I think I have some vague understanding of what it is but I'm still not very satisfied with my actual knowledge. I've found many questions about configuring SyncTeX but none about what it is and what it does.

So, could someone explain what is SyncTeX and what does it do exactly and/or point to some general purpose documentation?

SyncTeX is a utility written by Jérôme Laurens which enables synchronization between your source document and the PDF output. If your editor/viewer supports it, then you can click in your source and jump to the equivalent place in the PDF or click in the PDF and it will jump to the appropriate place in your source document.

In TeXShop, for example, Command-click does the navigation. Other editor/viewer pairs may implement the exact commands slightly differently.

The files that it creates store all of the synchronization data that make this magic possible. Gzipped versions of these files are created if you pass the `--synctex=1` option to e.g. the `pdflatex` command (and other engines similarly); non-zipped versions can be created with `--synctex=-1`, although for a large document these files can be quite large, so the zipped ones are generally to be preferred. See

Usually this is part of the default setting for the compilation command within most TeX-aware editors.

• Also note that the only engine (I'm aware of) which doesn't support synctexing is (plain) `tex`. – karlkoeller Jun 10 '13 at 16:14
• @karlkoeller At least in TeX Live, the `tex` program has few of the "extended features"; it supports, however, options such as `-enc` or `-mltex` (when called as `INITEX`). – egreg Jun 10 '13 at 16:21
• so synctex does just synchronize source code with pdf output? Also, it just works when you are previewing your pdf into the editor, not when you open it in an external viewer, right? – franz Jun 10 '13 at 20:27
• @franz It all depends on whether the previewer and the editor can communicate with SyncTeX. For instance I use Aquamacs and Skim; the communication between the two applications is flawless. – egreg Jun 10 '13 at 20:30
• @egreg I think I understand now. BTW before asking the question I had a vague idea but it was completely wrong :D – franz Jun 10 '13 at 20:35

Regarding synctex and plain tex -- in TeX Live, my goal is for "tex" to be TeX, i.e., to let DEK still invoke "tex" and get his program.

To get an extended non-ini engine, plain TeX macros, DVI output by default, "etex" is available. This is actually pdftex with the DVI default, not the pure e-TeX, because some of the non-PDF features in pdftex have come to be commonly used and useful. Breitenlohner said ok to that ...

• While this is probably valuable information it doesn't seem to answer the question at hand, thereby making this information hard to find. Consider asking a dedicated question where you can post this answer. (Answering your own questions is allowed and encouraged.) – das-g Dec 4 '18 at 11:06