[OS X TeX] the color of color

Robert Spence spence at saar.de
Tue Dec 27 17:48:45 CET 2005


On 27.12.2005, at 10:50, Piet van Oostrum wrote:

 > That's because you are not using dvips, but pdflatex, which  
doesn't know
 > these names by default. Just add also the option dvipsnames to  
make these known:
 > \usepackage[usenames,dvipsnames]{color}

Hmmm... Now _I'm_ the one who's confused!  Let me see if I can  
understand:

1) You no longer need to specify the driver options explicitly in the  
preamble because Gerben Wierda's teTeX distribution is clever enough  
to work out for itself whether you're processing with pdflatex or  
with latex plus Ghostscript.
2) These days the default is to process with pdflatex, which means  
the [pdftex] driver option for the color package somehow gets  
specified implicitly.
3) LaTeX would know the names and definitions of those 68 Postscript  
colors if
  a) you were using the [dvips] driver option and
  b) decided to use the [named] color model by explicitly specifying  
it ("declaring" it?) as an
   option to your \textcolor or \colorbox command (or whatever) when  
you typed it.
4) The purpose of the [dvipsnames] option is to make those 68 coior  
definitions available to _other drivers than dvips_ when using the  
[named] color model, the color model that has the advantage of being  
easier to achieve output-device-independence with.
5) The purpose of the [usenames] option is to make those 68 color  
definitions available _outside the [named] color model_, so that you  
can have the convenience of just typing, e.g.,
\colorbox{Orange}{the background here is Orange} rather than having  
to specify a color model.
6) If you include both options in the preamble by writing \usepackage 
[usenames,dvipsnames]{color} you should be able to
a) successfully type
    \colorbox{Orange}{the background here is Orange}
    and get the desired result even if you're processing with pdftex  
instead of tex plus Ghostscript.
b) successfully type
    \colorbox{green}{the background here is the pure "green" I'm used  
to}
c) successfully type
   \colorbox{Green}{I don't like this darker color called "Green"}
d) successfully type
   \colorbox[named]{Green}{...}
d) get an error message if you try to type
   \colorbox[named]{green}{...}

I initially found I could only reproduce this by leaving out the  
graphicx package (as, for example, in preparing the minimal file that  
I eventually remembered I needed for this verification test ;-)
That made me re-examine just what it was I was putting in my normal,  
non-minimal preambles, and how many potential package option clashes  
there were just waiting to occur!

So thanks, it was very instructive.

-- Robert Spence
Applied Linguistics
Saarbruecken
Germany
--------------------------------
"Really strange --- as soon as you do it the right way it works."

------------------------- 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 Archive: http://tug.org/pipermail/macostex-archives/




More information about the macostex-archives mailing list