View on GitHub


The multilingual framework for localizing LaTeX, LuaLaTeX, XeLaTeX

Localizing counters

Some random thoughts.

Localizing counters is far from trivial because their format can be set only with a set of macros clearly having English and a few other languages in mind.

Some dangerous hacks have been applied previously, such as mapping \roman to another counter or converting \chaptername, which should be a string, in a sort of function with several arguments.

Mapping the standard counters makes sense in some cases. For example, \alph can be replaced by a counter with a different alphabet, including not only a different script (eg, Devanagari), but also variations in a script (a letter added in Spanish, some of them removed in legal documents in Italian). \arabic may be replaced by another set of decimal digits. More doubtful is to replace \roman by another counter, even if it’s also an additive numeral system, but in many cultures Roman numeral are not used and therefore some replacement can be necessary.

So, I’m investigating several approaches, trying to take into account the fact many classes take some stylistics decisions.

Some ideas:

Or perhaps treating differently chapters, footnotes, lists, and on so on.