rgheck wrote:
> > I just downloaded and installed LyX via the Windows installer. I've
> > used LaTeX before (not recently), but never LyX. In playing around
> > with the LyX Tutorial, I find that after changing some text to red or
> > green and then generating DVI, I get errors such as this,
> >    LaTeX Error: Undefined color `RED'
> >  with this explanation when I click on the message (yes, the
> > explanation really does refer to green, not red, notwithstanding the
> > message above):
> >    \chapter
> >                  {\textcolor{green}{Getting started with \LyX{}}}
> >    You're in trouble here.  Try typing  <return  to proceed.
> >    If that doesn't work, type  X <return  to quit.
> >  [snip]
> >  The resulting DVI has the appropriate colors on the appropriate text,
> > so I don't
> >  know what the LaTeX errors are complaining about.
>
> This is a weird problem. It's got something to do---I don't know what,
> yet---with the way LyX is handling "LyX" and "LaTeX". These get
> converted to custom macros, and they are not playing nice for some
> reason with \textcolor. I'm cc'ing this to the devel list so someone
> will take care of it, or at least explain it.

No. It's nothing to do with the LyX macro. The problem occurs when you color a 
chapter heading (which is something you shouldn't do anyway, at least not 
locally ;-)) in the specific constellation the Tutorial is using.

The problem is in the way the page headings are generated: The page headings 
are upcased, and the color definition, which goes to the heading and the TOC 
as well, is upcased in the headings, too. Thus the error message about the 
unknown color "RED". In fact, only "red" (lowcase) is defined.

The document compiles if you put in the preamble:

\definecolor{RED}{rgb}{1,0,0}

Jürgen

Reply via email to