Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xeCJK:英文与括号连用导致断词失败 #365

Closed
stone-zeng opened this issue May 20, 2018 · 2 comments
Closed

xeCJK:英文与括号连用导致断词失败 #365

stone-zeng opened this issue May 20, 2018 · 2 comments
Assignees
Labels

Comments

@stone-zeng
Copy link
Member

MWE:

\documentclass{article}
\usepackage{xeCJK}
\usepackage[showframe]{geometry}

\begin{document}
在某一些特殊的情况下,我们可以利用 Monte Carlo 算法生成一系列特定的自旋构型(configuration)

% 这一行括号里加了空格
在某一些特殊的情况下,我们可以利用 Monte Carlo 算法生成一系列特定的自旋构型( configuration )
\end{document}

image

请问有什么办法可以确保正确断词?

@qinglee
Copy link
Member

qinglee commented May 21, 2018

这个问题以前处理过(#118),当时以为是 FullLeft 类之后插入的 \penalty 10000 引起的,解决的办法是在 penalty 之后插入一个 \hskip 0pt,后来重构代码的时候把 \penalty 10000 去掉了。查了一下 TeXbook,现在的问题是由于 FullLeft 类之前插入的用于实现标点压缩的 \vrule 造成的。

z

@qinglee qinglee self-assigned this May 21, 2018
@qinglee qinglee added the bug label May 21, 2018
@stone-zeng
Copy link
Member Author

另外这种地方究竟用西文括号(U+0029, 0029)还是中文括号(U+FF08, FF09)我个人还是有些犹豫。其实倒是可以定义一个宏的,插不插 penalty 也能整体控制。

https://www.zhihu.com/question/20488833

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants