-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Numbering patterns "一" and "壹" doesn't respect text region setting #6484
Copy link
Copy link
Open
Labels
feature requestNew feature or requestNew feature or requesttextRelated to the text category, which is all about text handling, shaping, etc.Related to the text category, which is all about text handling, shaping, etc.
Description
Description
#set text(lang: "zh", region: "tw", font: "Noto Serif CJK TC")
#set page(width: auto, height: auto, margin: 2em)
```typst
#set text(
lang: "zh",
region: "tw",
font: "Noto Serif CJK TC"
)
#numbering("壹", 123456789123)\
#numbering("一", 123456789123)\
```
Expected:
壹仟貳佰叄拾肆億伍仟陸佰柒拾捌萬玖仟壹佰貳拾叄\
一千二百三十四億五千六百七十八萬九千一百二十三
Actual:
#numbering("壹", 123456789123)\
#numbering("一", 123456789123)\The numbering pattern only works for zh_CN and zh_SG.
zh_TW and zh_CN uses different characters for those numbering patterns. zh_CN uses "零壹贰叁肆伍陆柒捌玖拾佰仟万亿一二三四五六七八九十"(萬億), whilst zh_TW uses "零壹貳叄(參)肆伍陸柒捌玖拾佰仟萬億一二三四五六七八九十"。The numbering function should respect the regional differences.
A workaround is to run the .replace method several times.
Reproduction URL
https://typst.app/project/plLY4S1B6caZuC3sNdkNnr
Operating system
Webapp
Typst version
- I am using the latest version of Typst
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
feature requestNew feature or requestNew feature or requesttextRelated to the text category, which is all about text handling, shaping, etc.Related to the text category, which is all about text handling, shaping, etc.
