Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Get numeral systems from Codex#7936

Draft
MDLC01 wants to merge 2 commits intotypst:mainfrom
MDLC01:numeral-systems
Draft

Get numeral systems from Codex#7936
MDLC01 wants to merge 2 commits intotypst:mainfrom
MDLC01:numeral-systems

Conversation

@MDLC01
Copy link
Collaborator

@MDLC01 MDLC01 commented Mar 2, 2026

As was previously discussed, this proposes to move numbering kinds to Codex. Numbering patterns stay in Typst, but numbering kinds and their "chars" are moved to Codex as numeral systems with shorthands.

This is still a draft as the corresponding Codex PR (typst/codex#145) should be merged first. Additionally, I made the decision to now raise an error when a numeral system cannot represent a number (e.g., zero) instead of arbitrarily falling back to Western Arabic numerals or a hyphen. Currently, the error is reported with a detached span, which is highly suboptimal.

For now, I do not make use of the names assigned to the various numeral systems in Codex and instead only use the shorthands. This means there should not be any observable behavior other than some numbers no longer being representable (hence the updated tests).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant