sile-typesetter / sile

The SILE Typesetter — Simon’s Improved Layout Engine
https://sile-typesetter.org
MIT License
1.66k stars 98 forks source link

Folio numbering needs to follow language #1248

Open alerque opened 3 years ago

alerque commented 3 years ago

Noting in tests/amharic.sil but surely relevant to quite a few languages, the folio flame shouldn't use Arabic digits when the language used doesn't use Arabic digits.

Omikhleia commented 3 years ago

Probably footnotes also? (No idea on how e.g. Arabic, Persian etc. typesets footnotes, but I'd assume they use their own digits)

alerque commented 2 years ago

I assigned this to the next patch release because I thought it was a language setting. It turns out the language setting is following along with the typesetter. The issue is more a bit more general. The counters package is generating the content here and it isn't paying any attention to the language. The languages should probably include a setting that define the default numbering type for the language and the counters package should probably check for such a setting and/or allow per language settings.

I'm pushing this back because I don't have a use case for it and it doesn't seem urgent --- whereas a SILE release to get the dropcap stuff is urgent.

Omikhleia commented 2 years ago

The more I think to it, the less I am convinced it's an enhancements to folio or footnotes. It rather has to do with a class and its sectioning. One can have a book with a preface where page numbers are, say, in latin numbering. On can have a book with several languages (and it's not even sure which there's a "main" language - only the author knows): consider books with page facing in two different languages, or technical documentations where each section is in a different language.

ctrlcctrlv commented 2 years ago

I'm not even convinced you're right that this is a language-level setting.

Hindu–Arabic numerals are essentially universal worldwide…there is no culture which doesn't use them at all…some “modern” books, even in Persian or Urdu, the two languages I know to prefer their native numbers as often as possible, often inexplicably use Latin digits for the page numbering.

Surely this is often due to not knowing how to fix it. However, professional publishers do it too, so often it must be a choice.

Therefore…language should only influence this, not enforce it…overall the numbering should be able to be overridden. Imagine if kanji numbers were used for a modern book in Japanese for example, it'd look ridiculous.

alerque commented 2 years ago

However, professional publishers do it too

LOL, some of the biggest "professional" publishing houses in Turkey use software that can't reliably hyphenate in Turkish and hand-edit entire books for line/page breaks. And Turkish uses a Latin derived script with few special rules! I don't even want to guess what some publishing houses in smaller countries with less widely used scripts resort to doing!

alerque commented 2 years ago

overall the numbering should be able to be overridden

Of course, this^^^. But by default it should follow the locale conventions as documented in CLDR, then allow a user setting to override to whatever they want.

alerque commented 2 years ago

There is more going on here than folios, also things like chapter numbering are subject to localized numbers — but even things like our use of periods in TOC leaders is problematic!

\begin[class=book,papersize=a7]{document}
\language[main=am]
\font[family=Noto Sans Ethiopic]
\tableofcontents
\chapter{ሁሉም ስለ አማርኛ}
\end{document}

image