Difference between revisions of "Command/dorecurse"

From ConTeXt wiki
Jump to navigationJump to search
(More elaborate See Also)
(looplevel --> recurselevel)
Line 42: Line 42:
 
** {{cmd|exitloop}} to exit a loop.
 
** {{cmd|exitloop}} to exit a loop.
 
** {{cmd|exitloopnow}} to immediately exit a loop.
 
** {{cmd|exitloopnow}} to immediately exit a loop.
** {{cmd|looplevel}} to know which iteration the loop is in.
+
** {{cmd|recurselevel}} to know which iteration the loop is in.
** {{cmd|loopdepth}} to know how many nested loops deep we are.
+
** {{cmd|recursedepth}} to know how many nested loops deep we are.
 
* {{cmd|input}} is also often used to produce dummy text.
 
* {{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.
 
* [[Programming_in_LuaTeX#Loops_without_worrying_about_expansion|LuaTeX]] for heavier-duty looping and iterating.

Revision as of 09:59, 14 June 2012

\dorecurse

Syntax

\dorecurse{n}{commands}
{n} The number of times to repeat the commands
{commands} Commands or text to repeat

Description

Repeat something a number of times.

Example

\dorecurse{3}{Meow\low{\recurselevel}... }

See also

Help from ConTeXt-Mailinglist/Forum

All issues with: