batela wrote:
Thanks very much. In fact, in Context is very easy doing hard tasks. But, it is great if I can do things like:
n_exam_versions=3; for (nversion=1 to n_exam_versions) { Final Math Exam Your name: ID: Yor exam version is: #nversion;
\startitemize[a,random,packed] \startitem first \stopitem \startitem second \doifmode[answers]{correctchoice}\stopitem \startitem third \stopitem \startitem fourth \stopitem \stopitemize
\startitemize[a,random,packed] \startitem first \stopitem \startitem second \stopitem \startitem third \stopitem \startitem fourth \doifmode[answers]{correctchoice}\stopitem \stopitemize
\startitemize[a,random,packed] \startitem first \doifmode[answers]{correctchoice} \stopitem \startitem second \stopitem \startitem third \stopitem \startitem fourth \stopitem \stopitemize
nversion++; }
In this way I have all exam versions in a simple document.
This should get you started ... please wikify this: \setupitemgroup[itemize][1][a,random,packed] \startsetups examn:make \setuppagenumber[number=1] \title{Final Math Examn} \blank[2*big] \starttabulate \NC Your name \EQ \NC \NR \NC ID \EQ \NC \NR \NC Version \EQ \recurselevel \NC \NR \stoptabulate \blank[2*big] \getbuffer[examn] \stopsetups \startsetups examn:ok \doifmode {answers} { \inleft{\symbol[star]} } \ignorespaces \stopsetups \starttext \startbuffer[examn] \startitemize \startitem first \stopitem \startitem \setups[examn:ok] second \stopitem \startitem third \stopitem \startitem fourth \stopitem \stopitemize \startitemize \startitem first \stopitem \startitem second \stopitem \startitem \setups[examn:ok] third \stopitem \startitem fourth \stopitem \stopitemize \startitemize \startitem first \stopitem \startitem second \stopitem \startitem \setups[examn:ok] third \stopitem \startitem fourth \stopitem \stopitemize \stopbuffer \setuprandomize[1234] % set a seed \enablemode[answers] \dorecurse{10} {\setups[examn:make]} \stoptext ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------