Skip to content

Add Arabic abjad numerals#170

Open
seloumi wants to merge 4 commits into
typst:mainfrom
seloumi:main
Open

Add Arabic abjad numerals#170
seloumi wants to merge 4 commits into
typst:mainfrom
seloumi:main

Conversation

@seloumi
Copy link
Copy Markdown

@seloumi seloumi commented May 28, 2026

Arabic abjad numeral for alphabetic numbering #168.

Add Arabic abjad numerals
Copy link
Copy Markdown
Collaborator

@MDLC01 MDLC01 left a comment

Choose a reason for hiding this comment

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

How to fix the issues raised by CI. You can click on the "Commit suggestion" button on each of them.

Comment thread src/numeral_systems.rs Outdated
Comment thread src/numeral_systems.rs Outdated
Comment thread src/numeral_systems.rs Outdated
Comment thread src/numeral_systems.rs Outdated
Co-authored-by: Malo <57839069+MDLC01@users.noreply.github.com>
Comment thread src/numeral_systems.rs Outdated
remove trailing space.

Co-authored-by: Malo <57839069+MDLC01@users.noreply.github.com>
@MDLC01 MDLC01 linked an issue May 29, 2026 that may be closed by this pull request
@MDLC01
Copy link
Copy Markdown
Collaborator

MDLC01 commented May 29, 2026

Thanks for addressing the CI issues.

Regarding the actual content, I am not fully confident I understand how abjad numerals work. According to the Wiktionary page you linked,1 this wouldn't be a positional system nor a bijective system, but an additive system, similar to Roman numerals, where each symbol has a value, and concatenated symbols signify addition of their respective values.

This boils down to the following question: if you had eleven headings using this numbering, how would you expect them to be numbered?

Option A (currently implemented in this PR) Option B (what I understand from the Wiktionary page)
  • أ
  • ب
  • ج
  • د
  • ه
  • و
  • ز
  • ح
  • ط
  • ي
  • ك
  • أ
  • ب
  • ج
  • د
  • ه
  • و
  • ز
  • ح
  • ط
  • ي
  • يأ

Finally, I have a question regarding the way the fifth number should be displayed. Should it be "ه" or "ه‍"?

Footnotes

  1. https://en.wiktionary.org/wiki/Appendix:Abjad_numerals

@seloumi
Copy link
Copy Markdown
Author

seloumi commented May 29, 2026

Arabic alphabetic abjad numbering is like Latin alphabetic numbering: a,b,c,........
The correct result of numbering should be like option A (like what we did in this PR).
For the fifth letter it should be like this "ه‍".

@seloumi
Copy link
Copy Markdown
Author

seloumi commented May 29, 2026

Why do these errors reappear every time? I only changed the fifth character, and the errors popped up again!

@MDLC01
Copy link
Copy Markdown
Collaborator

MDLC01 commented May 29, 2026

Then do you know what the Wiktionary page is referring to and whether it would make sense to implement that as well (in a separate PR)?

Regarding the fifth letter, this will require some change to the infrastructure. I opened a separate PR for that: #171.

Why do these errors reappear every time? I only changed the fifth character, and the errors popped up again!

In this case, this is due to the aforementioned infrastructure limitation. But more generally, even the slightest change to a numeral system will cause its magic number to change, so the corresponding test will fail. The goal is that we check that everything works as intended once, and then write the magic number. If something breaks in the future, we will notice it because the magic number will change.

@seloumi
Copy link
Copy Markdown
Author

seloumi commented May 29, 2026

What matters to us is the alphabet numbering, the content of the link describes an old method for converting letters and words into numbers ("حساب الجمل").
504673967_4108350892728132_8269484078919387011_n

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