[pdftex] Invalid SyncTeX file with \includegraphics

Martin Reinders martin at helios.de
Wed May 6 15:37:48 CEST 2009

It seems that pdftex writes an invalid SyncTeX file for the following
LaTeX document:

Hello world
\includegraphics[bb=5 5 10 10,clip=true]{arrow} % arbitrary PNG file
\chapter{Chapter 1}
This is chapter 1.

When I compile this with "pdflatex -synctex=-1 main.tex", the file
"main.synctex" contains something like

SyncTeX Version:1

so inside sheet 1 there is a "nested sheet".

When I open "main.pdf" in Skim.app (a PDF viewer on Mac OS X with SyncTeX support)
and Shift-Cmd-Click on the "Chapter 1" line in the table of contents (page 2),
then Skim.app crashes. The crash occurs because
   synctex_scanner_get_name(scanner, 12)
returns NULL instead of "main.toc".

The problem occurs only with \includegraphics[..., clip=true].
With clip=false, the synctex file looks good (to me) and Skim.app has no problems.

The problem can also be verified with the synctex command line utility.
With "clip=false", the call "synctex edit -o 2:184:275:main.pdf"
gives the result
   Input:main.toc, Line:1
which is correct.
With "clip=true", the result is empty.

Setting \tracingoutput=true, I saw that \includegraphics[..., clip=false]
produces \pdfrefximage in the output, and \includegraphics[..., clip=true]
produces \pdfrefxform+\pdfrefximage, so perhaps there is some problem with
the SyncTeX output of \pdfrefxform.

Best regards,

More information about the pdftex mailing list