\n",
"```python\n",
"print \"Hello World\"\n",
"```\n",
"\n",
"```javascript\n",
"console.log(\"Hello World\")\n",
"```\n",
"\n",
"\n",
"Gives \n",
"```python\n",
"print \"Hello World\"\n",
"```\n",
"\n",
"```javascript\n",
"console.log(\"Hello World\")\n",
"```\n",
"\n",
"And a table like this : \n",
"\n",
"\n",
"| This | is |\n",
"|------|------|\n",
"| a | table| \n",
"
\n",
"\n",
"A nice HTML Table\n",
"\n",
"| This | is |\n",
"|------|------|\n",
"| a | table| "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## General HTML\n",
"\n",
"Because Markdown is a superset of HTML you can even add things like HTML tables:\n",
"\n",
"\n",
"\n",
"Header 1 | \n",
"Header 2 | \n",
"
\n",
"\n",
"row 1, cell 1 | \n",
"row 1, cell 2 | \n",
"
\n",
"\n",
"row 2, cell 1 | \n",
"row 2, cell 2 | \n",
"
\n",
"
"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Local files\n",
"\n",
"If you have local files in your Notebook directory, you can refer to these files in Markdown cells directly:\n",
"\n",
" [subdirectory/]\n",
"\n",
"For example, in the images folder, we have the Python logo:\n",
"\n",
" \n",
"\n",
"\n",
"\n",
"and a video with the HTML5 video tag:\n",
"\n",
" \n",
"\n",
"\n",
"\n",
"These do not embed the data into the notebook file, and require that the files exist when you are viewing the notebook."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Security of local files\n",
"\n",
"Note that this means that the IPython notebook server also acts as a generic file server\n",
"for files inside the same tree as your notebooks. Access is not granted outside the\n",
"notebook folder so you have strict control over what files are visible, but for this\n",
"reason it is highly recommended that you do not run the notebook server with a notebook\n",
"directory at a high level in your filesystem (e.g. your home directory).\n",
"\n",
"When you run the notebook in a password-protected manner, local file access is restricted\n",
"to authenticated users unless read-only views are active."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"---\n",
"\n",
"# Typesetting Equations\n",
"\n",
"The Markdown parser included in IPython is MathJax-aware. This means that you can freely mix in mathematical expressions using the [MathJax subset of Tex and LaTeX](http://docs.mathjax.org/en/latest/tex.html#tex-support). \n",
"\n",
"You can use single-dollar signs to include inline math, e.g. `$e^{i \\pi} = -1$` will render as $e^{i \\pi} = -1$, and double-dollars for displayed math:\n",
"\n",
"```\n",
"$$\n",
"e^x=\\sum_{i=0}^\\infty \\frac{1}{i!}x^i\n",
"$$\n",
"```\n",
"\n",
"renders as:\n",
"\n",
"$$\n",
"e^x=\\sum_{i=0}^\\infty \\frac{1}{i!}x^i\n",
"$$\n",
"\n",
"You can also use more complex LaTeX constructs for displaying math, such as:\n",
"\n",
"```\n",
"\\begin{align}\n",
"\\dot{x} & = \\sigma(y-x) \\\\\n",
"\\dot{y} & = \\rho x - y - xz \\\\\n",
"\\dot{z} & = -\\beta z + xy\n",
"\\end{align}\n",
"```\n",
"\n",
"to produce the Lorenz equations:\n",
"\n",
"\\begin{align}\n",
"\\dot{x} & = \\sigma(y-x) \\\\\n",
"\\dot{y} & = \\rho x - y - xz \\\\\n",
"\\dot{z} & = -\\beta z + xy\n",
"\\end{align}\n",
"\n",
"Please refer to the MathJax documentation for a comprehensive description of which parts of LaTeX are supported, but note that Jupyter's support for LaTeX is **limited to mathematics**. You can **not** use LaTeX typesetting constrcuts for text or document structure, for text formatting you should restrict yourself to Markdown syntax."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"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.3"
}
},
"nbformat": 4,
"nbformat_minor": 2
}