From fa4f7343f47f20ffea41566f529869a0de504250 Mon Sep 17 00:00:00 2001 From: Matthias Geier Date: Wed, 12 Jan 2022 20:03:37 +0100 Subject: [PATCH] DOC: Add example Markdown content --- doc/code-cells.ipynb | 51 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 50 insertions(+), 1 deletion(-) diff --git a/doc/code-cells.ipynb b/doc/code-cells.ipynb index c4165b7f..9de64735 100644 --- a/doc/code-cells.ipynb +++ b/doc/code-cells.ipynb @@ -553,6 +553,55 @@ "df" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Markdown Content" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "from IPython.display import Markdown" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "md = Markdown(\"\"\"\n", + "# Markdown\n", + "\n", + "It *should* show up as **formatted** text\n", + "with things like [links] and images.\n", + "\n", + "[links]: https://jupyter.org/\n", + "\n", + "![Jupyter notebook icon](images/notebook_icon.png)\n", + "\n", + "## Markdown Extensions\n", + "\n", + "There might also be mathematical equations like\n", + "$a^2 + b^2 = c^2$\n", + "and even tables:\n", + "\n", + "A | B | A and B\n", + "------|-------|--------\n", + "False | False | False\n", + "True | False | False\n", + "False | True | False\n", + "True | True | True\n", + "\n", + "\"\"\")\n", + "md" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -671,7 +720,7 @@ "outputs": [], "source": [ "tabs = w.Tab()\n", - "for idx, obj in enumerate([df, fig, eq, i, slider]):\n", + "for idx, obj in enumerate([df, fig, eq, i, md, slider]):\n", " out = w.Output()\n", " with out:\n", " display(obj)\n",