[XeTeX] How to mix math fonts?

Ulrik Vieth ulrik.vieth at arcor.de
Tue Jul 12 23:34:38 CEST 2011


On 07/12/2011 02:23 PM, Will Robertson wrote:
> On 06/07/2011, at 3:41 PM, Mojca Miklavec wrote:
>>
>> I could use \setmathfont for each individual character, but then it
>> takes ages to compile.
>
> Sorry for the slow reply.
>
> Do the characters need to actually be set up for math use?
> For situations like this, I just grab the glyph directly with \char.
 > Otherwise there's no easy way to do it, I think.

I think the original application was to typeset symbol tables,
such as in unimath-symbols.ltx from the unicode-math documentation,
except that we want to do it for multiple fonts under testing.

In many cases (e.g. letters, mathord, mathbin, mathrel, etc),
it might indeed be sufficient to use the raw glyph with \char,
but in some cases (e.g. combining accents), we do need math mode.

Anyway, the question remains how much time-consuming overhead is 
involved in switching back and forth between multiple math fonts
and how much of this overhead might be avoided.

There's probably no easy answer to this right now, but it may be 
worthwile to keep in mind next time when revising the code.

Regards, Ulrik.

P.S: On a slightly related matter: Sooner or later we also need
to consider how to represent \mathversion{bold} in unicode-math.
If I understand correctly, switching math versions would mean
switching math fonts (possibly with some range substitutions),
and it would be subject to the same level of overhead.


More information about the XeTeX mailing list