bibliographyElement
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
.yaml/.ymlfile. Hayagriva is a new bibliography file format designed for use with Typst. Visit its documentation for more details. - A BibLaTeX
.bibfile.
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 ...
@arrgh @netwok.
#bibliography("works.bib")

Styles
Typst offers a wide selection of built-in citation and bibliography styles. Beyond those, you can add and use custom CSL (Citation Style Language) files. Wondering which style to use? Here are some good defaults based on what discipline you’re working in:
| Fields | Typical Styles |
|---|---|
| Engineering, IT | "ieee" |
| Psychology, Life Sciences | "apa" |
| Social sciences | "chicago-author-date" |
| Humanities | "mla", "chicago-notes", "harvard-cite-them-right" |
| Economics | "harvard-cite-them-right" |
| Physics | "american-physics-society" |
Multiple bibliographies
When a Typst document contains multiple bibliographies, each citation is assigned to one of them. By default, Typst will automatically pick a suitable bibliography (typically, the closest following one that contains the referenced citation key). This covers common cases like by-chapter or thematic bibliographies. For more fine-grained control, citations can be explicitly targeted by a bibliography through a target selector.
Parameters
sources
One or multiple paths to or raw bytes for Hayagriva .yaml and/or BibLaTeX .bib files.
This can be a:
- A path string or
pathto load a bibliography file from. - Raw bytes from which the bibliography should be decoded.
- An array where each item is one of the above.
titleDefault: auto
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.")
fullDefault: false
Whether to include all works from the given bibliography files, even those that weren’t cited in the document.
To selectively add individual cited works without showing them, you can also use the cite function with form set to none.
styleDefault: "ieee"
The bibliography style.
This can be:
- A string with the name of one of the built-in styles (see below). Some of the styles listed below appear twice, once with their full name and once with a short alias.
- A path string or
pathto a CSL file. - Raw bytes from which a CSL style should be decoded.
View options
| Variant | Details |
|---|---|
"alphanumeric" | Alphanumeric |
"american-anthropological-association" | American Anthropological Association |
"american-chemical-society" | ACS Guide 2022 revision |
"american-geophysical-union" | American Geophysical Union |
"american-institute-of-aeronautics-and-astronautics" | American Institute of Aeronautics and Astronautics |
"american-institute-of-physics" | AIP Style Manual 4th edition |
"american-medical-association" | AMA Manual of Style 11th edition |
"american-meteorological-society" | American Meteorological Society |
"american-physics-society" | American Physical Society |
"american-physiological-society" | American Physiological Society |
"american-political-science-association" | APSA Style Manual revised 2018 edition |
"american-psychological-association" | APA Style 7th edition |
"apa" | A short alias of american-psychological-association |
"american-society-for-microbiology" | American Society for Microbiology |
"american-society-of-civil-engineers" | American Society of Civil Engineers |
"american-society-of-mechanical-engineers" | American Society of Mechanical Engineers |
"american-sociological-association" | ASA Style Guide 6th/7th edition |
"angewandte-chemie" | Angewandte Chemie International Edition |
"annual-reviews" | Annual Reviews (sorted by order of appearance) |
"annual-reviews-author-date" | Annual Reviews (author-date) |
"associacao-brasileira-de-normas-tecnicas" | Associação Brasileira de Normas Técnicas (Português - Brasil) |
"association-for-computing-machinery" | Association for Computing Machinery |
"biomed-central" | BioMed Central |
"bristol-university-press" | Bristol University Press |
"british-medical-journal" | BMJ |
"bmj" | A short alias of british-medical-journal |
"cell" | Cell |
"chicago-author-date" | Chicago Manual of Style 18th edition (author-date) |
"chicago-notes" | Chicago Manual of Style 18th edition (notes and bibliography) |
"chicago-fullnotes" | A short alias of chicago-notes |
"chicago-shortened-notes" | Chicago Manual of Style 18th edition (shortened notes and bibliography) |
"copernicus" | Copernicus Publications |
"cse-citation-sequence-brackets-8th-edition" | CSE Manual: Scientific Style and Format 8th edition (citation-sequence, brackets) |
"council-of-science-editors" | A short alias of cse-citation-sequence-brackets-8th-edition |
"cse-name-year" | CSE Manual: Scientific Style and Format 9th edition (name-year) |
"council-of-science-editors-author-date" | A short alias of cse-name-year |
"current-opinion" | Current Opinion journals |
"deutsche-gesellschaft-für-psychologie" | Deutsche Gesellschaft für Psychologie 5. Auflage (Deutsch) |
"deutsche-sprache" | Deutsche Sprache (Deutsch) |
"elsevier-harvard" | Elsevier (author-date/Harvard, with titles) |
"elsevier-vancouver" | Elsevier - NLM/Vancouver (citation-sequence) |
"elsevier-with-titles" | Elsevier (numeric, with titles) |
"frontiers" | Frontiers journals |
"future-medicine" | Future Medicine journals |
"future-science" | Future Science Group |
"gb-7714-2005-numeric" | China National Standard GB/T 7714-2005 (numeric, 中文) |
"gb-7714-2015-author-date" | China National Standard GB/T 7714-2015 (author-date, 中文) |
"gb-7714-2015-note" | China National Standard GB/T 7714-2015 (note, 中文) |
"gb-7714-2015-numeric" | China National Standard GB/T 7714-2015 (numeric, 中文) |
"gost-r-705-2008-numeric" | Russian GOST R 7.0.5-2008 (numeric) |
"harvard-cite-them-right" | Cite Them Right 12th edition (author-date/Harvard) |
"institute-of-electrical-and-electronics-engineers" | IEEE Reference Guide version 11.29.2023 |
"ieee" | A short alias of institute-of-electrical-and-electronics-engineers |
"institute-of-physics-numeric" | Institute of Physics (numeric) |
"iso-690-author-date" | ISO-690 (author-date, English) |
"iso-690-numeric" | ISO-690 (numeric, English) |
"karger" | Karger journals |
"mary-ann-liebert-vancouver" | Mary Ann Liebert - NLM/Vancouver |
"modern-humanities-research-association-notes" | MHRA Style Guide 4th edition (notes) |
"modern-humanities-research-association" | A short alias of modern-humanities-research-association-notes |
"modern-language-association" | MLA Handbook 9th edition (in-text citations) |
"mla" | A short alias of modern-language-association |
"modern-language-association-8" | A short alias of modern-language-association |
"mla-8" | A short alias of modern-language-association |
"multidisciplinary-digital-publishing-institute" | Multidisciplinary Digital Publishing Institute |
"nature" | Nature |
"nlm-citation-sequence" | NLM/Vancouver: Citing Medicine 2nd edition (citation-sequence) |
"vancouver" | A short alias of nlm-citation-sequence |
"nlm-citation-sequence-superscript" | NLM/Vancouver: Citing Medicine 2nd edition (citation-sequence, superscript) |
"vancouver-superscript" | A short alias of nlm-citation-sequence-superscript |
"pensoft" | Pensoft Journals |
"public-library-of-science" | Public Library of Science |
"plos" | A short alias of public-library-of-science |
"royal-society-of-chemistry" | Royal Society of Chemistry |
"sage-vancouver" | SAGE - NLM/Vancouver |
"sist02" | SIST02 (日本語) |
"spie" | SPIE journals |
"springer-basic" | Springer - Basic (numeric, brackets) |
"springer-basic-author-date" | Springer - Basic (author-date) |
"springer-fachzeitschriften-medizin-psychologie" | Springer - Fachzeitschriften Medizin Psychologie (Deutsch) |
"springer-humanities-author-date" | Springer - Humanities (author-date) |
"springer-lecture-notes-in-computer-science" | Springer - Lecture Notes in Computer Science |
"springer-mathphys" | Springer - MathPhys (numeric, brackets) |
"springer-socpsych-author-date" | Springer - SocPsych (author-date) |
"springer-vancouver" | Springer - NLM/Vancouver (citation-sequence, brackets) |
"taylor-and-francis-chicago-author-date" | Taylor & Francis Journals Standard Reference Style Guide: Chicago author-date version 2.0 |
"taylor-and-francis-national-library-of-medicine" | Taylor & Francis - NLM/Vancouver (citation-sequence, brackets) |
"the-institution-of-engineering-and-technology" | The Institution of Engineering and Technology |
"the-lancet" | The Lancet |
"thieme" | Thieme-German (Deutsch) |
"trends" | Trends journals |
"turabian-author-date" | Chicago Manual of Style 17th edition (author-date) |
"turabian-fullnote-8" | Chicago Manual of Style 17th edition (notes and bibliography, subsequent author-title) |
targetDefault: auto
Defines which citations to include in the bibliography.
Typst will automatically assign each citation in the document to a bibliography. Concretely, a citation will be assigned to (in order of precedence)
- the first bibliography that includes it in its
targetselector; or if no such bibliography exists - the closest following bibliography with
target: autothat contains its key; or if no such bibliography follows - the closest preceding bibliography with
target: autothat contains its key.
View example: Local bibliography
#let info(body) = block(
stroke: (left: 1.5pt + blue),
fill: aqua.lighten(50%),
inset: 1em,
context {
body
show divider: set block(spacing: 1.2em)
divider()
bibliography(
"works.bib",
title: none,
target: selector(cite).within(here()),
style: "mla",
)
}
)
= On the matter of dumplings
In recent years, we can observe an uptick in
dumpling consumption across the board. @netwok
#info[
Dumplings are particularly enjoyed
among pirates. @arrgh
]
#bibliography("works.bib")

groupDefault: auto
Conceptually groups this bibliography with other bibliographies for numbering purposes. Bibliographies in the same group will assign consecutive citation numbers.
This can be:
none: The bibliography will be numbered in isolation.auto: The bibliography will be consecutively numbered with all other bibliographies in theautogroup.- A string: The bibliography will be consecutively numbered with all other bibliographies with the same
groupvalue.
The auto group works just like any string group, but it is the canonical default group.
View example: Consecutive citation numbers
#show bibliography: set heading(
offset: 1,
)
= First part
Starts at one: @netwok @arrgh
#bibliography(
"works.bib",
style: "ieee",
)
= Second part
Continues with three: @distress
#bibliography(
"works.bib",
style: "nlm-citation-sequence",
)

View example: Separate citation numbers
#show bibliography: set heading(
offset: 1,
)
#set bibliography(group: none)
= First part
Starts at one: @netwok @arrgh
#bibliography(
"works.bib",
style: "ieee",
)
= Second part
Resets to one: @distress
#bibliography(
"works.bib",
style: "nlm-citation-sequence",
)
