[NTG-context] Sorting items in Lua

Jairo A. del Rio jairoadelrio6 at gmail.com
Sun Apr 18 16:21:15 CEST 2021

Hi, list. I want to know how to use ConTeXt sorters, as those used in
registers, in Lua. Like this:




local list = {"ñandú", "perrera", "zócalo", "árnica"}

--What's "sortingfunction"?

context(table.concat(sortingfunction(list)," "))



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.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20210418/ee669387/attachment.htm>

More information about the ntg-context mailing list