-
Notifications
You must be signed in to change notification settings - Fork 567
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
Speaker notes not working for reveal.js slides #1423
Comments
@SylvainCorlay or @maartenbreddels do one of you know more about changes with reveal that might cause this? I've not touched that part of nbconvert in any significant way |
Hum I admit I have not worked with the speaker notes. Nbconvert 6 upgraded to revealjs 4, which is a major release, and should not work with 3.x. The nbconvert reveal template was significantly changed to work with the regular html exporter. |
Same problem here, there is very little documentaiton on how to make Notes work and nothing that I found using Google works. I am using python 3.6 and have
It does not work with any of the versions I tried to checkout locally: 3.5.0, 4.0.1, 4.1.0, pressing "s" does nothing at all. Tried with both Firefox and Google Chrome. |
@damianavila do you have any input on this? |
I just discovered that the RISE package does this right: after installing RISIS, the slides can be shown from within the notebook and there, the speaker notes do work, and also the font sizes and the space occupied by the slide is done much better than with the slides generated by nbconvert. |
The speaker notes plugin is no longer included by default in the Reveal.js template. It's quite easy to add them, but for non-nbconvert developers, the quickest solution is to create a custom template which overrides the JS. Here's the {%- extends "reveal/index.html.j2" -%}
{% block footer_js %}
<script>
require(
{
// it makes sense to wait a little bit when you are loading
// reveal from a cdn in a slow connection environment
waitSeconds: 15
},
[
"{{ reveal_url_prefix }}/dist/reveal.js",
"{{ reveal_url_prefix }}/plugin/notes/notes.js"
],
function(Reveal, RevealNotes){
// Full list of configuration options available here: https://github.com/hakimel/reveal.js#configuration
Reveal.initialize({
controls: true,
progress: true,
history: true,
transition: "{{reveal_transition}}",
plugins: [RevealNotes]
});
var update = function(event){
if(MathJax.Hub.getAllJax(Reveal.getCurrentSlide())){
MathJax.Hub.Rerender(Reveal.getCurrentSlide());
}
};
Reveal.addEventListener('slidechanged', update);
function setScrollingSlide() {
var scroll = {{ reveal_scroll }}
if (scroll === true) {
var h = $('.reveal').height() * 0.95;
$('section.present').find('section')
.filter(function() {
return $(this).height() > h;
})
.css('height', 'calc(95vh)')
.css('overflow-y', 'scroll')
.css('margin-top', '20px');
}
}
// check and set the scrolling slide every time the slide change
Reveal.addEventListener('slidechanged', setScrollingSlide);
}
);
</script>
{% endblock footer_js %} and here's the {
"base_template": "reveal",
"mimetypes": {
"text/html": true
}
} These files should be placed in a directory with a name that isn't already an nbconvert template, e.g. Modify the Search PathTo add your directory to the search path, you need to:
|
@agoose77 do you think this should be in the base reveal.js template? |
I would lean towards yes - the only negative is the additional package fetch, but the user can cache this anyway if they specify the right configuration value. |
Great! I think a PR would be very welcome then! |
I seems to have the same issue, and following the suggested fix from @agoose77 didn't work for me. As described by @joelostblom, when setting the reveal.js directory to master, the slides look fine but I can't turn on the speaker notes by clicking on I use the following to create the slides and serve them:
Jupyter env:
Please let me know if I can provide more info, Thanks |
@nogkaha to make this simpler to debug, can you replace the installed version with the latest master? Try this, and check that it actually does install over the existing version: pip install "git+https://github.com/jupyter/nbconvert.git#egg=nbconvert" Then run the new jupyter nbconvert tos_impact_multiple.ipynb --to slides --SlidesExporter.exclude_input=True --SlidesExporter.reveal_scroll=True --post serve |
@agoose77 thanks for the super quick support. I did as you suggest and the speaker notes are working now! |
I can't get speaker notes when exporting slides following the instructions in the docs. Pressing
s
in the slide shows seems to not do anything while other keyboard shortcuts such aso
works. Tested on recent versions of Firefox and Chromium, which work fine with speaker notes in this demo reveal.js presentation and with local reveal.js presentations generated from R Markdown by xaringan.This is my directory layout:
If I check out tag
3.5.0
, the slides don't format correctly and instead all code cells are visible on a single page. If I usemaster
instead, the presentation works as expected except from thes
key not bringing up the speaker view. I tried running bothand
and
All give seemingly the same result (when master is checkout in the reveal.js folder)
Contents of `notes-test.ipynb`
The text was updated successfully, but these errors were encountered: