[pdftex] SyncTeX and output-directory option

Martin Reinders martin at helios.de
Wed Mar 25 10:44:47 CET 2009

I just started experimenting with SyncTex and have the following

To keep generated files separate from the source files, I use the
pdflatex -output-directory=DIR option, e.g.

   pdflatex -synctex=1 -output-directory=output main.tex

However, the SyncTeX file "main.synctex.gz" is always created in the
source directory and not in the specified output directory.

Therefore the PDF viewer (e.g. Skim.app on Mac OS X) does not find
the SyncTeX file (it is searched only in the same directory as the
PDF file).

Moving the SyncTeX file into the output directory does not work,
because many file paths are relative to the current directory.

So I would like to suggest that a future version of SyncTeX creates
the SyncTeX file in the specified output directory, with file paths
relative to that directory.

Of course, I could write a script that moves the SyncTeX file and
fixes all relative paths. This should not be too difficult, but
perhaps somebody had the same problem and can suggest another

Best regards,

More information about the pdftex mailing list