[pdftex] Bug in `pdftex.def' (page key)?

Heiko Oberdiek oberdiek at uni-freiburg.de
Wed Feb 12 16:27:51 CET 2003


On Wed, Feb 12, 2003 at 03:03:19PM +0100, Andreas Matthias wrote:

> Rolf Niepraschk wrote:
> 
> > Andreas Matthias wrote:
> > ....
> >> 
> >> graphics (s!) loads pdftex.def, which checks if keyval.sty
> >> is loaded. If not, pdftex.def can not implement the page
> >> option, because it needs keyval. Graphicx (x!), which is
> >> loaded later does not reload pdftex.def -- therefor no page option.
> >> 
> >> If you load \usepackage{keyval} before \usepackage{graphics}
> >> then pdftex.def will implement the page option.
> >> 
> > 
> > Ok. In this special case the problem is solved. But I can't be sure that
> >  anyone loads `keyval' before `graphics' ;-(

Where is the problem, you can specify a lot of times:
  \usepackage{keyval}
  \usepackage{keyval}
  ...
LaTeX loads package keyval only the first time.

> Then reload pdftex.def:
> 
> \AtBeginDocument{%
>   \usepackage{graphicx}
>   \input{\Gin at driver}
> }

No, it is a bad idea to load packages, drivers, ... twice, eg:

  \let\@ldc at l@r\color
  \def\color{%
    \@ifundefined{if at inlabel}{}{%
      \csname if at inlabel\expandafter\endcsname
      \expandafter\leavevmode\csname fi\endcsname
    }%
    \@ldc at l@r
  }%
  \let\@lduseb at x\usebox
  \def\usebox#1{\@lduseb at x{#1}\set at color}%

Yours sincerely
  Heiko <oberdiek at uni-freiburg.de>
-- 


More information about the pdftex mailing list