Oleg schrieb am 25.10.2020 um 14:51:
Hi, all.
I try to place a row number into the first column of my table.
I tried:
\definecounter[rownum][way=bytext,prefix=no]
\setcounter[rownum][0]
\starttext
\startxtable
\startxrow
\startxcell
\incrementcounter[rownum]
\rawcounter[rownum]
\stopxcell
\stopxrow
\startxrow
\startxcell
\incrementcounter[rownum]
\rawcounter[rownum]
\stopxcell
\stopxrow
\startxrow
\startxcell
\incrementcounter[rownum]
\rawcounter[rownum]
\stopxcell
\stopxrow
\stopxtable
And got:
7
8
9
If i place \setcounter[rownum][0] right after \startxtable, then i got:
1
2
3
Is this normal?
Yes, to fix it use
\startxcell
\doifelsemode{*trialtypesetting}
{0}
{\incrementcounter[rownum]%
\convertedcounter[rownum]}
\stopxcell
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
___________________________________________________________________________________