{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": { "execution": { "iopub.execute_input": "2020-06-09T20:58:00.136549Z", "iopub.status.busy": "2020-06-09T20:58:00.135499Z", "iopub.status.idle": "2020-06-09T20:58:01.000390Z", "shell.execute_reply": "2020-06-09T20:58:01.000658Z" }, "init_cell": true, "slideshow": { "slide_type": "skip" } }, "outputs": [], "source": [ "import matplotlib.pyplot as plt\n", "import pandas as pd\n", "pd.set_option('display.latex.repr', True)\n", "import sympy as sym\n", "sym.init_printing(use_latex=True)\n", "import numpy as np\n", "from IPython.display import Image, Latex" ] }, { "cell_type": "markdown", "metadata": { "ipub": { "slide": true } }, "source": [ "# Markdown" ] }, { "cell_type": "markdown", "metadata": { "ipub": { "slide": true } }, "source": [ "## General" ] }, { "cell_type": "markdown", "metadata": { "ipub": { "slide": true } }, "source": [ "Some markdown text.\n", "\n", "A list:\n", "\n", "- something\n", "- something else\n", "\n", "A numbered list\n", "\n", "1. something\n", "2. something else\n", "\n", "non-ascii characters TODO" ] }, { "cell_type": "markdown", "metadata": { "ipub": {} }, "source": [ "This is a long section of text, which we only want in a document (not a presentation)\n", "some text\n", "some more text\n", "some more text\n", "some more text\n", "some more text\n", "some more text\n", "some more text\n", "some more text\n", "some more text\n" ] }, { "cell_type": "markdown", "metadata": { "ipub": { "slide": true, "slideonly": true } }, "source": [ "This is an abbreviated section of the document text, which we only want in a presentation\n", "\n", "- summary of document text" ] }, { "cell_type": "markdown", "metadata": { "ipub": { "slide": true } }, "source": [ "## References and Citations" ] }, { "cell_type": "markdown", "metadata": { "ipub": { "slide": true } }, "source": [ "References to \\cref{fig:example}, \\cref{tbl:example}, =@eqn:example_sympy and \\cref{code:example_mpl}.\n", "\n", "A latex citation.\\cite{zelenyak_molecular_2016}\n", "\n", "A html citation.(Kirkeminde, 2012) " ] }, { "cell_type": "markdown", "metadata": { "ipub": { "slide": true } }, "source": [ "## Todo notes" ] }, { "cell_type": "markdown", "metadata": { "ipub": { "slide": true } }, "source": [ "\\todo[inline]{an inline todo}\n", "\n", "Some text.\\todo{a todo in the margins}" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Text Output" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "execution": { "iopub.execute_input": "2020-06-09T20:58:01.003529Z", "iopub.status.busy": "2020-06-09T20:58:01.003122Z", "iopub.status.idle": "2020-06-09T20:58:01.005552Z", "shell.execute_reply": "2020-06-09T20:58:01.005184Z" }, "ipub": { "text": { "format": { "backgroundcolor": "\\color{blue!10}" } } } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n", "This is some printed text,\n", "with a nicely formatted output.\n", "\n" ] } ], "source": [ "print(\"\"\"\n", "This is some printed text,\n", "with a nicely formatted output.\n", "\"\"\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Images and Figures" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Displaying a plot with its code" ] }, { "cell_type": "markdown", "metadata": { "ipub": { "caption": "fig:example_mpl" } }, "source": [ "A matplotlib figure, with the caption set in the markdowncell above the figure." ] }, { "cell_type": "markdown", "metadata": { "ipub": { "caption": "code:example_mpl" } }, "source": [ "The plotting code for a matplotlib figure (\\cref{fig:example_mpl})." ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "# Tables (with pandas)" ] }, { "cell_type": "markdown", "metadata": { "ipub": { "caption": "code:example_pd" } }, "source": [ "The plotting code for a pandas Dataframe table (\\cref{tbl:example})." ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "execution": { "iopub.execute_input": "2020-06-09T20:58:01.010731Z", "iopub.status.busy": "2020-06-09T20:58:01.010410Z", "iopub.status.idle": "2020-06-09T20:58:01.021093Z", "shell.execute_reply": "2020-06-09T20:58:01.020829Z" }, "ipub": { "code": { "asfloat": true, "caption": "", "label": "code:example_pd", "placement": "H", "widefigure": false }, "table": { "alternate": "gray!20", "caption": "An example of a table created with pandas dataframe.", "label": "tbl:example", "placement": "H" } } }, "outputs": [ { "data": { "text/html": [ "
\n", " | a | \n", "b | \n", "c | \n", "d | \n", "
---|---|---|---|---|
0 | \n", "$\\delta$ | \n", "l | \n", "0.603 | \n", "0.545 | \n", "
1 | \n", "x | \n", "m | \n", "0.438 | \n", "0.892 | \n", "
2 | \n", "y | \n", "n | \n", "0.792 | \n", "0.529 | \n", "