Closed YDX-2147483647 closed 3 months ago
我认为不应引入zhlineskip
,原因如下。
zhlineskip
一引入就有作用,影响前置内容,比如《研究成果声明》篇幅明显缩短,《关于学位论文使用权的说明》前几行提前到前一页。
\AtBeginDocument{%
\linespread{\ZhLS@bodylinespread}\selectfont
% 这将 \baselinestretch 从 1.3 改成了 1.250000263919929。
}
事实上zhlineskip
的实现很简单,就是在数学环境开头设置\linespread
,完全可以自己实现。
\newcommand*\SetMathEnvironmentSinglespace[1]{%
\def\ZhLS@mathlinespread{#1}%
}
\SetMathEnvironmentSinglespace{1}
\newcommand*\RestoreMathEnvironmentLeading[1]{%
\forcsvlist\ZhLS@restoremathenvironmentleading{#1}%
}
\def\ZhLS@restoremathenvironmentleading#1{%
\AtBeginEnvironment{#1}{%
\linespread{\ZhLS@mathlinespread}\selectfont\ignorespaces
}%
}
\RestoreMathEnvironmentLeading{array}
\RestoreMathEnvironmentLeading{matrix}
\RestoreMathEnvironmentLeading{pmatrix}
\RestoreMathEnvironmentLeading{bmatrix}
但数学环境太多了,还有这种不规则的……还是想办法把副作用规避掉吧。
\patchcmd\start@gather
{\collect@body}
{\linespread{\ZhLS@mathlinespread}\selectfont\collect@body}
{}{}
似乎这样就可以:
\usepackage[bodytextleadingratio=1.56]{zhlineskip}
zhlineskip 的默认是 1.5,导致\baselinestretch
是 1.25;现在改为 1.56,\baselinestretch
恢复为 1.25 / 1.5 × 1.56 = 1.3。
以上只适用于中文模板。
目前矩阵的行距和正文一样,显得非常散。应当和西文默认的一样。
https://github.com/CTeX-org/ctex-kit/issues/549
需要新安装
xint
、poormanlog
两个宏包。Relates-to: #496
英文模板可能需进一步恢复西文间距。Relates-to: #498 不过即使设为
1
也还散,据说0.8
差不多。可能还要更新unicode-math相关文档。