注意 当サイトは、Typst v0.13.1 公式ドキュメントを、日本語コミュニティが非公式に翻訳したものです。誤訳・未訳・古い情報が含まれている可能性があるため、公式ドキュメント との併用を推奨します。このサイトの内容に誤りを発見された方は、GitHubリポジトリまでご報告を頂けましたら幸いです。我々のコミュニティにご興味のある方は、ぜひ非公式Discordサーバー「くみはんクラブ」にご参加ください。
Warning: This site provides an unofficial translation of the Typst v0.13.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.

箇条書きリスト。

各項目の先頭にマーカーを付け、 一連の項目を縦に並べて表示します。

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

構文

この関数には専用の構文もあります。 行頭にハイフンとスペースを置くことでリスト項目を作成します。 リスト項目には複数の段落や、他のブロックレベルコンテンツを含めることができます。 リスト項目の記号よりも深く字下げされた全てのコンテンツは、そのリスト項目の一部になります。

引数
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.

リストのデフォルトのspacingを定義します。 これがfalseの場合、 項目の間隔はparagraph spacingによって決まります。 trueの場合、代わりにparagraph leadingが使用されます。 これによりリストがよりコンパクトになり、 各項目が短い場合に見栄えが良くなります。

マークアップモードでは、 この引数の値は項目が空行で区切られているかどうかに基づいて決定されます。 項目間に空行がなく連続している場合、この値はtrueに設定されますが、 項目間が空行で区切られている場合はfalseに設定されます。 マークアップで定義された間隔はsetルールで上書きすることはできません。

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.

各項目の先頭に付けるマーカー。

単純なコンテンツの代わりに、ネストされたリストに使用する、 複数のマーカーを持つ配列を渡すこともできます。 リストのネストの深さがマーカーの数を超えた場合、使用されるマーカーは循環します。 完全に制御したい場合は、 リストのネストの深さ(0から開始する)に応じて、使用するマーカーを決める関数を渡すこともできます。

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.

各項目のインデント。

Default:0pt

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

各項目のマーカーと本文の間隔を指定します。

Default:0.5em

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

リストの項目同士の間隔を指定します。

autoに設定すると、 コンパクトなリストの場合はleadingを、 幅のある(コンパクトでない)リストの場合は段落のspacingを使用します。

Default:auto

children
content
RequiredPositional
Positional parameters are specified in order, without names.
Variadic
Variadic parameters can be specified multiple times.

箇条書きリストの項目。

list構文を使用する場合、forループのような構造を挟んでも、 隣接する項目は自動的にリストとしてまとめられます。

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

定義
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 Element
Element functions can be customized with set and show rules.

箇条書きリストの項目。

list.item() -> content

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

項目の本文。