From: "kauśika via ntg-context" <ntg-context@ntg.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: kauśika <citturs@gmail.com>,
"Jan-Erik Hägglöf via ntg-context" <ntg-context@ntg.nl>
Subject: Re: Resetcounter in custom enumeration environment
Date: Mon, 03 Jan 2022 16:34:50 +0530 [thread overview]
Message-ID: <5783745.lOV4Wx5bFT@sreeramtplt> (raw)
In-Reply-To: <29805597-ABAB-4198-8AFD-270875BBB4F2@gmail.com>
On Monday, January 3, 2022 4:21:27 PM IST Jan-Erik Hägglöf via ntg-context
wrote:
> I want a simple solution to reset the counter so it achieves the following
> result:
>
> Exercises
>
> 1 First exercise
>
> 2 Second exercise
>
> Answers to exercises
>
> 1 Answers to first exercise
>
> 2 Answers to second exercise
After all, one can do
\resetcounter[uppgift]
before 'Answers to exercises'.
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.
Best,
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
___________________________________________________________________________________
next prev parent reply other threads:[~2022-01-03 11:04 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 [this message]
2022-01-03 11:07 ` kauśika via ntg-context
2022-01-04 16:10 ` Jan-Erik Hägglöf via ntg-context
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=5783745.lOV4Wx5bFT@sreeramtplt \
--to=ntg-context@ntg.nl \
--cc=citturs@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).