{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"# Presenting with Jupyter Notebooks\n",
"\n",
"## [Scott Jeen](https://enjeeneer.io/)\n",
"\n",
"### 17th November 2021"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "notes"
}
},
"source": [
"In the last year I've started presenting work using Jupyter Notebooks, rebelling against the Bill Gates'-driven status-quo. Here I'll explain how to do it. It's not difficult, but in my opinion makes presentations look slicker, whilst allowing you to run code live in a presentation if you like. First, we need to download the plug-in that gives us the presentation functionality, it's called [RISE](https://rise.readthedocs.io/en/stable/index.html). We can do this easily using pip in a terminal window:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"outputs": [],
"source": [
"pip install RISE"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "notes"
}
},
"source": [
"Once installed, our first move is to add the presentation toggles to our notebook cells. We do this by clicking *View* in the menu bar, then *Cell Toolbar*, then *Slideshow*:"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"## Adding Presentation Toggles to Cells\n",
"\n",
""
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"## Slide Types\n",
"\n",
"This adds a `Slide Type` dropdown to each cell in the notebook. Here we can choose one of five options:\n",
"- **Slide**: Used to start a new chapter in your presentation, think of this as a section heading in LaTeX.\n",
"- **Sub-slide**: Slide falling within the chapter defined by a **Slide** cell.\n",
"- **Fragment**: this is to split the contents of one slide into pieces; a cell marked as a fragment will create a break inside the slide; it will not show up right away, you will need to press Space one more time to see it.\n",
"- **Skip**: Skips cell when in presenter mode.\n",
"- **Notes**: Cell that allows the author to write notes on a slide that aren't shown in presenter view."
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "notes"
}
},
"source": [
"As with any notebook, we can define the cell type to be either `Markdown` or `Code`. As you'd expect, we present any text or image-based slide in `Markdown`, reserving the `Code` cell type if and only if we want to explicitly run some code in the presentation. If you aren't familiar, Markdown is a straightforward language for text foramtting; I won't go into the details here, but suffice to say you can learn the basics of Markdown in 5 minutes. You can find a useful cheatsheet [here](https://www.markdownguide.org/cheat-sheet/)."
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"# Here's an example of a Markdown Slide!\n",
"\n",
"I can create bullet points easily:\n",
"- Groundbreaking idea no. 1\n",
"- Groundbreaking idea no. 2\n",
"\n",
"And I can add tables easily too:\n",
"\n",
"| **Presentation Software** | **Rating (scale: [0,10])** |\n",
"|---------------------------|----------------------------|\n",
"| MS Powerpoint | -3 |\n",
"| RISE | 11 |"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"I'm using RISE to present code in Jupyter Notebooks!\n"
]
}
],
"source": [
"# Here's an example of a Code slide!\n",
"\n",
"print('I\\'m using RISE to present code in Jupyter Notebooks!')"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "notes"
}
},
"source": [
"Adding images is easy too. I advise creating a sub-directory in your working directory calles `/images` and storing anything you want to present there. Then you display them in a markdown file using some simple HTML syntax:\n",
"\n",
"``\n",
"\n",
"You can manipulate the `style` attribute to change the size of the image. Don't worry, this is the only HTML you need to know!"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"## Displaying Images is Easy Too!\n",
"\n",
""
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "notes"
}
},
"source": [
"To view your slideshow click on the bar-chart button in the menu bar. This will start the presentation from the cell currently selected: "
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"## Enter Presentation Mode on the Menu Bar\n",
"\n",
""
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "notes"
}
},
"source": [
"That's it! This tutorial has given you an introduction to the basics of RISE for presenting with Jupyter Notebooks, you can of course customise these to your heart's content using further plug-ins and more advanced Markdown. Here's a summary of the useful links from this document to finish:\n",
"\n",
"- [RISE Documentation](https://rise.readthedocs.io/en/stable/index.html)\n",
"- [Markdown Cheatsheet](https://www.markdownguide.org/cheat-sheet/)\n",
"- [Markdown Table Generator](https://www.tablesgenerator.com/)"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"# Thanks!\n",
"\n",
"### Twitter: [@enjeeneer](https://twitter.com/enjeeneer)\n",
"\n",
"### Website: [https://enjeeneer.io/](https://enjeeneer.io/)"
]
}
],
"metadata": {
"celltoolbar": "Slideshow",
"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.7.9"
}
},
"nbformat": 4,
"nbformat_minor": 4
}