Changes

Jump to navigation Jump to search
291 bytes added ,  16:30, 11 November 2019
no edit summary
|attributes=
}}
 
== [[Help:Reference|Syntax]] (autogenerated) ==
<syntax>recurselevel</syntax>
== [[Help:Reference|Syntax]] ==
== Description ==
The iteration count in a {{cmd|dorecurse}}, {{cmd|dostepwiserecurse}} or {{cmd|dostepwiserecursedoloop}}loopblock.
== Example ==
{\recurselevel...\ }
Counting stopped.
 
Counting up to 3:
\doloop{
\ifnum \recurselevel=3
\exitloop % exit at end of current iteration
\fi
\recurselevel!
}
</context>
** {{cmd|exitloop}} to exit a loop.
** {{cmd|exitloopnow}} to immediately exit a loop.
** {{cmd|looplevelrecurselevel}} to know which iteration the loop is in.** {{cmd|loopdepthrecursedepth}} to know how many nested loops deep we are.
* {{cmd|input}} is also often used to produce dummy text.
* [[Programming_in_LuaTeX#Loops_without_worrying_about_expansion|LuaTeX]] for heavier-duty looping and iterating.
[[Category:Command/Internals|recurselevel]]
table cellspacing="4" cellpadding="2" class="cmd">

Navigation menu