Writing using Notebooks#
This section looks at using Notebooks as the source file for writing lecture content.
Note
jupyter notebooks are capable of storing extended myst syntax
in markdown cells but can’t currently render directives and roles
natively. These items are rendered using jupyter-book as it builds
html or pdf files.
Building using Jupyter Book#
You can write lectures directly in Jupyter Notebooks. While notebooks can’t render
the full MyST syntax it is happy to store the markup as markdown without syntax
highlighting support. This will get parsed when the notebook is read by jupyter book
when building the html or pdf files.
There is no special configuration required you can:
write a notebook
add the notebook name to the
_toc.ymlfile such asmarkovwithout theipynbuse
jupyter-book build lectureorjupyter-book build ./if you are already in a project folder.
Tip
You can actually use both ipynb and md in the same project. You can prototype in
jupyter notebooks and the convert them over to md at the end for easy maintenance
and version control.
Converting to Myst Markdown#
You can also easily convert ipynb to md using jupytext