damianavila / RISE

RISE: "Live" Reveal.js Jupyter/IPython Slideshow Extension
Other
3.67k stars 416 forks source link

Configuration of the slides does not take effect #539

Open NEGU93 opened 4 years ago

NEGU93 commented 4 years ago

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"
    }
    }
  2. 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.

parmentelat commented 4 years ago

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 commented 4 years ago

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

NEGU93 commented 4 years ago

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: damianavila82@yahoo.com.ar
License: BSD-3-Clause
Location: /home/barrachina/anaconda3/envs/tf-2-gpu/lib/python3.7/site-packages
Requires: notebook
Required-by:
NEGU93 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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.

damianavila commented 4 years ago

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