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

中文与“在分组中使用等宽字体的西文”之间的间距过大 #165

Open sikouhjw opened 3 years ago

sikouhjw commented 3 years ago

检查

编译环境

描述问题

中文与“在分组中使用等宽字体的西文”之间的间距过大,使用 ~ 可以解决,但是为什么会这样?

最小工作示例(MWE)

\documentclass{ctexart}
\begin{document}
使用{\ttfamily amsthm} 宏包

使用 {\ttfamily amsthm} 宏包

使用 \texttt{amsthm} 宏包

使用~{\ttfamily amsthm} 宏包

使用 {amsthm} 宏包

使用~{amsthm} 宏包
\end{document}

(用 XeLaTeX 编译后)输出

tanukihee commented 3 years ago

可能与这条,以及 #31 类似

另见 https://github.com/CTeX-org/ctex-kit/issues/252

可能的解释: https://github.com/CTeX-org/ctex-kit/issues/476#issuecomment-571590858

https://github.com/CTeX-org/ctex-kit/issues/476#issuecomment-573320180

中西间距会受后方西文字号影响,应该也会受后方西文字体的影响。第一行与第二行,用与 a 间的间距,应该是一个等宽空格的宽度。