From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/38857 Path: news.gmane.org!not-for-mail From: Bart Wise Newsgroups: gmane.comp.tex.context Subject: Numbers in Tables Date: Tue, 29 Jan 2008 12:12:05 -0700 Message-ID: <200801291212.05878.bntgcontext@wiseguysweb.com> 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: ger.gmane.org 1201634016 31104 80.91.229.12 (29 Jan 2008 19:13:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 29 Jan 2008 19:13:36 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Tue Jan 29 20:13:56 2008 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1JJvu6-0007Zi-Fc for gctc-ntg-context-518@m.gmane.org; Tue, 29 Jan 2008 20:13:54 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 76D161FBC1; Tue, 29 Jan 2008 20:13:27 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 19428-02; Tue, 29 Jan 2008 20:12:48 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 6633A1FB7E; Tue, 29 Jan 2008 20:12:48 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id B70331FB7E for ; Tue, 29 Jan 2008 20:12:45 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 17813-02-6 for ; Tue, 29 Jan 2008 20:12:10 +0100 (CET) Original-Received: from out01.mta.xmission.com (out01.mta.xmission.com [166.70.13.231]) by ronja.ntg.nl (Postfix) with ESMTP id 306CB1FB5B for ; Tue, 29 Jan 2008 20:12:09 +0100 (CET) Original-Received: from [166.70.13.201] (helo=mgr1.xmission.com) by out01.mta.xmission.com with esmtp (Exim 4.62) (envelope-from ) id 1JJvsQ-0002wN-HY for ntg-context@ntg.nl; Tue, 29 Jan 2008 12:12:10 -0700 Original-Received: from bwise1.provo.novell.com ([137.65.171.141] helo=bwise1) by mgr1.xmission.com with esmtpa (Exim 4.50) id 1JJvsN-0002II-6Q for ntg-context@ntg.nl; Tue, 29 Jan 2008 12:12:08 -0700 User-Agent: KMail/1.9.6 (enterprise 0.20070907.709405) Content-Disposition: inline Received-SPF: none (mgr1.xmission.com: 137.65.171.141 is neither permitted nor denied by domain of wiseguysweb.com) client-ip=137.65.171.141; envelope-from=bntgcontext@wiseguysweb.com; helo=bwise1; X-SA-Exim-Connect-IP: 137.65.171.141 X-SA-Exim-Mail-From: bntgcontext@wiseguysweb.com X-Spam-DCC: XMission; sa04 1397; Body=1 Fuz1=1 Fuz2=1 X-SA-Exim-Version: 4.2 (built Thu, 03 Mar 2005 10:44:12 +0100) X-SA-Exim-Scanned: Yes (on mgr1.xmission.com) X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 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 X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:38857 Archived-At: The code below defines a number and then on each row, displays then increments the number. The number is defined and reset to 0 before the table is declared. However, when the number is displayed in the table, it's not zero as expected, but some other number (usually between 3 and 9). The reset at reset point #1 does reset the number to 0, but it doesn't stay that way when the table is declared. The only thing I have found to work, is to define a row and column and put the reset there (see reset point #2). I would like to declare and reset the number outside of the table definition, but it doesn't seem to work. What am I doing wrong? \definenumber[MyNum] \starttext \resetnumber[MyNum] % reset point #1 \bTABLE % \bTR\bTD \resetnumber[MyNum] \eTD\eTR % reset point #2 \bTR\bTD \getnumber[MyNum]\incrementnumber[MyNum] \eTD\eTR \bTR\bTD \getnumber[MyNum]\incrementnumber[MyNum] \eTD\eTR \bTR\bTD \getnumber[MyNum]\incrementnumber[MyNum] \eTD\eTR \bTR\bTD \getnumber[MyNum]\incrementnumber[MyNum] \eTD\eTR \eTABLE \stoptext ___________________________________________________________________________________ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________