From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/73899 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: Bug? Counters inherit chapter number Date: Mon, 16 Jan 2012 15:52:52 +0100 Message-ID: References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1326725608 16694 80.91.229.12 (16 Jan 2012 14:53:28 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 16 Jan 2012 14:53:28 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Jan 16 15:53:21 2012 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Rmnvy-0005sp-TO for gctc-ntg-context-518@m.gmane.org; Mon, 16 Jan 2012 15:53:19 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id C6383CB1F3; Mon, 16 Jan 2012 15:53:17 +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 T2Hy0p4GJyCF; Mon, 16 Jan 2012 15:53:11 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id BC1BDCB1ED; Mon, 16 Jan 2012 15:53:11 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id C6EF1CB1ED for ; Mon, 16 Jan 2012 15:53:09 +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 pd9X3oKU89-S for ; Mon, 16 Jan 2012 15:52:55 +0100 (CET) Original-Received: from filter3-til.mf.surf.net (filter3-til.mf.surf.net [194.171.167.219]) by balder.ntg.nl (Postfix) with ESMTP id 3394ACB1E7 for ; Mon, 16 Jan 2012 15:52:55 +0100 (CET) Original-Received: from mail-ee0-f41.google.com (mail-ee0-f41.google.com [74.125.83.41]) by filter3-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id q0GEqs3X014565 for ; Mon, 16 Jan 2012 15:52:54 +0100 Original-Received: by eekc13 with SMTP id c13so493266eek.14 for ; Mon, 16 Jan 2012 06:52:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; bh=6kBx6WSWaQsZnKsizSfOZPG4itScLHe82DIUS2H+nKs=; b=s1sfphubR5fxNkndqlcwAsRCiL3rFlZxzu9YIZ9V5CR68VNSnqc0E80EJa1+XB3Dby 6te3zbbRzBHRMs4KaFAQfJFemfEGxiBpBwTkSZn4C9goI9sb8JO0PQVCsuJFgVnUV2s0 f1QW3Rq7uf6k4bcnurF2YrwGKIc/FFHG7JgNY= Original-Received: by 10.213.108.145 with SMTP id f17mr3630272ebp.1.1326725574162; Mon, 16 Jan 2012 06:52:54 -0800 (PST) Original-Received: from [192.168.2.35] (p57AFA49F.dip.t-dialin.net. [87.175.164.159]) by mx.google.com with ESMTPS id x43sm73069368eef.8.2012.01.16.06.52.52 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 16 Jan 2012 06:52:53 -0800 (PST) In-Reply-To: X-Mailer: Apple Mail (2.1251.1) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=74.125.83.41; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0eGmeQSsn - 1e4694bbb6f9 - 20120116 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.219 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:73899 Archived-At: Am 16.01.2012 um 15:43 schrieb Felix Ingram: > Hi all, > = > This works as expected* (empty section title with "5 6 7 8" on the next l= ine > = > \definenumber[examplecounter] > \setnumber[examplecounter]{5} > \starttext > \startsection > \getnumber[examplecounter] > \incrementnumber[examplecounter] > \getnumber[examplecounter] > \incrementnumber[examplecounter] > \getnumber[examplecounter] > \incrementnumber[examplecounter] > \getnumber[examplecounter] > \incrementnumber[examplecounter] > \stopsection > \stoptext > = > This does not: > = > \definenumber[examplecounter] > \setnumber[examplecounter]{5} > \starttext > \startchapter > \getnumber[examplecounter] > \incrementnumber[examplecounter] > \getnumber[examplecounter] > \incrementnumber[examplecounter] > \getnumber[examplecounter] > \incrementnumber[examplecounter] > \getnumber[examplecounter] > \incrementnumber[examplecounter] > \stopchapter > \stoptext > = > The second example has an empty chapter heading followed by "1. 1.1 1.2 1= .3". > = > This is on version: 2011.11.29. Apologies if this is has been > addressed - I'm holding off updating until I've worked out some more > features in my doc. By default the counter is reset with each new chapter, since you have chapt= ers in your first example the counter is incremented but in your second example \startchapter sets the counter back to zero. To have a counter which isn=92t reset you need =93way=3Dbytext" and to remo= ve the chapter number from the \getnumber result you have to add =93prefix=3Dn= o=94. The full \definenumber declaration is then \definenumber[examplecounter][wa= y=3Dbytext,prefix=3Dno] Wolfgang ___________________________________________________________________________= ________ If your question is of interest to others as well, please add an entry to t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-cont= ext webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________