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.
with running apt-cache search pygments
you'll get the needed packages:
voss@ubuntu:~$ apt-cache search pygments
python-pygments - syntax highlighting package written in Python
python-sphinx - documentation generator for Python projects (implemented in Python 2)
python3-pygments - syntax highlighting package written in Python 3
python3-sphinx - documentation generator for Python projects (implemented in Python 3)
texlive-latex-extra - TeX Live: LaTeX additional packages
python-django-debug-toolbar - Embedded debugging toolbar for Django projects
ruby-albino - Ruby wrapper for pygmentize
trac-wikiprint - Make Trac wiki pages printable, exporting to PDF or printable HTML
Install the package(s) with
voss@ubuntu:~$ sudo apt-get install python-pygments
and maybe that you also need to install the texlive package. Anf when everything is installed you need the pdflatex --shell-escape <file>
command
Best Answer
First of all, TeXMakerX is now TeXStudio. If you are still running TeXMakerX then it is advised that you upgrade to the latest version of TeXStudio.
minted
usesPygments
ofPython
for the fancy coloring schemes. You need to invoke the-shell-escape
option in order for LaTeX to allow Pygments to be used.In TeXStudio, click on the following menu
and change
into
Edit
As mentioned by tohecz in comment, it is better to make a separate command for this in TeXStudio for security reasons. You can do this by clicking
and in the User Commands box, click +Add button and add a name for your command in the first cell, say
user:graphviz-pdflatex
and the commandtxs:///pdflatex/[--shell-escape]
in the second cell.You can then see the command listed in the menu
Click on the command to run.