ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* looping an overlay
@ 2021-02-24 18:23 Pablo Rodriguez
  2021-02-24 18:44 ` Wolfgang Schuster
  0 siblings, 1 reply; 3+ messages in thread
From: Pablo Rodriguez @ 2021-02-24 18:23 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Dear list,

I have the following sample:

  \starttext
    \startTEXpage[offset=1em]
      \startoverlay
        \dostepwiserecurse{25}{95}{5}
          {{\recurselevel\ }}
      \stopoverlay
    \stopTEXpage
  \stoptext

Which is the right way to loop an overlay?

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: looping an overlay
  2021-02-24 18:23 looping an overlay Pablo Rodriguez
@ 2021-02-24 18:44 ` Wolfgang Schuster
  2021-02-24 21:38   ` Pablo Rodriguez
  0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Schuster @ 2021-02-24 18:44 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Pablo Rodriguez

Pablo Rodriguez schrieb am 24.02.2021 um 19:23:
> Dear list,
> 
> I have the following sample:
> 
>    \starttext
>      \startTEXpage[offset=1em]
>        \startoverlay
>          \dostepwiserecurse{25}{95}{5}
>            {{\recurselevel\ }}
>        \stopoverlay
>      \stopTEXpage
>    \stoptext
> 
> Which is the right way to loop an overlay?

\starttext

\startluacode
context.startoverlay()
for i=25,95,5 do
     context("{%d}",i)
end
context.stopoverlay()
\stopluacode

\blank

\startcollecting
\collect{\startoverlay}
\dostepwiserecurse{25}{95}{5}{\collectexpanded{{\recurselevel}}}
\collect{\stopoverlay}
\stopcollecting

\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: looping an overlay
  2021-02-24 18:44 ` Wolfgang Schuster
@ 2021-02-24 21:38   ` Pablo Rodriguez
  0 siblings, 0 replies; 3+ messages in thread
From: Pablo Rodriguez @ 2021-02-24 21:38 UTC (permalink / raw)
  To: ntg-context

On 2/24/21 7:44 PM, Wolfgang Schuster wrote:
> Pablo Rodriguez schrieb am 24.02.2021 um 19:23:
>> [...]
>>    \starttext
>>      \startTEXpage[offset=1em]
>>        \startoverlay
>>          \dostepwiserecurse{25}{95}{5}
>>            {{\recurselevel\ }}
>>        \stopoverlay
>>      \stopTEXpage
>>    \stoptext
>>
>> Which is the right way to loop an overlay?
> [...]
> \startcollecting
> \collect{\startoverlay}
> \dostepwiserecurse{25}{95}{5}{\collectexpanded{{\recurselevel}}}
> \collect{\stopoverlay}
> \stopcollecting

Many thanks for your fast reply, Wolfgang.

This is exactly what I needed.

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-02-24 21:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-24 18:23 looping an overlay Pablo Rodriguez
2021-02-24 18:44 ` Wolfgang Schuster
2021-02-24 21:38   ` 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).