Jairo A. del Rio schrieb am 12.02.2021 um 19:50:
Hi, Ángel. Like this?
\def\mylist{Fulano,Mengano,Sutano}
\def\mycommand#1{#1\blank{\red Something here}\blank}
\starttext
\processcommacommand[\mylist]\mycommand
\stoptext
There are better ways to deal with data in ConTeXt, but it's basically
that way, I think.
You can use the commalist environment:
\starttext
\startprocesscommalist[One,Two,Three,Four]
Person Number \currentcommalistitem\par
\stopprocesscommalist
\blank
\defineexpandable\NameList{One,Two,Three,Four}
\startprocesscommacommand[\NameList]
Person Number \currentcommalistitem\par
\stopprocesscommacommand
\stoptext
Another way is to use the database module:
\usemodule[database]
\starttext
\defineseparatedlist
[namelist]
[command=\NameEntry]
\starttexdefinition unexpanded NameEntry #1
Person Number #1\par
\stoptexdefinition
\startseparatedlist[namelist]
One
Two
Three
Four
\stopseparatedlist
\stoptext
Wolfgang
___________________________________________________________________________________
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
___________________________________________________________________________________