ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Oleg <lego12239@yandex.ru>
To: Wolfgang Schuster <wolfgang.schuster.lists@gmail.com>
Cc: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: xtable row number trouble
Date: Mon, 26 Oct 2020 23:03:20 +0300	[thread overview]
Message-ID: <20201026200320.GA4447@legohost> (raw)
In-Reply-To: <b0d41323-96ab-2d62-d3bf-88b84a876a20@gmail.com>

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)
___________________________________________________________________________________
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	other threads:[~2020-10-26 20:03 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-25 13:51 Oleg
2020-10-25 20:26 ` Wolfgang Schuster
2020-10-26 20:03   ` Oleg [this message]
2020-10-26 21:42     ` Wolfgang Schuster
2020-10-27 11:15       ` font rendering in bibliography Xenos Athenaios
2020-10-27 11:25         ` Denis Maier
2020-10-27 14:45         ` Jano Kula
2020-10-28  9:50           ` Xenos Athenaios
2020-10-28 11:49             ` Jano Kula
2020-10-28 15:00               ` Xenos Athenaios
2020-10-27 13:18       ` xtable row number trouble Oleg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201026200320.GA4447@legohost \
    --to=lego12239@yandex.ru \
    --cc=ntg-context@ntg.nl \
    --cc=wolfgang.schuster.lists@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).