{ "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": [ "