[NTG-context] Resetcounter in custom enumeration environment

kauśika citturs at gmail.com
Mon Jan 3 12:07:17 CET 2022


On Monday, January 3, 2022 4:34:50 PM IST kauśika wrote:
> If 'Exercises' and 'Answers to exercises' are some head structure (assuming
> unnumbered since they are so in your example):
> \definehead[exercises][subject]
> \definehead[answers][subject]
> then you can simply do
> \setupenumeration[uppgift]
> [alternative=left,
>  width=1cm,
>  text=,
>  after={\blank[2*big]},
>  way=bysubject]
> and ConTeXt will automatically restart the number at every new subject
> block.

In this case you would have something like :

\startexercise[title={Exercises}]
    \startuppgift
      first exercise
    \stopuppgift

    \startuppgift
      second exercise
    \stopuppgift
\stopexercise

\startanswers
    \startuppgift
      answer to first exercise
    \stopuppgift

    \startuppgift
      answer to second exercise
    \stopuppgift
\stopanswers

kauśika




More information about the ntg-context mailing list