[NTG-context] sort order in registers (indexes)

Henning Hraban Ramm texml at fiee.net
Sun Jun 10 14:11:17 CEST 2018


Am 2018-06-10 um 13:07 schrieb Henning Hraban Ramm <texml at fiee.net>:

>> I think this may achieve what you want:
>> \setupregister[index][method={zm,zc}]
>> I hope it helps,
> 
> Thank you very much!
> 
> I overlooked that there is indeed some documentation:
> http://wiki.contextgarden.net/Command/keyword:method

But reading through that and the source I’m still confused.

Source snippet:

local validmethods      = tohash {
    "ch", -- raw character (for tracing)
    "mm", -- minus mapping
    "zm", -- zero  mapping
    "pm", -- plus  mapping
    "mc", -- lower case - 1
    "zc", -- lower case
    "pc", -- lower case + 1
    "uc", -- unicode
}

local predefinedmethods = {
    [v_default] = "zc,pc,zm,pm,uc",
    [v_before]  = "mm,mc,uc",
    [v_after]   = "pm,mc,uc",
    [v_first]   = "pc,mm,uc",
    [v_last]    = "pc,mm,uc",
}

I’d like to write a proper explanation for the wiki (and my book).

Is there anywhere documentation about the meaning/goal of the presets or algorithms?

Are these codes translatable into something like "ignore diacritics", "ignore upper/lowercase" etc.?


Greetlings, Hraban
---
https://www.fiee.net
http://wiki.contextgarden.net
https://www.dreiviertelhaus.de
GPG Key ID 1C9B22FD



More information about the ntg-context mailing list