[NTG-context] xtable row number trouble

Oleg lego12239 at yandex.ru
Sun Oct 25 14:51:06 CET 2020


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?

I tried:

\newcount\rownumd
\rownumd = 0

\starttext
\startxtable
    \startxrow
        \startxcell
            \advance\rownumd by 1
            \the\rownumd
        \stopxcell
    \stopxrow
    \startxrow
        \startxcell
            \advance\rownumd by 1
            \the\rownumd
        \stopxcell
    \stopxrow
    \startxrow
        \startxcell
            \advance\rownumd by 1
            \the\rownumd
        \stopxcell
    \stopxrow
\stopxtable

And got:

1
1
1

Can anybody help?


-- 
Олег Неманов (Oleg Nemanov)


More information about the ntg-context mailing list