# ps2pdf produces /undefined in Blue when setting gridlabelcolor to dvipsnames' Blue

latex-dvips-ps2pdf compilation sequence produces a weird result when I change the grid style. The problem does not happen when I compile the same code with xelatex.

\documentclass[dvipsnames,pstricks,border=12pt]{standalone}

\newpsstyle{gridstyle}
{
gridcolor=Red!20,
gridlabelcolor=Blue,
subgridcolor=Green!20
}

\begin{document}
\begin{pspicture}[showgrid=true](-2,-2)(2,2)
\end{pspicture}
\end{document}


With latex-dvips-ps2pdf:

With xelatex:

## The latest edit

It seems to me this problem has been fixed by a package or class author silently. I have just tried and the problem disappeared!

-
I get a Ghostscript error if I do simpdftex latex test (which is a wrapper for latex+dvips+ps2pdf). The PDF is produced, but the error is /undefined in Blue. –  egreg Dec 21 '11 at 0:09
with current TL2012 everything is fine with xelatex and ps2pdf –  Herbert Sep 29 '12 at 9:42
@Herbert: Yes. I just tried it. Thanks. –  Oh my ghost Sep 29 '12 at 9:45
the grid is done on PS side. If you want it like LaTeXs math mode then suppress the labels on PS side and use \psaxes –  Herbert Sep 29 '12 at 9:49
historical reason –  Herbert Sep 29 '12 at 9:56

in some special cases the color definition table is missing in the pdf output. In such cases a

\documentclass[dvipsnames,pstricks,border=12pt,
prologue%%    option for package xcolor
]{standalone}


should help. Then the package xcolor wrote the color table into the PS and then PDF file. Such a special case maybe the use of the documentclass standalone which creates a single image which then is included in a document which knows nothing about the color Blue. By the way: Using the prologue option in any case doesn't hurt.

-

(Not really an answer, but too long for a comment)

Running simpdftex latex test, where simpdftex is a wrapper for latex+dvips+ps2pdf, I get a Ghostscript error in the ps2pdf phase:

Error: /undefined in Blue
Operand stack:
-56.9055
Execution stack:
[...]


The PDF is produced and doesn't show the numbers.

However, as soon as I change Blue into blue or Blue!100, the error disappears and the numbers are correctly produced.

The same error happens if I change Red!20 into Red or into another named color without a blending specification.

It seems a bug in the dvips driver for PSTricks.

-
In my further investigation, gridlabelcolor is the source of problem. It cannot accept any colors defined in dvipsnames. –  Oh my ghost Dec 21 '11 at 3:03
PSTricks has no driver for colors ... –  Herbert Sep 29 '12 at 10:05