Normal reStructuredText Files#
This is a normal RST file.
Those still work!
Sphinx Directives for Info/Warning Boxes#
This is an experimental feature! Its usage may change in the future or it might disappear completely, so don’t use it for now.
With a bit of luck, it will be possible (some time in the future) to create
info/warning boxes in Markdown cells, see
If this ever happens,
nbsphinx will provide directives for creating such
For now, there are two directives available:
This is how an info box looks like:
This is an info box.
It may include nested formatting, even another info/warning box:
Warning: You should probably not use nested boxes!
After installing the sphinxcontrib.bibtex extension, you have to enable it in
conf.py and select the BibTeX file(s) you want to use:
extensions = [ 'nbsphinx', 'sphinxcontrib.bibtex', # Probably more extensions here ... ] bibtex_bibfiles = ['my-references.bib'] bibtex_reference_style = 'author_year'
Afterwards all the references defined in the bibliography file(s) can be used throughout the Jupyter notebooks and other source files as detailed in the following.
You can create citations like [Pérez et al., 2011]:
You can also create so-called in-text citations, where the names of the authors, for example Pérez et al. , are part of the sentence:
You can create similar citations in Jupyter notebooks with a special HTML syntax, see the section about citations in Markdown cells.
You can create a list of references in any reStructuredText file (or reST cell in a notebook) like this:
For an example, see the file
In-text citations like Kluyver et al. can be created like this:
Also footnote citations can be used within Jupyter notebooks with a special HTML syntax, see the section about footnote citations in Markdown cells. Footnote citations are restricted to their own source file and the assembly of the bibliography is (analogously to normal citations) invoked with the
directive. For example, a footnote bibliography might look like this (in HTML output):
In the LaTeX/PDF output, there is no list of references appearing right here. Instead, the footnote citations are placed into the footnotes of their respective pages.
nbsphinx you can create thumbnail galleries in notebook files
as described in Gallery With Nested Documents.
If you like, you can also create such galleries in reST files
It takes the same parameters as the toctree directive.
The following example gallery was created using:
.. nbgallery:: :caption: This is a thumbnail gallery: :name: rst-gallery :glob: :reversed: gallery/*-rst