Closed mjsharpe closed 6 years ago
Just came here to report the same thing; I asked about it at https://tex.stackexchange.com/questions/324427/unicode-math-replaces-not-by-the-number-6
The “6” is due to the fact that, in the case of \not\propto
, \__um_oldnot:
is used, which is defined as the legacy \not
mathchar, so \mathchar"3236
. Since in math family 2 the unicode math font is used, character U+0036 is used (which is a 6).
@eg9 Thanks! Do you want to write a response to that question? That would be very useful :)
The "6" instead of a sensible slash is due to the fact, dass the definition of \not is not correctly saved when unicode-math-tables is processed. With e.g. this here it works again:
\ExplSyntaxOn
\cs_set:Nn \__um_input_math_symbol_table: {\g__um_mathtable_tl
\cs_set_eq:NN\__um_oldnot:\not
}
\ExplSyntaxOff
But this alone doesn't lead to a good \not. Imho the mathaccent definition is wrong, one need the overlay
key word for the correct placement.
\documentclass{article}
\usepackage{fontspec}
\usepackage{amsmath,amssymb}
\usepackage{unicode-math}
\ExplSyntaxOn
\cs_set:Nn \__um_input_math_symbol_table: {\g__um_mathtable_tl
\cs_set_eq:NN\__um_oldnot:\not
}
\ExplSyntaxOff
\begin{document}
Bad: $A \not\approxeq B $
\newcommand\napproxeq{\Umathaccent overlay fixed 7\symoperators "00338 \approxeq}
Good: $A \not\approxeq B $
\end{document}
Does XeTeX support the overly
keyword? It seems like a new LuaTeX addition.
Ups, I didn't realize that the question started with a reference to xelatex. My comments/code were meant for lualatex which knows the overlay keyword. For xelatex I don't know if there is a way to better place the solidus.
Ideally XeTeX should add support for the overlay
keyword, because AFAIK there was no clean way to place such overlay accents in math mode at the engine level.
Processing with xelatex, $\not\propto$ just prints 6 before $\propto$, rather than overlaying combining solidus.