[NTG-context] looping an overlay

Wolfgang Schuster wolfgang.schuster.lists at gmail.com
Wed Feb 24 19:44:06 CET 2021


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


More information about the ntg-context mailing list