fix(preamble): \secref/\appref 前置 \unskip 吸收前导空格
正文里命令前的源码空格(如"参见 \appref{...}")会渲染出多余空格:
xeCJK 见空格后是控制字、无法预知它展开为中文,故不吞掉该空格(实测
+3.65pt,约一个西文空格宽)。在两宏开头加 \unskip 删除紧邻的前导空格
胶;\unskip 作为控制字又吞掉定义里自身的后随空格,不引入新空格。两宏
输出恒为中文(附录…/第…),前导空格从不需要,故无条件正确。命令后的
空格本就被 xeCJK 在汉字边界吞掉,不受影响。
This commit is contained in:
+2
-2
@@ -27,8 +27,8 @@
|
|||||||
\newcommand{\Tran}{\mathsf{T}}
|
\newcommand{\Tran}{\mathsf{T}}
|
||||||
\newcommand{\Herm}{\mathsf{H}}
|
\newcommand{\Herm}{\mathsf{H}}
|
||||||
\newcommand{\diff}{\mathop{}\!\mathrm{d}}
|
\newcommand{\diff}{\mathop{}\!\mathrm{d}}
|
||||||
\newcommand{\secref}[1]{第~\ref{#1}~节}
|
\newcommand{\secref}[1]{\unskip 第~\ref{#1}~节}
|
||||||
\newcommand{\appref}[1]{附录~\ref{#1}}
|
\newcommand{\appref}[1]{\unskip 附录~\ref{#1}}
|
||||||
|
|
||||||
\usepackage{arydshln}
|
\usepackage{arydshln}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user