MiKTeX and proTeXtMiktex pdflatex no longer compiles pstricks commands

Information and discussion about MikTeX distribution for Windows and the related proTeXt: Installing, updating, configuring
Post Reply
aableson
Posts: 2
Joined: Wed Nov 11, 2015 1:44 am

Miktex pdflatex no longer compiles pstricks commands

Post by aableson »

I have been using MikTex 2.9's pdflatex for several years with sample code similar to:

Code: Select all

 \documentclass{standalone}
 \usepackage[pdf]{pstricks}
 \usepackage{pst-all}
 \begin{document}
 \psset{unit=1cm}
 \begin{pspicture}(0,0)(4, 4)
 \psaxes{-}(0,0)(0,0)(4,4)[$x$,0][$y$,0]       
 \end{pspicture}
 \end{document}
That would generate a stand-alone PDF file that I would then bring into a main document with \includegraphics.

After a recent update (and then clean re-install) of MikTex 2.9 though, this code no longer compiles. The compiling output is essentially identical to the original compiling that works, until these errors are triggered:

Code: Select all

<C:/Program Files (x86)/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmmi10.pfb>
<C:/Program Files (x86)/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmr10.pfb>
[1] 
Error: /typecheck in --div--
Operand stack:
   1   0   0.0   TeXcolorgray   65781.8
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   1926   1   3   %oparray_pop   1925   1   3   %oparray_pop   1909   1   3   %oparray_pop   1803   1   3   %oparray_pop   --nostringval--   %errorexec_pop   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   --nostringval--   5   --nostringval--   %repeat_continue   --nostringval--
Dictionary stack:
   --dict:1169/1684(ro)(G)--   --dict:0/20(G)--   --dict:167/200(L)--   --dict:180/300(L)--
Current allocation mode is local
Current file position is 174298
MiKTeX GPL Ghostscript 9.05: Unrecoverable error, exit code 1
PDFCROP 1.38, 2012/11/02 - Copyright (c) 2002-2012 by Heiko Oberdiek.

!!! Warning: Empty Bounding Box is returned by Ghostscript!
!!!   Page 1: 0 0 0 0
!!! Either there is a problem with the page or with Ghostscript.
!!! Recovery is tried by embedding the page in its original size.

==> 1 page written on `sample-pics.pdf'.
"-------------------------------------------------"
"auto-pst-pdf: End auxiliary LaTeX compilation"
"-------------------------------------------------"
and then later,

Code: Select all

 (C:\Users\aableson\AppData\Roaming\MiKTeX\2.9\tex\context\base\supp-pdf.mkii
 [Loading MPS to PDF converter (version 2006.09.02).]
 )
 ! Undefined control sequence.
 <recently read> \c@lor@to@ps 

 l.7 \psaxes{-}(0,0)(0,0)(4,4)[$x$,0][$y$,0]

 ? OK, entering \batchmode
Summary: For over a year, MikTeX's pdflatex compiled the above file with no problems, and generated a usable PDF. Now, with a new install of MikTeX, pdflatex no longer compiles. [File still compiles on a computer with an older installation]

Command used for both:

Code: Select all

pdflatex --enable-write18 sample.tex
Any suggestions for what has changed and how to fix this would be welcome. I would be open, under duress, to developing a new workflow with xetex or one of the other tools, but I would strongly prefer something that goes from emacs editing to a PDF in one step. Thanks,

Alan

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

Miktex pdflatex no longer compiles pstricks commands

Post by Stefan Kottwitz »

Hi Alan,

welcome to the forum!

I can confirm that the code sample works, I used TeX Live.

Can you please show the log file which contained that error?

Code: Select all

 ! Undefined control sequence.
 <recently read> \c@lor@to@ps
This error shows to me that pdfLaTeX has been used with PSTricks code, but PSTricks requires LaTeX in DVI mode or XeLaTeX. So the workaround using pdfLaTeX but with separately compiled PS pictures has not been working.

Stefan
LaTeX.org admin
aableson
Posts: 2
Joined: Wed Nov 11, 2015 1:44 am

Miktex pdflatex no longer compiles pstricks commands

Post by aableson »

Thanks for the quick reply Stefan. With the help from StackExchange folks as well, I have found a work-around. Replacing the original

Code: Select all

\usepackage[pdf]{pstricks}
with

Code: Select all

\usepackage{pstricks,auto-pst-pdf}
leads to successful compilation in the new MikTeX installation [Nov 2015].

Another poster indicated that the first [pdf]{pstricks} not working might be a bug. See:
http://tex.stackexchange.com/questions/ ... s-commands
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

Re: Miktex pdflatex no longer compiles pstricks commands

Post by Stefan Kottwitz »

Hi Alan,

thanks for telling us the solution!

Stefan
LaTeX.org admin
Post Reply