You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Numbering patterns "一" and "壹" don't respect text region setting #6484
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.
Numbering patterns return strings, which can't depend on the context. This issue should be solved by adding a separate numbering pattern1 instead of by making numbering contextual. Let's repurpose this issue as a request for the addition of the missing Chinese numbering patterns.
changed the title [-]Numbering patterns "一" and "壹" doesn't respect text region setting[/-][+]Numbering patterns "一" and "壹" don't respect text region setting[/+]on Sep 11, 2026
Activity
Andrew15-5 commentedon Jun 23, 2025
The link is private.
wensimehrp commentedon Jun 23, 2025
Oops sorry.
But it's basically jusy the code I have up there
MDLC01 commentedon Jun 24, 2025
Numbering patterns return strings, which can't depend on the context. This issue should be solved by adding a separate numbering pattern1 instead of by making
numberingcontextual. Let's repurpose this issue as a request for the addition of the missing Chinese numbering patterns.Footnotes
See related work: https://github.com/typst/typst/pull/6379. ↩
YDX-2147483647 commentedon Jul 3, 2025
Previously mentioned in #717 (comment) and #1000.
See also https://crates.io/crates/chinese-number and
codex::numeral_systems::NumeralSystem::Chinese.docs: add several issues
docs: add several issues
goyalyashpal commentedon Aug 5, 2025
this aligns with what i thought. that there should be capability to define custom numberings.
it seems very trivial thing and depending on typst core version update to provide a simple numbering sequence seems absurd and wasteful.
see also:
[-]Numbering patterns "一" and "壹" doesn't respect text region setting[/-][+]Numbering patterns "一" and "壹" don't respect text region setting[/+]