I want to use the auto-pst-pdf
package and therefore I need the --shell-escape
option to be enabled. I did this in my TeXShop preferences as follows:
However when I use pdflatexmk
(by writing % !TEX TS-program = pdflatexmk
on the first line) to compile my document the option is not taken into account and auto-pst-pdf
can not be used.
How do I enable the --shell-escape
command with pdflatexmk
?
I use TeXShop 3.24 on Mac OSX with pdflatexmk version 4.37.
Best Answer
Navigate to your
~/Library/TeXShop/Engines
folder and duplicate the filepdflatexmk.engine
to, say,pdflatexmk-shell.engine
. Then open this file with TeXShop itself and add the-pdflatex="pdflatex --shell-escape %O %S"
option: here's how the file should be:Now, if you start your document with
the shell escape will be enabled.
Here's a copy of the console when a file with that magic line is processed:
The lines
are the proof that shell escape is enabled.