xelatex 的 lualatex 中的否定二進位或關係符號

xelatex 的 lualatex 中的否定二進位或關係符號

根據這個答案https://tex.stackexchange.com/a/82121/16895 \not定義(在 中unicode-math)來尋找下一個 csname 並查看是否存在以nor為前綴的 csname not

但是,當我使用以下 MWE 時

\documentclass{article}

\usepackage{fontspec}
\usepackage{unicode-math}

\begin{document}
$a\not= b$  $a\neq b$

$\not\vdash$  $\nvdash$

$\not\vDash$ $\nvDash$

$\not\equiv$ $\nequiv$
\end{document}

我明白了

在此輸入影像描述

顯然, 的組合\not\...不會產生與等效字形相同的結果。

我是否誤解了上面的答案?或者否定符號的正確方法是什麼(在大多數情況下,\not出於可移植性原因,我更願意使用它,例如,\nequiv在大多數字體中不可用,根據綜合符號指南,它在幾個包中可用,例如不在amssymb

答案1

在從版本 0.7e 到 0.7f 的過程中,unicode-math有些內容發生了變化,定義也發生了變化

\cs_set_eq:NN \not \not_newnot:N

現在已被發現的內容覆蓋unicode-math-table.tex

\UnicodeMathSymbol{"00338}{\not}{\mathaccent}{combining long solidus overlay}

我猜加載順序已經改變了。

解決方法:

\documentclass{article}

\usepackage{fontspec}
\usepackage{unicode-math}
\ExplSyntaxOn
\AtBeginDocument{\cs_set_eq:NN \not \not_newnot:N}
\ExplSyntaxOff

\begin{document}

$a\not= b$  $a\neq b$

$\not\vdash$  $\nvdash$

$\not\vDash$ $\nvDash$

$\not\equiv$ $\nequiv$
\end{document}

在此輸入影像描述

相關內容