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

ctex 文档类 + xelatex,省略号允许出现在行首 #681

Open
muzimuzhi opened this issue Nov 9, 2023 · 1 comment
Open

ctex 文档类 + xelatex,省略号允许出现在行首 #681

muzimuzhi opened this issue Nov 9, 2023 · 1 comment

Comments

@muzimuzhi
Copy link
Contributor

CTeX-org/forum#298 而来。

现状:ctex 文档类,xelatex 下省略号允许出现在行首,lualatex 下不允许。

可能的改进

  • 修改 xecjk 的默认设置
  • xecjk 不动,修改 ctex 下的默认设置

改进方式,

  • forum#298 (comment) 提到了把 U+2026 "…" 从 LongPunct 分类改为 MiddlePunct
    \xeCJKsetup{LongPunct-={…}, MiddlePunct+={…}}
  • 之后的 forum#298 (comment) 提到了可能还需要抑制相邻 "…" 之间的压缩(破折号 U+2014 "—" 同样需要),以保证 "……" 占两个字的宽度。如使用
    \xeCJKsetkern{…}{…}{0.2em}
    • 我不大确定,因为包含字距的字宽可能允许伸缩。
\documentclass[fontset=fandol]{ctexart}

\def\demo{唐代之前,荆楚民间存在一种祈求丰收的“牵钩之戏”,广为流传。
  《观拔河俗戏》诗有云:“壮徒恒贾勇,拔拒抵长河。
  欲练英雄志,须明胜负多……预期年岁稔,先此乐时和。”}

\begin{document}
\demo
\end{document}
  • xelatex
    image
  • lualatex
    image
@muzimuzhi
Copy link
Contributor Author

另见 #382

本条 issue 还想指出另外一个问题:xeCJK 处理破折号宽度的算法似乎有误,得到的“非合字”破折号总宽并非两个全角字宽。

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

No branches or pull requests

1 participant