TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

It is frequently mentioned that latex and pdflatex are the same program invoked with different defaults for the variable \pdfoutput (0 in the former, 1 in the latter case); see What is the practical difference between latex and pdflatex?. A common advice to enforce pdflatex is therefore to put \pdfoutput=1 within the first 5 lines of the preamble (like http://arxiv.org/help/submit_tex#pdflatex). This fails for the first example using auto-pst-pdf on https://www.tug.org/PSTricks/main.cgi?file=pdf/pdfoutput.





  \rput(-4.5,4.5){A} \rput(4.5,4.5){B}

% removed by poster: \includegraphics{foo}% can be foo.jpg or foo.png


compiles just fine with

$ pdflatex -shell-escape minimal.tex

and yields the desired minimal.pdf. Adding


before (or after) \begindocumentclass[12pt]{article} followed by

$ latex -shell-escape minimal.tex

or even

$ pdflatex -shell-escape minimal.tex

fails with No pages of output and

auto-pst-pdf: Auxiliary LaTeX compilation
This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012)
entering extended mode

Package auto-pst-pdf Warning: 
    Creation of minimal-autopp.dvi failed.
This warning occured on input line 124.

Package auto-pst-pdf Warning: 
    Could not create minimal-pics.pdf. Auxiliary files not deleted.
This warning occured on input line 124.

auto-pst-pdf: End auxiliary LaTeX compilation

In either case, the corresponding log file minimal-autopp.log says

Package ifplatform Warning: 
shell escape is disabled, so I can only detect \ifwindows.


! Package auto-pst-pdf Error: 
"shell escape" (or "write18") is not enabled:
auto-pst-pdf will not work!

See the auto-pst-pdf package documentation for explanation.
Type  H <return>  for immediate help.

l.134         Or turn off auto-pst-pdf.}
You need to run LaTeX with the equivalent of "pdflatex -shell-escape"
Or turn off auto-pst-pdf.

So, it seems like the auxiliary pdflatex process which generates the minimal-pics.pdf is now missing the option -shell-escape.

PS: Adding the option [crop=off] to auto-pst-pdf as in auto-pst-pdf Problem does not change anything (and I guess it shouldn't have worked in the first place if that would have been the problem).

share|improve this question
Do not use the statement \pdfoutput=... it can be done automatically by the system. Do you have Perl installed? – Herbert Apr 22 '13 at 8:30
Welcome to TeX.SX. – Claudio Fiandrino Apr 22 '13 at 8:38
arXiv's recommendation to put \pdfoutput=1 within the first five lines suggests that they do some sort of preprocessing. This practice is definitely not recommended for normal document writing. – egreg Apr 22 '13 at 8:44
@Herbert: Yes, Perl is installed: $ perl -v This is perl 5, version 14, subversion 2 (v5.14.2) built for i686-linux-gnu-thread-multi-64int – zieglerk Apr 22 '13 at 9:00
@zieglerk: that is not possible. When the file is open you cannot modify the shell escape feature, it's too late. – Herbert Apr 22 '13 at 11:07
up vote 2 down vote accepted

The shell-escape feature cannot be activated from within a source file. When the file is open you cannot modify the shell escape feature, it's too late. This is a safe behaviour otherwise one could do any unsecure action.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.