ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* How to \processcommalist inside another commalist?
@ 2006-08-21 15:23 Mojca Miklavec
  2006-08-21 17:17 ` nico
  0 siblings, 1 reply; 11+ messages in thread
From: Mojca Miklavec @ 2006-08-21 15:23 UTC (permalink / raw)


Hello,

I tried to print out primes (well, I tried to do something else, but I
needed a more illustrative example), but it seems that my approach was
too naive:

\def\arePrime[#1]{%
	\bgroup
	\getparameters[Prime][p=,#1]
	\def\printPrime##1{##1 is prime.\crlf}
	\processcommalist[\Primep]\printPrime
	\egroup}

\starttext
\arePrime[p={2,3,5}]
\stoptext

I expected something like
   2 is prime.
   3 is prime.
   5 is prime.
But I got
   2,3,5 is prime.

Any suggestions or hints about how to change the macro to produce the
desired result (using the same input)?

Thank you a lot,
    Mojca

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2006-08-23 20:43 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-21 15:23 How to \processcommalist inside another commalist? Mojca Miklavec
2006-08-21 17:17 ` nico
2006-08-21 18:07   ` Taco Hoekwater
2006-08-21 18:35   ` Mojca Miklavec
2006-08-21 20:51     ` nico
2006-08-21 21:08       ` Hans Hagen
2006-08-21 22:26         ` nico
2006-08-22  8:13           ` Hans Hagen
2006-08-21 21:04     ` Taco Hoekwater
2006-08-23 20:43       ` Mojca Miklavec
2006-08-21 21:04     ` Hans Hagen

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