[XeTeX] Default values of \pdfpage{width, height}

Bruno Voisin bvoisin at mac.com
Fri Aug 3 15:16:31 CEST 2007


Le 3 août 07 à 14:23, Andreas Matthias a écrit :

> Ross Moore wrote:
>
>> But the \pdfpagewidth  and  \pdfpageheight
>> are not parameters that are meant to be changed willy-nilly
>> throughout a document.
>
> There's nothing wrong with changing them the way you like:
> willy-nilly or however.
>
> I agree that in general it is not easy to do something sensible
> with it because of TeXs asynchronous output mechanism. But
> that doesn't mean that they are "not meant to be changed".

Just in order to get a "standard" to refer to, I've been checking the  
way the papersize \special works in dvips. According to the intro of  
section 4 of dvips.pdf:

"Since the intended paper size is a document design decision, not a  
printing decision,
such information should be given in the TEX file and not on the Dvips  
command line. For
this reason, Dvips supports a ‘papersize’ special. It is hoped that  
this special will become
standard over time for TEX previewers and other printer drivers."

Alas, dvips seems to really have been designed with printing in mind,  
not PS/PDF file creation, so that the papersize \special is really  
meant to specify paper size and is not supposed to be changed  
throughout a document. Says in particular section 4.1 a bit later:

"The papersize special must occur somewhere on the first page of the  
document."

Thus it seems we're really left in the wild regarding the way the  
papersize \special should be generalized in XeTeX.

I'd tend to consider the most important thing here is backwards  
compatibility:

- For the papersize \special, compatibility with dvips.

- For \pdfpageheight and \pdfpagewidth, compatibility with pdfTeX.

Also, how well does this mix with dvipdfm's notion of pagesize, which  
IIUC should be specified in the form:

\special{pdf: pagesize width 11.0truein height 8.5truein}

Similarly, says section 4.11 of dvipdfm.pdf:

"The pagesize command specifies the document’s physical paper size.
The pagesize command must be specified on the first page and must  
precede the
first annotation or background color specification on the page. In  
other words, it
should occur as close to the beginning of the document as possible."

My 0.02 €.

Bruno Voisin


More information about the XeTeX mailing list