ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* incrementing counters in tables
@ 2013-12-10 18:47 Jannik Voges
  2013-12-10 18:55 ` Aditya Mahajan
  0 siblings, 1 reply; 3+ messages in thread
From: Jannik Voges @ 2013-12-10 18:47 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

Dear ConTeXt-Users,


I want to use counters in tables. But incrementing counters in tables doesn’t work as expected. For example, when I typeset the following example, I get numbers between 80 and 119, I would expect numbers between 0 and 39. How can I get the desired numbers?

\definenumber[test]

\starttext
\bTABLE
\dorecurse{8}{
	\bTR
	\dorecurse{5}{\bTD \rawcountervalue[test]\incrementnumber[test] \eTD}
	\eTR
}
\eTABLE
\stoptext

Thanks

Jannik Voges

[-- Attachment #1.2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 842 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: incrementing counters in tables
  2013-12-10 18:47 incrementing counters in tables Jannik Voges
@ 2013-12-10 18:55 ` Aditya Mahajan
  2013-12-10 19:07   ` Jannik Voges
  0 siblings, 1 reply; 3+ messages in thread
From: Aditya Mahajan @ 2013-12-10 18:55 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: TEXT/PLAIN, Size: 628 bytes --]

On Tue, 10 Dec 2013, Jannik Voges wrote:

> Dear ConTeXt-Users,
>
>
> I want to use counters in tables. But incrementing counters in tables doesn’t work as expected. For example, when I typeset the following example, I get numbers between 80 and 119, I would expect numbers between 0 and 39. How can I get the desired numbers?
>
> \definenumber[test]
>
> \starttext
> \bTABLE
> \dorecurse{8}{
> 	\bTR
> 	\dorecurse{5}{\bTD \rawcountervalue[test]\incrementnumber[test] \eTD}
> 	\eTR
> }
> \eTABLE
> \stoptext

Change that to:

\rawcountervalue[test]\iftrialtypesetting\else\incrementnumber[test]\fi

Aditya

[-- Attachment #2: Type: text/plain, Size: 485 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: incrementing counters in tables
  2013-12-10 18:55 ` Aditya Mahajan
@ 2013-12-10 19:07   ` Jannik Voges
  0 siblings, 0 replies; 3+ messages in thread
From: Jannik Voges @ 2013-12-10 19:07 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

Thanks, that helps.


Am 10.12.2013 um 19:55 schrieb Aditya Mahajan <adityam@umich.edu>:

> On Tue, 10 Dec 2013, Jannik Voges wrote:
> 
>> Dear ConTeXt-Users,
>> 
>> 
>> I want to use counters in tables. But incrementing counters in tables doesn’t work as expected. For example, when I typeset the following example, I get numbers between 80 and 119, I would expect numbers between 0 and 39. How can I get the desired numbers?
>> 
>> \definenumber[test]
>> 
>> \starttext
>> \bTABLE
>> \dorecurse{8}{
>> 	\bTR
>> 	\dorecurse{5}{\bTD \rawcountervalue[test]\incrementnumber[test] \eTD}
>> 	\eTR
>> }
>> \eTABLE
>> \stoptext
> 
> Change that to:
> 
> \rawcountervalue[test]\iftrialtypesetting\else\incrementnumber[test]\fi
> 
> Aditya___________________________________________________________________________________
> 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://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________


[-- Attachment #1.2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 842 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2013-12-10 19:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-10 18:47 incrementing counters in tables Jannik Voges
2013-12-10 18:55 ` Aditya Mahajan
2013-12-10 19:07   ` Jannik Voges

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