[NTG-context] two buglets

Hans Hagen pragma at wxs.nl
Thu Feb 11 20:29:54 CET 2010


On 11-2-2010 18:35, Thomas A. Schmitz wrote:
>
> On Feb 11, 2010, at 6:17 PM, Hans Hagen wrote:
>
>> are you sure that that's the convention for english? it's easy to change it ...
>>
>> \startluacode
>> sorters.mappings['en'] = {
>>     ["a"] =  2, ["b"] =  4, ["c"] =  6, ["d"] =  8, ["e"] = 10,
>>     ["f"] = 12, ["g"] = 14, ["h"] = 16, ["i"] = 18, ["j"] = 20,
>>     ["k"] = 22, ["l"] = 24, ["m"] = 26, ["n"] = 28, ["o"] = 30,
>>     ["p"] = 32, ["q"] = 34, ["r"] = 36, ["s"] = 38, ["t"] = 40,
>>     ["u"] = 42, ["v"] = 44, ["w"] = 46, ["x"] = 48, ["y"] = 50,
>>     ["z"] = 52,
>>     ["A"] =  1, ["B"] =  3, ["C"] =  5, ["D"] =  7, ["E"] =  9,
>>     ["F"] = 11, ["G"] = 13, ["H"] = 15, ["I"] = 17, ["J"] = 19,
>>     ["K"] = 21, ["L"] = 23, ["M"] = 25, ["N"] = 27, ["O"] = 29,
>>     ["P"] = 31, ["Q"] = 33, ["R"] = 35, ["S"] = 37, ["T"] = 39,
>>     ["U"] = 41, ["V"] = 43, ["W"] = 45, ["X"] = 47, ["Y"] = 49,
>>     ["Z"] = 51,
>> }
>> \stopluacode
>>
>> \starttext
>>     \index{Aardvark}Aardvark \par
>>     \index{azygous}azygous
>>     \placeregister[index][n=1]
>> \stoptext
>
> No, I'm not sure at all. All I can say is that a quick check in my scholarly books didn't bring up a single example where uppercase and lowercase were treated differently. If I apply your code, I will have the same problem with Azygous ->  aardvark. How would I write the table so that lowercase and uppercase are not distinguished at all? I tried
>
> \startluacode
> sorters.mappings['en'] = {
>     ["a"] =  1, ["b"] =  2, ["c"] =  3, ["d"] =  4, ["e"] = 5,
>     ["f"] = 6, ["g"] = 7, ["h"] = 8, ["i"] = 9, ["j"] = 10,
>     ["k"] = 11, ["l"] = 12, ["m"] = 13, ["n"] = 14, ["o"] = 15,
>     ["p"] = 16, ["q"] = 17, ["r"] = 18, ["s"] = 19, ["t"] = 20,
>     ["u"] = 21, ["v"] = 22, ["w"] = 23, ["x"] = 24, ["y"] = 25,
>     ["z"] = 26,
> }
> \stopluacode
>
> but that didn't work.

just give them the same code, so "A"=1, "a"=1

(we could make that an option: upper first, lower first, mixed)

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------


More information about the ntg-context mailing list