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
Support for RISE slides #792
Comments
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 executablebooks/meta#52 😄 |
A quick update here - I just played around with embedding content via https://predictablynoisy.com/jupyter-multi-book and click the "RISE" link at the top. Here's a comment w/ explanation: In principle this could work the same way with Jupyter Book - just use an 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 |
@choldgraf In your demo, the figures are not displayed (somewhat contrary the text of the slides). It looks like this may just be that we'd need I use RISE (with splitcell and hide_code) in class (with a live kernel) and would love to be able to render the static result in an iframe of the class website. I know it won't have a live kernel, but Altair plots can still be interactive, for example. (I use |
Mmm i don't think i quite understand what you're suggesting. I don't have much experience with rise so may not be the best person to ask. Perhaps @damianavila has thoughts? |
FYI, in the Scikit-Learn Course jupyter-book, slides are embedded with iframe in the markdown files. See for example: https://inria.github.io/scikit-learn-mooc/overfit/learning_validation_curves_slides.html This yaml file appears to configure the continuous integration making the slides : https://github.com/INRIA/scikit-learn-mooc/blob/c1158f6492dfd8a8865b24e0268b4bc9a9c02d30/.github/workflows/slides.yml It is based on the remarker Python package, "a command line tool for generating Remark.js presentations from markdown files.". This solution does not have the same purpose as RISE, but it could be nice to have it implemented as an alternative (just sharing the yaml continuous integration file with some doc?) or at least give some inspiration. |
Several thoughts here 😉 ... IMHO, there is one important distinction to make to prevent confusion: RISE deals with live (executable) slideshows, it is a JS notebook extension based on reveal.js and is able to turn a notebook view into a slideshow view. On the other hand, we have support for static reveal.js slides in nbconvert. There, we can convert ipynb files into HTML static slideshow that resemble RISE slides but are NOT executable. For the Jupyter Book use case, I can foresee different slideshow approaches:
|
Thanks @damianavila, was meaning to pick your brains about this; you being the author of RISE and all! https://github.com/damianavila/RISE. |
Thanks @damianavila I envision 2 with either 3 or 4 eventually. (I think 4 is the future, but 3 might help get us there by creating demand for 4.) But 2 needs some integration and there are outstanding issues with nbconvert not supporting static things that I use a lot in RISE (splitcell, hide-code, chalkboard). |
Thanks @damianavila for clarifying! As @jedbrown, I believe 2 is the most pressing one, so that readers can at least browse through the static documents in a layout similar to their counterpart live view within Jupyter. 3 would be nice to have for simple interactivity. The others too, but they apply to all Jupyter notebook equally, not just slides. |
Some thoughts while preparing lecture notes using jupyter-book and jupyter-lab. Would it be possible with such an extension, to use those two tools for following workflow?
This way, an interactive slide deck could theoretically live inside a juypter-book. Not sure if this would be overengineered in practice but right now it seems like a good workflow. |
Hi @MoritzImendoerffer I don't think that's over-engineered at all. In fact, I do something similar already with my lecture notes/slides. The advantage is that you can embed long prose sections for additional explanation/context into your jupyter notebook for pre-reading or post-reflection. During class, we go through the executable portions of the notebook and now my "textbook" (via notebook) and "lecture slides" (via RISE) are linked in one place and provided to students using a jupyterbook. There are definitely inefficiencies, the most annoying of which is setting the cell tags manually - but I can't think of an automatic way to do this, so perhaps that's for the best. |
On another note, just wanted to link to this potentially exciting future development of thebe: adding |
Same here. It's very convenient to have the same document support both
Two things that would help much in this regard:
|
For the record: I made a quick attempt with jupyter lab: you can select a range of |
I hacked together a proof of concept for |
Description
RISE is a Jupyter extension that lets you define
reveal.js
presentations with Jupyter Notebooks. It would be useful if, when Jupyter Book builds a book with a notebook that is "a RISE notebook", that the notebook would be presented in the book as a RISE presentation, instead of a static page of content.Bonus:
Benefit
RISE is a very popular extension in Jupyter and has been around for a long time. Integrating it with Jupyter Book would offer a nice opportunity for a different pattern of reader interaction, and would support the many notebooks that are already built for RISE presentations.
Implementation
Notebooks are currently parsed by MyST-NB, so this is likely where the change would be. When that parsing is done, the outcome is a docutils doctree. This is the "state of the content" when Jupyter Book builds outputs.
One option would be to build a Sphinx extension that would know how to turn
doctree
objects with certain metadata into RISE slideshows on the current page.Another option would be to add logic to
MyST-NB
so that if a RISE notebook is encountered, the RISE assets would also be generated and bundled with the output website, and these assets could be activated from within the page.Tasks to complete
The text was updated successfully, but these errors were encountered: