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

波浪号“~”(U+FF5E)的前后空白 #284

Open
zepinglee opened this issue May 29, 2017 · 5 comments
Open

波浪号“~”(U+FF5E)的前后空白 #284

zepinglee opened this issue May 29, 2017 · 5 comments
Assignees

Comments

@zepinglee
Copy link
Member

zepinglee commented May 29, 2017

我根据国标使用波浪形式的连接号:

\documentclass{ctexart}
\begin{document}
123~234
\end{document}

根据 https://www.zhihu.com/question/19615526 ,这个波浪号应该用 U+FF5E ,但是我得到的结果中,波浪号前后会出现一些空白:

1

这个地方的空白是不是应该去掉?

@leo-liu
Copy link
Member

leo-liu commented Jun 3, 2017

在 xeCJK 中,~ 是全角形式的 ~ 符号,但在目前的版本中没有被当作标点,而是被作为普通汉字使用。所以产生了错误。

应该在下一版中修正。目前可以用如下代码修正该符号类型为闭标点:

\xeCJKDeclareCharClass{FullRight}{`~}
% 或 \xeCJKDeclareCharClass{FullRight}{"FF5E}

@leo-liu leo-liu added the bug label Jun 3, 2017
@zepinglee
Copy link
Member Author

感谢!

@leo-liu
Copy link
Member

leo-liu commented Jun 3, 2017

@qinglee

我简单查了一下,日文波浪号似乎用的是 U+301C,在 xeCJK 文档引用 W3C 的 jlreq 规范中,分类为 cl-03 类,也就是目前 xeCJK 中设置为 \c_xeCJK_hyphens_chars_clist 的字符类。不过该字符类在 xeCJK 中未实际使用。

而在中文排版中,一般的中文字体则只支持全角浪线 U+FF5E。

问题是,无论是 U+301C,还是 U+FF5E,这两个字符字符目前在 xeCJK 3.4.8 中都是作为普通汉字类使用的,这样符号与西文符号之间会自动添加空格,结果不对。

这两个符号目前都在 CJK 字符类,间距不对。按 cl-03 类的需要,分入 FullRight 字符类禁则太严。当然,也不能分入使用西文字体的 NormalSpace 类。这样一来,似乎应该为禁则宽松而无需额外空白的连字符、破折号等增加一个新的字符类。此外,目前中文省略号、破折号的特殊处理的,似乎也可以在这个新字符类中单独处理。

@leo-liu
Copy link
Member

leo-liu commented Jun 11, 2017

注:中文标点可部分参考与 jlreq 规范类似的中文排版需求文档 clreq
https://github.com/w3c/clreq

@qinglee
Copy link
Member

qinglee commented Jan 14, 2018

#320 类似,目前暂时将 U+FF5E 等归入 FullRight 类。

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

No branches or pull requests

4 participants