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

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

A list of terms and their descriptions.

Displays a sequence of terms and their descriptions vertically. When the descriptions span over multiple lines, they use hanging indent to communicate the visual hierarchy.

Example

/ Ligature: A merged glyph.
/ Kerning: A spacing adjustment
  between two adjacent letters.
Preview

Syntax

This function also has dedicated syntax: Starting a line with a slash, followed by a term, a colon and a description creates a term list item.

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

Defines the default spacing of the term 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:true

View example
/ Fact: If a term list has a lot
  of text, and maybe other inline
  content, it should not be tight
  anymore.

/ Tip: To make it wide, simply
  insert a blank line between the
  items.
Preview

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

The separator between the item and the description.

If you want to just separate them with a certain amount of space, use h(2cm, weak: true) as the separator and replace 2cm with your desired amount of space.

Default:h(amount: 0.6em, weak: true)

View example
#set terms(separator: [: ])

/ Colon: A nice separator symbol.
Preview

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

The indentation of each item.

Default:0pt

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

The hanging indent of the description.

This is in addition to the whole item's indent.

Default:2em

View example
#set terms(hanging-indent: 0pt)
/ Term: This term list does not
  make use of hanging indents.
Preview

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

The spacing between the items of the term list.

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

Default:auto

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

The term list's children.

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

View example
#for (year, product) in (
  "1978": "TeX",
  "1984": "LaTeX",
  "2019": "Typst",
) [/ #product: Born in #year.]
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

A term list item.

terms.item() -> content

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

The term described by the list item.

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

The description of the term.