[XeTeX] accent circumflex with unicode-math

Philipp Stephani st_philipp at yahoo.de
Mon Nov 22 11:16:38 CET 2010


----- Ursprüngliche Mail ----

> Von: Tobias Schoel <liesdiedatei at googlemail.com>
> An: Unicode-based TeX for Mac OS X and other platforms <xetex at tug.org>
> Gesendet: Montag, den 22. November 2010, 7:18:19 Uhr
> Betreff: [XeTeX] accent circumflex with unicode-math
>
> The accents have different width.  This might be wanted in text mode, but in 
>math mode it looks rather  strange.
> 
> What's the reason for this behaviour

it is in fact inherited from original TeX: TeX always looks for horizontal 
variants ("successors") when typesetting math accents. The font tables contain 
lists of similar accents of increasing width. TeX traverses this list to find an 
accent whose width is large enough to cover the base character/expression. The 
Computer Modern fonts simply have two circumflex accents: one without successors 
in CMR that can't grow and is used for \hat, and one with successors in CMEX 
that is used for \widehat. If you use a Unicode Math font like Asana Math, there 
is only one circumflex accent character because Unicode encodes characters, not 
glyphs. That accent does have horizontal variants, so curcumflexes always grow 
regardless whether you use \hat or \widehat (the unicode-math package even 
defines \widehat and \hat to be equivalent).

> and how to change  it?

Currently there is no way to change this behavior. It must be fixed at the 
engine level, i.e. the engine has to provide accent primitives that circumvent 
the growth mechanism (similar to delimiters which use different syntax for 
growing and non-growing versions). I've proposed a patch for LuaTeX 
(https://github.com/phst/unimath-extras/blob/master/luatex-patches/fixed-accents.patch)
 which is not integrated yet (but is working fine, so if you are willing to use 
a patched development version of LuaTeX you can use it).






More information about the XeTeX mailing list