From: Bart Wise <bntgcontext@wiseguysweb.com>
To: ntg-context@ntg.nl
Subject: Numbers in Tables
Date: Tue, 29 Jan 2008 12:12:05 -0700 [thread overview]
Message-ID: <200801291212.05878.bntgcontext@wiseguysweb.com> (raw)
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
___________________________________________________________________________________
next reply other threads:[~2008-01-29 19:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-29 19:12 Bart Wise [this message]
2008-01-30 12:41 ` Peter Rolf
2008-01-30 14:33 ` Bart C. Wise
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200801291212.05878.bntgcontext@wiseguysweb.com \
--to=bntgcontext@wiseguysweb.com \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).