Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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

coilsans.eps

will be automatically be converted to a file named

coilsans-eps-converted-to.pdf

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?

share|improve this question
add comment

2 Answers

up vote 6 down vote accepted

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.

share|improve this answer
    
@ Werner Thanks. Does -shell-escape is to be put after pdfLaTeX.exe like in pdfLaTeX -shell-escape myfile.tex ? Actually I have the file in a folder in my tex root directory. Even if I have {/test/classi.eps}, PdfLaTeX still complains. 1 vote up. –  yCalleecharan Dec 28 '11 at 7:52
    
@yCalleecharan: Yes, pdflatex -shell-escape myfile.tex. I was able to reproduce your error if I included ../test/XX.eps, but had no problems with inclusion of test/XX.eps under pdflatex. The -shell-escape option solved it in both cases. The problem deals with "restricted mode," which led me to this thread. I found that I had the shell_escape = p setting in my texmf.cnf file. –  Werner Dec 28 '11 at 8:00
    
@ Werner I have the texmf.cnf file also as yours with shell_escape = p in C:\texlive\2011\texmf\web2c. My mistake was to put {/test/classi.eps} and not just {test/classi.eps}. Thanks. It works now. –  yCalleecharan Dec 28 '11 at 8:13
add comment

Try this kind of folder structure. I had the same error but overcome by using like this.

\chapter{Introduction}
\ifpdf
    \graphicspath{{Introduction/IntroductionFigs/PNG/}{Introduction/IntroductionFigs/PDF/}{Introduction/IntroductionFigs/}}
\else
    \graphicspath{{Introduction/IntroductionFigs/EPS/}{Introduction/IntroductionFigs/}}
\fi
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.