Skip to content

Move numbering kinds to Codex (take 2)#145

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

Move numbering kinds to Codex (take 2)#145
MDLC01 wants to merge 2 commits intotypst:mainfrom
MDLC01:numeral-systems

Conversation

@MDLC01
Copy link
Collaborator

@MDLC01 MDLC01 commented Feb 18, 2026

This is a rewrite of #116.

In order to move forward with this, I suggest we only focus on the architecture for now; we can discuss the names and shorthands and add missing numeral systems in a later PR. I also think we should wait to decide precisely which numeral systems to include before adding more extensive tests. That way, we can simply test the individual numeral systems, which is what we care about. I added all the numeral systems from Typst with no modification other than removing the zero case when it felt appropriate. Adding new numeral systems can be left for future PR.

I would like some resource to link for Hiragana, Katakana, Korean, and Bengali letters (specifically their order).

The algorithms are the same as the ones we ended up with in #116. The main change is that I wanted to have a way to represent the fact that some numeral systems are simply unable to represent some values. In this case, we now return an error instead of falling back to Arabic numerals. Then, the client (i.e., Typst) can decide what to do (raise an error, or fallback to Arabic numerals).

Given that this plans to move some things out of typst/typst, I'll cc. @laurmaedje.

@MDLC01 MDLC01 added meta Discussion about the structure of this repo waiting on reviews Breaking and non-breaking changes need respectively 3 and 2 reviews labels Feb 18, 2026
@MDLC01 MDLC01 force-pushed the numeral-systems branch 2 times, most recently from 1c8cffd to f66adcd Compare February 25, 2026 11:25
@MDLC01 MDLC01 force-pushed the numeral-systems branch 2 times, most recently from 421c625 to a09e50c Compare March 1, 2026 19:03
@MDLC01 MDLC01 force-pushed the numeral-systems branch from a09e50c to e8d75d1 Compare March 1, 2026 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

meta Discussion about the structure of this repo waiting on reviews Breaking and non-breaking changes need respectively 3 and 2 reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant