RISE icon indicating copy to clipboard operation
RISE copied to clipboard

Configuration of the slides does not take effect

Open NEGU93 opened this issue 5 years ago • 7 comments

I am trying to get my slides a bit pretier, so I am following this file. I am using a weird image as background just to test it shows correcly. I tried both options:

  1. Going to Edit Notebook Metadata, the info looks like this:
{
  "celltoolbar": "Slideshow",
  "kernelspec": {
    "name": "python3",
    "display_name": "Python 3",
    "language": "python"
  },
  "language_info": {
    "name": "python",
    "version": "3.7.6",
    "mimetype": "text/x-python",
    "codemirror_mode": {
      "name": "ipython",
      "version": 3
    },
    "pygments_lexer": "ipython3",
    "nbconvert_exporter": "python",
    "file_extension": ".py"
  },
  "rise": {
    "width": "100%",
    "height": "100%",
    "backimage": "back.png",
    "theme": "sky",
    "scroll": true,
    "transition": "zoom",
    "start_slideshow_at": "selected"
  }
}
  1. Using the following code:
#!/usr/bin/env python3
from traitlets.config.manager import BaseJSONConfigManager
from pathlib import Path
path = Path.home() / ".jupyter" / "nbconfig"
cm = BaseJSONConfigManager(config_dir=str(path))
cm.update(
    "livereveal",
    {
        # "width": "100%",
        # "height": "100%",
        "theme": "sky",
        "scroll": True,
        "backimage": "back.png",
        "transition": "zoom",
        "start_slideshow_at": "selected",
     }
)

Neither case seems to work for me. Any thought on why it is not working|? I am using the button Enter/Exit RISE slideshow to see the result and also I tried with jupyter nbconvert *.ipynb --TagRemovePreprocessor.remove_input_tags="{'remove_input'}" --to slides but the html does not render with the changes neither.

NEGU93 avatar Mar 05 '20 12:03 NEGU93

Hi

first off, I need to warn you that the backimage/overlay settings won't work under nbconvert; that is expected, apologies; that stuff will work under reveal.js (i.e. under RISE) only, but as I have never used nbconvert to produce slides, I was unaware of that dimension at the time where I wrote these..

second, what version of rise are you using ? the "Enter/Exit RISE slideshow" button sounds like a very old thing, unless that's from the button tooltip ? in any case, what does pip show rise have to say about that ?

parmentelat avatar Mar 05 '20 13:03 parmentelat

ps. the first approach should work fine; as far as the second, it would be better to replace livereveal with rise, but otherwise at first sight it should be fine too

is that back.png file located in the same directory as the notebook ? if you know how to, please check in the javascript console for any message related to back.png being missing or not found

parmentelat avatar Mar 05 '20 13:03 parmentelat

Output of pip show rise:

Name: rise
Version: 5.6.1
Summary: Reveal.js - Jupyter/IPython Slideshow Extension
Home-page: UNKNOWN
Author: Damian Avila
Author-email: [email protected]
License: BSD-3-Clause
Location: /home/barrachina/anaconda3/envs/tf-2-gpu/lib/python3.7/site-packages
Requires: notebook
Required-by:

NEGU93 avatar Mar 05 '20 14:03 NEGU93

ps. the first approach should work fine; as far as the second, it would be better to replace livereveal with rise, but otherwise at first sight it should be fine too

I believe I actually tried both

is that back.png file located in the same directory as the notebook ?

Yes

if you know how to, please check in the javascript console for any message related to back.png being missing or not found

Sorry, I lack the knowledge of this. In any case. The image is not important itself. Also, the theme does not change anything (or at least I don' t see the difference, I try to use sky and I see no difference as well.

NEGU93 avatar Mar 05 '20 14:03 NEGU93

Ok, my fault! I just forgot the basic. Restart the kernel. It seams each change I do on Edit Notebook Metadata I have to restart the kernel to make it work.

Sorry! Forgot the basic! Leave the post in case someone has the same problem.

NEGU93 avatar Mar 05 '20 16:03 NEGU93

So I tried the background image just to make sure if the config was working or not. The problem now is I cannot remove the background!

I tried shutting down the kernel. Relaunching jupyter notebook, running killall chrome to reset it. Nothing works, the image loads and if I remove for example the zoom it keeps doing it.

I have a personal computer that just restarting the kernel works.

Any idea here?

PS: for the moment I cannot restart the pc because I am running some simulations.

NEGU93 avatar Mar 06 '20 10:03 NEGU93

Can you try hard-reloading your browser? Chrome cache is pretty aggressive, so maybe there is something like this happening under the hood.

damianavila avatar Mar 07 '20 13:03 damianavila