[pdftex] errors from AR caused by color package
Ben Crowell
pdftexcrowell04 at lightandmatter.com
Sun May 23 02:23:42 CEST 2004
Maarten wrote:
>Just a few quick checks: what version of pdf(la)tex do you use?
pdfTeX (Web2C 7.4.5) 3.14159-1.10b
kpathsea version 3.4.5
>Why do you load the color package with RequirePackage, use
>\usepackage instead.
Oops, I messed up -- that was because I was trying to consolide the
.tex file and .cls file into a single file.
> It is possible that your installation doesn't
> autodetect the version of TeX it is running on, in that case try
> adding \usepackage[pdftex]{color}, instead of just \usepackage{color}
That was indeed why my attempt at making a minimal example gave
a different result. Thanks!
OK, now I'm able to make a minimal example that shows exactly what's
going on. Here's an example that produces the error in Acrobat
Reader:
b.cls:
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{b}
\LoadClass{book}
\RequirePackage{titlesec,titletoc,color}
\definecolor{egrulegray}{gray}{.6}
\usepackage[pdftex]{graphicx}
b.tex:
\documentclass{b}
\begin{document}
\color{egrulegray} foo
\end{document}
Here's an almost identical example that does /not/ produce
the error in AR:
b.cls:
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{b}
\LoadClass{book}
\RequirePackage{titlesec,titletoc,color}
\usepackage[pdftex]{graphicx}
b.tex:
\documentclass{b}
\begin{document}
\definecolor{egrulegray}{gray}{.6}
\color{egrulegray} foo
\end{document}
In other words, the error goes away if I move the definecolor
line from the .cls file to the .tex file. Does this make sense
to any of the TeXnicians out there? To me it seems utterly
mysterious.
More information about the pdftex
mailing list