I would avoid modifying the list of programs allowed to run in the restricted shell. These are either programs that don't write out any output (and when output redirection is requested they don't work in the restricted shell escape setting) or respect the openout_any
setting in texmf.cnf
.
As far as the present problem is concerned, running pdflatex
with shell escape enabled on the file filename.tex
consists in using the command line
pdflatex -shell-escape filename
(no quotes).
How to setup a front-end to run this command depends on the front-end itself. With TeXShop, for example, one can define a new engine. In your ~/Library/TeXShop/Engines
folder duplicate XeLaTeX.engine
and call it pdflatexshell.engine
. Modify the file (with TeXShop itself) to read
#!/bin/tcsh
set path= (/usr/texbin /usr/local/bin $path)
pdflatex -shell-escape "$1"
and, for a file you want to compile with unrestricted shell escape, write at its beginning
% !TEX TS-program = pdflatexshell
so that the engine will be automatically selected on opening.
What to do with other front-ends or LyX will vary.
If you really want to use the restricted shell escape, you have to enable
uname
rm
echo
latex
The program list can be determined by searching for runsystem
in the .log
file.
latexmk
has a switch called -shell-escape
that should do what you want. It takes care of makeindex
and bibtex
anyway.
so this should work
Name: xelatexmk
Program: latexmk
Arguments: -xelatex
-shell-escape
-e
$synctexoption %O %S/
$fullname
Best Answer
You can pass the parameter directly to
latexmk
as such:This option is not mentioned in the manpage. The manpage suggests the
-e
option which is also used in the first answer. This option amongst many others can be found usingThe command output starts with the following note:
Tested with
latexmk
versions