reusable-footnotes
Page-local reusable bibliographic footnotes for Quarto
Why this pattern matters
reusable-footnotes is designed for a citation pattern that is especially common in Law. Legal scholarship, briefs, opinions, memoranda, and books frequently place bibliographic references in page footnotes rather than relying only on a final reference list. The same practice is also familiar in History, Philosophy, Theology, Classics, literary studies, and other Humanities disciplines.
The important distinction is between the bibliographic source and its footnote occurrences. BibTeX should define the source once; Quarto should decide how that source is rendered wherever it is used.
For printable outputs, this has an important practical consequence. In PDF and DOCX, the reader can encounter the full source at the bottom of the same page as the proposition it supports. A reference cited again on another page can therefore appear again on that later page, while repeated uses on the same page can share one footnote.
The intended page-local behavior is:
page 1 A¹ ... A¹ ... B²
─────────────────
¹ Full reference A
² Full reference B
page 2 A³ ... A³ ... B⁴ # continuous numbering
─────────────────
³ Full reference A
⁴ Full reference B
or, when numbering restarts on every page:
page 1 A¹ ... A¹ ... B²
page 2 A¹ ... A¹ ... B²
In both cases, the source is repeated between pages, but not unnecessarily duplicated within the same page.
BibTeX and full bibliography entries
A normal Pandoc/Quarto citation remains completely unchanged:
A normal citation stays normal: [@silva2026].
For example: a normal citation stays normal (Silva 2026).
The development version of Fred Guth’s bibentry extension adds a second representation:
[@silva2026]{.bibentry}
That form prints the full bibliography entry using the bibliography layout of the active CSL style. It does not redefine what @silva2026 means.
Here is the full entry inline:
Silva, José Afonso da. 2026. Curso de Direito Constitucional Positivo. 47th ed. JusPodivm.
With:
bibliography: references.bib
csl: your-style.cslordinary citations use the CSL citation layout, while .bibentry extracts the corresponding bibliography-layout entry.
Legal-style footnotes
The useful composition remains native Pandoc syntax:
A legal proposition.^[See [@silva2026]{.bibentry}]
Rendered here:
A constitutional proposition may be supported in a page footnote.1
The Constitution itself can be rendered in full the same way.2
The mechanism is not limited to Law. A historical argument can use the same pattern.3
Multi-page print demonstration
The following example is intentionally spread over several physical pages using Quarto’s native pagebreak shortcode. This makes the page-local behavior visible in PDF and DOCX rather than keeping all examples on one page.
Demonstration page 1
A printable legal document often develops an argument over several paragraphs while keeping authorities immediately available to the reader. The first occurrence below creates the full footnote for José Afonso da Silva.1
A later sentence on the same page can rely on exactly the same bibliographic footnote without printing the long entry a second time.1
The Constitution is a distinct source and therefore receives its own footnote.2
This page-local model is useful when the body text is intended to be read on paper or as a paginated digital document: the source remains close to the proposition, but repeated use of the same source does not make the bottom of the page unnecessarily repetitive.
A final sentence on this first page cites the Constitution again. Because the footnote content is identical and the occurrence is on the same page, it reuses the existing note.2
Demonstration page 2
This second page deliberately cites the same authorities again. The Silva reference must now be printed again at the bottom of this page, because a reader should not need to return to the previous page to identify the source.1
A second occurrence on this same page should reuse the new page-local Silva footnote.1
The Constitution likewise receives a new page-local occurrence here.2
The point is not to treat the bibliographic source as a new source. BibTeX still contains only one silva2026 entry and one brasil1988 entry. What changes is the placement of the footnote instance in the printable document.
This page ends by citing the Constitution once more, demonstrating reuse within the second page.2
Demonstration page 3
A third page repeats the same pattern. José Afonso da Silva appears again as a footnote on this page.1
The same source can be invoked again without duplicating the footnote text on this page.1
A historical source can participate in exactly the same mechanism.3
A second reference to the historical source on the same page reuses its page-local note.3
The result is a document in which each printed page carries the references needed to understand that page, while identical notes are not redundantly printed twice on the same page.
Configuration
The repository example uses page-local reuse and restarts footnote numbering on every page:
bibliography: references.bib
filters:
- bibentry
- reusable-footnotes
reusable-footnotes:
enabled: true
backlinks: true
scope: page
numbering: page
docx-scope: pagebreak
format:
html:
toc: true
pdf:
toc: true
pdf-engine: lualatex
docx:
toc: false
reference-doc: _extensions/reusable-footnotes/reference-page.docxThe main options are:
scope: page: identical notes are reused only within the current page scope and may appear again later.numbering: page: numbering restarts at1on every printed page.numbering: continuous: numbering continues across pages while reuse remains page-local.docx-scope: pagebreak: explicitboundaries define deterministic DOCX page scopes before Word performs final layout.backlinks: true: HTML adds discreet return links for repeated calls to the same local footnote.
For continuous numbering, change only:
reusable-footnotes:
scope: page
numbering: continuous
docx-scope: pagebreakFor DOCX page-local numbering, the supplied reference-page.docx configures Word’s native footnote counter to restart on each page. For continuous DOCX numbering, omit that reference document or use a custom continuous-numbering reference DOCX.
HTML websites and books
A standalone HTML document is one scrolling document, so there is no physical-page concept comparable to PDF or DOCX. The whole file is therefore one logical reusable-footnote scope.
A Quarto website or HTML book is different: each .qmd page or chapter is rendered as its own HTML page. The reusable-footnote scope starts fresh for every page, but numbering can either restart or continue globally.
Page-local numbering
Each rendered HTML page starts again at 1; repeated calls within the page reuse the local canonical footnote.
quarto preview examples/website
quarto preview examples/bookGlobal numbering
The footnote scope remains page-local, but the displayed numbers continue across pages. In the examples below, the first page contributes 1, 2, the second 3, 4, and the third 5, 6.
quarto preview examples/website-global
quarto preview examples/book-globalBecause Quarto renders each HTML page independently, continuous project-wide numbering needs an explicit page order:
reusable-footnotes:
scope: page
numbering: continuous
html-order:
- index.qmd
- doctrine.qmd
- constitution.qmdhtml-order is used only to calculate the numbering offset contributed by earlier pages. It does not merge their footnote scopes. A source cited on two pages can therefore appear in both pages’ footnote areas while receiving different numbers in a continuous sequence.
This gives four distinct, demonstrable HTML modes in the repository: website/local, website/global, book/local, and book/global.
Why BibTeX remains the source of truth
The author should not copy and paste formatted references into ^[...]. The .bib entry provides the stable bibliographic identity:
@book{silva2026,
author = {Silva, José Afonso da},
title = {Curso de direito constitucional positivo},
edition = {47},
address = {São Paulo},
publisher = {JusPodivm},
year = {2026},
note = {Coedição Malheiros}
}The same entry can then be represented in three different ways without duplicating data:
Normal citation: [@silva2026]
Full entry: [@silva2026]{.bibentry}
Full entry in a footnote: ^[See [@silva2026]{.bibentry}]
bibentry integration
This repository currently vendors an extended development version of Fred Guth’s bibentry extension under _extensions/bibentry/ for integration testing. The original project is MIT licensed and remains credited to Frederico Guth.
The proposed upstream changes add recursive AST support, including .bibentry inside native footnotes; true inline replacement; a single citeproc pass preserving numeric CSL ordering; and portable AST output for HTML, PDF/LaTeX, DOCX, and Typst.
bibentry and reusable-footnotes have separate responsibilities:
bibentryresolves a citation key and renders its full CSL bibliography form;reusable-footnotesdecides when an identical footnote occurrence should be reused locally or printed again on a later page.
Output formats
| Format | Page-local behavior |
|---|---|
| HTML document | the whole HTML file is one logical page |
| HTML website/book | each .qmd page owns its footnotes; numbering may restart or continue globally |
| true physical-page reuse; identical notes print once per page and may reappear on later pages | |
| DOCX | exact reuse within explicit pagebreak-delimited pages; Word can restart numbering on every physical page through the supplied reference document |
No Python runtime or post-render Python step is required.
References
Footnotes
See Silva, José Afonso da. 2026. Curso de Direito Constitucional Positivo. 47th ed. JusPodivm. ↩︎ ↩︎ ↩︎ ↩︎ ↩︎ ↩︎ ↩︎
See Brasil. 1988. Constituição Da República Federativa Do Brasil de 1988. Presidência da República. https://www.planalto.gov.br/ccivil_03/constituicao/constituicao.htm. ↩︎ ↩︎ ↩︎ ↩︎ ↩︎
See Bloch, Marc. 1953. The Historian’s Craft. Manchester University Press. ↩︎ ↩︎ ↩︎