From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/73939 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: Counters again Date: Tue, 17 Jan 2012 19:10:54 +0100 Message-ID: <198D4974-4EE4-4057-90B0-1C6A2C1CEE2B@googlemail.com> 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="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1326823934 11509 80.91.229.12 (17 Jan 2012 18:12:14 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 17 Jan 2012 18:12:14 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Jan 17 19:12:10 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 1RnDVx-0005T9-A5 for gctc-ntg-context-518@m.gmane.org; Tue, 17 Jan 2012 19:12:09 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 22870CB1F5; Tue, 17 Jan 2012 19:12: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 nF8DKbHA04da; Tue, 17 Jan 2012 19:12:08 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 2FA21CB1FC; Tue, 17 Jan 2012 19:11:19 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id B2D20CB1FC for ; Tue, 17 Jan 2012 19:11: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 gqYlasdExdhB for ; Tue, 17 Jan 2012 19:11:01 +0100 (CET) Original-Received: from filter1-til.mf.surf.net (filter1-til.mf.surf.net [194.171.167.217]) by balder.ntg.nl (Postfix) with ESMTP id 04E92CB1F9 for ; Tue, 17 Jan 2012 19:11:00 +0100 (CET) Original-Received: from mail-ee0-f41.google.com (mail-ee0-f41.google.com [74.125.83.41]) by filter1-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id q0HIB0cG018745 for ; Tue, 17 Jan 2012 19:11:00 +0100 Original-Received: by eekc13 with SMTP id c13so954015eek.14 for ; Tue, 17 Jan 2012 10:11:00 -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=EhzkUvw0YaUbCEFLCiNfcxLfrAqL66gZuvJQbniODnw=; b=dGK5CgZGUC1ydfiy1JhKdJJ36QFCG8/zK219xFaprhBDzTLdLb5PHCWmJ25SWLQX0L 5i6FC5zvBIIn42D52KBuamdUGQvEZ5fGq0x2QIy0+5Mc6fyAnFbMO0YkYttNBzwoy/Ud vpVkGol5C3NGSQhx423SCoXJ9+pCQ/UHbugBg= Original-Received: by 10.213.28.205 with SMTP id n13mr4322635ebc.97.1326823860004; Tue, 17 Jan 2012 10:11:00 -0800 (PST) Original-Received: from [192.168.2.35] (p57AFA154.dip.t-dialin.net. [87.175.161.84]) by mx.google.com with ESMTPS id 28sm23614937eed.0.2012.01.17.10.10.56 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 17 Jan 2012 10:10:57 -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: 08GmGb0vb - 87177b69f08b - 20120117 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.217 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:73939 Archived-At: Am 17.01.2012 um 15:55 schrieb Felix Ingram: > Hello all, > > I'm now trying to use counters that will tally some values. The value > of these could be zero, which the wiki states will be the default > value. The following shows that nothing is displayed when the counter > is 0. > > \definenumber[examplecounter] > \setnumber[examplecounter]{1} > \starttext > This is the default value: \getnumber[examplecounter] > \incrementnumber[examplecounter] > This is the new value: \getnumber[examplecounter] > \resetnumber[examplecounter] > This is the reset value: \getnumber[examplecounter] > \setnumber[examplecounter]{0} > This is the set value: \getnumber[examplecounter] > \stoptext > > I can include some conditionals to check this but thought I'd report > it in case I'm doing it wrong/the wiki needs updating. The wiki explains often the behavior for MkII but MkIV does sometimes things different but when you need only the value of the counter without chapter or section prefixes you can use \rawnumber which shows also the start value. BTW: In the next beta the syntax for \setnumber will change, now both arguments are written in brackets, e.g. \setnumber[mycount][4] 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 ___________________________________________________________________________________