Getting Started


A Sphinx extension for BibTeX style citations.

This extension allows BibTeX citations to be inserted into documentation generated by Sphinx, via a bibliography directive, and a cite role, which work similarly to LaTeX’s thebibliography environment and \cite command.

For formatting, the extension relies on pybtex written by Andrey Golovizin. The extension is inspired by Matthew Brett’s bibstuff.sphinxext.bibref.


Install the module with pip install sphinxcontrib-bibtex, or from source using python install. Then add:

extensions = ['sphinxcontrib.bibtex']

to your project’s Sphinx configuration file

Minimal Example

In your project’s documentation, you can then write for instance:

See :cite:`1987:nelson` for an introduction to non-standard analysis.

.. bibliography:: refs.bib

where refs.bib would contain an entry:

  author = {Edward Nelson},
  title = {Radically Elementary Probability Theory},
  publisher = {Princeton University Press},
  year = {1987}

In the default style, this will get rendered as:

See [Nel87] for an introduction to non-standard analysis.


Edward Nelson. Radically Elementary Probability Theory. Princeton University Press, 1987.