From: Wolfgang Schuster <schuster.wolfgang@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: \recurselevel inside \bTABLE\eTABLE
Date: Sun, 17 Mar 2013 23:15:43 +0100 [thread overview]
Message-ID: <EFB1710D-AC62-4A64-B509-A8505FF75C2C@gmail.com> (raw)
In-Reply-To: <7D8B2708-F031-462D-924F-FD05FA7544F7@gmail.com>
Am 17.03.2013 um 22:17 schrieb Wolfgang Schuster <schuster.wolfgang@gmail.com>:
>
> Am 17.03.2013 um 13:00 schrieb Willi Egger <context@boede.nl>:
>
>> Dear all,
>>
>> I should prepare a form with a table. The table rows should be numbered.
>>
>> How can I get get this done by using \recurselevel.
>> In the attached minimal example all rows are numbered with 0.
>>
>> \starttext
>> \subject{bTABLE--eTABLE: recurse creates rows}
>> \bTABLE
>> \dorecurse{3}
>> {\bTR
>> \bTD \recurselevel \eTD
>> \eTR}
>> \eTABLE
>>
>> What do i do wrongly here?
>
> You’re doing nothing wrong but you have to expand the value of the counter.
>
> One feature of natural tables is the calculated width of the cells, to do this context stores
> the content of all cells in a token register, i.e. context stores \recurselevel as content
> of the cell and not the value of the iteration. This content is processed after all cells
> have been stored and the \recurselevel macro uses at this moment its default value 0.
>
> To expand the value of the counter use \expanded{…} to force a expansion.
>
> \bTABLE
> \dorecurse{3}{\bTR\bTD\recurselevel\eTD\eTR}
> \eTABLE
Needs \expanded:
\bTABLE
\dorecurse{3}{\bTR\expanded{\bTD\recurselevel\eTD}\eTR}
\eTABLE
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
___________________________________________________________________________________
prev parent reply other threads:[~2013-03-17 22:15 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-17 12:00 Willi Egger
2013-03-17 12:21 ` Alan BRASLAU
2013-03-17 21:17 ` Wolfgang Schuster
2013-03-17 21:38 ` Aditya Mahajan
2013-03-17 21:49 ` Willi Egger
2013-03-17 21:52 ` Hans Hagen
2013-03-17 21:58 ` Willi Egger
2013-03-19 7:23 ` Wolfgang Schuster
2013-03-22 21:12 ` Willi Egger
2013-03-17 22:15 ` Wolfgang Schuster [this message]
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=EFB1710D-AC62-4A64-B509-A8505FF75C2C@gmail.com \
--to=schuster.wolfgang@gmail.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).