TypstDocumentation

range

Create an array consisting of a sequence of numbers.

If you pass just one positional parameter, it is interpreted as the end of the range. If you pass two, they describe the start and end of the range.

Example

#range(5) \
#range(2, 5) \
#range(20, step: 4) \
#range(21, step: 4) \
#range(5, 2, step: -1)
Preview

Parameters
Question mark

start
integerPositional
Question mark

The start of the range (inclusive).

end
integerRequiredPositional
Question mark

The end of the range (exclusive).

step

The distance between the generated numbers.