Monday, June 10, 2013

epstopdf on OS X

I was having some issues with .eps files in TeXShop and the default installation of MacTeX on OS X Lion. Specifically, I was getting this error:

repstopdf: command not found

After much googling, I was able to figure out that I need to add the "--shell-escape" option to both fields in TeXShop -> Preferences -> Engine:

Tex:
pdftex --shell-escape --file-line-error --synctex=1

Latex:
pdflatex --shell-escape --file-line-error --synctex=1

Now I get this error:

epstopdf: command not found

At least this is supposed to be the name of the tool we need. After much more misleading googling, I decided to hack it myself. Here's my solution:

curl -O http://mirrors.ctan.org/support/epstopdf.zip
unzip epstopdf.zip
cd epstopdf
chmod a+x epstopdf.pl
mv epstopdf.pl epstopdf
sudo mv epstopdf /usr/textbin
cd ..
rm -rf epstopdf*

Hope that's useful for someone out there.