[OS X TeX] question about the geometry package
Bruno Voisin
bvoisin at mac.com
Mon Oct 24 12:19:22 CEST 2005
Le 22 oct. 05 à 00:53, Morten Høgholm a écrit :
> I made it a little better in my suggestion to the author. When
> detecting drivers first check if the user already gave one. Only if
> no driver is specified try to detect one. Basically something like
> this:
>
> \def\Gm at checkdrivers{%
> \ifx\Gm at driver\@empty % no driver specified by user, detect
> \ifpdf
> \Gm at setdriver{pdftex}%
> \else
> \Gm at setdriver{dvips}%
> \fi
> \ifx\VTeXversion\@undefined\else
> \ifnum\OpMode=\@ne
> \Gm at setdriver{vtex}%
> \else
> \ifnum\OpMode=\tw@
> \Gm at setdriver{vtex}%
> \fi
> \fi
> \fi
> \fi % end of detection
> \ifx\Gm at driver\Gm at dvips
> \Gm at specialtrue
> \else
> \ifx\Gm at driver\Gm at dvipdfm
> \Gm at specialtrue
> \fi
> \fi}%
I haven't followed this thread closely, but considering automatic
driver selection: it might be nice to add another check for XeTeX
<http://scripts.sil.org/xetex/>, based on \XeTeXversion. For example,
the adapted color.cfg for XeTeX contains:
% Select an appropriate default driver
\begingroup
\chardef\x=0\relax
% check pdfTeX
\@ifundefined{pdfoutput}{}{%
\ifcase\pdfoutput
\else
\chardef\x=1\relax
\fi
}%
% check VTeX
\@ifundefined{OpMode}{}{%
\chardef\x=2\relax
}%
% check XeTeX
\@ifundefined{XeTeXversion}{}{%
\chardef\x=3\relax
}%
\expandafter\endgroup
In that case, for the geometry package the appropriate option would
be dvipdfm, since the latest versions of XeTeX support the dvipdfm
papersize \special.
Bruno Voisin------------------------- 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