Writing Books with Jupyter

I’m a huge fan of the Jupyter project, and love to see all the progress being made with JupyterHub and especially JupyterLab.

Recently learned of another Jupyter project, Jupyter Book:

Jupyter Book is an open source project for building beautiful, publication-quality books and documents from computational material.

It’s still early in development, but this could scratch a real itch that I have: pushing computational notebooks beyond working documents and into prose, especially long-form writing, reveals some sticking points. Jupyter Book looks to address exactly these problems with features including:

Write publication-quality content in markdown You can write in either Jupyter markdown, or an extended flavor of markdown with publishing features. This includes support for rich syntax such as citations and cross-references, math and equations, and figures.

Insert notebook outputs into your content Generate outputs as you build your documentation, and insert them in-line with your content across pages.

Add interactivity to your book You can toggle cell visibility, include interactive outputs from Jupyter, and connect with online services like Binder.

Generate a variety of outputs This includes single- and multi-page websites, as well as PDF outputs.

Build books with a simple command-line interface You can quickly generate your books with one command, like so: jupyter-book build mybook/

I often wish I had these features when preparing notebooks for my courses, especially the citations and cross-references. It was a pain getting my Whirlwind Tour of Python fork going, that’s for sure.

And the pages are gorgeous:

Jupyter Books Dynamic TOC in action

Check out that dynamic table of contents on the right. And that’s there by default, not some third-party extension.

Jim Bagrow
Jim Bagrow
Associate Professor of Mathematics & Statistics

My research interests include complex networks, computational social science, and data science.

Next
Previous