On 5/2/2022 12:09 PM, Denis Maier via ntg-context wrote:
But, it’d still love to hear whether there is a solution on the tex side.
\processtokens {[before]} {[between]} {[after]} {[space]}
{{one}{two}{three}}
\def\whatever{a,b,c,d}
\getcommacommandsize[\whatever]
\scratchcounterone \zerocount
\scratchcountertwo \commalistsize
\processcommacommand[\whatever]
{\advance\scratchcounterone\plusone
\ifnum\scratchcounterone=\scratchcountertwo
\space and\space
\orelse\ifnum\scratchcounterone>\plusone
,\space
\fi
\commalistelement}
but ... there's also:
\startlines
\commalistsentence[aap,noot,mies]
\commalistsentence[aap,noot]
\commalistsentence[aap]
\commalistsentence[a,b,c]
\commalistsentence[a,b,c][{ \& },{ and }]
\commalistsentence[a,b,c][+,-]
\stoplines
which uses presets like
\setuplabeltext [nl] [and-1={{, }}, and-2={{ en }}] % 1, 2 en 3
\setuplabeltext [en] [and-1={{, }}, and-2={{, }}] % 1, 2, 3
\setuplabeltext [de] [and-1={{, }}, and-2={{ und }}] % 1, 2 und 3
\setuplabeltext [hr] [and-1={{, }}, and-2={{ i }}] % 1, 2 i 3
maybe wikify
-----------------------------------------------------------------
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 : [email protected] / 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
___________________________________________________________________________________