damianavila / rise Goto Github PK
View Code? Open in Web Editor NEWRISE: "Live" Reveal.js Jupyter/IPython Slideshow Extension
License: Other
RISE: "Live" Reveal.js Jupyter/IPython Slideshow Extension
License: Other
Great bit of code, I will be using it to teach a class on Monday!
One slight problem: my installation had no buttons, including the 'enter slideshow' button -- which fortunately showed up as a not-quite-invisible box. I am using IPython 2.3.0 and at first I thought the problem was the version check in main.js -- but even fixing that didn't solve the problem. Seems that I needed an installation of FontAwesome which I had to download and hack into my static.css. Perhaps this would have been installed by default in earlier IPython versions? Anyway, this might be something to try to work around in future versions of your code.
I understood the Alt+R
shortcut is a switch into presentation mode. It's actually running all cells when I press it. If I click the icon in the toolbar instead, the presentation starts without any cell execution as desired.
Background color changes correctly for "sky", "solarized", and "blood".
Background is incorrectly white for "moon" and "night".
When I see a long slide, I have to scrool down to see it all. That's cool.
But If I scrolled down a slide, and then move to the next slide (by hitting space or arrow key) then the next slide is also scrolled down in respsct to it's original location.
Clearly, if the "next slide" contains less text, you may see just blank screen.
The behavior I think it should have: moving into new slide move to the top of it.
It would be great if this had the ability to hide input cells, like you do for nbconvert here:
http://www.damian.oquanta.info/posts/hide-the-input-cells-from-your-ipython-slides.html
That would make the ability to mix hidden python stuff with purposefully displayed python.
When editing the slideshow cell types in live_reveal
, several (but not all) cells specified as a plain cell (i.e. cell type blank) get interpreted as a fragment, and do not appear unless you press the spacebar. When the cells are first specified, it seems to work okay, but as you edit slides (particularly changing a cell above to be a "slide" or "sub-slide", the cells begin behaving as fragments.
I have tried to change the style from the Julia kernel via
using PyCall
@pyimport IPython.html.services.config as config
cm = config.ConfigManager()
cm[:update]("livereveal", {
"theme" => "sky",
"transition" => "zoom",
})
(a direct translation of the Python code in the README),
but this does not seem to have any effect.
In line 398 of main.js I get the error message "button_rise" is not defined.
https://github.com/damianavila/live_reveal/blob/master/livereveal/main.js#L398
I didn't find a button_rise function anywhere in this code. I may be missing something, otherwise I'd create a pull request with that line removed.
This is a very minor issue, of course...
Live reveal is so cool!
I've got a couple of questions/observations about the live reveal mode.
ctrl+m h
type help available for the reveal shortcut keys?Keep up the awesome work on this killer feature!
Hi,
I'd love to use the dynamic ipython slideshow for my teaching.
I am therefore trying to get RJSE/RISE running in my ipython notebook (v2.4). I have however trouble with the installation. I tried two different approaches:
a) cloning the current repo and then running python setup.py install
--> to my underanding, this installs directly in the ǹbextensions
folder
b) running the script Install_RJSE.ipynb
--> which downloads the tagged 2.x version and generates a profile.
However, in both cases I have trouble getting the slideshow running. The button to activate the slideshow is available. When I press it, I however get NO presentation. Instead, the ipython notebook pager page opens at the bottom of the notebook (this is where typically the help/documentation is shown). However, the pager page is empty. What also happens is that the toolbars disappear. I attach two screenshots to illustrate this behavior.
AND AFTER ...
Note the white and empty pager frame at the bottom!
When starting the notebook with the --debug
option, I can also find no obvious problem. The strange thing is that I tried the installation this morning once and it was running. Then I was leaving the slidemode using the shortcut given in the help. Since then it did not work any more. I remove everything related to live_reveal
in the .ipython
directory and tried to reinstall using the two different methods indicated above.
Any idea how to fix the issue or identify where it is coming from?
The current possible solutions for this are:
The last 2 are quite invasive and implies touching things that shouldn't be touched "frequently". The first is OK(ish) in the sense that someone could build ipynb profile "for presentation".
Maybe a rise.css placed in the notebook profile folder that is loaded if found is a more clean solution?
At present, theme and transition are user-local settings stored in frontend config. Possibly there should be a way of embedding information like this in the notebook metadata, where it would override the user config.
I'm running into issues with trying to "skip" cells in slideshows with live_reveal
. First, if you try to skip the very first fragment (e.g. if it contains import statements, etc.), the cell is not skipped, and the state of the cell is switched to "slide" from "skip" automatically.
Second, and perhaps more serious, if you skip any other cell in the workbook and play the slideshow, the cell gets deleted and does not ever re-appear.
I have prepared a screen capture of the behavior.
Running current master on IPython 2.1 with OS X 10.9.4 and Chrome 36.
Some things to discuss/implement:
Other ideas welcome...
A minor issue, but currently when you exit a slideshow, you are returned to a blank notebook. The browser has to be manually refreshed to show content.
Running current master on OS X 10.9.4, Python 2.7.6, IPython 2.1.
This is the first version and I have a lot of to do yet... but it is usable ;-)
ping for code review (because you deal with js in the notebook everyday) @Carreau @minrk @ellisonbg
ping for usability (but if you want to review the code it would be awesome) @fperez @ivanov @takluyver @jdfreder @Zsailer
To make live_reveal work for IRuby, after install do:
~/.config/iruby$ cp -fr ../../.ipython/nbextensions/livereveal/ nbextensions/
This is because IRuby config files are placed in .config/iruby.
From discussion on PR #65: it would be useful to have a feature where the slideshow can be started from the selected cell.
From #26:
I'm running into issues with trying to "skip" cells in slideshows with live_reveal. First, if you try to skip the very first fragment (e.g. if it contains import statements, etc.), the cell is not skipped, and the state of the cell is switched to "slide" from "skip" automatically.
This is a design decision because a lot of people could forget to setup the first cell to show as an slide... but you are right about some uses cases where is good to hide the first (or more) cells... I think I have to re-evaluate this decision or come up with a better solution...
I have just tested RISE with IPython 3.0.0 and RISE cloned from commit d0a8fbd. When I create a simple slideshow with a couple of slides and some sub-slides or fragments on the first slide, I cannot navigate between sub-slides or fragments using the up/down keys. Left/right keys work fine for navigating between slides. I have previously opened a static reveal slideshow where up/down worked just fine, so I expected that here as well. Is this a known issue?
I am using Firefox 36.0.4 on Linux. I have also tried starting IPython notebook with Chromium as browser, but that does not seem to work at all...
I think you said this could not be helped, but I find that the scroll bar on the right edge is useless and a distraction.
If there is a way to avoid it, I would like to use it.
Hi, damianavila, thanks for your amazing tool.
I want to change default theme of transformation to "linear". I edit the custom.js file, and try to reinstall this library, but returns:
custom.js entry already exists.
what should I do? I also try to delete the files "../nbextension/liveshow"
By the way, I change the theme by this way is not elegant. What about adding some choice box in the cell toolbar?
Currently, when changing to live reveal mode, the slide type box is shown.
Could this be disabled by default?
The formatting of HTML tables is adjusted between IPython and LiveReveal/RISE. This includes adjusted column widths, and text centering during the slideshow. Sample notebook below:
{
"cells": [
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": true,
"slideshow": {
"slide_type": "skip"
}
},
"outputs": [],
"source": [
"#Load\n",
"from IPython.display import HTML"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"##Make an HTML Table"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"collapsed": true,
"slideshow": {
"slide_type": "skip"
}
},
"outputs": [],
"source": [
"Q=\"\"\"<style type=\"text/css\">\n",
".tg {border-collapse:collapse;border-spacing:0;}\n",
".tg td{font-family:Arial, sans-serif;font-size:14px;padding:10px 20px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;}\n",
".tg th{font-family:Arial, sans-serif;font-size:14px;font-weight:normal;padding:10px 20px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;}\n",
".tg .tg-s6z2{text-align:center}\n",
".tg .tg-y7ca{font-weight:bold;background-color:#93ce84;text-align:center}\n",
".tg .tg-j4kc{background-color:#efefef;text-align:center}\n",
"</style>\n",
"<table class=\"tg\">\n",
" <tr>\n",
" <th class=\"tg-s6z2\" colspan=\"2\" rowspan=\"2\"></th>\n",
" <th class=\"tg-y7ca\" colspan=\"6\">Hour</th>\n",
" </tr>\n",
" <tr>\n",
" <td class=\"tg-j4kc\">1<br></td>\n",
" <td class=\"tg-j4kc\">2</td>\n",
" <td class=\"tg-j4kc\">...</td>\n",
" <td class=\"tg-j4kc\">22</td>\n",
" <td class=\"tg-j4kc\">23</td>\n",
" <td class=\"tg-j4kc\">24</td>\n",
" </tr>\n",
" <tr>\n",
" <td class=\"tg-y7ca\" rowspan=\"5\">The<br>Goods</td>\n",
" <td class=\"tg-j4kc\">0.00</td>\n",
" <td class=\"tg-s6z2\"></td>\n",
" <td class=\"tg-s6z2\"></td>\n",
" <td class=\"tg-s6z2\"></td>\n",
" <td class=\"tg-s6z2\">1.2</td>\n",
" <td class=\"tg-s6z2\">0.0</td>\n",
" <td class=\"tg-s6z2\">0</td>\n",
" </tr>\n",
" <tr>\n",
" <td class=\"tg-j4kc\">0.05</td>\n",
" <td class=\"tg-s6z2\"></td>\n",
" <td class=\"tg-s6z2\"></td>\n",
" <td class=\"tg-s6z2\"></td>\n",
" <td class=\"tg-s6z2\">1.8</td>\n",
" <td class=\"tg-s6z2\">0.1<br></td>\n",
" <td class=\"tg-s6z2\">0</td>\n",
" </tr>\n",
" <tr>\n",
" <td class=\"tg-j4kc\">...</td>\n",
" <td class=\"tg-s6z2\"></td>\n",
" <td class=\"tg-s6z2\"></td>\n",
" <td class=\"tg-s6z2\"></td>\n",
" <td class=\"tg-s6z2\">...</td>\n",
" <td class=\"tg-s6z2\">...</td>\n",
" <td class=\"tg-s6z2\">...</td>\n",
" </tr>\n",
" <tr>\n",
" <td class=\"tg-j4kc\">1.95<br></td>\n",
" <td class=\"tg-s6z2\"></td>\n",
" <td class=\"tg-s6z2\"></td>\n",
" <td class=\"tg-s6z2\"></td>\n",
" <td class=\"tg-s6z2\">3.5</td>\n",
" <td class=\"tg-s6z2\">1.2</td>\n",
" <td class=\"tg-s6z2\">0</td>\n",
" </tr>\n",
" <tr>\n",
" <td class=\"tg-j4kc\">2.00</td>\n",
" <td class=\"tg-s6z2\"></td>\n",
" <td class=\"tg-s6z2\"></td>\n",
" <td class=\"tg-s6z2\"></td>\n",
" <td class=\"tg-s6z2\">3.6</td>\n",
" <td class=\"tg-s6z2\">1.3</td>\n",
" <td class=\"tg-s6z2\">0</td>\n",
" </tr>\n",
"</table>\"\"\""
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {
"collapsed": false,
"slideshow": {
"slide_type": "slide"
}
},
"outputs": [
{
"data": {
"text/html": [
"<style type=\"text/css\">\n",
".tg {border-collapse:collapse;border-spacing:0;}\n",
".tg td{font-family:Arial, sans-serif;font-size:14px;padding:10px 20px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;}\n",
".tg th{font-family:Arial, sans-serif;font-size:14px;font-weight:normal;padding:10px 20px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;}\n",
".tg .tg-s6z2{text-align:center}\n",
".tg .tg-y7ca{font-weight:bold;background-color:#93ce84;text-align:center}\n",
".tg .tg-j4kc{background-color:#efefef;text-align:center}\n",
"</style>\n",
"<table class=\"tg\">\n",
" <tr>\n",
" <th class=\"tg-s6z2\" colspan=\"2\" rowspan=\"2\"></th>\n",
" <th class=\"tg-y7ca\" colspan=\"6\">Hour</th>\n",
" </tr>\n",
" <tr>\n",
" <td class=\"tg-j4kc\">1<br></td>\n",
" <td class=\"tg-j4kc\">2</td>\n",
" <td class=\"tg-j4kc\">...</td>\n",
" <td class=\"tg-j4kc\">22</td>\n",
" <td class=\"tg-j4kc\">23</td>\n",
" <td class=\"tg-j4kc\">24</td>\n",
" </tr>\n",
" <tr>\n",
" <td class=\"tg-y7ca\" rowspan=\"5\">The<br>Goods</td>\n",
" <td class=\"tg-j4kc\">0.00</td>\n",
" <td class=\"tg-s6z2\"></td>\n",
" <td class=\"tg-s6z2\"></td>\n",
" <td class=\"tg-s6z2\"></td>\n",
" <td class=\"tg-s6z2\">1.2</td>\n",
" <td class=\"tg-s6z2\">0.0</td>\n",
" <td class=\"tg-s6z2\">0</td>\n",
" </tr>\n",
" <tr>\n",
" <td class=\"tg-j4kc\">0.05</td>\n",
" <td class=\"tg-s6z2\"></td>\n",
" <td class=\"tg-s6z2\"></td>\n",
" <td class=\"tg-s6z2\"></td>\n",
" <td class=\"tg-s6z2\">1.8</td>\n",
" <td class=\"tg-s6z2\">0.1<br></td>\n",
" <td class=\"tg-s6z2\">0</td>\n",
" </tr>\n",
" <tr>\n",
" <td class=\"tg-j4kc\">...</td>\n",
" <td class=\"tg-s6z2\"></td>\n",
" <td class=\"tg-s6z2\"></td>\n",
" <td class=\"tg-s6z2\"></td>\n",
" <td class=\"tg-s6z2\">...</td>\n",
" <td class=\"tg-s6z2\">...</td>\n",
" <td class=\"tg-s6z2\">...</td>\n",
" </tr>\n",
" <tr>\n",
" <td class=\"tg-j4kc\">1.95<br></td>\n",
" <td class=\"tg-s6z2\"></td>\n",
" <td class=\"tg-s6z2\"></td>\n",
" <td class=\"tg-s6z2\"></td>\n",
" <td class=\"tg-s6z2\">3.5</td>\n",
" <td class=\"tg-s6z2\">1.2</td>\n",
" <td class=\"tg-s6z2\">0</td>\n",
" </tr>\n",
" <tr>\n",
" <td class=\"tg-j4kc\">2.00</td>\n",
" <td class=\"tg-s6z2\"></td>\n",
" <td class=\"tg-s6z2\"></td>\n",
" <td class=\"tg-s6z2\"></td>\n",
" <td class=\"tg-s6z2\">3.6</td>\n",
" <td class=\"tg-s6z2\">1.3</td>\n",
" <td class=\"tg-s6z2\">0</td>\n",
" </tr>\n",
"</table>"
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"HTML(Q)"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "fragment"
}
},
"source": [
"Looks good in IPython, but in LiveReveal, the widths are shifted, in addition to centering of values."
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "subslide"
}
},
"source": [
"Using:\n",
"\n",
"- Python 2.7, IPython 3.0.0\n",
"- Firefox and Chrome (issue on both)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.7"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
Tried live_reveal against the latest ipython master, and the reveal slides get rendered into a tiny sliver instead of the full browser window. Reverting ipython to a commit from a few days back fixed it for me.
How can I hide those (X)
and (?)
buttons in presentation mode?
When attempting to create a cell to demonstrate code in a live slideshow, adding a cell below the last cell on the slide (via command-b) causes the slide to go blank. Subsequent forward or backward movement from one slide to the other also produces blank slides, and the only way to recover is to close the slideshow completely and restart it.
Creating a cell above an existing cell, or below a cell that is not the last cell does not cause this to happen.
Some things seems to does not work in css stylesheets, but those has to be the exceptions, let's migrate all the thing we can to proper css files...
IIRC, with require.js something change in the way we load the extension in IPython master... I have to figured out the way... hint: ipython/ipython#6116 and ipython/ipython#6119
A lot of things changed in the last months... we have to update the code to make it more compatible with the current possibilities of the nbextensions architecture...
I'm on IPython 2.1.0, Google Chrome Version 36.0.1985.125
Sometimes when I return from RISE mode, I only see the cells that are not marked skip. Exiting the notebook and reloading it reveals all of the cells again. It may be triggered by creating a new cell during the RISE mode, but I haven't done enough testing to determine that yet. I will post more if I figure out exactly when it occurs.
The problem is described here: #1 (comment)
Two things should be hidden when switch into "live reavel" mode:
Personal note:
I just wrote 5 slides during the weekend and it's completely awesome!
The notebook linked to by the README seems pretty out of date... An install/uninstall script, and/or instructions to create a specific "reveal" profile that inherits from default, would be best!
.notebookapp
)Done in #104
>pip install git+https://github.com/damianavila/live_reveal.git
Downloading/unpacking git+https://github.com/damianavila/live_reveal.git
Cloning https://github.com/damianavila/live_reveal.git to /tmp/pip-oiuaam-build
Running setup.py (path:/tmp/pip-oiuaam-build/setup.py) egg_info for package from git+https://github.com/damianavila/live_reveal.git
usage: -c [-h] {install} ...
-c: error: invalid choice: 'egg_info' (choose from 'install')
Complete output from command python setup.py egg_info:
usage: -c [-h] {install} ...
-c: error: invalid choice: 'egg_info' (choose from 'install')
----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 2 in /tmp/pip-oiuaam-build
Storing debug log for failure in /home/wiecki/.pip/pip.log
When I open the example notebook stight up, the youtube embeded video works grate.
When I see it on presentation mode, it's only a black square.
When I exit presenation mode, it's remain black square.
After refrash, I can play it again on the notebook.
(Iceweasel 21)
The readme explains how to configure the theme via ConfigManager().update('livereveal',...)
. However it might be nice to mention how this interacts with profiles. Perhaps something like ConfigManager(profile_dir=locate_profile(get_ipython().profile))
.
The motivation for this is that when I installed livereveal I used the --profile
option, but was then puzzled when the theme configuration had no effect. It took me some time to realize that ConfigManager operates on the default profile unless you tell it otherwise.
Better way to pass a config object...
While the fix in #63 worked for my problem I had reported in #62, I have again problems with the current master.
When I switch to slide mode, the layout gets messed up as follows (see also screenshot):
a) the button to activate/deactive the slide mode just appears as a line
b) the toolbar remains visible
c) a footer bar is visible which should not be there
d) I can not swith back to the standard notebook layout
This is how my first slide looks like in presentation mode:
Giving this a shot on Windows, but ran into a few issues. The rise profile didn't seem to have the live_reveal stuff in it, but that seems to be in the default profile. The notebook is written calling out to the posix shell. I patched it to use shutil, but it was still erroring. Here's the diff from the essential that notebook:
"input": [
- "import os\n",
+ "import os, shutil\n",
"import IPython.html.nbextensions as nbext\n",
"\n",
"# download rise extension\n",
@@ -42,21 +42,58 @@
"nbext_folder = os.path.join(nbext.get_ipython_dir(), \"nbextensions\")\n
"install_folder = os.path.join(nbext_folder, nbext_name + \"-\" + version
"rise_folder = os.path.join(install_folder, \"livereveal\")\n",
- "!mv {rise_folder} {nbext_folder}\n",
+ "shutil.move(rise_folder, nbext_folder)\n",
"\n",
"# create a rise profile and add the proper custom.js\n",
"!ipython profile create rise\n",
"custom_js = os.path.join(nbext_folder, nbext_name + \"-\" + version, \"c
"tgt = os.path.join(nbext.get_ipython_dir(), 'profile_rise', 'static', 'c
- "!mv {custom_js} {tgt}\n",
+ "shutil.move(custom_js, tgt)\n",
"\n",
"# clean the mess\n",
- "!rm -r {install_folder}"
+ "shutil.rmtree(install_folder)"
The mathematics formula in live_ reveal are ugly.
If I set some cells as notes using the cell toolbar, they are hidden when I switch into presentation mode (presumably usable with a speaker view), but they don't come back when I leave presentation mode. Refreshing the page restores them.
Reveal support several themes by default, we need to make live reveal work with those, specially the darker ones... or at least provide a good tutorial about how to achieve the needed css changes.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.