On Sun, 17 Mar 2013, Wolfgang Schuster wrote: > > Am 17.03.2013 um 13:00 schrieb Willi Egger : > >> 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 There was a long discussion on this a couple of years back. Summarized here: http://randomdeterminism.wordpress.com/2009/03/05/tex-programming-the-past-the-present-and-the-future/ Aditya