注意 当サイトは、Typst v0.11.1 公式ドキュメントを、日本語コミュニティが非公式に翻訳したものです。誤訳・未訳・古い情報が含まれている可能性があるため、公式ドキュメント との併用を推奨します。このサイトの内容に誤りを発見された方は、GitHubリポジトリまでご報告を頂けましたら幸いです。我々のコミュニティにご興味のある方は、ぜひ非公式Discordサーバー「くみはんクラブ」にご参加ください。
Warning: This site provides an unofficial translation of the Typst v0.11.1 documentation by the Japanese Community. Please note that there may be some inaccuracies, untranslated sections or outdated information. We highly recommend referring to the latest official documentation as well. If you find any errors in the content, please let us know through our GitHub repository. If you are interested in our community, feel free to join our unofficial Discord server, “Kumihan Club.”
Typst ドキュメント日本語版

list 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.

Parameters
Parameters are the inputs to a function. They are specified in parentheses after the function name.

tight
bool
Settable
Settable parameters can be customized for all following uses of the function with a set rule.

If this is false, the items are spaced apart with list spacing. If it is true, they use normal 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.

Default:true

View 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
content array function
Settable
Settable parameters can be customized for all following uses of the function with a set rule.

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:([], [], [])

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

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

indent
length
Settable
Settable parameters can be customized for all following uses of the function with a set rule.

The indent of each item.

Default:0pt

body-indent
length
Settable
Settable parameters can be customized for all following uses of the function with a set rule.

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

Default:0.5em

spacing
auto relative fraction
Settable
Settable parameters can be customized for all following uses of the function with a set rule.

The spacing between the items of a wide (non-tight) list.

If set to auto, uses the spacing below blocks.

Default:auto

children
content
RequiredPositional
Positional parameters are specified in order, without names.
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.

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

Definitions
Functions and types and can have associated definitions. These are accessed by specifying the function or type, followed by a period, and then the definition's name.

item

A bullet list item.

list.item() -> content

body
content
RequiredPositional
Positional parameters are specified in order, without names.

The item's body.