LaTeX forum ⇒ MiKTeX and proTeXtMiktex pdflatex no longer compiles pstricks commands Topic is solved

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

Miktex pdflatex no longer compiles pstricks commands

Postby aableson » Wed Nov 11, 2015 1:50 am

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

  1. \documentclass{standalone}
  2. \usepackage[pdf]{pstricks}
  3. \usepackage{pst-all}
  4. \begin{document}
  5. \psset{unit=1cm}
  6. \begin{pspicture}(0,0)(4, 4)
  7. \psaxes{-}(0,0)(0,0)(4,4)[$x$,0][$y$,0]
  8. \end{pspicture}
  9. \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:

  1. <C:/Program Files (x86)/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmmi10.pfb>
  2. <C:/Program Files (x86)/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmr10.pfb>
  3. [1]
  4. Error: /typecheck in --div--
  5. Operand stack:
  6. 1 0 0.0 TeXcolorgray 65781.8
  7. Execution stack:
  8. %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--
  9. Dictionary stack:
  10. --dict:1169/1684(ro)(G)-- --dict:0/20(G)-- --dict:167/200(L)-- --dict:180/300(L)--
  11. Current allocation mode is local
  12. Current file position is 174298
  13. MiKTeX GPL Ghostscript 9.05: Unrecoverable error, exit code 1
  14. PDFCROP 1.38, 2012/11/02 - Copyright (c) 2002-2012 by Heiko Oberdiek.
  15.  
  16. !!! Warning: Empty Bounding Box is returned by Ghostscript!
  17. !!! Page 1: 0 0 0 0
  18. !!! Either there is a problem with the page or with Ghostscript.
  19. !!! Recovery is tried by embedding the page in its original size.
  20.  
  21. ==> 1 page written on `sample-pics.pdf'.
  22. "-------------------------------------------------"
  23. "auto-pst-pdf: End auxiliary LaTeX compilation"
  24. "-------------------------------------------------"


and then later,

  1. (C:\Users\aableson\AppData\Roaming\MiKTeX\2.9\tex\context\base\supp-pdf.mkii
  2. [Loading MPS to PDF converter (version 2006.09.02).]
  3. )
  4. ! Undefined control sequence.
  5. <recently read> \c@lor@to@ps
  6.  
  7. l.7 \psaxes{-}(0,0)(0,0)(4,4)[$x$,0][$y$,0]
  8.  
  9. ? 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:
  1. 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

Tags:

User avatar
Stefan Kottwitz
Site Admin
Posts: 8522
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:

Postby Stefan Kottwitz » Wed Nov 11, 2015 12:48 pm

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?

  1. ! Undefined control sequence.
  2. <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
Site admin

aableson
Posts: 2
Joined: Wed Nov 11, 2015 1:44 am

Postby aableson » Wed Nov 11, 2015 5:08 pm

Thanks for the quick reply Stefan. With the help from StackExchange folks as well, I have found a work-around. Replacing the original
  1. \usepackage[pdf]{pstricks}

with
  1. \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/277502/miktex-pdflatex-no-longer-compiles-pstricks-commands

User avatar
Stefan Kottwitz
Site Admin
Posts: 8522
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:

Postby Stefan Kottwitz » Wed Nov 11, 2015 5:24 pm

Hi Alan,

thanks for telling us the solution!

Stefan
Site admin


Return to “MiKTeX and proTeXt”

Who is online

Users browsing this forum: No registered users and 1 guest