On Mon, Dec 03, 2012 at 09:07:43PM +0100, Hans Hagen wrote:
On 11/30/2012 10:26 AM, Jeong Dal wrote:
Hi,
After updating ConTeXt, math command '\not\in' is not shown properly.
For example,
$a \not\eq b$ is good.
but $a \not\in A$ shows two symbols separately.
I am using Mac OS X 10.8 and the versions of LuaTex and ConTeXt are
This is LuaTeX, Version beta-0.70.2-2012052309 (TeX Live 2012) ConTeXt ver: 2012.11.23 17:35 MKIV fmt: 2012.11.26 int: english/english
I assume that you use lm ... before I start looking into it I'd like to know Khaleds point of view on this.
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. 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). 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? Regards, Khaled