From a0356026966926bfd47e9c54bc7969890808813d Mon Sep 17 00:00:00 2001 From: Josh Gao Date: Tue, 16 Jun 2026 19:38:33 +0800 Subject: [PATCH] =?UTF-8?q?fix(preamble):=20\secref/\appref=20=E5=89=8D?= =?UTF-8?q?=E7=BD=AE=20\unskip=20=E5=90=B8=E6=94=B6=E5=89=8D=E5=AF=BC?= =?UTF-8?q?=E7=A9=BA=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 正文里命令前的源码空格(如"参见 \appref{...}")会渲染出多余空格: xeCJK 见空格后是控制字、无法预知它展开为中文,故不吞掉该空格(实测 +3.65pt,约一个西文空格宽)。在两宏开头加 \unskip 删除紧邻的前导空格 胶;\unskip 作为控制字又吞掉定义里自身的后随空格,不引入新空格。两宏 输出恒为中文(附录…/第…),前导空格从不需要,故无条件正确。命令后的 空格本就被 xeCJK 在汉字边界吞掉,不受影响。 --- doa_doppler_est.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doa_doppler_est.tex b/doa_doppler_est.tex index 69ca563..1174318 100644 --- a/doa_doppler_est.tex +++ b/doa_doppler_est.tex @@ -27,8 +27,8 @@ \newcommand{\Tran}{\mathsf{T}} \newcommand{\Herm}{\mathsf{H}} \newcommand{\diff}{\mathop{}\!\mathrm{d}} -\newcommand{\secref}[1]{第~\ref{#1}~节} -\newcommand{\appref}[1]{附录~\ref{#1}} +\newcommand{\secref}[1]{\unskip 第~\ref{#1}~节} +\newcommand{\appref}[1]{\unskip 附录~\ref{#1}} \usepackage{arydshln}