[NTG-context] Loop?

Hans Hagen j.hagen at xs4all.nl
Sat Feb 13 14:39:36 CET 2021


On 2/13/2021 2:23 PM, Angel M Alganza wrote:
> On Sat, Feb 13, 2021 at 12:12:47PM +0100, Wolfgang Schuster wrote:
> 
>> Using the \startsetups block to set the content for the loop/list 
>> makes it easier to strucuture (format) the text. With \recursestring 
>> you can print the value of the current loop entry.
> 
> Very nice and easy to maintain the list of names.
You have to wikify all the answers ... here's another one:

\doloopovermatch {([^\letterpercent s,]+)} {aa, bb, cc, dd} {/#1/}

or more complex matching:

\doloopovermatch {(\letterpercent w+) *(\letterpercent w*)} {aa bb cc dd} {
     [
     \doloopovermatch{(\letterpercent w)(\letterpercent w)} {#1} {(##1 ##2)}
     \doloopovermatch{(\letterpercent w)(\letterpercent w)} {#2} {(##1 ##2)}
     ]
}

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
-----------------------------------------------------------------


More information about the ntg-context mailing list