Background
In #834 (commit 3694557, "docs: consolidate bibliography into a single global references page") we replaced ~22 per-notebook :::{bibliography}::: blocks with a single global docs/source/references.rst. The change was forced by an upstream limitation in sphinxcontrib-bibtex: per-document bibliographies produced bibtex.duplicate_citation warnings for every shared key and, more critically, the rendered citation hyperlinks resolved non-deterministically — a {cite:t} on page A could silently link to page B's bibliography. The trade-off was readers leaving the page they were on to see a reference, which is a meaningful UX regression for an educational docs site.
We filed mcmtroffaes/sphinxcontrib-bibtex#385 describing the problem and proposing a same-document-preferred resolution. The maintainer addressed it in PR #387, slated for the 2.7.0 release. We then dogfooded the develop branch (2.7.0a0) against CausalPy and confirmed:
- Citation hyperlinks now resolve to the same page when the citing notebook has its own
:::{bibliography}::: block, even when other notebooks register the same key.
- Cross-document duplicate noise can be suppressed cleanly with
suppress_warnings = ["bibtex.duplicate_citation"] while real same-page duplicates still surface via the new bibtex.duplicate_local_citation category.
What to do
Once sphinxcontrib-bibtex 2.7.0 is tagged on PyPI, undo the centralisation from #834 and restore per-document bibliographies.
Tasks
Blockers
sphinxcontrib-bibtex 2.7.0 has not yet been released. Latest on PyPI is 2.6.5 (2025-06-27). The fix is on the develop branch as 2.7.0a0. Hold this issue until the tag lands.
References
Background
In #834 (commit
3694557, "docs: consolidate bibliography into a single global references page") we replaced ~22 per-notebook:::{bibliography}:::blocks with a single global docs/source/references.rst. The change was forced by an upstream limitation insphinxcontrib-bibtex: per-document bibliographies producedbibtex.duplicate_citationwarnings for every shared key and, more critically, the rendered citation hyperlinks resolved non-deterministically — a{cite:t}on page A could silently link to page B's bibliography. The trade-off was readers leaving the page they were on to see a reference, which is a meaningful UX regression for an educational docs site.We filed mcmtroffaes/sphinxcontrib-bibtex#385 describing the problem and proposing a same-document-preferred resolution. The maintainer addressed it in PR #387, slated for the 2.7.0 release. We then dogfooded the
developbranch (2.7.0a0) against CausalPy and confirmed::::{bibliography}:::block, even when other notebooks register the same key.suppress_warnings = ["bibtex.duplicate_citation"]while real same-page duplicates still surface via the newbibtex.duplicate_local_citationcategory.What to do
Once
sphinxcontrib-bibtex 2.7.0is tagged on PyPI, undo the centralisation from #834 and restore per-document bibliographies.Tasks
sphinxcontrib-bibtex>=2.7.0(and regenerateenvironment.ymlvia the standard script).suppress_warnings = ["bibtex.duplicate_citation"]to docs/source/conf.py.## Referencesmarkdown cell with:::{bibliography}:filter: docname in docnames:::to each of the ~22 documents that lost it in3694557. Usenbformat-based tooling, not in-place notebook editors, to keep diffs clean.../referencestoctree entry in docs/source/knowledgebase/index.md.3694557) and re-add it as part of the consistent rollout, so it is no longer an inconsistent special case.make html) and verify zerobibtex.duplicate_local_citationwarnings; spot-check a handful of rendered pages to confirm citation links resolve to in-page anchors.Blockers
sphinxcontrib-bibtex 2.7.0has not yet been released. Latest on PyPI is 2.6.5 (2025-06-27). The fix is on thedevelopbranch as2.7.0a0. Hold this issue until the tag lands.References
3694557)