[pdftex] Color and graphicx

Geoff Russell geoffrey.russell at gmail.com
Wed Feb 22 22:23:34 CET 2006


Hi,

\input miniltx
\def\Gin at driver{pdftex.def}
\input graphicx.sty
\input color.sty
\resetatcatcode
\definecolor{yellow}{rgb}{1,0,0}
\textcolor{yellow}{This is stuff.}
\vfill
\bye

produces the attached log (using TeXLive 2003).

However, I have found a work around by using \pdfximage directly instead of
using graphicx.

Cheers and thanks,
Geoff.

On 2/22/06, Robin Fairbairns <Robin.Fairbairns at cl.cam.ac.uk> wrote:
> > I got the following off the pdftex archives to use color in a pdftex document.
> >
> >    \input miniltx
> >    \def\Gin at driver{pdftex.def}
> >    \input color.sty
> >    \resetatcatcode
> >    \definecolor{yellow}{rgb}{1,0,0}
> >    \textcolor{yellow}{This is stuff.}
> >    \vfill
> >    \bye
> >
> > This is fine until I add \input graphicx
>
> you should \input graphicx.sty -- graphicx.tex resets \Gin at driver to dvips.
>
> (i guess you did, but...)
>
> > to the mix. Adding it before color.sty produces "!undefined control
> > sequence ..."
> > and adding it after produces a busy loop.
>
> this is a pdftex.def effect; it attempts to do things
> \AtBeginDocument, which is a null command in miniltx (but does the
> "right thing" in latex).
>
> one of the things it does isn't idempotent, and it's obviously getting
> confused when loaded twice.  i would claim it doesn't need to do these
> things at all if it's running under miniltx (it patches up a couple of
> latex instances for use in a coloured document).
>
> this explains the busy loop you experienced.
>
> i've not investigated the "undefined command" thing.
>
> however, i don't maintain pdftex.def -- heiko?
>
>


More information about the pdftex mailing list