[XeTeX] Fontspec: how to prevent execution of \@zf at math

Bruno Voisin bvoisin at mac.com
Wed May 28 17:06:08 CEST 2008


In fontspec, is there a simple switch to prevent use of the  
legacymaths font, in other terms to prevent execution of \@zf at math?

Apparently, fontspec executes \@zf at math@maybe which tests for use of  
either of a list of font packages, and if none is used executes  
\@zf at math which tests additionally for use of euler and lucida and if  
none is used redefines a number of math "elements" (including digits)  
to be taken from a legacymaths fonts (namely CMR).

I'm willing to prevent this to happen, even though I'm not loading any  
of the font packages \@zf at math@maybe and \@zf at math test for.  
Specifically, I'm willing digits in maths to be taken from the main  
text font (Verdana here).

It seems loading the unicode-math package is a solution, but I thought  
unicode-math was considered not mature enough to be used routinely.  
And indeed, unicode-math isn't included in TeXLive and isn't installed  
when building and installing XeTeX from source.

I tried

\makeatletter
\AtBeginDocument{%
   \@zf at mathfalse}
\makeatother

which didn't work, and finally resorted to

\AtBeginDocument{%
   \DeclareMathSymbol{0}{\mathalpha}{operators}{`0}
   \DeclareMathSymbol{1}{\mathalpha}{operators}{`1}
   \DeclareMathSymbol{2}{\mathalpha}{operators}{`2}
   \DeclareMathSymbol{3}{\mathalpha}{operators}{`3}
   \DeclareMathSymbol{4}{\mathalpha}{operators}{`4}
   \DeclareMathSymbol{5}{\mathalpha}{operators}{`5}
   \DeclareMathSymbol{6}{\mathalpha}{operators}{`6}
   \DeclareMathSymbol{7}{\mathalpha}{operators}{`7}
   \DeclareMathSymbol{8}{\mathalpha}{operators}{`8}
   \DeclareMathSymbol{9}{\mathalpha}{operators}{`9}}

Is there a simpler way of achieving the same result?

Bruno Voisin



More information about the XeTeX mailing list