[NTG-context] Loop?

Angel M Alganza ama at ugr.es
Fri Feb 12 19:39:05 CET 2021


Hello:

I am trying to print a list of names always followed by the same info
(generated by a new command).  At the moment, I have all the names
followed by the command like so:

	Person Number One
	\mycommand
	Person Number Two
	\mycommand
	Person Number Three
	\mycommand
	Person Number Four
	\mycommand
	Person Number Five
	\mycommand
	.
	.
	.

I'd rather have the list of people stored somewhere (a list? an array?)
and loop through it and then inserting \mynewcommand at compilation
time.  That way, when I need to replace the list of people with a new
one, I'd just do that instead of building the above structure again and
again.

Is it possible to do that with just ConTeXt or would I need to resort to
Lua.  I guess it should be possible both ways, but I haven't figure out
how to do it.  Any pointer, please?

Thank you so much in advance.

Cheers,
Ángel


More information about the ntg-context mailing list