Describe the solution you'd like
It's almost all in the title: if the notebook contains RISE slides, then we would want it
to be displayed as slides, turning on reveal.js.
Bonus:
{note}
How do you imagine incorporating RISE slides into a book? Like, you'd click a link in the sidebar and then it's just take you to a RISE presentation? Or do you want to generate a full RISE presentation for your book itself?
How do you imagine incorporating RISE slides into a book? Like,
you'd click a link in the sidebar and then it's just take you to a
RISE presentation?
Yes, exactly.
Variant: having some button to view as slides next to the thebelab/...
buttons. Like in nbviewer (although the slides view seems to be broken
nowadays for nbviewer).
I also teach with Jupyter RISE and this would be a game changer for me!
If it helps, here's a demo of it in action with binder: https://mybinder.org/v2/gh/damianavila/RISE/master?filepath=examples%2FREADME.ipynb.
The thing that I can't wrap my head around is how to retain the ability to still code in the cells inside the RISE presentation. I don't think that can be done on the web server, that needs to be a binder/thebelab thing. In other words, seeing just the slides seems doable with an html export of the presentation and then serving it. Tricky part is the coding inside the presentation
The thing that I can't wrap my head around is how to retain the
ability to still code in the cells inside the RISE presentation. I
don't think that can be done on the web server, that needs to be a
binder/thebelab thing. In other words, seeing just the slides seems
doable with an html export of the presentation and then serving it.
Tricky part is the coding inside the presentation
Is it any different than for the usual HTML export of the notebooks?
In both cases, something needs to be done to make the cells live,
which is what thebelab is about, right?
The question is probably: where should the
thebelab/binder/download/... buttons appear in the slide view?
Yeah I think the question here is one of division-of-labor. e.g., right now there is nothing in jupyter-book that depends on nbconvert, and I'm not sure whether we want to add that as a dependency. But, perhaps a path forward is to have a Sphinx extension that creates RISE presentations from notebooks (maybe even MyST Markdown notebooks?) and then document how to use that extension with Jupyter Book? There are also other issues to figure out like "would the RISE presentation need to take up the whole screen or could/should it still exist within the content window etc"
perhaps a path forward is to have a Sphinx extension that creates
RISE presentations from notebooks (maybe even MyST Markdown
notebooks?) and then document how to use that extension with Jupyter
Book?
Yeah, that sounds right.
Cool - I think a tricky question is whether the RISE assets should be a part of the Sphinx toctree itself, or just a set of assets that users can link out to via, e.g., a directive in their Sphinx pages. I think that the latter might be simpler to start with.
Just going to link this issue to https://github.com/executablebooks/meta/issues/52 馃槃
A quick update here - I just played around with embedding content via <iframe> elements and think that this could be a relatively easy way to get RISE slideshows working in Jupyter Book without changing any of the underlying code. For an example of embedding a RISE presentation in a different Sphinx website, see here
https://predictablynoisy.com/jupyter-multi-book
and click the "RISE" link at the top. Here's a comment w/ explanation:
https://github.com/executablebooks/jupyter-book/issues/1037#issuecomment-707433827
In principle this could work the same way with Jupyter Book - just use an <iframe> element in one of your book's pages to embed a local RISE presentation, and it should embed nicely into the content.
Curious what others think about this
Thanks @choldgraf ! I agree that this is nice and may work in some/most cases.
The "killer" feature of RISE though, is to edit the presentation live and run jupyter notebook cells - I don't think the iframe solution can do this, can it ? When I tried this a few weeks ago there was no kernel attached because the slides were being run as HTML files.
The "killer" feature of RISE though, is to edit the presentation live and run jupyter notebook cells - I don't think the iframe solution can do this, can it ? When I tried this a few weeks ago there was no kernel attached because the slides were being run as HTML files.
So, the question is whether one could still use Thebe to activate the
HTML-converted RISE slides embedded in an iframe, as this is done by
jupyterbook for the other HTML-converted notebooks, right?
Yep you're right that executing the RISE presentations would still require a live kernel, which Jupyter Book doesn't provide by default.
I suspect that the best way to support this would be to support Thebe within RISE, rather than to try and piggy-back on Jupyter Book...it definitely should be doable but would require some new development