[NTG-context] solutions and problems

Xan dxpublica at telefonica.net
Thu Feb 20 10:15:11 CET 2014


Hi,

Just a question about blocks... I consulted the manual, but I'm in trouble:

I have this definitions:

% the exercise
\defineenumeration
  [exercici]
  [alternative=serried,text={\startcolor[darkblue]Exercici\stopcolor},stopper={.\space},left={\bgroup},right={\egroup},width=fit,headstyle=\ss,distance=0.25em,width=fit]


\defineenumeration[resposta][headstyle=\ss,text={Solucions},width=fit,alternative=serried]

\defineblock[resposta] % the answer
\hideblocks[resposta]

And in my text, I have:

\startexercici
\beginresposta
\resposta Exercici 2 (Solucions: \startitemize[a,text] \item D, \item I, \item D, \item No té relació, \item D, \item D, \item No té relació, \item No té relació, \item D.\stopitemize) \par
\endresposta
\stopexercici
...

\startmode[solucions]
\subject{Respostes} %Answers

\selectblocks[resposta][criterium=section]
\stopmode
...


Is there any way that the answers (resposta) has the same number as the 'exercici' in which it belongs to? If not, I have to put "Solutions of exercici 2" in my 'resposta'

Thank you very much


More information about the ntg-context mailing list