ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Thomas A. Schmitz" <thomas.schmitz@uni-bonn.de>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Increment an item number?
Date: Tue, 14 Feb 2012 17:27:45 +0100	[thread overview]
Message-ID: <4F3A8B81.2030506@uni-bonn.de> (raw)
In-Reply-To: <4F3A582C.7080704@wxs.nl>

On 2/14/12 1:48 PM, Hans Hagen wrote:
>> \starttext
>> \startitemize[n]
>> \item First question
>> \phantom{\item }
>> \item Third question
>> \phantom{\item }
>> \item Fifth question
>> \item Sixth question
>> \stopitemize
>> \stoptext
>
> or something
>
> \starttext
> \startitemize[n]
> \item First question
> \incrementnumber[itemgroup:itemize]
> \item Third question
> \incrementnumber[itemgroup:itemize]
> \item Fifth question
> \item Sixth question
> \stopitemize
> \stoptext

Just a hint: however you do it, I think this is not the best approach. 
you write:

> I'm typing out solutions to questions in some student notes, and the
missing item is a question for which a written solution is not necessary.


If this is a recurrent task, i.e. if you regularly make up student 
problems and then typeset the solutions, this approach is inefficient 
because you're doing the book keeping yourself. If, for example, you 
decide to delete one of the questions without written solution, you will 
have to delete the \incrementnumber as well. It may be better if you let 
ConTeXt do the book keeping: give every question a unique identitfier 
like so

\startitem[p:1:2]
  Problem?
\stopitem

and then typeset the solutions by referring back to this identifier:

\sym{\in[p:1:2]}

That way, the numbers in problems and solutions will always be correct, 
even if you rearrange etc. (I often typeset such exercise stylesheets, 
and after many years, that's my approach today.)

Thomas
___________________________________________________________________________________
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:[~2012-02-14 16:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-14  5:27 Alasdair McAndrew
2012-02-14 12:39 ` Otared Kavian
2012-02-14 12:48   ` Hans Hagen
2012-02-14 16:27     ` Thomas A. Schmitz [this message]
2012-02-15  0:10       ` Alasdair McAndrew

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=4F3A8B81.2030506@uni-bonn.de \
    --to=thomas.schmitz@uni-bonn.de \
    --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).