{ "cells": [ { "cell_type": "markdown", "metadata": { "nbsphinx": "hidden" }, "source": [ "This notebook is part of the `nbsphinx` documentation: http://nbsphinx.readthedocs.io/." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Markdown Cells\n", "\n", "We can use *emphasis*, **boldface**, `preformatted text`.\n", "\n", "> It looks like strike-out text is not supported: ~~strikethrough~~.\n", "\n", "* Red\n", "* Green\n", "* Blue\n", "\n", "***\n", "\n", "1. One\n", "1. Two\n", "1. Three\n", "\n", "Arbitrary Unicode characters should be supported, e.g. łαßō.\n", "Note, however, that this only works if your HTML browser and your LaTeX processor provide the appropriate fonts." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Equations\n", "\n", "Equations can be formatted really nicely, either inline, like $\\text{e}^{i\\pi} = -1$, or on a separate line, like\n", "\n", "\\begin{equation}\n", "\\int_{-\\infty}^\\infty f(x) \\delta(x - x_0) dx = f(x_0)\n", "\\end{equation}\n", "\n", "*Note:* Avoid leading and trailing spaces around math expressions, otherwise errors like the following will occur when Sphinx is running:\n", "\n", " ERROR: Unknown interpreted text role \"raw-latex\".\n", "\n", "See also the [pandoc docs](http://pandoc.org/MANUAL.html#math):\n", "\n", "> Anything between two `$` characters will be treated as TeX math. The opening `$` must have a non-space character immediately to its right, while the closing `$` must have a non-space character immediately to its left, and must not be followed immediately by a digit." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Code\n", "\n", "We can also write code with nice syntax highlighting:\n", "\n", "```python3\n", "print(\"Hello, world!\")\n", "```" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 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" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Images\n", "\n", "PNG file (local): ![Jupyter notebook icon](images/notebook_icon.png)\n", "\n", "SVG file (local): ![Python logo](images/python_logo.svg)\n", "\n", "PNG file (remote): ![Python logo (remote)](https://www.python.org/static/img/python-logo-large.png)\n", "\n", "SVG file (remote): ![Jupyter logo (remote)](http://jupyter.org/assets/nav_logo.svg)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## HTML Elements (HTML only)\n", "\n", "It is allowed to use plain HTML elements within Markdown cells.\n", "Those elements are passed through to the HTML output and are ignored for the LaTeX output.\n", "Below are a few examples.\n", "\n", "HTML5 [audio](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio) elements can be created like this:\n", "\n", "```html\n", "\n", "```\n", "\n", "Example:\n", "\n", "\n", "\n", "\n", "HTML5 [video](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video) elements can be created like this:\n", "\n", "```html\n", "\n", "```\n", "\n", "Example:\n", "\n", "\n", "\n", "The alternative text is shown in browsers that don't support those elements. The same text is also shown in Sphinx's LaTeX output.\n", "\n", "