[XeTeX] XeTeX and mathematics

Will Robertson wspr81 at gmail.com
Mon Jan 15 12:40:30 CET 2007


On 15/01/2007, at 18:10 , Apostolos Syropoulos wrote:

> Indeed, I know that are ranges to store the various mathematical  
> alphabets,

Sorry then, I misinterpreted your question.

> but if I my memory serves me well, it seems that XeTeX has problem
> handling fonts that have more that FFFF symbols and these alphabets
> fall exactly in this category.

The only problem at present is that such characters cannot be made  
active (or accessing them via the ^^^^ input method; composite glyphs  
need to be used), but there's no problem with assigning them  
mathcodes. Oh, except that unless you've got v0.996 of XeTeX from the  
SVN repository, you don't have the \XeTeXmathcode primitive to do  
such at thing :)

> But apart from this, I do not think it would
> be a good idea to type something like \mathcal{A.cal}, A.cal is the  
> actual
> symbol. And that is why I was thinking about this feature meachism.
> After all, a perfectly legal ASCII LaTeX file should produce  
> "identical"
> results when compiled with XeLaTeX and LaTeX.

Ah, here you hit unexplored territory. Probably if you want to be  
able to compile identical documents in XeLaTeX and (pdf)LaTeX, it  
would be better to create a legacy TFM-based maths font.

On the other hand, if you're interested in maths typesetting using  
unicode fonts, my current (unreleased) work will be of interest to  
you. You can join a discussion group on the matter if you are  
interested in what's going on at the moment.

In short, there are three broad ways of implementing \mathcal-type  
commands. One is to use XeTeX font mappings to map the ascii  
characters to the mathematical alphabet ranges (this is equivalent to  
how LaTeX does it at the moment, with changing the \fam used to  
typeset symbols of math class 7).

The other, which I am currently using, is to adjust mathcode values  
locally when entering the \mathcal{} group. The least feasible option  
is to parse the argument and map characters to their unicode  
equivalent, but that way lies madness :)


I'm not sure if that helped clarify the matter. I suppose I'm  
recommending that if you're interested in creating a unicode maths  
font, then if it conforms to the new Microsoft standard for such  
things (cf. the Cambria Math font), I will have a package to support  
it in the not too distant future.

Alternatively, since XeTeX still works with legacy maths  
installations, it might be easier and/or more compatible to do it the  
"old fashioned way".

A third option could be to roll your own support, but it depends how  
seriously you're thinking about it. If you were looking to do such a  
thing, your input or collaboration would be most welcome.

All in all, I hope this helps,

More information about the XeTeX mailing list