Changes

Jump to navigation Jump to search
m
looplevel --> recurselevel; add this into example
== 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