Thanks for that. I use incrementcounter and decrementnumber in 'before', because I use *always* answer nested in question:
\defineenumeration [exercici] [alternative=serried,text={\startcolor[darkblue]Exercici\stopcolor},stopper={.\space},left={\bgroup},right={\egroup},width=fit,headstyle=\ss,distance=0.25em,width=fit,before={\incrementcounter[answer]}] \defineenumeration[resposta][headstyle=\ss,text={Solucions},width=fit,alternative=serried,before={\decrementcounter[resposta]}] \defineblock[resposta] \hideblocks[resposta] @Thomas: thank you very much for the link. Eventually I have to migrate all my data to XML, but it's tedious do it that. XML is very verbose and I have to define my DTD structure (at least mentally ;-)). Thanks all of you, > You can add a answer block which increments the answer counter. > > \defineblock[question] > \defineblock[answer] > > \defineenumeration[question][text={Question}] > \defineenumeration[answer] [text={Answer}] > > \keepblocks[question] > \hideblocks[answer] > > \starttext > > \chapter{Question} > > \beginquestion > \startquestion > Question 1. > \stopquestion > \endquestion > > \beginanswer > \startanswer > Answer 1. > \stopanswer > \endanswer > > \beginquestion > \startquestion > Question 2. > \stopquestion > \endquestion > > \beginanswer > \incrementcounter[answer] > \endanswer > > \beginquestion > \startquestion > Question 3. > \stopquestion > \endquestion > > \beginanswer > \startanswer > Answer 3. > \stopanswer > \endanswer > > \chapter{Answers} > > \useblocks[answer] > > \stoptext > > Wolfgang ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________