Citations & Footnotes

Introduction

This guide provides an overview of how to include citations and footnotes in your Quarto documents. It covers the following topics:

  • Formatting basics using BibLaTeX, BibTeX, and CSL for precise citation styles.
  • Automatic bibliography generation and customization.
  • Advanced features including footnote formatting and the inclusion of uncited items.


Citations

You’ll need:

  • A Quarto document with citations.
  • A bibliography source file, like BibLaTeX (.bib) or BibTeX (.bibtex).
  • Optionally, a CSL file for specific formatting (when not using natbib or biblatex).

Bibliography Files

Specify a bibliography file field in the YAML metadata.:

---
title: "My Document"
bibliography: references.bib
---

Citation Syntax

  • Citations are in square brackets, separated by semicolons: [@citation] or [@citation1; @citation2].
  • Each citation has a key starting with @ plus an identifier from the database.
  • Keys must start with a letter, digit, or _, and can include alphanumerics, _, and certain punctuation (:.#$%&-+?<>~/).

Here is examples of a citations in a markdown document:

Markdown Format:

  1. Blah Blah (see Knuth 1984, 33–35; also Wickham 2015, chap. 1)
  2. Blah Blah (Knuth 1984, 33–35, 38–39 and passim)
  3. Blah Blah (Wickham 2015; Knuth 1984)
  4. Wickham says blah (2015)

Output (default):

  1. Blah Blah (see Knuth 1984, 33–35; also Wickham 2015, chap. 1)
  2. Blah Blah (Knuth 1984, 33–35, 38–39 and passim)
  3. Blah Blah (Wickham 2015; Knuth 1984)
  4. Wickham says blah (2015)

Output (csl):

  1. Blah Blah see [1], pp. 33-35; also [1], chap. 1
  2. Blah Blah [1], pp. 33-35, 38-39 and passim
  3. Blah Blah [1, 2]
  4. Wickham says blah [1]

csl: diabetologia.csl, see Section 2.3

Citation Style

---
title: "My Document"
bibliography: references.bib
csl: nature.csl
---

Bibliography Generation

  • Automatically generated
  • Placed at the end of the document by default (or in a div with the id refs if one exists):
### References

::: {#refs}
:::
Tip

You can suppress generation of a bibliography by including suppress-bibliography: true option in your document metadata

Example of a generated bibliography:

Knuth, Donald E. 1984. “Literate Programming.” The Computer Journal 27 (2): 97–111.
Wickham, Hadley. 2015. R Packages. 1st ed. O’Reilly Media, Inc.

Including Uncited Items

To add bibliography items not cited in the text, use a nocite metadata field for the citations.

---
nocite: |
  @item1, @item2
---

@item3

In this example, the document will contain a citation for item3 only, but the bibliography will contain entries for item1, item2, and item3.

Footnotes

Syntax:

Here is a footnote reference,[^1] and another.[^longnote]

[^1]: Here is the footnote.

[^longnote]: Here's one with multiple blocks.

    Subsequent paragraphs are indented to show that they belong to the previous footnote.

        { some.code }

    The whole paragraph can be indented, or just the first line. 
    In this way, multi-paragraph footnotes work like multi-paragraph list items.

This paragraph won't be part of the note, because it isn't indented.

Output

Here is a footnote reference,1 and another.2

This paragraph won’t be part of the note, because it isn’t indented.

In addition, you can also write single paragraph footnotes inline using the following syntax:

Here is an inline note.^[Inlines notes are easier to write, since you don't have to pick an identifier and move down to type the note.]

Output

Here is an inline note.3

Note

The footnotes that are generated from the above examples are included in the following section. See the Pandoc Footnotes for additional information.

Footnotes

  1. Here is the footnote.↩︎

  2. Here’s one with multiple blocks.

    Subsequent paragraphs are indented to show that they belong to the previous footnote.

    { some.code }

    The whole paragraph can be indented, or just the first line. In this way, multi-paragraph footnotes work like multi-paragraph list items.↩︎

  3. Inlines notes are easier to write, since you don’t have to pick an identifier and move down to type the note.↩︎