用 XeLaTeX 排版中文,首推使用
xeCJK
宏包。xeCJK
最早由孙文昌教授开发,历史可以追溯到 2007 年。xeCJK
功能丰富,对简体中文横排的支持比较完善。但 xeCJK
对直排的支持,或者对标点习惯不同的繁体中文、日文排版的支持都很有限。
newxeCJK
尝试重构 xeCJK
中的 inter-character token
机制,将中文/日文使用的「全形/全角」标点符号细分为
5 类,并试图同时支持简中、繁中、日文的横排与直排。
目前 newxeCJK
处于研发阶段,不自动检测 XeTeX
引擎的版本是否最新,也不考虑向后兼容 xeCJK
。希望
newxeCJK
提供的思路能在不久的将来成为 xeCJK
的一部分。
-
\setCJKmainfont
,\setCJKsansfont
,\setCJKmonofont
-
\CJKrmfamily
,\CJKsffamily
,\CJKttfamily
-
\newCJKfontfamily
,\renewCJKfontfamily
,\provideCJKfontfamily
,\setCJKfontfamily
-
\newCJKfontface
,\renewCJKfontface
,\provideCJKfontface
,\setCJKfontface
- 全角样式:
\quanjiaostyle
- 半角样式:
\banjiaostyle
- 开明样式:
\kaimingstyle
- 不作调整:
\plainstyle
- 简中横排:
\ChineseSimplifiedH
- 简中直排:
\ChineseSimplifiedV
- 繁中横排:
\ChineseTraditionalH
- 繁中直排:
\ChineseTraditionalV
- 日文横排:
\JapaneseH
- 日文直排:
\JapaneseV
-
\SetPunctWidthRatio{<floating point expression>}
-
\SetEndSentencePunctWidthRatio{<floating point expression>}
-
\SetPunctMinWidthRatio{<floating point expression>}
-
\SetMiddlePunctMinWidthRatio{<floating point expression>}
-
\SetPunctKernWidthRatio{<floating point expression>}
-
\SetPunctOffsetDim{<dimension expression>}
-
\SetCJKCondensedRatio{<fraction>}
License notice
The text samples in the demo files were adapted from:
- https://zh.wikipedia.org/zh-cn/TeX
- https://zh.wikipedia.org/zh-tw/TeX
- https://ja.wikipedia.org/wiki/TeX
- https://dict.revised.moe.edu.tw/
which were licensed under various terms (details). Modifications to some of the text were made in order to exhibit typographic adjustments when typesetting East Asian languages. The demo files themselves (in SVG format) are licensed under CC BY‑SA 4.0.
疏排、紧排 / Tracking for CJK
Positive tracking in horizontal typesetting:
Negative tracking in vertical typesetting (锦华明朝体, −18% tracking):
- 完善 Boundary 类别和其它字符类别之间插入的 tokens
- 支持独立设置标点符号字体、日语假名字体、韩语谚文字体
The demo files, which are the non-software parts of this project, are licensed under CC BY‑SA 4.0. The software parts of this project are licensed under LPPL 1.3c.
Copyright 2020-2023 Ruixi Zhang <[email protected]>
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either version 1.3c
of this license or (at your option) any later version.
The latest version of this license is in
https://www.latex-project.org/lppl.txt
and version 1.3c or later is part of all distributions of LaTeX
version 2005/12/01 or later.
This work has the LPPL maintenance status `maintained'.
The Current Maintainer of this work is Ruixi Zhang.
This work consists of the files newxeCJK.tex,
README.md (this file)