[XeTeX] XeTeX 0.994 for Mac OS X

Jonathan Kew jonathan_kew at sil.org
Tue Jun 6 23:59:34 CEST 2006


On 6 Jun 2006, at 6:25 pm, Ralf Stubner wrote:

>> - pdfTeX-style \pdfpageheight and \pdfpagewidth parameters to control
>> page size
>
> This causes a problem with geometry.sty (2002/07/08 v3.2 Page  
> Geometry)
> which checks for a running pdftex via
>
>   \ifx\pdfpagewidth\@undefined\else
>     \ifnum\pdfoutput=\@ne
>       \Gm at setdriver{pdftex}%
>     \fi
>   \fi

Hmm... is that the current "standard" way to test for pdfTeX? If so,  
that could disrupt quite a few packages. (You can tell I'm not much  
of a LaTeX user!)

> No idea how to solve this best.

Well, packages can detect XeTeX by testing for \XeTeXversion. But  
they'd have to test this *before* checking for pdfTeX in that way.

An alternative would be to change the names of these primitives in  
XeTeX, making them \XeTeXpagewidth, etc., and then leave it up to  
package/driver writers to say \let\pdfpagewidth=\XeTeXpagewidth,  
etc., if they want to share some supporting code.

These were actually added largely as a side-effect of supporting  
\pdfsavepos and friends, which was at Hans's request; I don't see how  
this could be implemented reliably without giving the engine  
knowledge of the page size, because of the need to convert between  
TeX-style and PDF-style coordinate systems.

I guess I'd be reluctant to maintain separate names for identical  
extensions to the TeX language; I'd rather see pdfTeX and xetex  
tending to converge. But that does mean that code that needs to  
detect which engine is running may have to be more careful.

Of course, if the only thing a package wants to do is set the page  
size, then it is entirely appropriate to check for the availability  
of \pdfpagewidth and use it if available. It shouldn't matter whether  
the primitive is being implemented by pdfTeX or xetex, as long as it  
has the same meaning.

Comments/suggestions welcome... this isn't "set in stone" by any  
means, I'm open to ideas...

JK



More information about the XeTeX mailing list