[XeTeX] unicod-math testing / siunitx

Will Robertson wspr81 at gmail.com
Fri May 28 08:14:34 CEST 2010


On 2010-05-28 14:42:24 +0930, Ross Moore 
<ross.moore at mq.edu.au> said:

> I don't have an old  siunitx.sty  to try to reproduce the old bug.
> With just the .log file it is impossible to tell what is going on,
> since  siunitx.sty  uses \AtBeginDocument to delay a lot of stuff,
> and it is amongst those things where the error occurs.


This gist of the problem was that siunitx was using things like

    \setbox\si at tempboxa=\hbox{%
      $\mathsf{\global\chardef\si at fam@sf=\fam}$}%

and then

  \ifnum\the\fam=\si at fam@sf

to detect when maths alphabets were available.

Since unicode-math doesn't use a different fam for each alphabet those 
tests were breaking.

(The current implementation of unicode-math very inefficiently uses 
mathcode remapping to effect the maths font switching. But at least it 
works and is flexible for now. Future plans are to merge breqn's 
"everything active" approach to improve efficiency and compatibility 
with that package.)

I haven't actually checked yet, however, whether siunitx v2 gives 
correct output while inside a unicode-math \mathsf. I'd be surprised if 
it did.

Cheers,
Will




More information about the XeTeX mailing list