[Tex/LaTex] Error using epstopdf package

epstopdf

I am currently using pdflatex on my Mac OS Yosemite to compile a simple code which is to demonstrate the problem I am having with another larger file. I am using TexLive 2014 and when running the following code on TexStudio I get an error:

\documentclass[11pt,notitlepage]{article}
\usepackage[utf8]{inputenc}
\usepackage[margin=0.5in]{geometry}
\usepackage{graphicx}
\usepackage{epstopdf}

\begin{document}
    \includegraphics{test.eps}
\end{document}

I have tried every combination of including the .eps extension, or removing the \usepackage{epstopdf}, or placing \epstopdfsetup{outdir=./}. I don't know what I could possibly be doing wrong. I have also tried compiling using TexMaker and TexShop, but nothing works. The error I get in my log is the following:

(/usr/local/texlive/2014/texmf-dist/tex/context/base/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
\scratchcounter=\count91
\scratchdimen=\dimen113
\scratchbox=\box26
\nofMPsegments=\count92
\nofMParguments=\count93
\everyMPshowfont=\toks18
\MPscratchCnt=\count94
\MPscratchDim=\dimen114
\MPnumerator=\count95
\makeMPintoPDFobject=\count96
\everyMPtoPDFconversion=\toks19
)
Package epstopdf Info: Source file: <test.eps>
(epstopdf)                    date: 2014-08-01 13:34:15
(epstopdf)                    size: 6154549 bytes
(epstopdf)             Output file: <test-eps-converted-to.pdf>
(epstopdf)             Command: <repstopdf --outfile=test-eps-converted-to.pdf 
test.eps>
(epstopdf)             \includegraphics on input line 8.
runsystem(repstopdf --outfile=test-eps-converted-to.pdf test.eps)...executed sa
fely (allowed).

Package epstopdf Info: Result file: <test-eps-converted-to.pdf>.

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

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

l.8     \includegraphics{test}

Using draft setting for this image.
Try typing  <return>  to proceed.
If that doesn't work, type  X <return>  to quit.

[1

{/usr/local/texlive/2014/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] (./docu
ment.aux) ) 

Thank you so much in advance to anyone who can help!

Best Answer

So here's where we ended up (see edits and comments for the history):

User recently upgraded to OS X 10.10 (Yosemite), and couldn't automatically convert any EPS graphics into PDF as he'd done previously.

The user was also unable to use the known-working (but probably not truly minimal) MWE of

\documentclass[11pt,notitlepage]{article}
\usepackage[utf8]{inputenc}
\usepackage[margin=0.5in]{geometry}
\usepackage{graphicx}

\begin{document}
%\includegraphics{207754.eps}
% copied from /usr/local/texlive/2014/texmf-dist/tex/latex/mwe/example-image-a.eps
\includegraphics{207754-op.eps}
% downloaded from http://goo.gl/nlQb6j and renamed
\end{document}

The same graphics and the same documents converted correctly on a Windows 7 system, and on other Yosemite systems.

The user was unable to use the epstopdf shell command to convert the graphics as well. This gave an error of dyld: Library not loaded: /usr/X11/lib/libXt.6.dylib Referenced from: /usr/local/bin/gs Reason: image not found.

The user had installed XQuartz at some point before the Yosemite upgrade.

In the end, it appears that the OS X upgrade undid some of the work of the XQuartz application, similar to how it undoes some of the work of the MacTeX installer, requiring the use of the FixMacTeX2014.pkg or similar packages. The image not found error also shows up in other X11-related applications after OS upgrades, such as wireshark. Since GhostScript is the main executable at the core of epstopdf command and the automatic conversion of EPS graphics to PDF in the newer graphicx packages, its failure to run was the root cause.

Reinstalling XQuartz (or possibly just restoring the symbolic link from /usr/X11 to /opt/X11) after the Yosemite upgrade fixed the problem.

Related Question