I'm using the package auto-pst-pdf and the package pst-labo. Everthing goes well with latex->dvips->ps2pdf but I got an error when i want to use it with pdflatex with -shell-escape


%\usepackage[cleanup={}]{auto-pst-pdf} %% pour compiler avec pdflatex




I am using MiKTeK 2.9 on windows 10 and I edit with Texmaker.

pdflatex -synctex=1 -interaction=nonstopmode  -shell-escape %.tex 

And I got (with the command line)

("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\etexcmds.sty")))" "
("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\etexcmds.sty")))" "
"auto-pst-pdf: Auxiliary LaTeX compilation"
This is pdfTeX, Version 3.14159265-2.6-1.40.18 (MiKTeX 2.9.6400 64-bit)
entering extended mode
This is dvips(k) 5.997 Copyright 2017 Radical Eye Software (www.radicaleye.com)
' TeX output 2017.10.31:1143' -> bur2-autopp.ps
<C:/Program Files/MiKTeX 2.9/dvips/base/tex.pro>
<C:/Program Files/MiKTeX 2.9/dvips/config/alt-rule.pro>
<C:/Program Files/MiKTeX 2.9/dvips/pstricks/pstricks.pro>
<C:/Program Files/MiKTeX 2.9/dvips/pstricks/pst-algparser.pro>
<C:/Program Files/MiKTeX 2.9/dvips/pst-tools/pst-tools.pro>
<C:/Program Files/MiKTeX 2.9/dvips/pstricks/pst-dots.pro>
<C:/Program Files/MiKTeX 2.9/dvips/pst-node/pst-node.pro>
<C:/Program Files/MiKTeX 2.9/dvips/pst-3d/pst-3d.pro>
<C:/Program Files/MiKTeX 2.9/dvips/pst-math/pst-math.pro>
<C:/Program Files/MiKTeX 2.9/dvips/pstricks-add/pstricks-add.pro>
<C:/Program Files/MiKTeX 2.9/dvips/pst-grad/pst-grad.pro>
<C:/Program Files/MiKTeX 2.9/dvips/base/special.pro>. [1]
Error: /undefined in pst@angleunit
Operand stack:
   2889.0   2520.0   5.69046   39.8332   5.69046   28.4523   17.0714   0.0   -17.0714   0.0   -5.69046   28.4523   2889.0   0.0   0.0   5.69046   0.0   31.2975   -2.84523   34.1428   -2.84523   125.19   -5.69046   130.881   8.53569   130.881   5.69046   125.19   5.69046   34.1428   2.27614   31.2975   2.27614   7.9666   --nostringval--   5.0   0.0
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   1967   1   3   %oparray_pop   1966   1   3   %oparray_pop   1950   1   3   %oparray_pop   1836   1   3   %oparray_pop   --nostringval--   %errorexec_pop   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   --nostringval--
Dictionary stack:
   --dict:1197/1684(ro)(G)--   --dict:0/20(G)--   --dict:166/200(L)--   --dict:96/300(L)--   --dict:141/200(L)--   --dict:3/5(L)--
Current allocation mode is local
Last OS error: No such file or directory
Current file position is 181154
MiKTeX GPL Ghostscript 9.19: Unrecoverable error, exit code 1
"auto-pst-pdf: End auxiliary LaTeX compilation"

I can't understand why it is working when I type myself the commands (no problem with de dvips command and the special prolog), and not when it is done with the auxiliary compilation of auto-pst-pdf

For me it's a postscript error comming from pstricks and it s' normal that latex detect nothing (I may be wrong), but where does it come from exactly and what can be done to fix it ???

I got the first image in the pdf, but not the others (with pdflatex). I got them all with latex->dvips->ps2pdf

  • Welcome to TeX.SX! No error here, with TeX Live 2017. – egreg Oct 31 '17 at 11:28
  • Works okay for me (on miktex) but such things depends sometimes on external ghostscripts. What happen if you use crop=false? And is your miktex up-to-date? Did you check with the update manager in user and admin mode? – Ulrike Fischer Oct 31 '17 at 12:03
  • With crop = false I get exactly the same thing. When I want to update, the manager check pst-pdf et auto-pst-pdf as "absolete (to be removed)" . But i don't want that. I use MikeTek 2.9 64 bit. Other people told me evrything is OK. So frustrating. – Idefix Oct 31 '17 at 14:29
  • I don't get a message about obsolete packages but I would let miktex remove the packages. Perhaps it has rearranged something. – Ulrike Fischer Oct 31 '17 at 16:23
  • Simply update your MikTeX – user2478 Oct 31 '17 at 21:36

I did what you suggest .. and even more.

I install a new fresh ditribution of MiKTeK (a basic one), I made a compile to get the packages I need, I got errors (different from the first time, no more error with Ghostcript for instance) and then I did all the updates suggested. A first update for Asymptote if I remember well, and maybe two or three more already selected (it was not possible at first to select the other packages). And then a second update for all the packages.

.. then it works

Fine .. but I still can't understand why before it was working when I type myself the commands and not when it is was done with the auxiliary compilation of auto-pst-pdf (which is supposed to do exactely the same).

Anyway thanks a lot

  • 1
    There was a bug in the pstricks.pro file. You had the old version of that file – user2478 Oct 31 '17 at 21:34
  • Here is my old version of the dvips prolog files in the \Texmf\dvips\pstricks folder. Tell me if there is any problem to get the files. And if you have a precise explanation, I m interrested to know what's the bug in detail – Idefix Oct 31 '17 at 23:06
  • what do you want to know? The old version is 1.26 (your version) and the new one is 1.27. It is simple to see the difference with \pst@angleunit – user2478 Nov 1 '17 at 14:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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