On 12/4/2012 4:18 PM, Khaled Hosny wrote:
The main issue here is that \not in was largely a hack in CM fonts, the glyph was specially crafted so that it overlays the next symbol by having zero width and -ve right side bearing and it was centered over equal and similar symbols, anything with different width would not look good.
ok, so officially it has zero width
This can't be relied on with OpenType fonts mainly because we don't control all the fonts and since U+0338 is a combining mark it tends to have -ve left side bearing (the opposite of CM).
ah, ok
Previously I thought it should be handled as special math accent that don't get shifted above, but this didn't work because accent noads do not inherit the spacing of their nuclei, and changing this is not simple AFAICT. When I checked Word it had no notion of negations either, you can only use pre-composed negated symbols (but accents respect the spacing of its accentee, BTW).
The solution currently used by unicode-math package is to look ahead and see if the next symbol after \not has a precomposed negated form and use it (such a list can be obtained by checking Unicode characters that decompose to something + U+0338), else just output U+0338. This probably can be even enhanced by inserting a kern between \not and the next symbol that would center their bounding boxes together, to handle cases why no precomposed symbol exists. My be we need a new primitive \Unegation that would do this in the engine?
we already have some mechanisms that deal with such issues so some kind of support is doable (if really needed) concerning the bug reports ... % \setupbodyfont[dejavu] % uses xits \enablemode[lmmath] \starttext % \imply : undefined % \notin : no virtual char \startformula \hbox{not = :} \not= \stopformula \startformula \hbox{notin :} \notin \stopformula \startformula \hbox{longrightarrow :} \Longrightarrow \stopformula \startformula \hbox{not in :} \not\in \stopformula \startformula \hbox{iff :} \iff \stopformula \startformula \hbox{mapsto :} \mapsto \stopformula \stoptext afaik \imply was never defined to start with; \notin needs a virtual glyph in the lm definitions; the rest seems to work ok I'll add a vf \notin and also \imply Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------