I have three simple files which load colour-related packages although they don't attempt to use any fancy colours. These are file col.tex
:
\documentclass{minimal}
\usepackage{color}
\begin{document}
ABC
\end{document}
file col-black.tex
:
\documentclass{minimal}
\usepackage{color}
\begin{document}
\textcolor{black}{ABC}
\end{document}
and file xcol.tex
:
\documentclass{minimal}
\usepackage{xcolor}
\begin{document}
ABC
\end{document}
I latex
and then dvips
(with dvips(k) 5.994) each of them, and I look at the postscripts. I was expecting to get "ABC" in black in all cases, as if I had not loaded any colour package at all. However, when visualizing the files with evince
, this is not the case for file col.ps
, I get the "ABC" in a very dark grey, but clearly not black. If I ps2pdf
the postscripts the differences are even more clear using a large magnification in acroread
.
If I diff the three postscript files, apart from three mentions in each of them to the dvi file names, a couple of lines show differences: in col.ps
:
%%Page: 1 1
TeXDict begin 1 0 bop Black Black 166 83 a Fa(ABC)p Black
Black eop end
%%Trailer
in col-black.ps
:
%%Page: 1 1
TeXDict begin 1 0 bop Black Black 0 TeXcolorgray 166
83 a Fa(ABC)p Black Black Black eop end
%%Trailer
and in xcol.ps
:
%%Page: 1 1
TeXDict begin 1 0 bop 0 TeXcolorgray Black 0 TeXcolorgray
166 83 a Fa(ABC)p 0 TeXcolorgray 0 TeXcolorgray eop end
%%Trailer
Am I doing anything wrong? Is this the expected behaviour of the color
package? If it is, is there any way to set the default color in the header?
The problem seems to be with the definition of Black
. In all files it is defined as
/Black{0 0 0 1 setcmykcolor}
If I change the definition in col.ps
to
/Black{0 setgray}
I get the proper black I expected.
color
package: TeX itself doesn't do colour, I believe. Trytexdoc grfguide
to learn about thecolor
package options;texdoc xcolor
for thexcolor
package.color
andxcolor
) I don't specify any driver, and this loads thedvips
one, which is the default in TeXLive.0 TeXcolorgray
is another form of0 setgray
which meansblack
.col.ps
. The files that useTeXcolorgray
seem to deliver proper black.0 0 0 1 setcmykcolor
means black.