注意 当サイトは、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 ドキュメント日本語版

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

The root element of a document and its metadata.

All documents are automatically wrapped in a document element. You cannot create a document element yourself. This function is only used with set rules to specify document metadata. Such a set rule must appear before any of the document's contents.

#set document(title: [Hello])

This has no visible output, but
embeds metadata into the PDF!
Preview

Note that metadata set with this function is not rendered within the document. Instead, it is embedded in the compiled PDF file.

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

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

The document's title. This is often rendered as the title of the PDF viewer window.

While this can be arbitrary content, PDF viewers only support plain text titles, so the conversion might be lossy.

Default:none

author
str array
Settable
Settable parameters can be customized for all following uses of the function with a set rule.

The document's authors.

Default:()

keywords
str array
Settable
Settable parameters can be customized for all following uses of the function with a set rule.

The document's keywords.

Default:()

date
none auto datetime
Settable
Settable parameters can be customized for all following uses of the function with a set rule.

The document's creation date.

If this is auto (default), Typst uses the current date and time. Setting it to none prevents Typst from embedding any creation date into the PDF metadata.

The year component must be at least zero in order to be embedded into a PDF.

If you want to create byte-by-byte reproducible PDFs, set this to something other than auto.

Default:auto