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

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

Cite a work from the bibliography.

Before you starting citing, you need to add a bibliography somewhere in your document.

Example

This was already noted by
pirates long ago. @arrgh

Multiple sources say ...
@arrgh @netwok.

You can also call `cite`
explicitly. #cite(<arrgh>)

#bibliography("works.bib")
Preview

If your source name contains certain characters such as slashes, which are not recognized by the <> syntax, you can explicitly call label instead.

Computer Modern is an example of a modernist serif typeface.
#cite(label("DBLP:books/lib/Knuth86a")).

Syntax

This function indirectly has dedicated syntax. References can be used to cite works from the bibliography. The label then corresponds to the citation key.

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

key
label
RequiredPositional
Positional parameters are specified in order, without names.

The citation key that identifies the entry in the bibliography that shall be cited, as a label.

View example
// All the same
@netwok \
#cite(<netwok>) \
#cite(label("netwok"))
Preview

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

A supplement for the citation such as page or chapter number.

In reference syntax, the supplement can be added in square brackets:

Default:none

View example
This has been proven. @distress[p.~7]

#bibliography("works.bib")
Preview

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

The kind of citation to produce. Different forms are useful in different scenarios: A normal citation is useful as a source at the end of a sentence, while a "prose" citation is more suitable for inclusion in the flow of text.

If set to none, the cited work is included in the bibliography, but nothing will be displayed.

Default:"normal"

View example
#cite(<netwok>, form: "prose")
show the outsized effects of
pirate life on the human psyche.
Preview

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

The citation style.

Should be either auto, one of the built-in styles (see below) or a path to a CSL file. Some of the styles listed below appear twice, once with their full name and once with a short alias.

When set to auto, automatically use the bibliography's style for the citations.

Default:auto