[XeTeX] Default values of \pdfpage{width, height} (was: XeTeX and pdfpages: no dice?)

Bruno Voisin bvoisin at mac.com
Thu Aug 2 22:16:27 CEST 2007


Le 2 août 07 à 20:58, Andreas Matthias a écrit :

> Andreas Matthias wrote:
>
>> There's still one thing that puzzles me: Why doesn't
>> \pdfpage{width,height} have sensible defaults?
>>
>> \documentclass{article}
>> %\pdfpagewidth=\paperwidth
>> %\pdfpageheight=\paperheight
>> \begin{document}
>> aaa
>> \newpage
>> \begingroup
>> \pdfpagewidth=80mm
>> \pdfpageheight=150mm
>> bbb
>> \newpage
>> \endgroup
>> ccc
>> \end{document}
>>
>>
>> I am pretty sure most (or nearly all?) users wouldn't be
>> able to tell what they get from the above example before
>> running it -- with and without the two line uncommented.
>>
>> I really hope that it's not just me for whom the result of this
>> example is highly unexpected.
>
> No opinions? Do all of you agree?

Can't say. Problem is, you need to have a certain degree of  
familiarity with the inner working of pdfTeX to expect anything from  
the above code: when are \pdfpagewidth and \pdfpageheight taken into  
account? is this when the \vbox for a finished page is shipped out?  
or when the \vbox for a new page is started? or when the first \hbox  
within this \vbox is started?

All this will influence the interaction of \pdfpagewidth,  
\pdfpageheight, \newpage, \begingroup, \endgroup and aaa, bbb and ccc  
in the above. Personally I've no idea what the above should yield  
after typesetting, before trying it.

It may or may not be related, but a few years ago Hartmut Henkel  
discussed a bit the pdfTeX initialization procedure in a message to  
the OS X TeX list, in relation to the change from pdftex.cfg to  
pdftexconfig.tex and the way \mag is applied to the true units  
specified in this file:

<http://tug.org/pipermail/macostex-archives/2004-December/012146.html>

Personally I gave up on pdfTeX after that, as I couldn't get the hang  
of how the new initialization procedure worked, and I got a bit  
heated up by the way the change had broken backwards compatibility.

Bruno Voisin


More information about the XeTeX mailing list