Tomas Hala schrieb am 03.12.18 um 20:23:
Hi all,

at https://wiki.contextgarden.net/Command/currentTABLEcolumn I learnt
about \currentTABLErow etc. for counting lines in natural tables.

I have got the following two minimal non-working examples (on TeXlive 2018):

\starttext\setupTABLE[split=yes]
   \bTABLE
   \bTABLEhead\bTR\bTH head      \eTH\eTR\eTABLEhead
   \bTABLEbody
     \dorecurse{100}{\bTR\bTD \currentTABLErow xxx \eTD\eTR}
   \eTABLEbody
   \eTABLE
\stoptext

In this case, the head-line is alse counted which makes no sense
and I do not know how to supress it.
Even though this is not what you expect it makes sense because when ConTeXt
creates the table the whole thing is only one huge part which the headers for
the first and the following pages on top and the footer on the bottom.

The number of rows is now determined by the number of all rows
(including header and footer) and the counting starts also from the first
row in the table independent of the type of the row.

What you want is a counter which removes the header row from the value
but to keep backwards compatibility this has to be a new command,
e.g. \currentTABLEbodyrow
If I add \bTABLEnext (below), I receive very strange result -- both heads
are at the beginning of the table and both counted. Moreover, the "next"
head is not used on the following pages.

\starttext\setupTABLE[split=yes]
   \bTABLE
   \bTABLEhead\bTR\bTH head      \eTH\eTR\eTABLEhead
   \bTABLEnext\bTR\bTH next head \eTH\eTR\eTABLEnext
   \bTABLEbody
     \dorecurse{100}{\bTR\bTD \currentTABLErow xxx \eTD\eTR}
   \eTABLEbody
   \eTABLE
\stoptext

I tried \TC and \TD instead of \TH, also without success.
What I am doing wrong?
You need split=repeat.

The normal command to create a cell is \bTD, the \bTH command
is usefull for the header because it changes the font style to bold
and it also disables the character alignment for the current cell.

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to