[OS X TeX] pdflatex figure with the same name as the document?

Herbert Schulz herbs at wideopenwest.com
Thu May 13 23:24:01 CEST 2010

On May 13, 2010, at 3:43 PM, Jung-Tsung Shen wrote:

> I was pdflatexing a document named "One_Way.tex" just now. In the
> document, I have a figure named "one_way.jpg". The compilation failed
> numerous times (log attached below) and I thought the figure file was
> corrupted so also I re-made tons of times a new figure file but still
> in vain.
> Finally, I changed the name of the figure file to something else and
> it worked immediately. Is there a rule that the figure file can't be
> of the same name as the document?
> JT
> *****************************
> [1{/usr/local/texlive/2009/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]Error:
> PDF file is damaged - attempting to reconstruct xref table...
> Error: Couldn't find trailer dictionary
> Error: Couldn't read xref table
> !pdfTeX error: /usr/texbin/pdflatex (file ./one_way.pdf): xpdf: reading PDF ima
> ge failed
> ==> Fatal error occurred, no output PDF file produced!


Could you supply a minimal but compilable file and graphic that demonstrates this problem? Also, are you including the jpg extension when you use the \includgraphics command? That might be what is causing the problem since pdflatex is most likely finding the previous One_Way.pdf file and trying to include that.

Good Luck,

Herb Schulz
(herbs at wideopenwest dot com)

More information about the macostex-archives mailing list