pythonvisual-studio-codejupyter-notebookslideshow

Jupyter Notebook Slides in VScode


In Jupyter Notebook we could create slides, like explained here. Here you can see a reproducible example to create Jupyter notebook slides via Anaconda-navigator:

enter image description here

When running this command in the terminal:

jupyter nbconvert slides_test.ipynb --to slides --post serve

It will outputs this in your browser:

enter image description here

And for the code cell output:

enter image description here

This is very nice and I would like to use this but in VScode.

In the Jupyter notebook of Anaconda navigator we can create slides when clicking on View -> Cell Toolbar -> Slideshow in the header bar. Unfortunately, this is not possible in VScode. So I was wondering if anyone knows how to create Jupyter Notebook slides in VScode?


Solution

  • Firstly, ensure that you have install Jupyter extension.

    enter image description here

    It will install several extensions required for Jupyter including slides for you.

    Then, you can add a slide type to the cell you're on by opening the Command Palette (Cmd+Shift+P) and selecting Switch Slide Type according to the document in GitHub.

    enter image description here

    enter image description here

    You could modify slide types for notebook cells by selecting the slide type on the cell.

    enter image description here

    After assigning slide types to your cells, create an HTML slideshow presentation by opening the integrated terminal and running the command, jupyter nbconvert '<notebook-file-name>.ipynb' --to slides --post serve.