From c709bc13b698a43778dfa9cb79e2420ed8598136 Mon Sep 17 00:00:00 2001 From: Martijn Vermaat <martijn@vermaat.name> Date: Wed, 31 Jul 2013 16:20:20 +0200 Subject: [PATCH] Add usage note to notebooks --- README.md | 2 +- matplotlib.ipynb | 28 ++++++++++++++++++++---- numpy.ipynb | 56 +++++++++++++++++++++++++++++++++++++----------- python.ipynb | 20 +++++++++++++++++ 4 files changed, 88 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 288e6e0..88d5a5a 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ notebook server: ipython notebook -Choose `Slideshow` in the `Cell Toolbar` menu. +Choose *Slideshow* in the *Cell Toolbar* menu. Some aditional information on editing slides in the Notebook can be found here in [this presentation](http://www.slideviper.oquanta.info/tutorial/slideshow_tutorial_slides.html). diff --git a/matplotlib.ipynb b/matplotlib.ipynb index f781358..e316b97 100644 --- a/matplotlib.ipynb +++ b/matplotlib.ipynb @@ -29,6 +29,26 @@ "License: [Creative Commons Attribution 3.0 License (CC-by)](http://creativecommons.org/licenses/by/3.0)" ] }, + { + "cell_type": "markdown", + "metadata": { + "slideshow": { + "slide_type": "skip" + } + }, + "source": [ + "About this notebook\n", + "===\n", + "\n", + "This notebook is the source for a set of slides. If you want to edit them, be sure to choose *Slideshow* in the *Cell Toolbar* menu.\n", + "\n", + "You can use nbconvert to convert the slides to HTML and serve them:\n", + "\n", + " ipython nbconvert --to slides --post serve matplotlib.ipynb\n", + "\n", + "This will open the slides in a new browser window." + ] + }, { "cell_type": "code", "collapsed": false, @@ -59,7 +79,7 @@ "input": [ "%%html\n", "<style type=\"text/css\">\n", - "/* nbconvert adds a vertical scrollbar to the slides. */\n", + "/* Remove the vertical scrollbar added by nbconvert. */\n", ".reveal {\n", " overflow-y: hidden;\n", "}\n", @@ -75,7 +95,7 @@ { "html": [ "<style type=\"text/css\">\n", - "/* nbconvert adds a vertical scrollbar to the slides. */\n", + "/* Remove the vertical scrollbar added by nbconvert. */\n", ".reveal {\n", " overflow-y: hidden;\n", "}\n", @@ -84,11 +104,11 @@ "metadata": {}, "output_type": "display_data", "text": [ - "<IPython.core.display.HTML at 0x36c8510>" + "<IPython.core.display.HTML at 0x357a550>" ] } ], - "prompt_number": 2 + "prompt_number": 3 }, { "cell_type": "markdown", diff --git a/numpy.ipynb b/numpy.ipynb index be2d308..7ca82c2 100644 --- a/numpy.ipynb +++ b/numpy.ipynb @@ -29,22 +29,53 @@ "License: [Creative Commons Attribution 3.0 License (CC-by)](http://creativecommons.org/licenses/by/3.0)" ] }, + { + "cell_type": "markdown", + "metadata": { + "slideshow": { + "slide_type": "skip" + } + }, + "source": [ + "About this notebook\n", + "===\n", + "\n", + "This notebook is the source for a set of slides. If you want to edit them, be sure to choose *Slideshow* in the *Cell Toolbar* menu.\n", + "\n", + "You can use nbconvert to convert the slides to HTML and serve them:\n", + "\n", + " ipython nbconvert --to slides --post serve numpy.ipynb\n", + "\n", + "This will open the slides in a new browser window." + ] + }, { "cell_type": "code", "collapsed": false, "input": [ - "%matplotlib inline\n", - "\n", "from IPython.display import HTML, Image\n", - "\n", - "# nbconvert adds a vertical scrollbar to the slides.\n", - "HTML(\"\"\"\n", + "%matplotlib inline" + ], + "language": "python", + "metadata": { + "slideshow": { + "slide_type": "skip" + } + }, + "outputs": [], + "prompt_number": 8 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%%html\n", "<style type=\"text/css\">\n", + "/* Remove the vertical scrollbar added by nbconvert. */\n", ".reveal {\n", " overflow-y: hidden;\n", "}\n", - "</style>\n", - "\"\"\")" + "</style>" ], "language": "python", "metadata": { @@ -55,22 +86,21 @@ "outputs": [ { "html": [ - "\n", "<style type=\"text/css\">\n", + "/* Remove the vertical scrollbar added by nbconvert. */\n", ".reveal {\n", " overflow-y: hidden;\n", "}\n", - "</style>\n" + "</style>" ], "metadata": {}, - "output_type": "pyout", - "prompt_number": 2, + "output_type": "display_data", "text": [ - "<IPython.core.display.HTML at 0x2152d50>" + "<IPython.core.display.HTML at 0x2ba4410>" ] } ], - "prompt_number": 2 + "prompt_number": 7 }, { "cell_type": "markdown", diff --git a/python.ipynb b/python.ipynb index 6bc2ce6..959dea0 100644 --- a/python.ipynb +++ b/python.ipynb @@ -29,6 +29,26 @@ "License: [Creative Commons Attribution 3.0 License (CC-by)](http://creativecommons.org/licenses/by/3.0)" ] }, + { + "cell_type": "markdown", + "metadata": { + "slideshow": { + "slide_type": "skip" + } + }, + "source": [ + "About this notebook\n", + "===\n", + "\n", + "This notebook is the source for a set of slides. If you want to edit them, be sure to choose *Slideshow* in the *Cell Toolbar* menu.\n", + "\n", + "You can use nbconvert to convert the slides to HTML and serve them:\n", + "\n", + " ipython nbconvert --to slides --post serve python.ipynb\n", + "\n", + "This will open the slides in a new browser window." + ] + }, { "cell_type": "code", "collapsed": false, -- GitLab