為什麼 unicode-math 與 amssymb 結合使用會破壞重音字距?

為什麼 unicode-math 與 amssymb 結合使用會破壞重音字距?

我正在使用以下 MWE。第一次使用unicode-math,第二次不使用:

% arara: lualatex

\documentclass{article}
\usepackage{amssymb}
%\usepackage{unicode-math}

\begin{document}
$\tilde\Box \hat\Box \bar\Box$   
\end{document}

在此輸入影像描述

在此輸入影像描述

差異從何而來?字距明顯被破壞。

amssymb.sty 2013/01/14 v3.01 AMS字體符號

unicode-math.sty 2013/05/21 v0.7e XeTeX 和 LuaTeX 的 Unicode 數學支持

編輯

Barbara Beeton 建議嘗試該軟體包latexsym而不是amssymb.這會導致更差的垂直定位,並且對 I/O 產生完全相同的效果unicode-math

% arara: lualatex

\documentclass{article}
\usepackage{latexsym}
%\usepackage{unicode-math}

\begin{document}
$\tilde\Box \hat\Box \bar\Box$   
\end{document}

在此輸入影像描述

在此輸入影像描述

答案1

您不應該amssymb與 一起使用unicode-math。該命令可以用(沒有真正明確命名的)命令(for )\Box代替。\mdlgwhtsquareU+25A1 WHITE SQUARE

% arara: lualatex

\documentclass{article}

\usepackage{unicode-math}

\renewcommand{\Box}{\mdlgwhtsquare}

\begin{document}
$\tilde{\Box} \hat{\Box} \bar{\Box}$
\end{document}

在此輸入影像描述

相關內容