Cyrillic numbering#5597
Conversation
|
Don't forget to add a test in typst/crates/typst-library/src/model/numbering.rs Lines 62 to 65 in 73253d4 |
This could potentially be a significant problem, especially considering the current circumstances of the world. In particular, this may be quite uncomfortable for Ukrainian users, as well as speakers of other languages using the Cyrillic alphabet. This is also related (but evidently much worse) to how all the "A"-like letters (latin A, greek Alpha, cyrillic A) look the same, despite being distinct characters. Even though this was already kind of accepted with the Greek alphabet, this particular case will require a much more careful decision. FWIW I still think that some alternative format such as Considering that the |
|
I don't think a good solution/implementation is out of reach although you raise some good points which I didn't fully consider. Perhaps giving a warning if one of the 'multi-valued' characters is used as the key for numbering without a language having been set in the document. Then for each of the 38 languages with translations in typst currently, we can provide, or point to the relevant alphabet. Do you think this is a robust enough solution or are you looking for something more? |
If we emit a warning, we still need to pick a default.
I'm on board with adding an additional more verbose format, see my comment here for the concrete design I'm envisioning: #1177 (comment) I think we should, as a first step, implement these more verbose formats for the existing numbering formats. Once that works
I'd like to take one step at a time and, for the reasons discussed above, consider the first part a blocker for adding Cyrillic, so I'll close this for the time being. Thanks still! |
|
Okay - that makes sense. I will have a go at implementing what you mentioned. Did I go about this process in the wrong way? Would it have been better if I started a new issue to discuss this before opening a PR? |
|
For smaller stuff a PR is typically a fine. For larger stuff, having some discussion on Discord or here first is better. This one wasn't really large, it just happened to be more intricate than it looks at first glance, so it's all good. |
Test cases still needed, and I feel all numbering could be tied up here in line with https://www.w3.org/TR/predefined-counter-styles/#cyrillic-styles as mentioned in #1595.
Since all the languages which use the cyrillic alphabet use the same first character (U430) for their numbering system, there needs to be some way to distinguish between the language. I'm not sure the best way to proceed with this - there was a suggestion to use the language which was set in the file; I guess this would be pretty neat.