Improve RTL language support: heading numbering order and cover page alignment - #38
Open
nakibrayane wants to merge 2 commits into
Open
Improve RTL language support: heading numbering order and cover page alignment#38nakibrayane wants to merge 2 commits into
nakibrayane wants to merge 2 commits into
Conversation
The cover page now respects the document's language direction. When `#set text(lang: ...)` is an RTL language (Arabic, Hebrew, Persian, etc.), the title block aligns to the right (`right + horizon`). For LTR languages, it remains left-aligned. This improves readability for RTL documents and complements the existing heading numbering workaround.
nakibrayane
force-pushed
the
rtl-cover-page
branch
from
June 12, 2026 17:18
0bd7364 to
3ced1a6
Compare
Owner
|
Hi, thanks for the PR. I'm a bit busy at the moment, I'll review and merge later when I have some free time. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR improves Right‑to‑Left (RTL) language support in the
ilmtemplate. It fixes two issues that affect documents using languages such as Arabic (ar), Hebrew (he), Persian (fa), and others:2.1instead of1.2).Both fixes are applied automatically based on the document’s active language (
#set text(lang: ...)). No changes to existing documents are required.Problem details
1. Heading numbering
With
#set text(lang: "ar"), a second‑level heading under chapter 1, section 2 would incorrectly render as2.1: