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.

I work in WinEdt + MikTex 2.8 and mostly compile the source through PdfTexify. In order to compile eps figures in this mode I used the package epstopdf, but recently it stopped working. This is quite strange, as I can't recall what I changed in the settings of WinEdt for example. Just to eliminate this latter possibility, I re-installed WinEdt and I'm pretty sure that the settings of WinEdt are now by default - e.g. the pdf reader is set to Acrobat (before re-installing it was Sumatra). However, the problem have not gone - here is the text:

[18]MiKTeX GPL Ghostscript 8.60: **** Could not open the file ../plots/contourML-eps-converted-to.pdf .
**** Unable to open the initial device, quitting.

LaTeX Warning: Reference `fig:cs1' on page 19 undefined on input line 1146.

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

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

l.1156 ...=true,width=5cm]{../plots/contourML.eps}

? 

Process has been terminated ...

Does anybody have an idea, hot to resolve the problem?

share|improve this question
    
Check this out. It might be something related to enabling shell escape. –  pythonista Nov 19 '12 at 10:50
    
@AbdulhaqElhouderi: thanks for the suggestion - that indeed seems to be often the reason, but as appeared, not in my case: it didn't help. On the other hand, I have found, that if I store TeX auxiliary files in the same folder, there is no problem - only if I require them to be in a different folder there is a problem with epstopdf. Any idea, why can it be so? –  Ilya Nov 19 '12 at 14:26
    
I have experienced the same problem... I wondered if you found a solution. I have tried some solutions such as using --shell-escape option but it didnt work. In any case it could be that I am not configuring it correctly in winedt. I would highly appreciate any orientation about this problem.thanks arantxa –  user25476 Feb 4 '13 at 12:53
    
@arantxa: I'm using WinEdt and had this problem with it. I found that the problem disappears if I don't use a special folder for auxiliary files. –  Ilya Feb 5 '13 at 16:37
add comment

2 Answers 2

WinEdt uses its own algorithm to store auxiliary files, that is, it saves all auxiliary files in a folder named TeXAux (unless you've changed it, it is customisable) and uses this folder as output folder.

Files placed in folders relative to your main .tex file are found thanks to the TEXINPUTS environmental variable to which your main folder is added.

But epstopdfpackage uses Ghostscript and this program is not aware of the contents of TEXINPUTS.

So you have to go back one folder when you specify files, in your case:

\includegraphics{../../plots/contourML.eps}

instead of:

\includegraphics{../plots/contourML.eps}

This should work...


ADDENDUM

Following Heiko's suggestions, I can say that the best way to make it work with WinEdt (both in MiKTeX and TeX Live) is to leave your \includegraphics lines as they were and add these lines to your preamble:

\epstopdfsetup{outdir=./}
\graphicspath{{../}}
share|improve this answer
add comment

The following scenarios work for me in MiKteX 2.9:

% test.tex
\documentclass{article}
\usepackage{graphicx}
\usepackage{epstopdf}
%\epstopdfsetup{outdir=texaux/}
\begin{document}
\includegraphics[width=.5\linewidth]{plots/contourML.eps}
\end{document}

Files, relative to the current directory:

test.tex
plots\contourML.eps
texaux\

pdflatex test generates:

test.aux
test.log
test.pdf
plots\contourML-eps-converted-to.pdf

pdflatex -output-directory=texaux test generates:

plots\contourML-eps-converted-to.pdf
texaux\test.aux
texaux\test.log
texaux\test.pdf

Option outdir of package epstopdf

Package epstopdf (that might be automatically loaded by graphics.cfg) supports an option outdir, where the directory for the converted files can be specified:

\usepackage{epstopdf}
\epstopdfsetup{outfile=texaux}

pdflatex test generates:

test.aux
test.log
test.pdf
texaux\contourML-eps-converted-to.pdf

pdflatex -output-directory=texaux test generates:

texaux\contourML-eps-converted-to.pdf
texaux\test.aux
texaux\test.log
texaux\test.pdf
share|improve this answer
    
I think Ilya was using WinEdt command PDFTeXify which already saves auxiliary files in texaux folder when it exists, without the need to specify the command-line switch -output-directory=texaux. –  karlkoeller May 21 '13 at 15:39
    
@karlkoeller I do not have WinEdt, thus I do not know, which options, which current directory,... WinEdt is using. At least the scenarios given in the answer provide some minimal models. With further information, they can be refined to get closer to the WinEdt case. –  Heiko Oberdiek May 21 '13 at 15:58
    
Your example works in WinEdt substituting \epstopdfsetup{outdir=texaux/} with both \epstopdfsetup{outdir=./} or \epstopdfsetup{outdir=../plots/} because the working directory is texaux –  karlkoeller May 21 '13 at 16:25
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.