[Tex/LaTex] TeXLive 2011: pdfLaTeX does not convert eps to pdf for eps files in subdirectories


As from 2010, TexLive has been converting .eps files directly to pdf file if the compilation is done with PDFLaTeX. Thus a file named


will be automatically be converted to a file named


However I find that the conversion is done if the .eps file is located in the root directory as the main .tex file. If the .eps files happen to be located in another folder, then PdfLaTeX complains e.g.

! Package pdftex.def Error: File `../test/classi-eps-converted-to.pdf' not  found.

See the pdftex.def package documentation for explanation.
Type  H <return>  for immediate help.

l.130 ...ludegraphics[scale=1]{../test/classi.eps}

Process has been terminated ...

How to instruct PDFLaTeX to search in the right directories?

Best Answer

Add the option -shell-escape to your compilation options.

Alternatively, instead of having the EPS images in a folder at the same level (but in a different subdirectory), you could just place it in a subdirectory of your root .tex file. Then pdflatex will not complain about the conversion and inclusion of EPS files.