* 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
* Re: Sorting items in Lua
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
0 siblings, 1 reply; 3+ messages in thread
From: Hans Hagen @ 2021-04-18 15:52 UTC (permalink / raw)
To: mailing list for ConTeXt users, Jairo A. del Rio
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
-----------------------------------------------------------------
___________________________________________________________________________________
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
* Re: Sorting items in Lua
2021-04-18 15:52 ` Hans Hagen
@ 2021-04-18 15:57 ` Jairo A. del Rio
0 siblings, 0 replies; 3+ messages in thread
From: Jairo A. del Rio @ 2021-04-18 15:57 UTC (permalink / raw)
To: Hans Hagen; +Cc: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 897 bytes --]
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
> -----------------------------------------------------------------
>
[-- Attachment #1.2: Type: text/html, Size: 1424 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).