Wolfgang Schuster <schuster.wolfgang <at> googlemail.com> writes:


> You don't need \nextrandom any longer, it's fixed with the last beta.
> 
> \newcounter\choicecounter
> 
> \define[1]\Rightitem
>    {\doglobal\increment\choicecounter
>     \startitem[\choicecounter]#1\stopitem}
> 
> \define[1]\Wrongitem
>    {\startitem#1\stopitem}
> 
> \processbetween{rightitem}\Rightitem
> \processbetween{wrongitem}\Wrongitem
> 

>              \startrightitem This is the CORRECT answer. \stoprightitem
>              \startwrongitem Yet another wrong answer.   \stopwrongitem

> You can use a fixed random order for the items (the don't change after
> each new run) with '\setupsystem[random=3456]', you can change the order
> when you user another number.
> 
> Wolfgang
> 

Awesome solution. Works great. Thanks very much Wolfgang. I can now use your
solution. If it is not too difficult to explain, I would appreciate if someone
could explain why the following does not work. It is not necessary because
Wolfgang's solution is great but will help me understand it better.

\def\AnsT
   {\doglobal\increment\choicecounter
     \startitem[\choicecounter]#1\stopitem}
\def\eAns{\stopitem}

With these commands if I use

\AnsT This is the CORRECT answer. \eAns
\startwrongitem Yet another wrong answer.   \stopwrongitem

I get the error "File ended while scanning use of \startitem"






___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : [email protected] / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to