Normal reStructuredText Files¶
This is a normal RST file.
Those still work!
Sphinx Directives for Jupyter Notebook Cells¶
For comparison, this is a “normal” Sphinx code block using
%file helloworld.py #!/usr/bin/env python3 print('Hello, world!')
nbsphinx extension provides custom directives to show notebook cells:
6 * 7
This was created with
.. nbinput:: ipython3 :execution-count: 42 6 * 7 .. nboutput:: :execution-count: 42 42
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: