I am trying to include an .eps
figure in a document and build with pdflatex:
\documentclass[12pt,a4paper]{report}
\usepackage{graphicx}
\usepackage{epstopdf}
\begin{document}
\includegraphics{figure}
\end{document}
The error I get is:
sh: epstopdf: command not found
Package pdftex.def Error: File `figure-eps-converted-to.pdf' not found. \includegraphics{figure}
Adding -shell-escape
as mentioned in previous posts does not solve the issue. I have reinstalled epstopdf
with TeX Live. I am using TeXstudio 2.10.2 on Mac OS X 10.10.5.
Edit:
Apparently, this is an editor-related issue since everything works fine if called from command line.
Best Answer
With TeXLive 2015,
eps
files should be converted topdf
automatically when using pdflatex. There is no need to load theepstopdf
package. The error you are getting suggests that the system is looking for theepstopdf
script in the wrong place. According to the user manual, there are various settings that TeXStudio uses when looking for commands of this type. If there is a setting forepstopdf
, then doin the terminal and paste the result in its place. Failing this, compile the following document with shell escape enabled:
(Note that this will destroy any existing files called
tmp1
andtmp2
in the current directory.) Then edit your question by adding the contents of the filestmp1
andtmp2
.EDIT
Integrated development environments are the work of Satan. I just downloaded TeXStudio and reproduced exactly the same problem. Using the code above, I determined that it is searching for epstopdf in a nonexistent TeXLive2012 directory. In the file
I found the following:
I can't find an option to change this from within TeXStudio (someone else who knows the software better than me may know how to do it). I tried editing the file, since I think it should be
but when I restarted TeXStudio the
.ini
file changed back automatically. Here is a workaround (which requires admin privileges). In the terminal:and enter your password to make yourself root. Now create the missing directory as follows:
Finally, create a symbolic link to the real location of
epstopdf
:Now when TeXStudio looks for epstopdf it will find the symbolic link leading to the proper location.