# Nbconvert --to slides produces odd code cells

**URL:** <https://discourse.jupyter.org/t/nbconvert-to-slides-produces-odd-code-cells/14723>\
**Category:** General\
**Created:** [June 27, 2022, 4:09pm UTC](https://discourse.jupyter.org/t/nbconvert-to-slides-produces-odd-code-cells/14723 "2022-06-27T16:09:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![johann-petrak](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/johann-petrak/32/2510_2.png) [@johann-petrak](https://discourse.jupyter.org/u/johann-petrak)\
**Post date:** [June 27, 2022, 4:09pm UTC](https://discourse.jupyter.org/t/nbconvert-to-slides-produces-odd-code-cells/14723/1 "2022-06-27T16:09:49Z")

</div>

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:

 ![175658551-bc22e2fc-7a6a-40cd-8f41-a05460a44156](https://canada1.discourse-cdn.com/flex031/uploads/jupyter/original/2X/f/f4063e2ed607b64585672a4b90414c2f37179182.png)

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

 ![175658525-c030b471-2d30-471c-89c2-03a153aa5774](https://canada1.discourse-cdn.com/flex031/uploads/jupyter/original/2X/8/87d4f92254f7781614d988b9fa9fd767ec40b67b.png)

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).

---

<div class="post-metadata">

**Author:** ![johann-petrak](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/johann-petrak/32/2510_2.png) [@johann-petrak](https://discourse.jupyter.org/u/johann-petrak)\
**Post date:** [June 28, 2022, 9:32pm UTC](https://discourse.jupyter.org/t/nbconvert-to-slides-produces-odd-code-cells/14723/2 "2022-06-28T21:32:11Z")

</div>

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.
