Typst Pointless Size——字号 zìhào
中文字号的号数制及字体度量单位。 Chinese size system (hào-system) and type-related measurements units.
#import "@preview/pointless-size:0.1.3": zh, zihao
#set text(size: zh(5)) // 五号(10.5pt)
// or
#set text(zh(5))
#show: zihao(5)
// 小号用负数或 .5 表示 Use negative numbers or .5 for small sizes
#zh(-4) #zh(4.5) // 小四(12pt)
#zh(1) #zh(1.0) // 一号(26pt)
#zh(-1) #zh(1.5) // 小一(24pt)
#zh("-0") #zh(0.5) // 小初(36pt)
#zh(0) #zh(0.0) // 初号(42pt)
// 写汉字也可以 Han characters are also acceptable
#zh("五号") #zh("五")
#zh("小五")
覆盖定义 Override
字号没有统一规定,本包默认与 CTeX、MS Word、WPS、Adobe 的中文规则一致。 Chinese size systems were not standardized. By default, this package is consistent with Chinese rules of CTeX, MS Word, WPS, Adobe.
如想覆盖定义:If you want to override:
#import "@preview/pointless-size:0.1.3": zh as _zh
#let zh = _zh.with(overrides: ((7, 5.25pt),))
#assert.eq(_zh(7), 5.5pt)
#assert.eq(zh(7), 5.25pt)
参考资料 References
基本参考链接 Basic Reference Links(中文 + English)
资料汇编:汉字号数与点数的映射关系 Reference Compilation: Mapping Between the Chinese Size System and the Point Unit(中文 only)
分章版首页 per-chapter homepage (~0.2 MB) / 合集版 all-in-one (~30 MB)