Usage

Roles and Directives

:cite:

Create a citation to a bibliographic entry. For example:

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

which would be equivalent to the following LaTeX code:

See \cite{1987:nelson} for an introduction to non-standard analysis.
.. bibliography:: refs.bib [...]

Create bibliography for all cited references. The all flag forces all references to be included (equivalent to \nocite{*} in LaTeX). The notcited flag causes all references that were not cited to be included. The cited flag is recognized as well but is entirely optional. For example:

.. rubric:: References

.. bibliography:: refs.bib
   :cited:

.. rubric:: Further reading

.. bibliography:: refs.bib
   :notcited:

Warning

Sphinx will attempt to resolve references to the bibliography across all documents, so you must take care that no citation key is included more than once.

You can also pick a bibliography style, using the style option. This is not yet quite as useful, as only unsrt is supported, which is also the default.

.. bibliography:: refs.bib
   :style: unsrt

All citations have numbered labels, as in the plain LaTeX bibliography style, regardless of the style chosen. This limitation might be lifted in a future version.

You can also set the encoding of the bibliography files, using the encoding option.

.. bibliography:: refs.bib
   :encoding: latin

Known Issues and Workarounds

Tinkerer

To use the bibtex extension with Tinkerer, be sure to specify the bibtex extension first in your conf.py file:

extensions = ['sphinxcontrib.bibtex', 'tinkerer.ext.blog', 'tinkerer.ext.disqus']

Project Versions

Table Of Contents

Previous topic

Getting Started

Next topic

Extension API

This Page