[XeTeX] wrong paper size (geometry and truedimen)

Jonathan Kew jonathan_kew at sil.org
Sun Jun 25 13:46:45 CEST 2006

On 25 Jun 2006, at 10:47 am, Akira Kakuto wrote:

> Hi Pablo,
>> I'm afraid that this works, because xetex handles mag and paper size
>> true dimensions wrong.
>>> From the geometry documentation:
> Thanks. I think the geometry package does not
> treat the "pdftex" driver correctly.
> I think XeTeX uses \pdfpageheight and \pdfpagewidth
> as pdfTeX does. Processing the following source
> by pdflatex, \pdfpagewidth and \paperwidth are
> "incorrect" (not magnified). The same as the case of XeLaTeX:
> %
> % pdflatex
> %
> \documentclass[a4paper,12pt,twoside,openright]{book}
> \usepackage[pdftex,compat2,mag=1050,truedimen,paperheight=24.75cm,
> paperwidth=17.5cm,margin=2cm,twosideshift=10pt,headsep=7pt,
> headheight=14.5pt]{geometry}
> \begin{document}
> This is a sample text.
> \message{\the\pdfpagewidth}
> \message{\the\paperwidth}
> \end{document}

I'm still fairly confused as to exactly how all the options to  
geometry are supposed to interact, and what the "correct" results  
would be in each case. But at the pdftex/xetex level, there are only  
a few parameters to worry about; and if those are right, then  
everything else is a question of macro programming.

It basically comes down to comparing the treatment of \pdfpagewidth/ 
height, \mag, and true vs. non-true dimensions in pdftex and xetex.  
So we can try

   \pdfpagewidth = 5in
   \pdfpageheight = 5truein
   Hello world

and then try adding \magnification = 2000 at the start and comparing  
the result.

The resulting PDF sizes (width x height) that I get are:

             pdftex   xetex
no mag:     5 x 5    5 x 5

mag=2000:   10 x 5   5 x 2.5

So it's clear that xetex is handling the \magnification parameter  
wrong in relation to the page size parameters. I'll look into it; I  
think it's a trivial problem, so expect a fix in the xetex code shortly.


More information about the XeTeX mailing list