ANN: nbsphinx 0.8.0: Create HTML pages and LaTeX/PDF from your Jupyter notebooks

I’m pleased to announce a new release of the Sphinx extension nbsphinx:

It allows you to take a bunch of Jupyter notebooks (plus some Markdown
and/or reStructuredText files if you want) and turn them into static
HTML pages and/or a LaTeX/PDF file.

If you don’t want to save all those bulky code cell outputs in your
notebooks, nbsphinx can automatically execute your notebooks for you
(with the help of nbconvert) and include the outputs only when
building the HTML and LaTeX/PDF files.

For a taste of a generated PDF file, see https://nbsphinx.readthedocs.io/_/downloads/en/0.8.0/pdf/.

The HTML pages (and the PDF as well) can be very easily auto-created (including executing your notebooks) and hosted on https://readthedocs.org/ (see the documentation for details), but you can of course create your HTML pages by other means (e.g. on a CI server, or by hand) and host them wherever you like.

You can choose the look of the generated HTML pages from many available Sphinx themes. Recently, I’ve created a Sphinx theme of my own, which I’ve also selected as default for the nbsphinx documentation:

But of course you can use nbsphinx with any Sphinx theme of your choice. In fact, the nbsphinx documentation is available in many different themes for quick comparisons. Have a look at https://nbsphinx.readthedocs.io/en/0.8.0/usage.html#HTML-Themes for a (very much not exhaustive) list of available themes.

Try it out, have fun and feel free to share your positive as well as negative
experiences with nbsphinx here!

Contributions are always welcome, so if you want to contribute, please head over to
https://github.com/spatialaudio/nbsphinx!

BTW, nbsphinx is of course not the only way to generate HTML and PDF from Jupyter notebooks, for many possible alternatives, see https://nbsphinx.readthedocs.io/links.html.

2 Likes