[pstricks] Colored text with pstricks in plain TeX

Christoph Bersch usenet at bersch.net
Fri Oct 16 11:31:45 CEST 2009


Hi,

I want to use colored text in a document together with PSTricks. 
Coloring only works and PSTricks only works, but I could not get it to 
work together:

% PSTricks only, works
%
\input pstricks
\pspicture(3,3)
\psline[linecolor=red](1,1)(3,3)
\endpspicture
\bye

% Color only, works
%
\input color
\color{red} redtext
\textcolor{blue}{blue text}
\bye


% PSTricks and color, does not work, Postscript error!
%
\input color
\input pstricks
\color{red} redtext
\textcolor{blue}{blue text}
\pspicture(3,3)
\psline[linecolor=red](1,1)(3,3)
\endpspicture
\bye

Running TeX (from TeXLive 2008) gives:


$ tex pstrickstex.tex
This is TeX, Version 3.1415926 (Web2C 7.5.7)
(./pstrickstex.tex
(/usr/local/texlive/2008/texmf-dist/tex/plain/plgraph/color.tex
(/usr/local/texlive/2008/texmf-dist/tex/plain/plgraph/miniltx.tex)
(/usr/local/texlive/2008/texmf-dist/tex/latex/graphics/color.sty
(/usr/local/texlive/2008/texmf/tex/latex/config/color.cfg)
(/usr/local/texlive/2008/texmf-dist/tex/latex/graphics/dvips.def)))
(/usr/local/texlive/2008/texmf-dist/tex/generic/pstricks/pstricks.tex
we are running tex and have to define some LaTeX commands ...
`PSTricks' v1.27  <2009/01/25> (tvz)
(/usr/local/texlive/2008/texmf-dist/tex/generic/pstricks/pstricks.con))
[1] )
Output written on pstrickstex.dvi (1 page, 680 bytes).

However when viewing the ps file, I get a Postscript error:

Error: /stackunderflow in --setrgbcolor--
Operand stack:
    0.0   0.0

What goes wrong here?

Thank you,
Christoph


More information about the PSTricks mailing list