TypstDocumentation

direction

The four directions into which content can be laid out.

Possible values are:

These values are available globally and also in the direction type's scope, so you can write either of the following two:

#stack(dir: rtl)[A][B][C]
#stack(dir: direction.rtl)[A][B][C]
Preview

Definitions
Question mark

axis

The axis this direction belongs to, either "horizontal" or "vertical".

self.axis(
)
#ltr.axis() \
#ttb.axis()
Preview

start

The start point of this direction, as an alignment.

self.start(
) -> alignment
#ltr.start() \
#rtl.start() \
#ttb.start() \
#btt.start()
Preview

end

The end point of this direction, as an alignment.

self.end(
) -> alignment
#ltr.end() \
#rtl.end() \
#ttb.end() \
#btt.end()
Preview

inv

The inverse direction.

self.inv(
) -> direction
#ltr.inv() \
#rtl.inv() \
#ttb.inv() \
#btt.inv()
Preview