CTeX-org / ctex-kit

Macro Packages and Scripts for Chinese TeX users
976 stars 124 forks source link

xeCJKfntef: 下划线中公式会引发错误 #530

Open stone-zeng opened 4 years ago

stone-zeng commented 4 years ago
\documentclass{article}
\usepackage{xeCJKfntef}
\begin{document}
\CJKunderline{张量$A$的维度}
\end{document}

报错为:

! Too many }'s.
\UL@stop ... \UL@putbox \fi \else \egroup \egroup 
                                                  \UL@putbox \fi \ifnum \UL@...
l.4 \CJKunderline{张量$A$的维度}

?

如果加上空格,即改为 \CJKunderline{张量 $A$ 的维度},则不报错,但公式前间距消失:

image

BurgessX commented 3 years ago

我也遇到了同样的问题(Texlive2021),但看了这个issue才知道能通过加空格解决。