未翻訳
このページはまだ翻訳されていません。原文の内容が表示されています。
toml
Reads structured data from a TOML file.
The file must contain a valid TOML table. TOML tables will be converted into Typst dictionaries, and TOML arrays will be converted into Typst arrays. Strings, booleans and datetimes will be converted into the Typst equivalents and numbers will be converted to floats or integers depending on whether they are whole numbers.
The TOML file in the example consists of a table with the keys title
,
version
, and authors
.
Example
#let details = toml("details.toml")
Title: #details.title \
Version: #details.version \
Authors: #(details.authors
.join(", ", last: " and "))

引数引数引数は関数への入力値です。関数名の後に括弧で囲んで指定します。
引数
引数は関数への入力値です。関数名の後に括弧で囲んで指定します。
定義定義これらの関数や型には、関連する定義を持たせることができます。定義にアクセスするには、対象の関数や型の名前を指定した後に、ピリオド区切りで定義名を記述します。
定義
これらの関数や型には、関連する定義を持たせることができます。定義にアクセスするには、対象の関数や型の名前を指定した後に、ピリオド区切りで定義名を記述します。
decode
`toml.decode` is deprecated, directly pass bytes to `toml` instead