Sorting items in Lua
Hi, list. I want to know how to use ConTeXt sorters, as those used in registers, in Lua. Like this: \starttext \startluacode --Spanish local list = {"ñandú", "perrera", "zócalo", "árnica"} --What's "sortingfunction"? context(table.concat(sortingfunction(list)," ")) \stopluacode \stoptext Also, as registers allow to set a language for sorting, I want to know how to do the same through Lua, e.g., sorting the same list according to English and then Spanish rules. I've searched for examples in the archive, but I've only found cases working on the TeX side. Thank you in advance. Jairo
On 4/18/2021 4:21 PM, Jairo A. del Rio wrote:
Also, as registers allow to set a language for sorting, I want to know how to do the same through Lua, e.g., sorting the same list according to English and then Spanish rules. I've searched for examples in the archive, but I've only found cases working on the TeX side. Thank you in advance.
hint: the test suite 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 -----------------------------------------------------------------
Oh, yes, I've just found it. Thanks! Jairo El dom, 18 de abr. de 2021 a la(s) 10:52, Hans Hagen (j.hagen@xs4all.nl) escribió:
On 4/18/2021 4:21 PM, Jairo A. del Rio wrote:
Also, as registers allow to set a language for sorting, I want to know how to do the same through Lua, e.g., sorting the same list according to English and then Spanish rules. I've searched for examples in the archive, but I've only found cases working on the TeX side. Thank you in advance.
hint: the test suite 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 -----------------------------------------------------------------
participants (2)
-
Hans Hagen
-
Jairo A. del Rio