Citations and bibliographies

You can add citations and bibliographies using references that are stored in a bibtex file that is in your book’s folder. You can then add a citation in-line in your Markdown with the {cite} role, and include the bibliography from your bibtex file with the {bibliography} directive.

See also

This functionality uses the excellent sphinxcontrib-bibtex extension.

Basic citations

To get started with citations in Jupyter Book, check out Get started with references.

Change the in-line citation style

There are a few alternatives roles that you can use to change the in-line citation style. Below are a few examples:

  • The citation {cite:p}`perez2011python` results in [Perez et al., 2011]

  • The citation {cite:t}`perez2011python` results in Perez et al. [2011]

  • The citation {cite:ps}`perez2011python` results in [Perez, Granger, and Hunter, 2011]

  • The citation {cite:ts}`perez2011python` results in Perez, Granger, and Hunter [2011]

See also

For a more complete list of in-line citation styles, check out the sphinxcontrib-bibtex docs.

Select your bibliography style

You can also optionally customize the style of your references. By default, references are displayed in the alpha style. Other currently supported styles include plain, unsrt, and unsrtalpha. These styles create the following bibliography formatting:

  • alpha: Use alphanumeric reference labels, citations are sorted by author, year.

  • plain: Use numeric reference labels, citations are sorted by author, year.

  • unsrt: Use numeric reference labels, citations are sorted by order of appearance.

  • unsrtalpha: Use alphanumeric reference labels, citations are sorted by order of appearance.

To set your reference style, use the style option:

:style: unsrt

Change the reference style

There are a few options for your in-line citation style. To select one, use the following configuration in _config.yml.

# In _config.yml
bibtex_reference_style: author_year  # or label, super, \supercite

See also

For a list of configuration options and more detail about this, see the sphinxcontrib-bibtex docs

Local bibliographies

You may wish to include a bibliography listing at the end of each document rather than having a single bibliography contained in a separate document. Having multiple bibliography directives, however, can cause sphinx to issue duplicate citation warnings.

A common fix is to add a filter to the bibliography directives:

:filter: docname in docnames

See sphinxcontrib-bibtex documentation on local bibliographies.

Example Bibliography

An example bibliography, for reference:


J Gregory Caporaso, Justin Kuczynski, Jesse Stombaugh, Kyle Bittinger, Frederic D Bushman, Elizabeth K Costello, Noah Fierer, Antonio Gonzalez Pena, Julia K Goodrich, Jeffrey I Gordon, and others. Qiime allows analysis of high-throughput community sequencing data. Nature methods, 7(5):335–336, 2010.


Christopher Ramsay Holdgraf, Wendy de Heer, Brian N. Pasley, Jochem W. Rieger, Nathan Crone, Jack J. Lin, Robert T. Knight, and Frédéric E. Theunissen. Rapid tuning shifts in human auditory cortex enhance speech intelligibility. Nature Communications, 7(May):13654, 2016. URL:, doi:10.1038/ncomms13654.


Fernando Perez, Brian E Granger, and John D Hunter. Python: an ecosystem for scientific computing. Computing in Science \\& Engineering, 13(2):13–21, 2011.


John Stachurski and Takashi Kamihigashi. Stochastic stability in monotone economies. Theoretical Economics, 2014.