ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* (again) index sorting of accented characters
@ 2017-04-27 17:21 Pablo Rodriguez
  2017-04-27 18:51 ` Thomas A. Schmitz
  2017-04-28 16:27 ` Florian Grammel
  0 siblings, 2 replies; 11+ messages in thread
From: Pablo Rodriguez @ 2017-04-27 17:21 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Dear list,

sorry for bothering again with this issue, but I need to have indices in
my documents.

I have the following sample:

    \mainlanguage[es]
    \setupregister[method=default]
    \starttext
    \startTEXpage[offset=1em]
    \index{ámame}\index{arisco}\index{ándrago}
    \index{antonia}\index{antón}
    \placeindex
    \stopTEXpage
    \stoptext

Word sorting is the following:

    antonia
    antón
    arisco
    ámame
    ándrago

Right word order is:

    ámame
    ándrago
    antón
    antonia
    arisco

In Spanish, as in other languages, an accented letter has no different
sorting that its unaccented counterpart.

I got the right word order adding these replacements in sort-lan.lua:

    replacements = {
        { "á", "a" }, { "é", "i"}, { "í", "i" }, { "ó", "o"},
        { "ú", "u" }, { "ü", "u" },
    },

Could anyone explain me whether this is the right way of doing it?

I mean, if this is the way, I have other two patches for other two
languages in which I have indices.

And if I’m wrong, I would like to know how to get right word sorting in
registers.

Many thanks for your help,

Pablo
-- 
http://www.ousia.tk
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2017-05-01 19:08 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-27 17:21 (again) index sorting of accented characters Pablo Rodriguez
2017-04-27 18:51 ` Thomas A. Schmitz
2017-04-27 20:26   ` Pablo Rodriguez
2017-04-27 21:08     ` Thomas A. Schmitz
2017-04-29 11:10       ` Pablo Rodriguez
2017-04-29 11:42         ` Schmitz Thomas A.
2017-04-29 14:51           ` Pablo Rodriguez
2017-04-29 15:36             ` Schmitz Thomas A.
2017-05-01 19:08               ` Pablo Rodriguez
2017-04-28 16:27 ` Florian Grammel
2017-04-29 11:58   ` Pablo Rodriguez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).