From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/74473 Path: news.gmane.org!not-for-mail From: "Thomas A. Schmitz" Newsgroups: gmane.comp.tex.context Subject: Re: Increment an item number? Date: Tue, 14 Feb 2012 17:27:45 +0100 Organization: Uni Bonn Message-ID: <4F3A8B81.2030506@uni-bonn.de> References: <4F3A582C.7080704@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1329236924 30958 80.91.229.3 (14 Feb 2012 16:28:44 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 14 Feb 2012 16:28:44 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Feb 14 17:28:39 2012 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RxLF8-00005B-Uu for gctc-ntg-context-518@m.gmane.org; Tue, 14 Feb 2012 17:28:39 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 4B733CB20A; Tue, 14 Feb 2012 17:28:34 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id pkzBopgJZ0f1; Tue, 14 Feb 2012 17:28:34 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 5F9DACB218; Tue, 14 Feb 2012 17:28:24 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 143AACB218 for ; Tue, 14 Feb 2012 17:28:23 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id Rne+oA0zWqww for ; Tue, 14 Feb 2012 17:28:12 +0100 (CET) Original-Received: from filter5-til.mf.surf.net (filter5-til.mf.surf.net [194.171.167.221]) by balder.ntg.nl (Postfix) with ESMTP id 00FD2CB20A for ; Tue, 14 Feb 2012 17:28:11 +0100 (CET) Original-Received: from uni-bonn.de (mail.uni-bonn.de [131.220.15.113]) by filter5-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id q1EGSAwn019170 for ; Tue, 14 Feb 2012 17:28:11 +0100 Original-Received: from [80.187.200.106] (account tschmit1@uni-bonn.de HELO Thomass-MacBook-Air.local) by fe2.uni-bonn.de (CommuniGate Pro SMTP 5.4.3) with ESMTPSA id 10127122 for ntg-context@ntg.nl; Tue, 14 Feb 2012 17:28:09 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:9.0) Gecko/20111222 Thunderbird/9.0.1 In-Reply-To: <4F3A582C.7080704@wxs.nl> X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=131.220.15.113; country=DE; region=07; city=Bonn; latitude=50.7333; longitude=7.1000; http://maps.google.com/maps?q=50.7333,7.1000&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0HGxQsbfR - 01cd853306db - 20120214 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.221 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:74473 Archived-At: 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 ___________________________________________________________________________________