ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Mojca Miklavec" <mojca.miklavec.lists@gmail.com>
Subject: Re: Question and answers
Date: Mon, 20 Mar 2006 15:34:16 +0100	[thread overview]
Message-ID: <6faad9f00603200634m6b72fd25teb697df19c293c0b@mail.gmail.com> (raw)
In-Reply-To: <E5D8E055-D1CF-44E5-8012-A17AA4F5C891@cox.net>

On 3/20/06, David Arnold wrote:
> All,
>
> I have:
>
> \defineenumeration[questions][location=serried,text=\blank]
> \setupenumerations[questions][before={\unnumberedsubsection{Exercises}
> \startcolumns[n=2]},after=\stopcolumns,number=no]
>
> \defineenumeration[answers][location=serried,text=\blank]
> \setupenumerations[answers][before={\unnumberedsubsection{Answers}
> \startcolumns[n=2]},after=\stopcolumns,number=no]
>
> \def\placeanswers{\startanswers\doifmodeelse{short}{\selectblocks
> [shortanswer][criterium=section]}{\selectblocks[longanswer]
> [criterium=section]}\stopanswers}
>
> \defineenumeration[question][location=inleft,text={\color[heavygreen]
> \bgroup}]
> \setupenumerations[question][stopper={.\egroup}]
>
> \defineenumeration[subquestion][location=hanging,text={\color
> [heavygreen]\bgroup},conversion=characters]
> \setupenumerations[subquestion][stopper={.\egroup}]
>
> \defineenumeration[answer][location=inleft,text={\color[heavygreen]
> \bgroup}]
> \setupenumerations[answer][stopper={.\egroup}]
>
> \defineenumeration[subanswer][location=hanging,text={\color
> [heavygreen]\bgroup},conversion=characters]
> \setupenumerations[subanswer][stopper={.\egroup}]
>
> \defineblock[question,shortanswer,longanswer]
> \hideblocks[shortanswer,longanswer]
>
> I put a \placeanswers at the end of each section, but the numbering
> is contiguous across sections. For example, section 1 might end with
> exercise #15, then section 2 begins with exercise #16. How can I
> reset the numbers to start with #1 in section 2?

Add
    way=bysection,sectionnumber=no
to \defineenumeration or to \setupenumeration.

(You can also reset the numbers manually with \resetquestion.)

Mojca

      reply	other threads:[~2006-03-20 14:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-19 23:24 David Arnold
2006-03-20 14:34 ` Mojca Miklavec [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=6faad9f00603200634m6b72fd25teb697df19c293c0b@mail.gmail.com \
    --to=mojca.miklavec.lists@gmail.com \
    --cc=ntg-context@ntg.nl \
    /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).