ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Disproportion in initializing user counters
@ 2018-07-15 10:33 Jaroslav Hajtmar
  2018-07-15 13:49 ` Hans Hagen
  0 siblings, 1 reply; 8+ messages in thread
From: Jaroslav Hajtmar @ 2018-07-15 10:33 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 913 bytes --]

Hello ConTeXist.
I encountered a disproportion in initializing user counters. Why initialization at the beginning of the source text does not work and what is the mechanism of how the user counters work.

Thanx Jaroslav Hajtmar

Here is a sample example:

\definecounter[mycounter]

\def\getmycounter{\incrementcounter[mycounter]\getnumber[mycounter]}

\startbuffer[groups]
    \startxrow
    \startxcell \getmycounter\stopxcell
    \startxcell Content of column\stopxcell
\stopxrow
\stopbuffer



\starttext

%\setcounter[mycounter][0] % initializing at this point not working (the counter is 10 more than it should be). WHY?



\startxtable
    \startxrow
        \startxcell Column 1\stopxcell
        \startxcell Column 2\stopxcell
    \stopxrow

\setcounter[mycounter][0] % initializing at this point works fine
\dorecurse{5}{\getbuffer[groups]}
\stopxtable

\stoptext


[-- Attachment #1.2: Type: text/html, Size: 5390 bytes --]

[-- Attachment #2: Type: text/plain, Size: 492 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-07-15 23:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-15 10:33 Disproportion in initializing user counters Jaroslav Hajtmar
2018-07-15 13:49 ` Hans Hagen
2018-07-15 14:47   ` Pablo Rodriguez
2018-07-15 17:20     ` Wolfgang Schuster
2018-07-15 17:34       ` Pablo Rodriguez
2018-07-15 17:54         ` Rik
2018-07-15 18:10           ` Pablo Rodriguez
2018-07-15 23:18       ` Jaroslav Hajtmar

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).