Content with notebooks#

You can also create content with Jupyter Notebooks. This means that you can include code blocks and their outputs in your book.

Markdown + notebooks#

As it is markdown, you can embed images, HTML, etc into your posts!

You can also \(add_{math}\) and

\[ math^{blocks} \]

or

\[\begin{split} \begin{aligned} \mbox{mean} la_{tex} \\ \\ math blocks \end{aligned} \end{split}\]

But make sure you $Escape $your $dollar signs $you want to keep!

MyST markdown#

MyST markdown works in Jupyter Notebooks as well. For more information about MyST markdown, check out the MyST guide in Jupyter Book, or see the MyST markdown documentation.

Code blocks and outputs#

Jupyter Book will also embed your code blocks and output in your book. For example, here’s some sample Matplotlib code:

global repo https://github.com/abikesa/nondonor/raw/main/
di (2 + 2)
4
use ${repo}donor_live, clear
di c(N) "  " c(k)
(DONOR_LIVE)
173929  253

There is a lot more that you can do with outputs (such as including interactive outputs) with your book. For more information about this, see the Jupyter Book documentation