From: "Jan-Erik Hägglöf via ntg-context" <ntg-context@ntg.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: "Jan-Erik Hägglöf" <skrantajanneman@gmail.com>
Subject: Re: Resetcounter in custom enumeration environment
Date: Tue, 4 Jan 2022 17:10:47 +0100 [thread overview]
Message-ID: <A4AF0957-EF31-491F-99D6-B4549078B23D@gmail.com> (raw)
In-Reply-To: <4369758.LvFx2qVVIh@sreeramtplt>
Many thanks, that was very structured and helpful.
/Jan-Erik
> 3 jan. 2022 kl. 12:07 skrev kauśika <citturs@gmail.com>:
>
> 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
>
>
___________________________________________________________________________________
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
prev parent reply other threads:[~2022-01-04 16:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-03 10:51 Jan-Erik Hägglöf via ntg-context
2022-01-03 11:04 ` kauśika via ntg-context
2022-01-03 11:07 ` kauśika via ntg-context
2022-01-04 16:10 ` Jan-Erik Hägglöf via ntg-context [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=A4AF0957-EF31-491F-99D6-B4549078B23D@gmail.com \
--to=ntg-context@ntg.nl \
--cc=skrantajanneman@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).