bibliography
ElementElement functions can be customized with set
and show
rules.
set
and show
rules.A bibliography / reference listing.
You can create a new bibliography by calling this function with a path to a bibliography file in either one of two formats:
- A Hayagriva
.yml
file. Hayagriva is a new bibliography file format designed for use with Typst. Visit its documentation for more details. - A BibLaTeX
.bib
file.
As soon as you add a bibliography somewhere in your document, you can start
citing things with reference syntax (@key
) or explicit calls to the
citation function (#cite("key")
). The bibliography will
only show entries for works that were referenced in the document.
Example
This was already noted by
pirates long ago. @arrgh
Multiple sources say ...
#cite("arrgh", "netwok").
#bibliography("works.bib")

ParametersParameters are the inputs to a function. They are specified in parentheses after the function name.
path
Path to a Hayagriva .yml
or BibLaTeX .bib
file.
title
The title of the bibliography.
- When set to
auto
, an appropriate title for the text language will be used. This is the default. - When set to
none
, the bibliography will not have a title. - A custom title can be set by passing content.
The bibliography's heading will not be numbered by default, but you can
force it to be with a show-set rule:
show bibliography: set heading(numbering: "1.")
Default: auto
style
SettableSettable parameters can be customized for all following uses of the function with a set
rule.
set
rule.The bibliography style.
"apa"
Follows guidance of the American Psychological Association. Based on the 7th edition of the APA Publication Manual.
"chicago-author-date"
The Chicago Author Date style. Based on the 17th edition of the Chicago Manual of Style, Chapter 15.
"chicago-notes"
The Chicago Notes style. Based on the 17th edition of the Chicago Manual of Style, Chapter 14.
"ieee"
The style of the Institute of Electrical and Electronics Engineers. Based on the 2018 IEEE Reference Guide.
"mla"
Follows guidance of the Modern Language Association. Based on the 8th edition of the MLA Handbook.
Default: "ieee"