[XeTeX] wrong paper size (geometry and truedimen)

Pablo Rodríguez oinos at web.de
Sun Jun 25 14:04:09 CEST 2006


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}

Thanks for the answer, Akira.

My knowledge of LaTeX internals is practically non-existing. Because of
that, I don't know whether you are pointing to something different than
the obvious fact that pdflatex magnifies the paper size dimensions and
xelatex doesn't.

At least for me, \message is misleading. You get the same dimensions
processing the document with pdflatex or xelatex, but pdfinfo shows
magnified dimensions with pdflatex and not magnified dimensions with
xelatex.

After some tinkering, I think I got it. It is clearer after Jonathan's
explanation. geometry gives all dimensions in the log file (and works
with them internally in the LaTeX file) with the mag operator already
calculated and xetex thinks that the mag operator has still to be
calculated.

I hope it is clear now.

Thanks for your help,


Pablo


More information about the XeTeX mailing list