{ "cells": [ { "cell_type": "markdown", "metadata": { "slideshow": {} }, "source": [ "##### The first page does not need a Slide tag" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "I have no slide tag\n" ] } ], "source": [ "print(\"I have no slide tag\")" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "# demonstrating smart-exec " ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "x = 1" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "x = 2" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [], "source": [ "x = 3" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "notes" } }, "source": [ "Some note to see how it gets rendered" ] }, { "cell_type": "markdown", "metadata": { "collapsed": true, "slideshow": { "slide_type": "skip" } }, "source": [ "This is a skip cell" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "# one fragment per code cell" ] }, { "cell_type": "code", "execution_count": 5, "metadata": { "slideshow": { "slide_type": "fragment" } }, "outputs": [], "source": [ "z = 26" ] }, { "cell_type": "code", "execution_count": 6, "metadata": { "slideshow": { "slide_type": "fragment" } }, "outputs": [], "source": [ "y = 25" ] }, { "cell_type": "code", "execution_count": 7, "metadata": { "slideshow": { "slide_type": "fragment" } }, "outputs": [], "source": [ "x = 24" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "# 2 fragments with 2 code cells each" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [], "source": [ "a = 1" ] }, { "cell_type": "code", "execution_count": 9, "metadata": { "slideshow": {} }, "outputs": [], "source": [ "b = 2" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "fragment" } }, "source": [ "Some text" ] }, { "cell_type": "code", "execution_count": 10, "metadata": { "slideshow": {} }, "outputs": [], "source": [ "c = 3" ] }, { "cell_type": "code", "execution_count": 11, "metadata": { "slideshow": {} }, "outputs": [], "source": [ "d = 4" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "## smart exec and fragment\n", "* in general the last cell in a fragment will behave like the end of a slide\n", "* however if what comes after that fragment is visible already\n", " * like when we show a fragment and move backwards \n", "* then we allow smart-exec to go to the next cell" ] }, { "cell_type": "code", "execution_count": 12, "metadata": { "slideshow": {} }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "I could go on\n" ] } ], "source": [ "# last cell in fragment\n", "print(\"I could go on\")" ] }, { "cell_type": "code", "execution_count": 13, "metadata": { "slideshow": { "slide_type": "fragment" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "once the next fragment is shown\n" ] } ], "source": [ "# move back up once this is displayed\n", "print(\"once the next fragment is shown\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "
should be red if the css-loading feature works fine
" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "
should be blue if the css-loading feature works fine
" ] }, { "cell_type": "code", "execution_count": 14, "metadata": { "slideshow": { "slide_type": "slide" } }, "outputs": [], "source": [ "e = 5" ] }, { "cell_type": "markdown", "metadata": { "slideshow": {} }, "source": [ "When the text comes second" ] }, { "cell_type": "code", "execution_count": 15, "metadata": { "slideshow": { "slide_type": "slide" } }, "outputs": [], "source": [ "f = 6" ] }, { "cell_type": "markdown", "metadata": { "slideshow": {} }, "source": [ "Again with a fragment" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "fragment" } }, "source": [ "Some text" ] }, { "cell_type": "code", "execution_count": 16, "metadata": { "slideshow": {} }, "outputs": [], "source": [ "g = 7" ] }, { "cell_type": "code", "execution_count": 17, "metadata": { "slideshow": { "slide_type": "-" } }, "outputs": [], "source": [ "h = 8" ] } ], "metadata": { "celltoolbar": "Slideshow", "jupytext": { "formats": "ipynb" }, "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.6.3" }, "rise": { "autolaunch": true, "slideNumber": "c/t" } }, "nbformat": 4, "nbformat_minor": 2 }