0

I would like to add slide numbers to a Jupyter Notebook slideshow. I found an issue about this, but I am not sure how and if it possible to add slide numbers to your slides in Jupyter Notebook slideshow. Here is some reproducible code to make a slide show:

# Jupyter Notebook Slides

I would like to add a slide number here?

Using the command in the terminal:

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

So I was wondering if anyone knows how to add a page number to your slides in a Jupyter Notebook Slideshow?

Quinten
  • 35,235
  • 5
  • 20
  • 53
  • 1
    The 'jupyter convert' command of the syntax is on the page that is linked from where you link [here](https://github.com/jupyter/nbconvert/pull/1654#issue-1020071008). I don't know if still syntax. While you suggest you provide an example of 'code', you don't say say how you implement that. (Is that markdown in a single `.ipynb' file? Why not actually link to a gist of a notebook that has multiple slides that you'd want numbered?) More importantly, how do you make your slides? Did you try running on the command line `jupyter nbconvert --to=slides --SlidesExporter.reveal_number='c/t'`? ... – Wayne Jul 17 '23 at 12:17
  • Plus from the documentation linked at the page above, there is a setting you need to set in the configuration `Reveal.initialize({ slideNumber: true });`. See [here](https://revealjs.com/slide-numbers/). – Wayne Jul 17 '23 at 12:17
  • 1
    Hi @Wayne, Using `jupyter nbconvert test_slides.ipynb --to slides --SlidesExporter.reveal_number='c/t` did the job! Thanks – Quinten Jul 17 '23 at 12:34

1 Answers1

0

As mentioned by @Wayne in the comments, you could use the following command:

jupyter nbconvert notebook_slides.ipynb --to slides --SlidesExporter.reveal_number='c/t'

Output:

enter image description here

As you can see it now has slide numbers!

Quinten
  • 35,235
  • 5
  • 20
  • 53