Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better support for reveal.js functionality #612

Open
mattilyra opened this issue Jun 27, 2017 · 6 comments
Open

Better support for reveal.js functionality #612

mattilyra opened this issue Jun 27, 2017 · 6 comments
Labels
format:Slides pertains to exporting to the Slides format

Comments

@mattilyra
Copy link

I really like creating slide presentation using Jupyter Notebooks, but the workflow is currently fairly cumbersome. I often find myself wanting to control HTML <section> tag parameters like

It would be great if controls for these could be added to the slide toolbar so that one does not need to edit the HTML file manually each time after running nbconvert --to slides.

@buffetboy2001
Copy link

+1 Definitely agree. I assumed I could use the slide toolbar in some way to edit the JSON and control slide transitions, but I don't think it's possible. Please open up some of these options, if possible.

@bouzidanas
Copy link
Contributor

bouzidanas commented Sep 8, 2022

#1861

Give that a try. You can set the data- attributes for slides, subslides (vertical slides), and fragments by means of the cells metadata.

Example: Click View > Cell Toolbar > Edit Metadata . Then go to a cell (in notebook) thats going in a slide/subslide/fragment and click Edit Metadata in the cell's toolbar on the right. You will see a popup input with something like this:

{
  "id": "p9eicnYjOoBv",
  "slideshow": {
    "slide_type": "slide"
  }
}

Change that to something like this example:

{
  "id": "p9eicnYjOoBv",
  "slideshow": {
    "slide_type": "slide",
    "data": {
      "background_video": "your-video-URL-here.mp4",
      "background_video_loop": "",
      "background_video_muted": ""
    }
  }
}

This should put data-background-video="your-video-URL-here.mp4", data-background-video-loop="", and data-background-video-muted="" inside the <section> tag that corresponds to this slide.

A few things to note.

  1. That background_video sets data-background-video so if you want to add say data-transition="zoom", you would put "transition": "zoom" inside the Metadata instead.
  2. Setting the Metadata attribute to an empty string "" is equivalent to adding a data- attribute without a value.

Give it a shot. There is only so much testing I have time for.

@MP-MaximilianLattka
Copy link

Sorry for bringing this up again, but is it possible as of now to provide reveal.js configuration parameters on the presentation-level like this?
https://revealjs.com/config/

@bouzidanas
Copy link
Contributor

Sorry for bringing this up again, but is it possible as of now to provide reveal.js configuration parameters on the presentation-level like this? https://revealjs.com/config/

Im not sure I understand. You can edit the output presentation file and configure the same exact way as in the link. You also have access to some of the configuration parameters in the command line and I think the easiest way to configure a presentation in a rush or in a new environment is to use query parameters.

@MP-MaximilianLattka
Copy link

Are you suggesting that I manually edit the HTML artifact? I would've hoped that nbconvert would allow to pass these parameters over to reveal.js.

@bouzidanas
Copy link
Contributor

bouzidanas commented Oct 30, 2023

I mean it does allow for command line options that change configuration parameters. I'm not sure it allows changing all of them, but I've set some of them myself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
format:Slides pertains to exporting to the Slides format
Projects
None yet
Development

No branches or pull requests

5 participants