From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/73934 Path: news.gmane.org!not-for-mail From: Felix Ingram Newsgroups: gmane.comp.tex.context Subject: Counters again Date: Tue, 17 Jan 2012 14:55:02 +0000 Message-ID: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1326812130 11669 80.91.229.12 (17 Jan 2012 14:55:30 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 17 Jan 2012 14:55:30 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Jan 17 15:55:26 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 1RnARZ-0003vC-0s for gctc-ntg-context-518@m.gmane.org; Tue, 17 Jan 2012 15:55:25 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id BD4DBCB1F6; Tue, 17 Jan 2012 15:55: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 qZH6dbq3bBoq; Tue, 17 Jan 2012 15:55:18 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 255E0CB1F3; Tue, 17 Jan 2012 15:55:18 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 7B0B7CB1F3 for ; Tue, 17 Jan 2012 15:55: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 upvsmutK+qq0 for ; Tue, 17 Jan 2012 15:55:03 +0100 (CET) Original-Received: from filter4-ams.mf.surf.net (filter4-ams.mf.surf.net [192.87.102.72]) by balder.ntg.nl (Postfix) with ESMTP id 8E312CB1F0 for ; Tue, 17 Jan 2012 15:55:03 +0100 (CET) Original-Received: from mail-vw0-f41.google.com (mail-vw0-f41.google.com [209.85.212.41]) by filter4-ams.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id q0HEt2t5012307 for ; Tue, 17 Jan 2012 15:55:03 +0100 Original-Received: by vbbfa15 with SMTP id fa15so2176877vbb.14 for ; Tue, 17 Jan 2012 06:55:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=XUN5VdvdAjs8owC0sNJAdpgjCPSWUvKWhPlZqYHtI0o=; b=A7zjM4ZtN1C56ctbAFNWHt7q6nMOqihGxAn/h1tGTwUlam7LuDOSmneFtRd61MND2B 5WDFy3rsrzp6SV4K1qOPC0//sT6fXlj9Jur7PUPjpZgyPXFI+vaAJl0sRH+Neu1szZS0 80S0YDSZiKdDHIONGQ0+soVN75Y/usl8hWC1c= Original-Received: by 10.52.95.13 with SMTP id dg13mr8681706vdb.124.1326812102165; Tue, 17 Jan 2012 06:55:02 -0800 (PST) Original-Received: by 10.52.184.193 with HTTP; Tue, 17 Jan 2012 06:55:02 -0800 (PST) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.212.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: 03GmCT2FD - f7c5e5c40e7f - 20120117 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.72 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:73934 Archived-At: 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. Many thanks, Felix ___________________________________________________________________________________ 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 ___________________________________________________________________________________