On 2013-11-07 Wolfgang Schuster wrote:
Am 07.11.2013 um 23:11 schrieb honyk
: czech sorting has a quite complex logic. How can a default index entries sorting be overridden?
Using a macro or somewhere under the hood via a lua code?
When you have \mainlanguage[cz] in your document context should use the czech sorting mechanism, when you english as main language you can use them in the register with \placeregister[index][language=cz].
You can also influence the sorting with the method key for \placeregister: http://www.ntg.nl/pipermail/ntg- context/2010/052950.html
That main language is set correctly. While the current implementation supports a single character order, in czech at least two are required - the primary one for the first pass and the secondary for the second pass. It ensures the correct order of accented characters. Anyway, I dive into the code and found an entry point in the sort-ini.lua file. In the comparers.basic(a,b) function I call a customized code instead of basicsort(). Thanks to my code I can produce desired outputs now ;-) But all my lua code is directly in that file, which is not ideal as it is overwritten with every ConTeXt update. Is there any general recommendation how to make these customization more flexible? Thanks, Jan