Am 21.05.2013 um 17:41 schrieb Xan
Hi,
I have two enumerations:
\defineenumeration [exercici] You need a different name for the normal enumeration environment, e.g. exercicidefault [alternative=serried,text={\startcolor[middlecyan]Exercici\stopcolor},stopper={.\space},left={\bgroup},right={\egroup},width=fit,headstyle=\ss]
\defineenumeration [exercicivora] [alternative=serried,text={\startcolor[middlecyan]Exercici\stopcolor},stopper={.\space},left={\bgroup\startframedtext[background=screen,frame=off,width=broad]},right={\stopframedtext\egroup},width=fit,headstyle=\ss]
I just want to join into one: when I do \startexercici ... \stopexercici ConTeXt do the first, and when I pass \startexercici[vora] ... \stopexercici then do the second. That is, 'vora' as optional argument.
How can I achieve that?
You have to write you own version of the exercise environment which chooses one the two enumerations dependent on the argument. \def\startexercici {\dosingleempty\dostartexercici} \def\dostartexercici[#1]% {\edef\currentexercici{#1}% \doifelse{\currentexercici}{vora} \startexercicivora \startexercicidefault} \def\stopexercici {\doifelse{\currentexercici}{vora} \stopexercicivora \stopexercicidefault} Wolfgang