On 04/28/2017 06:27 PM, Florian Grammel wrote:
Have you played with the different "methods" defined in sort-ini.lua, lines 96-103?
Many thanks for your reply, Thomas.
The right values seem to be {zm, zc}. This works fine with Spanish and French, […]
Even with {zm, zc} or any of the predefined methods I don’t really think it is working completely as expected, even though the problem might just occur in very special cases:
Hi Florian, a simpler sample would be: \mainlanguage[es] \setupregister[language=es, method={zm, zc}] \starttext \startTEXpage[offset=2em] \index{cómodo} \index{comodos} \index{cómoda} \placeindex \stopTEXpage \stoptext I know that "comodos" isn’t a word in Spanish. But it should be the last word in the sorting.
It there a way to get this result with „methods“ or would I need to modify the sort-rules?
I think that sort-lan.lua might be wrong here. I explain why. German ("de-DE") has the following code: replacements = { { "ä", 'ae' }, { "Ä", 'Ae' }, { "ö", 'oe' }, { "Ö", 'Oe' }, { "ü", 'ue' }, { "Ü", 'Ue' }, { "ß", 's' }, }, This is to get Umlaut-forms and eszet sorted as ae, Ae, oe, Oe, ue, Ue and s (which I wonder whether ß shouldn’t be replaced as ss). Austrian German ("de-AT") doesn’t contain these replacements. Umlaut-forms are given different entries. I guess if we need a similar behavior for Spanish, replacements of accented glyphs should be created, such as in: replacements = { { "á", 'a' }, { "Á", 'A' }, { "é", 'e' }, { "É", 'E' }, { "í", 'i' }, { "Í", 'I' }, { "ó", 'o' }, { "Ó", 'O' }, { "ú", 'u' }, { "Ú", 'u' }, { "ü", 'u' }, { "Ü", 'u' }, }, So you get the right word order: cómoda cómodo comodos But Hans has to confirm the issue before. Just in case it helps, Pablo -- http://www.ousia.tk