I am having issues with -shell-escape. I do not know really what this is, and how to apply it. Furthermore, I have read elsewhere that I is possibly dangerous to summon this command. Any help would be hugely appreciated.

In order to incorporate a simplified numbering system for compounds in my document, I am trying to replace a TMP marker within a chemdraw .eps file. However, when I include


I get this message:

enter image description here

If I remove the above command then the typset completes, but the TMP markers in the graphic remain TMP1, TMP2 etc.

This is my input:

\caption{Macrocycle synthesis}

The tutorial I am following is detailed here: http://www.jkwchui.com/2010/03/writing-chemistry-with-latex-33/

I am using TeXShop for Mac.

  • 1
    on the command line it means literally adding the option --shell-escape It is probably a configuration option in texshop but I can not help with that. It is needed to allow tex to call out to the operating system to (for example) convert eps to pdf. as any command that can call to the operating system it could in theory be misused to run commands that you don't want running, but the standard auto-pst package does nothing bad:-) Apr 27, 2013 at 11:23
  • I am sorry, where in the command line do you mean?
    – Alastair
    Apr 27, 2013 at 11:27
  • 1
    If you are running latex "by hand" you would do pdflatex --shell-escape myfile.tex instead of pdflatex myfile.tex You just need to tell texshop to do that... Apr 27, 2013 at 11:29
  • @Alastair see Command-line interface
    – cgnieder
    Apr 27, 2013 at 11:29
  • You might be best running in 'traditional' latex+dvips+ps2pdf mode if you are having trouble: the 'magic' that replaces TMPX with a number can only be done with .eps files.
    – Joseph Wright
    Apr 27, 2013 at 17:08

2 Answers 2


To enable shell escape in TeXShop:

enter image description here


You just need to add it as an argument to pdflatex:

$ pdflatex --shell-escape main.tex

Always useful to check the manual:

$ man pdflatex

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .