TypstDocumentation

blockShowable
Question mark

A block-level container that places content into a separate flow.

This can be used to force elements that would otherwise be inline to become block-level. This is especially useful when writing show rules.

Example

#[
  #show heading: it => it.title
  = No block
  Some text
]

#[
  #show heading: it => block(it.title)
  = Block
  Some more text
]
Preview

Parameters
Question mark

body
contentPositional
Question mark

The contents of the block.

spacing
relative lengthfractionSettable
Question mark

The spacing around this block.

above
relative lengthfractionSettable
Question mark

The spacing between this block and its predecessor. Takes precedence over spacing.

The default value is 1.2em.

below
relative lengthfractionSettable
Question mark

The spacing between this block and its successor. Takes precedence over spacing.

The default value is 1.2em.