Skip to content

Add Abjad letters#169

Closed
seloumi wants to merge 3 commits into
typst:mainfrom
seloumi:main
Closed

Add Abjad letters#169
seloumi wants to merge 3 commits into
typst:mainfrom
seloumi:main

Conversation

@seloumi
Copy link
Copy Markdown

@seloumi seloumi commented May 27, 2026

Add Arabic abjad numbering #168

Add Arabic abjad numbering
Comment thread src/numeral_systems.rs Outdated
NamedNumeralSystem::KoreanJamo => 65477685939649764827530478995838083425, // 21
NamedNumeralSystem::KoreanSyllable => 24217153056183571894327643661698510954,
NamedNumeralSystem::EasternArabic => 277754701051910363703826860323053920831,
NamedNumeralSystem::ArabicAbjad => , // ?
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To figure out what value to put here, first try an arbitrary value like 0. It's not gonna work, but the error message in GitHub CI will tell you the right value.

Copy link
Copy Markdown
Collaborator

@MDLC01 MDLC01 May 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So the value is 332217778941065507236060222268877272547

@MDLC01 MDLC01 linked an issue May 27, 2026 that may be closed by this pull request
@MDLC01 MDLC01 changed the title Update numeral_systems.rs Add Abjad numerals May 27, 2026
@MDLC01 MDLC01 changed the title Add Abjad numerals Add Abjad letters May 27, 2026
seloumi added 2 commits May 27, 2026 21:17
Add Arabic abjad numbering.
Add Arabic abjad numbering
Comment thread src/numeral_systems.rs
Comment on lines +852 to +855
Self::ArabicAbjad => NumeralSystem::Positional(&[
'أ', 'ب', 'ج', 'د', 'ه', 'و', 'ز', 'ح', 'ط', 'ي', 'ك', 'ل', 'م', 'ن',
'س', 'ع', 'ف', 'ص', 'ق', 'ر', 'ش', 'ت', 'ث', 'خ', 'ذ', 'ض', 'ظ', 'غ',
]),
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I understand properly, this is a system where the first letter has value one, then all the way up to the last letter of the alphabet, and then you start using multiple letters? If this is the case, you should use Bijective instead of Positional. Otherwise, could you please elaborate on how this numeral system works?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Users will mostly not need all this numbering; the first ten are sufficient.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The most important reason why we want to use Bijective is that the first letter should have the value one instead of zero. For example, when using numbered headings in Typst, if using Positional, the first letter would always be skipped because the first heading has the number one.

@seloumi seloumi marked this pull request as draft May 27, 2026 21:11
@seloumi seloumi marked this pull request as ready for review May 27, 2026 21:12
@seloumi
Copy link
Copy Markdown
Author

seloumi commented May 27, 2026

I will close this and send a new request

@seloumi seloumi closed this May 27, 2026
@MDLC01
Copy link
Copy Markdown
Collaborator

MDLC01 commented May 27, 2026

Don't worry about having a bad-looking commit history on your pull requests. It's all gonna get squashed in the end anyway :)

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.

Arabic alphabetic numbering for lists and headings.

2 participants