{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# IPython notebook Markdown summary" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Robert Johansson\n", "\n", "Source code listings for [Numerical Python - Scientific Computing and Data Science Applications with Numpy, SciPy and Matplotlib](https://www.apress.com/us/book/9781484242452) (ISBN 978-1-484242-45-2)." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Test notebook for Markdown table in Chapter 1." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Italics" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Text that is surrounded by asterisks `*text*` is displayed as italics: *text*" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Bold" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Text that is surrounded by double asterisks `**text**` is displayed as bold: **text**" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Strike-through" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Text that is surrounded by double tidle `~~text~~` is displayed as strike-through: ~~text~~" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Fixed-width font" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Text that is quoted with ` characters are displayed as fixed-width font:\n", "\n", "`text`" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## URLs" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "URLs are written as\t`[URL text](http://www.example.com)`: [URL text](http://www.example.com) " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## New paragraph" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Separate the text of two paragraphs with an empty line.\n", "\n", "This is a new paragraph." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Verbatim" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Text that start with four spaces is displayed as verbatim:\n", "\n", " def func(x):\n", " return x ** 2" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Table" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The format for tables are as follows:\n", "\n", " | A | B | C |\n", " |---|---|---|\n", " | 1 | 2 | 3 |\n", " | 4 | 5 | 6 |\n", "\n", "| A | B | C |\n", "|---|---|---|\n", "| 1 | 2 | 3 |\n", "| 4 | 5 | 6 |" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Horizontal line" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "A line with three dashes `---` is shown as a horizontal line:\n", "\n", "---" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Headings" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Lines starting with one `#` is a heading level 1, `##` is heading level 2, `###` is heading level 3, etc.\n", "\n", "# Level 1 heading\n", "## Level 2 heading\n", "### Level 3 heading" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Block quote" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Lines that start with `>` are displayed as a block quote:\n", "\n", "> Text here is indented and offset\n", "> from the main text body." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Unordered list" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Unordered lists are created by starting lines with `*`\n", "\n", "* Item one\n", "* Item two\n", "* Item three" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Ordered list" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Ordered lists are created by simply enumerating lines with numbers followed a period: 1. ..., 2. ..., etc.\n", "1. Item one\n", "2. Item two\n", "3. Item three" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Image" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Images can be included using `![Alternative text](image-file.png)` or `![Alternative text](http://www.example.com/image.png)`:\n", "\n", "![Alternative text](image-file.png)\n", "\n", "![Alternative text](http://www.example.com/image.png)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## LaTeX" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Inline LaTeX equations can be included using `$\\LaTeX$`: $\\LaTeX$\n", "\n", "Displayed LaTeX equations (centered, and on a new line): `$$\\LaTeX$$`\n", "\n", "$$\\LaTeX$$ \n", "\n", "It is also possible to use latex environments like equation, eqnarray, align:\n", "\n", "`\\begin{equation} x = 1 \\end{equation}`\n", "\n", "\\begin{equation} x = 1 \\end{equation}\n", "\n", "`\\begin{eqnarray} x = 2 \\end{eqnarray}`\n", "\n", "\\begin{eqnarray} x = 2 \\end{eqnarray}\n", "\n", "`\\begin{align} x = 3 \\end{align}`\n", "\n", "\\begin{align} x = 3 \\end{align}\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Versions" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "%reload_ext version_information" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
SoftwareVersion
Python3.6.6 64bit [GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)]
IPython6.4.0
OSDarwin 17.3.0 x86_64 i386 64bit
Thu Sep 27 22:36:35 2018 JST
" ], "text/latex": [ "\\begin{tabular}{|l|l|}\\hline\n", "{\\bf Software} & {\\bf Version} \\\\ \\hline\\hline\n", "Python & 3.6.6 64bit [GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE\\_401/final)] \\\\ \\hline\n", "IPython & 6.4.0 \\\\ \\hline\n", "OS & Darwin 17.3.0 x86\\_64 i386 64bit \\\\ \\hline\n", "\\hline \\multicolumn{2}{|l|}{Thu Sep 27 22:36:35 2018 JST} \\\\ \\hline\n", "\\end{tabular}\n" ], "text/plain": [ "Software versions\n", "Python 3.6.6 64bit [GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)]\n", "IPython 6.4.0\n", "OS Darwin 17.3.0 x86_64 i386 64bit\n", "Thu Sep 27 22:36:35 2018 JST" ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "%version_information" ] } ], "metadata": { "kernelspec": { "display_name": "py36", "language": "python", "name": "py36" }, "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.8" } }, "nbformat": 4, "nbformat_minor": 2 }