summary: there are at least 3 different modes that we can use to serve a slideshow from Jupyter.
- use nbconvert to convert to slides / HTML and serve them directly in the web browser
- show the slideshow directly from Jupyter (using
jupyterlab-rise) - convert to HTML and then PDF (using nbconvert and then chrome)
Getting all of this right means hacking a lot of CSS.
-
Create a markdown cell at the top of the presentation
-
In the cell-metadata, mark the slide-type as "Notes" -- it cannot be skip
-
Add something like:
<style> .reveal { background: pink; } .reveal { font-size: 32px; } .reveal h1 { font-size: 2.2em; } .reveal pre code { font-size: 0.8em; } </style>The "pink" should show up. You can remove it after confirmation.
There is a separate section, that starts with @media print that is
used for the PDF generation. Most of the CSS there will be direct
copies of what is in the main section.
The notebook here, pynucastro-overview.ipynb has the CSS already filled in in a way that seems to
work reasonable for creating the PDF or rendering slides via nbconvert.
From the commandline, do:
jupyter nbconvert pynucastro-overview.ipynb --to slides --post serve
install jupyterlab-rise:
pip install jupyterlab-rise
do:
view -> render as reveal slideshow
this will open a new view. Then you can go back to the "view" menu and make it fullscreen.
Note that the notebook metadata does not seem to take effect this way. I am not supporting this method.
Use the script make_pdf.sh. This uses google-chrome