[OS X TeX] using color in LaTeX

Bruno Voisin bvoisin at mac.com
Sun Apr 10 09:22:21 CEST 2005


Le 10 avr. 05, à 02:14, lichtner a écrit :

> It looks like simply
>
> \usepackage{color}
>
> works ok, but not \usepackage[usenames]{color}.

Given you seem to be using pdfTeX:

>> (/usr/local/teTeX/share/texmf.tetex/tex/latex/graphics/color.sty
>> (/usr/local/teTeX/share/texmf.tetex/tex/latex/graphics/color.cfg)
>> (/usr/local/teTeX/share/texmf.tetex/tex/latex/graphics/pdftex.def))

and to be willing to use colors from the "named" color model:

>> ! LaTeX Error: Undefined color `BrickRed'.
>> [...]
>> ! LaTeX Error: Undefined color `Blue'.

then replacing \usepackage[usenames]{color} by 
\usepackage[dvipsnames,usenames]{color} should be the way to go.

See /Library/teTeX/share/texmf.tetex/doc/latex/graphics/grfguide.ps, 
pp. 4-5, though the info there is not very clear neither very 
practical. It seems:

- The [dvipsnames] option defines the 68 colors of the "named" model, 
for example \color[named]{BrickRed}. These colors are defined 
automatically for the dvips driver, in the PostScript prolog 
/Library/teTeX/share/texmf/dvips/base/color.pro; the [dvipsnames] 
option makes them available for any other driver, such as pdfTeX.

- The [usenames] option makes the use of the [named] declaration 
implicit for every color defined in the "named" model. For example, 
\color{BrickRed} is made equivalent to \color[named]{BrickRed}, making 
the [named] declaration unnecessary.

Bruno Voisin

--------------------- Info ---------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
           & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>





More information about the macostex-archives mailing list