[XeTeX] Let's discuss \mathchar again

Will Robertson will at guerilla.net.au
Mon Dec 12 04:02:06 CET 2005


Hi Jonathan,

This was going to be tacked on the previous thread but I wanted it to  
stand out.

I've been thinking more about maths in XeTeX since I realised a  
prototype implementation can be tested with the Code2001 font. I feel  
that it should be a high priority for XeTeX v1.0 to provide that  
facility.

However, you've said in the past that TeX uses special TFM metrics  
for maths typesetting that aren't provided for in unicode fonts; is  
there more to this story than the extra fontdimens? Because if so, we  
are indeed unable to proceed.

As far as just extending the primitives goes, from Chapter 21 in TeX  
by Topic, it looks like the ones that need "adjusting" are:

  - \mathcode     "xx = "cfxx
  - \mathchar     "cfxx
  - \mathchardef  "cfxx
  - \delcode      "fxxfxx
  - \delimiter    "cfxxfxx
  - \radical      "fxxfxx
  - \mathaccent   "cfxx

where
  - c  = class < 8
  - f  = family < 16
  - xx = slot < 256

On the other hand, Omega has (thanks Bruno for previous detective work)
  - 3 bits for math category (same)
  - 8 bits for font family ( < 256 )
  - 16 bits for character in font ( < 65000-ish )

That still isn't enough to access the supplementary plane unicode  
maths characters, however. Having said that, I don't understand how  
XeTeX manages to typeset these character either with only ^^^^ at its  
disposal.

So, would it be easier to make new primitives such as
   \XeTeXmathchar XXXX(XXXX?) category C family FF
or just copy Omega and use
   \omathchar "cffxxxx(xxxx?)
?

Or is it all a moot point because you need voodoo in the maths font  
(that OpenType can't provide) to tell TeX what to do?

Will



More information about the XeTeX mailing list