ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* number in \doloopoverlist?
@ 2021-07-14 18:41 Pablo Rodriguez
  2021-07-14 19:06 ` Wolfgang Schuster
  0 siblings, 1 reply; 3+ messages in thread
From: Pablo Rodriguez @ 2021-07-14 18:41 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Dear list,

I have the following sample:

  \starttext
  \doloopoverlist{a,b,c,d}
    {\recursestring, number: \recurselevel\\}
  \stoptext

Which is the way to get the number when looping over a list?

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___________________________________________________________________________________
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] 3+ messages in thread

* Re: number in \doloopoverlist?
  2021-07-14 18:41 number in \doloopoverlist? Pablo Rodriguez
@ 2021-07-14 19:06 ` Wolfgang Schuster
  2021-07-15  5:53   ` Pablo Rodriguez
  0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Schuster @ 2021-07-14 19:06 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Pablo Rodriguez

Pablo Rodriguez schrieb am 14.07.2021 um 20:41:
> Dear list,
> 
> I have the following sample:
> 
>    \starttext
>    \doloopoverlist{a,b,c,d}
>      {\recursestring, number: \recurselevel\\}
>    \stoptext
> 
> Which is the way to get the number when looping over a list?


There is no number, you're just iterating over a list.


\definecounter [loopcounter]

\starttext

\resetcounter [loopcounter]

\doloopoverlist
   {a,b,c,d}
   {\recursestring, number: \incrementedcounter [loopcounter]\par}

\stoptext


Wolfgang
___________________________________________________________________________________
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] 3+ messages in thread

* Re: number in \doloopoverlist?
  2021-07-14 19:06 ` Wolfgang Schuster
@ 2021-07-15  5:53   ` Pablo Rodriguez
  0 siblings, 0 replies; 3+ messages in thread
From: Pablo Rodriguez @ 2021-07-15  5:53 UTC (permalink / raw)
  To: ntg-context

On 7/14/21 9:06 PM, Wolfgang Schuster wrote:
> Pablo Rodriguez schrieb am 14.07.2021 um 20:41:
>> Dear list,
>>
>> I have the following sample:
>>
>>    \starttext
>>    \doloopoverlist{a,b,c,d}
>>      {\recursestring, number: \recurselevel\\}
>>    \stoptext
>>
>> Which is the way to get the number when looping over a list?
>
> There is no number, you're just iterating over a list.

Many thanks for your reply, Wolfgang.

I thought that iterations were numbered when loops took place.

This is now clear to me now.

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___________________________________________________________________________________
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] 3+ messages in thread

end of thread, other threads:[~2021-07-15  5:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-14 18:41 number in \doloopoverlist? Pablo Rodriguez
2021-07-14 19:06 ` Wolfgang Schuster
2021-07-15  5:53   ` Pablo Rodriguez

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