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?
Best Answer
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 working folder.Files placed in folders relative to your main
.tex
file are found thanks to theTEXINPUTS
environmental variable to which your main folder is added.The problem using relative paths containing things like
./
or../
is that in these cases kpathsea simply checks if that file exists. Excerpt from the kpathsea documentation, section 5.1 (thanks to David Carlisle for this full explanation)So you have to go back one folder when you specify files, in your case:
instead of:
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: