Skip to content

RuixiZhang42/newxeCJK

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

newxeCJK

用 XeLaTeX 排版中文,首推使用 xeCJK 宏包。xeCJK 最早由孙文昌教授开发,历史可以追溯到 2007 年。xeCJK 功能丰富,对简体中文横排的支持比较完善。但 xeCJK 对直排的支持,或者对标点习惯不同的繁体中文、日文排版的支持都很有限。

newxeCJK 尝试重构 xeCJK 中的 inter-character token 机制,将中文/日文使用的「全形/全角」标点符号细分为 5 类,并试图同时支持简中、繁中、日文的横排与直排。

目前 newxeCJK 处于研发阶段,不自动检测 XeTeX 引擎的版本是否最新,也不考虑向后兼容 xeCJK。希望 newxeCJK 提供的思路能在不久的将来成为 xeCJK 的一部分。

向用户公开的命令 / Public commands

字体的设置与使用

  • \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>}

效果展示 / Demo

License notice

The text samples in the demo files were adapted from:

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.

本地化 / Language localization

demo-language

疏排、紧排 / Tracking for CJK

Positive tracking in horizontal typesetting:

demo-tracking

Negative tracking in vertical typesetting (锦华明朝体, −18% tracking):

demo-tracking-2

标点符号一律半宽 / Half-width CJK punctuation marks

demo-halfwidth

等待实现的功能 / TODO

  • 完善 Boundary 类别和其它字符类别之间插入的 tokens
  • 支持独立设置标点符号字体、日语假名字体、韩语谚文字体

Copyright and License

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 <ruixizhang42@gmail.com>

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)

About

New implementation of xeCJK

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages