Nbconvert --to slides produces odd code cells

I am using RISE to create a presentation and it looks good when presenting from within the jupyter notebook.

However, I would also like to convert that notebook to slides that can be shared as HTML using jupyter nbconvert --to slides myslides.ipynb. The problem is that the resulting slides look very different from what I see when presenting from the notebook.

What is especially annoying is that the code cells have huge empty space and tiny font.

Here is an example result slide when using nbconvert --to slides:

But when presenting from the notebook the same slide looks like this:

How can I make the output of nbconvert look more like the original and also influence the font size (the font size used in the slides after conversion is much smaller than when presented directly from the notebook).

I think this happened because the environment where I did the conversion used an older version of the nbconvert package (6.3.0) - after upgrading that package to version 6.5.0 those margins disappeared.

1 Like