[NTG-context] Sorting registers method for "uppercase like lowercase, diacritics ignored"

Thomas A. Schmitz thomas.schmitz at uni-bonn.de
Sun Jan 20 23:02:52 CET 2019

On 20.01.19 21:59, Marcus Vinicius Mesquita wrote:
> Well, I tried all possible permutations thereof, and also the predefined
> methods, and none gives what my editor wants, which is just "uppercase like
> lowercase, diacritics ignored".
> See MWE attached.
> Please, would somebody help me achieve the desired result?

Your example doesn't contain any uppercase letters. Which makes it a bit 
difficult to test what you're looking for. I must admit that I'm not 
very familiar with register "methods," I assume that Wolfgang or Hans 
will be able to tell you how to use them. For your case, if you merely 
want to get rid of all distinctions between upper- and lowercase, 
accents, etc., you could use
Lua (slightly modified example):

\defineregister [nome]
\setupregister  [nome] [

   userdata = userdata or { }
   function userdata.indexing(s)
     t = characters.lower(characters.shaped(s))
     context.nome( { t }, s)



\mynome{árvore}árvore \mynome{Äard}Äard \mynome{água}água 
\mynome{Água}Água  \mynome{abnegação}abnegação \mynome{alegria}alegria 
\mynome{agrilhoado}agrilhoado \mynome{anjo}anjo \mynome{ódio}ódio 
\mynome{orgulho}orgulho \mynome{Åz}Åz \mynome{Åaaa}Åaaa \mynome{Özz}Özz 


\placeregister [nome]


More information about the ntg-context mailing list