-
Notifications
You must be signed in to change notification settings - Fork 10
EN:Punctuation
English | 中文版
luatex-cn provides a complete modern punctuation processing system with squeeze, kinsoku (line-breaking rules), vertical quote replacement, and mainland/Taiwan style support.
luatex-cn has two mutually exclusive punctuation mechanisms:
| System | Use Case | punct-mode | Description |
|---|---|---|---|
| Punctuation (this page) | Modern books |
normal (default) |
Squeeze, kinsoku, quote replacement |
| Judou | Ancient books |
judou or none
|
Convert punct to circles/dots or remove |
When punct-mode=normal, the punctuation system is active; when punct-mode=judou or none, the judou system takes over and the punctuation system is automatically disabled.
All punctuation marks are centered within the grid cell.
\punctSetup{punct-style=taiwan}
% or
\台湾标点风格Period (。) and comma (,、) marks are offset toward the upper-right corner of the grid cell, matching mainland Chinese publishing conventions.
\punctSetup{punct-style=mainland}
% or
\大陆标点风格Configure punctuation behavior via \punctSetup:
\punctSetup{
punct-style = taiwan, % Style: taiwan or mainland
punct-squeeze = true, % Squeeze: compress punct to half-grid
kinsoku = true, % Kinsoku: prevent misplaced punct
punct-hanging = false, % Hanging (in development)
}| Parameter | Description | Default | Values |
|---|---|---|---|
punct-style |
Punctuation style | taiwan |
taiwan, mainland
|
punct-squeeze |
Squeeze punctuation | true |
true, false
|
kinsoku |
Line-breaking rules | true |
true, false
|
punct-hanging |
Hanging punctuation | false |
true, false
|
When enabled, periods, commas and other marks are compressed to half the grid cell height, producing a tighter, more elegant layout.
Follows Chinese typesetting standards (CLREQ) to prevent marks from appearing in inappropriate positions:
- Line-start forbidden: Closing brackets, periods, commas, middle marks cannot appear at column start
- Line-end forbidden: Opening brackets cannot appear at column end
The system automatically replaces horizontal bracket/quote forms with Unicode Vertical Presentation Forms (e.g., 「→﹁, 」→﹂, (→︵, )→︶, 《→︽, 》→︾, —→︱, …→︙).
The ltc-cn-vbook / ltc-tw-vbook document classes enable the punctuation system by default. Choose styles via templates:
% Default template: Taiwan style
\documentclass{ltc-cn-vbook}
% Zhonghua Shuju template: Mainland style
\documentclass[中华书局]{ltc-cn-vbook}The ltc-guji class also supports the punctuation system. When punct-mode=normal, it activates automatically:
\documentclass[四库全书]{ltc-guji}
\正常标点模式 % Use modern punctuation (not judou)
\punctSetup{punct-style=mainland}You can dynamically switch between the punctuation and judou systems:
\正常标点模式 % Modern punctuation
\句读模式 % Judou mode (circles/dots)
\无标点模式 % Plain text (no punctuation)Implemented via luatex-cn-core-punct.lua in three stages:
- Flatten: Classify punctuation characters and replace with vertical forms
- Layout: Apply squeeze and kinsoku processing
- Render: Apply mainland/Taiwan style position offsets
👉 Next: Judou | Modern Vertical | Features
📜 LuaTeX-CN | Licensed under Apache License 2.0