Footnotes
Add footnotes with [^label], write long and multi-paragraph notes, and know where they render and how they are numbered
A footnote moves an aside out of the sentence without losing it: a source, a technical caveat, a proof detail most readers can skip. You mark the place in the text and write the note anywhere in the document; the page numbers them and collects them at the end.
Syntax
A footnote has two halves. The reference [^label] goes in the text,
directly after the word or punctuation it annotates. The definition
[^label]: text goes on its own line, anywhere in the document:
The bound was later improved to .1
The bound was later improved to $O(n \log n)$.[^tao2019]
[^tao2019]: T. Tao, "Universality of random matrices", 2019.The rendered note is at the very bottom of this page, under the last section, with a small arrow that jumps back to where it was referenced. The same happens in a publication.
How numbering works
- Readers see numbers, never your labels. Notes are numbered 1, 2, 3 in the
order they are first referenced in the text, not the order their definitions
appear.
[^tao2019]shows as a superscript number. - Labels are for you. Pick ones that tell you what the note is
(
[^tao2019],[^proof-sketch]), so you can find it while editing. A label is a word without spaces; digits work too ([^1]), but a descriptive label survives reordering, and a numbered one soon reads out of order in the source. - Referencing the same note twice reuses its number and gives the note one back-arrow per reference.
- A definition nobody references is dropped, and a reference without a
definition stays as the literal text
[^label], so a typo is visible on the page rather than silently lost.
Longer notes
A note can hold more than one paragraph, a list, or display maths. Indent everything after the first line by four spaces:
Stirling's formula is accurate even for small .2
Stirling's formula is accurate even for small $n$.[^stirling]
[^stirling]: For $n = 10$ the relative error is below one percent.
The next term of the asymptotic series gives
$$
n! \approx \sqrt{2\pi n}\left(\frac{n}{e}\right)^n \left(1 + \frac{1}{12n}\right).
$$Inline formatting, links and inline maths work inside any note.
Where to write the definitions
Anywhere works, because the position of a definition does not affect where the note renders. Two habits keep a long document manageable:
- Next to the paragraph, when you are drafting and the note is part of the thought. The source reads almost like the page.
- At the end of each section, the way reference links are usually kept, when the notes are many and short.
Either way, keep one convention per document.
Footnotes and citations
Footnotes are the way to give a source in a document today. The [@key]
citation syntax is reserved for references resolved against a bibliography,
but the published page does not resolve it yet: it shows your text as written.
Until it does, cite in a footnote, and give a DOI or an arXiv link where one
exists so the reader can reach the source in one click.
Keep notes short and few. A note that runs longer than the paragraph it annotates usually belongs in the text, or in an appendix section of its own.