MiKTeX and proTeXtYap giving error when using color in PSTricks

Information and discussion about MikTeX distribution for Windows and the related proTeXt: Installing, updating, configuring
Post Reply
User avatar
Bozack
Posts: 117
Joined: Wed Feb 06, 2008 4:21 pm

Yap giving error when using color in PSTricks

Post by Bozack »

I have a very odd problem. For a time I used MikTeX 2.7, because I simply forgot to update it. Recently, however, I updated to the newest version (2.9, and I keep it fully updated from now on!), and after this I got into trouble with Yap.

I make a lot of graphics with PSTricks, and usually compile to DVI, viewing the output with Yap. I'll then compile LaTeX => PS => PDF when the document is finished. But after my update, whenever I use color in my PSTricks figures, Yap gives me errors like the following (sorry about the long quote, but it's hard for me to figure out what's actually important):

Code: Select all

MiKTeX Problem Report
Message: Some PostScript specials could not be rendered.
Data: Error: /undefined in Black
Operand stack:
   --nostringval--   PermitFileReading   --nostringval--   PermitFileWriting   --nostringval--
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   1914   1   3   %oparray_pop   1913   1   3   %oparray_pop   1897   1   3   %oparray_pop   1787   1   3   %oparray_pop   --nostringval--   %errorexec_pop   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--
Dictionary stack:
   --dict:1166/1684(ro)(G)--   --dict:0/20(G)--   --dict:84/200(L)--   --dict:95/300(L)--   --dict:37/200(L)--   --dict:110/200(L)--   --dict:95/300(L)--
Current allocation mode is local
MiKTeX GPL Ghostscript  9.00: Unrecoverable error, exit code 1

Source: Libraries\MiKTeX\Dvi\Ghostscript.cpp
Line: 372
MiKTeX: 2.9
OS: Microsoft Windows Vista Ultimate Edition, 64-bit Service Pack 1 (build 6001)
Invokers: explorer/TEXCNTR
SystemAdmin: no
PowerUser: no
Root0: C:\Users\Bozack\AppData\Roaming\MiKTeX\2.9
Root1: C:\Users\Bozack\AppData\Local\MiKTeX\2.9
Root2: C:\ProgramData\MiKTeX\2.9
Root3: C:\Program Files (x86)\MiKTeX 2.9
UserInstall: C:\Users\Bozack\AppData\Roaming\MiKTeX\2.9
UserConfig: C:\Users\Bozack\AppData\Roaming\MiKTeX\2.9
UserData: C:\Users\Bozack\AppData\Local\MiKTeX\2.9
CommonInstall: C:\Program Files (x86)\MiKTeX 2.9
CommonConfig: C:\ProgramData\MiKTeX\2.9
CommonData: C:\ProgramData\MiKTeX\2.9
When I simply do PSTricks figures without colors, Yap shows the file just fine.

A minimal example that gives the error for me:

Code: Select all

\documentclass{article}
\usepackage[dvipsnames]{xcolor}
\usepackage{pstricks}

\begin{document}

\psset{unit=5mm}
\begin{pspicture}(0,0)(5,5)
 \psframe(0,0)(5,5)
 \pscircle[linecolor=LimeGreen](2.5,2.5){5pt}    %this makes the error
 %\pscircle(2.5,2.5){5pt}                    %this works fine
\end{pspicture}

\end{document}
Does anyone know a fix for this? I am really happy about Yap, and would really hate having to use another DVI viewer :(

My system: Windows Vista x64, TeXnicCenter 1.0 Stable, MikTeX 2.9.
OS, LaTeX-system, editor: Arch Linux 64bit, TeXlive, Kile | Windows 10 Professional 64bit, MikTeX 4.9, TeXnicCenter 2.02 64bit

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

qinjingonly
Posts: 1
Joined: Wed Jun 15, 2011 5:25 pm

Re: Yap giving error when using color in PSTricks

Post by qinjingonly »

I got the same problem and fixed it as follows:
Choose "View->Render Method->Dvips" in Yap instead of "Pk".

Hopefully it will solve your problem:)
User avatar
Bozack
Posts: 117
Joined: Wed Feb 06, 2008 4:21 pm

Re: Yap giving error when using color in PSTricks

Post by Bozack »

Yay, thank you so much - it works now! :D
OS, LaTeX-system, editor: Arch Linux 64bit, TeXlive, Kile | Windows 10 Professional 64bit, MikTeX 4.9, TeXnicCenter 2.02 64bit
Scroom
Posts: 1
Joined: Mon Oct 24, 2011 9:23 pm

Re: Yap giving error when using color in PSTricks

Post by Scroom »

Eurika!!!
Thank you very much :D
Post Reply