[XeTeX] xelatex and geometry

Jonathan Kew jonathan_kew at sil.org
Wed Mar 26 15:33:15 CET 2008


On 26 Mar 2008, at 2:13 pm, Ulrike Fischer wrote:

> Am Wed, 26 Mar 2008 12:54:44 +0100 schrieb Peter Dyballa:
>
>
>
>> Why not simply use
>>
>> 	\usepackage{geometry}
>>
>> and in cases (La|Xe)TeX cannot know which output driver will be used,
>> start with:
>>
>> 	\documentclass[dvips|dvipdfm|...]{article}
>
> This only moves the need for a switch to the documentclass. And the
> switch gets more complicated as you now will have to differenciate
> between xetex/pdflatex/dvips if you don't want e.g. graphics or  
> hyperref
> to use the wrong drivers.
>
> I prefer to declare the driver locally only for geometry. All other
> packages that I use regularly get the right driver either  
> automatically
> or have a sensible default (dvips). geometry is the only package where
> the dvips-Option must be given.

What does it do under latex if no option is given?

>
> Also I would find it a pity if the recommanded solution
>         \usepackage[dvixxx,...]{geometry}
>         (where dvixxx is your current favourite DVI driver)
> of the faq (http://www.tex.ac.uk/cgi-bin/texfaq2html?label=papersize)
> wouldn't work for XeLaTeX too.

Does \usepackage[dvipdfm]{geometry} work with xelatex? When you run  
xelatex, you're actually using a dvipdfm-based driver, so that's the  
closest logical option if you insist on specifying one.

In most cases, you shouldn't need to specify a driver at all; in the  
default configuration, graphicx, hyperref, color, crop, geometry  
should all do the "right thing" automatically when used under xelatex.

If you want geometry to default to its dvips mode when no driver is  
specified, you can create your own local geometry.cfg file to make  
this happen. No matter what we do in the distribution, it will be  
"wrong" for someone; local configuration files allow you to adapt the  
behavior to your personal preferences.

JK



More information about the XeTeX mailing list