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:37:17 +0530 [thread overview]
Message-ID: <4369758.LvFx2qVVIh@sreeramtplt> (raw)
In-Reply-To: <5783745.lOV4Wx5bFT@sreeramtplt>
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
___________________________________________________________________________________
next prev parent reply other threads:[~2022-01-03 11:07 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 [this message]
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=4369758.LvFx2qVVIh@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).