Jorge Manuel schrieb am 12.10.2024 um 11:40:
Good morning to all,

Thank you for the code to insert numbers into boxes. However, I can't prevent the multiple-choice questions from repeating labels like 1.1.A). It looks very bad. How can I control this behavior? Thank you.

%%% sample code
\define[1]\BoxedNumber{\inframed[width=3ex]{\convertnumber{n}{#1}}}

\defineconversion [BoxedNumber] [\BoxedNumber]

\starttext

\startitemize[BoxedNumber,fit,repeat][stopper=,distance=\spaceamount]
    \item xxx
    \startitemize[BoxedNumber,fit][stopper=,distance=\spaceamount]

Add norepeat:

\startitemize[BoxedNumber,norepeat,fit][stopper=,distance=\spaceamount]

      \item multiple choice
      \startitemize[A, columns, two, random][stopper={)},style=bold]
   \item choice 1

You have to replace \item with \startitem ... \stopitem to make use of the random option, i.e.

\startitem choice 1 \stopitem

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

Reply via email to