Info
This site is generated using the static site generator developed by the Typst Community. Please adjust the text content of this banner according to your usage requirements. At Typst GmbH's request, when publishing documentation, you must clearly indicate that it is non-official and display the version of Typst being documented. For details, refer to Issue #874 on typst/typst.
TypstDocumentEnglish
v0.dev.2025-09-12

list
Element
Element
Element functions can be customized with set and show rules.

A bullet list.

Displays a sequence of items vertically, with each item introduced by a marker.

Example

Normal list.
- Text
- Math
- Layout
- ...

Multiple lines.
- This list item spans multiple
  lines because it is indented.

Function call.
#list(
  [Foundations],
  [Calculate],
  [Construct],
  [Data Loading],
)
Preview

Syntax

This functions also has dedicated syntax: Start a line with a hyphen, followed by a space to create a list item. A list item can contain multiple paragraphs and other block-level content. All content that is indented more than an item's marker becomes part of that item.

Parameter
Parameter
Parameters are input values for functions. Specify them in parentheses after the function name.

tight
Settable
Settable
Settable parameters can be set using the set rule, changing the default value used thereafter.

Defines the default spacing of the list. If it is false, the items are spaced apart with paragraph spacing. If it is true, they use paragraph leading instead. This makes the list more compact, which can look better if the items are short.

In markup mode, the value of this parameter is determined based on whether items are separated with a blank line. If items directly follow each other, this is set to true; if items are separated by a blank line, this is set to false. The markup-defined tightness cannot be overridden with set rules.

Default value:

true

Show example
- If a list has a lot of text, and
  maybe other inline content, it
  should not be tight anymore.

- To make a list wide, simply insert
  a blank line between the items.
Preview

marker
Settable
Settable
Settable parameters can be set using the set rule, changing the default value used thereafter.

The marker which introduces each item.

Instead of plain content, you can also pass an array with multiple markers that should be used for nested lists. If the list nesting depth exceeds the number of markers, the markers are cycled. For total control, you may pass a function that maps the list's nesting depth (starting from 0) to a desired marker.

Default value:

([], [], [])

Show example
#set list(marker: [--])
- A more classic list
- With en-dashes

#set list(marker: ([], [--]))
- Top-level
  - Nested
  - Items
- Items
Preview

indent
Settable
Settable
Settable parameters can be set using the set rule, changing the default value used thereafter.

The indent of each item.

Default value:

0pt

body-indent
Settable
Settable
Settable parameters can be set using the set rule, changing the default value used thereafter.

The spacing between the marker and the body of each item.

Default value:

0.5em

spacing
Settable
Settable
Settable parameters can be set using the set rule, changing the default value used thereafter.

The spacing between the items of the list.

If set to auto, uses paragraph leading for tight lists and paragraph spacing for wide (non-tight) lists.

Default value:

auto

children
Required
Required
Required parameters must be specified when calling the function.
Positional
Positional
Positional parameters can be set by specifying them in order, omitting the parameter name.
Variadic
Variadic
Variadic parameters can be specified multiple times.

The bullet list's children.

When using the list syntax, adjacent items are automatically collected into lists, even through constructs like for loops.

Show example
#for letter in "ABC" [
  - Letter #letter
]
Preview

Definition
Definition
These functions and types can have related definitions. To access a definition, specify the name of the function or type, followed by the definition name separated by a period.

item
Element
Element
Element functions can be customized with set and show rules.

A bullet list item.

list.item()->

body
Required
Required
Required parameters must be specified when calling the function.
Positional
Positional
Positional parameters can be set by specifying them in order, omitting the parameter name.

The item's body.

Open official docs

Search