[NTG-context] register for biblical citations

Hans Hagen j.hagen at xs4all.nl
Fri Apr 16 15:08:57 CEST 2021


On 4/16/2021 12:22 PM, jbf wrote:
> There was no mention of the indicator anywhere in what I copied from 
> your example. I did try indicator=no just now in case it should be made 
> explicit:
You use a couple of chartacters that will be filtered (crlf and so). Try 
weird ones, like:

sorters.definitions["biblical"] = {
     method  = interfaces.variables.before,
     replacements = {
         { "Gen",  "\\x01\\x01" },
         { "Ex",   "\\x01\\x02" },
         { "Lev",  "\\x01\\x03" },
         { "Deut", "\\x01\\x04" },
         { "Lam",  "\\x01\\x05" },
         { "Dan",  "\\x01\\x06" },
         { "Joel", "\\x02\\x01" },
         { "Ps",   "\\x02\\x02" },
         { "Prov", "\\x02\\x03" },
         { "Sir",  "\\x02\\x04" },
         { "Mt",   "\\x02\\x05" },
         { "Mk",   "\\x02\\x06" },
     },
}

or better, take a harmless unicode sequence

sorters.definitions["biblical"] = {
     method  = interfaces.variables.before,
     replacements = {
         { "Gen",  utf.char(0xFF01) },
         { "Ex",   utf.char(0xFF02) },
         { "Lev",  utf.char(0xFF03) },
         { "Deut", utf.char(0xFF04) },
         { "Lam",  utf.char(0xFF05) },
         { "Dan",  utf.char(0xFF06) },
         { "Joel", utf.char(0xFF07) },
         { "Ps",   utf.char(0xFF08) },
         { "Prov", utf.char(0xFF09) },
         { "Sir",  utf.char(0xFF0A) },
         { "Mt",   utf.char(0xFF0B) },
         { "Mk",   utf.char(0xFF0C) },
     },
}

Hans




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


More information about the ntg-context mailing list