[OS X TeX] Is this geometry behavior correct?

Bruno Voisin bvoisin at mac.com
Thu Apr 5 17:54:40 EDT 2007

Le 5 avr. 07 à 22:01, Maarten Sneep a écrit :

> On Apr 5, 2007, at 15:11, Herbert Schulz wrote:
>> If I process the following file with pdflatex the final pdf is  
>> properly in landscape mode. If I use latex+ghostscript it is only  
>> in landscape mode if I provide the [dvips] option to the  
>> \usepackage{geometry} call.
>> \documentclass[10pt, landscape]{article}
>> \usepackage{geometry}
>> \begin{document}
>> This is in landscape!?
>> \end{document}
>> I thought the geometry package automatically determined if one was  
>> in dvi mode and picked the proper driver.
> IIRC, the geometry package doesn't use the ifpdf package to do so,  
> and as such may issue the wrong commands (i.e. think that it is in  
> pdf mode when it actually is in dvi mode.

Looking for geometry.cfg, one finds it in the XeLaTeX-specific area  
of the TeXLive tree:

Portable-de-Bruno:~ brunovoisin$ texdist --texdist=TeXLive-2007  
"kpsewhich geometry.cfg"
Portable-de-Bruno:~ brunovoisin$ texdist --texdist=gwTeX "kpsewhich  

It seems to check whether XeTeX is running, and if yes sets the  
driver to pdfTeX (given XeTeX uses the same commands \pdfpagewidth  
and \pdfpageheight as pdfTeX), namely selects the [pdftex] option  
automatically. If XeTeX's not running, nothing is set, meaning you  
need to specify the option manually, with [pdftex] apparently the  
default --- so that yes, the [dvips] option must be specified manually.

This situation is confusing indeed:

- There are packages which perform automatic driver detection within  
the package "core" itself, as with the hyperref package which  
performs driver detection within hyperref.sty. See the section  
starting with:


- There are packages which perform automatic driver detection but  
delegate this detection to a .cfg file, as with the graphics and  
color package. See:


- There are packages which do not perform driver detection, or which  
perform only detection of a specific driver, as with the geometry  
package for which geometry.cfg only checks for XeTeX.

Bruno Voisin
------------------------- Helpful Info -------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
List Reminders & Etiquette: http://www.esm.psu.edu/mac-tex/list/

More information about the MacOSX-TeX mailing list