CTeX-org / forum

A temporarily alternate forum of `bbs.ctex.org`
https://t.me/chinesetex
Apache License 2.0
211 stars 16 forks source link

使用 `siunitx` 宏包自定义 `list-final-separator` 等连接符时不能正确地处理间距 #253

Open syvshc opened 2 years ago

syvshc commented 2 years ago

检查

编译环境

描述问题

使用 siunitx 宏包自定义 list-final-separator 时不能正确地处理间距, 而在 list-pair-separatorrange-phrase 中可以.

最小工作示例(MWE)

\documentclass{ctexart}
\usepackage{siunitx}
\sisetup{
  list-final-separator = { 和 },
  list-pair-separator = { 和 },
  range-phrase = { 到 },
}
\begin{document}
\numlist{1;2;3}\\
\numrange{1}{10}\\
\qtyrange{50}{150}{\milli\electronvolt}
\end{document}

(用 XeLaTeX 编译后)输出

image

可以看到 1, 2 和 3 中的间距不正确, 而 1 到 1050meV 到 150meV 的间距正确. 并且如果将设置的空格都去掉, 即:

\documentclass{ctexart}
\usepackage{siunitx}
\sisetup{
  list-final-separator = {和},    % <-- here
  list-pair-separator = {和},     % <-- here
  range-phrase = {到},            % <-- here
}
\begin{document}
\numlist{1;2;3}\\
\numrange{1}{10}\\
\qtyrange{50}{150}{\milli\electronvolt}
\end{document}

image

那么三种情况的间距全部错误.

相关问题:

muzimuzhi commented 2 years ago

是下面 issue 尝试解决的一般性问题,的具体情况之一