[NTG-context] xtable row number trouble
Oleg
lego12239 at yandex.ru
Mon Oct 26 21:03:20 CET 2020
On Sun, Oct 25, 2020 at 09:26:06PM +0100, Wolfgang Schuster wrote:
> 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
It seems that reseting once at table start is simpler, isn't it :-)?
What is the difference between \rawcounter and \convertedcounter?
\rawcounter give me the plain number as i want.
What's about \newcount&\advance variant? Why it not work?
--
Олег Неманов (Oleg Nemanov)
More information about the ntg-context
mailing list