[Tex/LaTex] xy-eps-converted-to.pdf not found – wrong filename

epstopdfgraphicsmiktexpdftex

I'm trying to include an EPS file into a PDF file using MikTex 2.9 under Windows 8. Everything else LaTex related works like a charm.

pdflatex keeps complaining about a missing xy-eps-converted-to.pdf file. However a xy.pdf exists and is exactly that file that pdflatex should use instead of the xy-eps-converted-to.pdf, so it's just the filename that appears to be wrong.

Either epstopdf is giving the file the wrong name or pdflatex is expecting the wrong one. Whichever way might be right or wrong, how do I kind of synchronize them to use the same filename?

Best Answer

Are you including it as \includegraphics[..]{xy.eps}? If so, don't. Use \includegraphics[..]{xy} - the driver will take care of file extensions.

Under pdflatex, an EPS is converted to a PDF, but if a PNG exists, then it will be used (a legacy preference order). There are default file extensions accepted by pdflatex, searched in a specific order (see Graphics file extensions and their order of inclusion when not specified), so there's no need to include the extension. Moreover, this allows for one to possibly switch between processing a document in latex and pdflatex, letting the compiler decide on the graphics file to include.

If you're still experiencing problems, there should be a converted version of your .eps in the working folder. Rename this to an appropriate .pdf name (say, xy.pdf) and then include this verbatim

\includegraphics{xy.pdf}