[XeTeX] Default values of \pdfpage{width, height}
Andreas Matthias
amat at kabsi.at
Fri Aug 3 03:18:58 CEST 2007
Bruno Voisin wrote:
> 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?
At shipout.
The original TeX does not have any notion about the actual paper
size. You don't need if for typesetting a text. And the DVI file
doesn't know it either. It is the driver processing the DVI file
(dvips, dvipdfm, etc.) that must know paper size. That's why the
paper size is often set by special.
Pdftex which produces PDF directly and doesn't have a driver,
therefor introduced \pdfpage{width,height} to set the paper size.
And XeTeX seems to have adopted that.
The nice thing with \pdfpage{width,height} is, that you can change
the paper size within you document; for example to set a very large
tabular, a large picture, or if you include some pages of a PDF with
another paper size. The problem is that you must know exactly where
a page start and ends if you want to give it a different page size,
because the size of Box255 does not depend at all on the page size.
If Box255 doesn't fit on the page ... Well, it's your fault. Pdftex
and XeTeX don't care. And that's correct AFAIK, because in PDF and
PS you may set your text beyond the page.
So setting \pdfpage{width,height} at the end of the page (before shipout)
is enough, but to have any advantage of it you should know exactly
where the page starts as well to set the layout parameters accordingly.
Ciao
Andreas
More information about the XeTeX
mailing list