Command/dostepwiserecurse

From Wiki
< Command
Revision as of 09:59, 14 June 2012 by Esteis (talk | contribs) (looplevel --> recurselevel)
Jump to navigation Jump to search

\dostepwiserecurse

Syntax

\dostepwiserecurse{start}{stop}{step}{commands}
{start} Initial value of recurselevel
{stop} Stop when recurselevel is higher than this (or when lower, if step is negative)
{step} Increment recurselevel by this much after each iteration
{commands} Commands or text to repeat

Description

Repeat something for start, start + step, start + 2*step, ..., continuing until stop is exceeded.

Example

Counting down:
\dostepwiserecurse{10}{4}{-2}
    {\recurselevel...\ }
Counting stopped.

Counting down again:
\dostepwiserecurse{10}{5}{-2}
    {\recurselevel...\ }
Counting stopped.

See also

Help from ConTeXt-Mailinglist/Forum

All issues with: