ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <schuster.wolfgang@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: How to increment a counter
Date: Sat, 7 Feb 2015 12:46:10 +0100	[thread overview]
Message-ID: <CFBCBD5E-4767-4CDE-9A05-D73712762BC9@gmail.com> (raw)
In-Reply-To: <39AF0E6E-85F0-4469-B034-6E505E29C3A2@gmail.com>


> Am 05.02.2015 um 17:19 schrieb Otared Kavian <otared@gmail.com>:
> 
> Hi all,
> 
> I have a counter in an itemize environment which I need to increment by using
> 	\incrementcounter[NameOfTheCounter]
> 
> However this does not work in the following example, maybe due to the use of blocks, or some other reason.
> I define two blocks, one for exercises, one for the solutions.
> Then in each exercise I have a certain number of questions, presented with an itemgroup named Questions.
> Analogously I have an itemgroup named Answers, which appear in the solution to an exercise. Now my problem is that some questions don’t have an answer included (for instance they are too easy…) and I need to increment the counter by saying
> 	\incrementcounter[Answers]
> 
> But this does not work, for an unknown reason. (See below)
> Can anyone give an advice?

This doesn’t work because the name of the counter is “itemgroup:Answers”
and you have to use \incrementcounter[itemgroup:Answers] to increase
the counter for the items.

Wolfgang

___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2015-02-07 11:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-05 16:19 Otared Kavian
2015-02-07 11:46 ` Wolfgang Schuster [this message]
2015-02-07 20:15   ` Otared Kavian

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=CFBCBD5E-4767-4CDE-9A05-D73712762BC9@gmail.com \
    --to=schuster.wolfgang@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).