Q: Bug in pstricks/color ?

Denis Girou Denis.Girou at idris.fr
Fri May 9 12:57:10 CEST 1997


-----------------------------------------------------------------------------
This is the PSTricks mailing list, devoted to discussions about computational
graphics in (La)TeX using the PSTricks package from Timothy van Zandt.
For help using this mailing list, see instructions at the end of message.
-----------------------------------------------------------------------------

The following message is a courtesy copy of an article
that has been posted to comp.text.tex as well.

>>>>> "Wolfgang.May" == Wolfgang May <may at informatik.uni-freiburg.de> writes:

    Wolfgang.May> Hi,
    Wolfgang.May> In the following document, in the second item, the keyword "If"
    Wolfgang.May> gets not colored green:

    Wolfgang.May> \documentclass{article}
    Wolfgang.May> \usepackage{pstricks,pst-node,pstcol}
    Wolfgang.May> \begin{document}
    Wolfgang.May> \begin{description}
    Wolfgang.May> \item[``{\green !}'' Conjunction:] Some transition satisfies 
    Wolfgang.May>     ${\blue  a}$ {\green and} the reached state satisfies $F$.
    Wolfgang.May> \item [``{\green ?}'' Implication:] {\green If} some transition
    Wolfgang.May>   satisfies ${\blue  a}$, {\green then} the reached state satisfies
    Wolfgang.May>   $F$.
    Wolfgang.May> \item [``{\green ?}'' Implication:] x{\green If} some transition
    Wolfgang.May>   satisfies ${\blue  a}$, {\green then} the reached state satisfies
    Wolfgang.May>   $F$.
    Wolfgang.May> \end{description}
    Wolfgang.May> \end{document}

    Wolfgang.May> Could someone please test this on an up-to-date installation ? 

  It's a known (yes, undocumented I believe...) effect: outside problems
described pages 88 and 89 of the PSTricks manual for coloring text
(D - Troubleshooting  - 3, 4, 5, 6), there are few special cases where colors
are loosed, like at the beginning of an item. Solution is the same as the one
described in Troubleshooting 3: "to precede the color command with
\leavevmode". So:

  \item [``{\green ?}'' Implication:] {\leavevmode\green If} some transition

  Nevertheless, you are strongly encourage today to use the "standard" `color'
package for coloring text:

\documentclass{article}

\usepackage{color} % Or \usepackage{pstcol} if you use PSTricks macros later

\begin{document}
\begin{description}
  \item [``\textcolor{green}{?}'' Implication:] \textcolor{green}{If} some
  transition satisfies $\textcolor{blue}{a}$, \textcolor{green}{then} the
  reached state satisfies $F$.
\end{description}
\end{document}


  P.S. In any case, you have not to load both `pstricks' and `pstcol',
as pstcol do it, adding an interface between the `color' package and
PSTricks. And you must load `pst-node' after `pstcol', because `pst-node'
load `pstricks' if this was not already done...
       So \usepackage{pstcol,pst-node} is better than
\usepackage{pstricks,pst-node,pstcol}

Denis Girou

-----------------------------------------------------------------------------
To [un]subscribe to this list, send mail to pstricks-request at mail.tug.org
Leave the subject line blank and in the body put the line
[un]subscribe <email-address>
For help, put the word "help" in the message body.
To obtain current archive, put the words "get current" in the message body.
-----------------------------------------------------------------------------



More information about the PSTricks mailing list