ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Sorting items in Lua
@ 2021-04-18 14:21 Jairo A. del Rio
  2021-04-18 15:52 ` Hans Hagen
  0 siblings, 1 reply; 3+ messages in thread
From: Jairo A. del Rio @ 2021-04-18 14:21 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 626 bytes --]

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

[-- Attachment #1.2: Type: text/html, Size: 1361 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-04-18 15:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-18 14:21 Sorting items in Lua Jairo A. del Rio
2021-04-18 15:52 ` Hans Hagen
2021-04-18 15:57   ` Jairo A. del Rio

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).