Skip to content

Commit

Permalink
update markdown cells
Browse files Browse the repository at this point in the history
remove outdated references to heading cells, merge some cells
  • Loading branch information
minrk committed May 18, 2017
1 parent cd5ac03 commit d0c1c2a
Showing 1 changed file with 27 additions and 88 deletions.
115 changes: 27 additions & 88 deletions examples/Notebook/Working With Markdown Cells.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,21 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Markdown Cells"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Markdown Cells\n",
"\n",
"Text can be added to IPython Notebooks using Markdown cells. Markdown is a popular markup language that is a superset of HTML. Its specification can be found here:\n",
"\n",
"<http://daringfireball.net/projects/markdown/>"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<http://daringfireball.net/projects/markdown/>\n",
"\n",
"You can view the source of a cell by double clicking on it, or while the cell is selected in command mode, press `Enter` to edit it. One A cell has been editted, use `Shift-Enter` to re-render it. "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Markdown basics"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Markdown basics\n",
"\n",
"You can make text *italic* or **bold**."
]
},
Expand Down Expand Up @@ -112,39 +97,23 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Headings"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"If you want, you can add headings using Markdown's syntax:\n",
"You can add headings using Markdown's syntax:\n",
"\n",
"# Heading 1\n",
"\n",
"# Heading 2\n",
"\n",
"## Heading 2.1\n",
"\n",
"## Heading 2.2"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"**BUT most of the time you should use the Notebook's Heading Cells to organize your Notebook content**, as they provide meaningful structure that can be interpreted by other tools, not just large bold fonts."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Embedded code"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Embedded code\n",
"\n",
"You can embed code meant for illustration instead of execution in Python:\n",
"\n",
" def f(x):\n",
Expand All @@ -163,13 +132,8 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## LaTeX equations"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## LaTeX equations\n",
"\n",
"Courtesy of MathJax, you can include mathematical expressions both inline: \n",
"$e^{i\\pi} + 1 = 0$ and displayed:\n",
"\n",
Expand All @@ -186,13 +150,8 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Github flavored markdown (GFM)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Github flavored markdown (GFM)\n",
"\n",
"The Notebook webapp support Github flavored markdown meaning that you can use triple backticks for code blocks \n",
"<pre>\n",
"```python\n",
Expand Down Expand Up @@ -221,7 +180,7 @@
"| a | table| \n",
"</pre>\n",
"\n",
"A nice Html Table\n",
"A nice HTML Table\n",
"\n",
"| This | is |\n",
"|------|------|\n",
Expand All @@ -232,13 +191,8 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## General HTML"
]
},
{
"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",
"<table>\n",
Expand All @@ -261,13 +215,8 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Local files"
]
},
{
"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/]<filename>\n",
Expand All @@ -291,13 +240,8 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### Security of local files"
]
},
{
"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",
Expand All @@ -308,13 +252,6 @@
"to authenticated users unless read-only views are active."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Markdown attachement"
]
},
{
"attachments": {
"pycon-logo.jpg": {
Expand All @@ -324,7 +261,9 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Since Jupyter ntoebook version 5.0, in addition to referencing external file you can attach a file to a markdown cell. \n",
"### Markdown attachments\n",
"\n",
"Since Jupyter notebook version 5.0, in addition to referencing external file you can attach a file to a markdown cell. \n",
"To do so drag the file from in a markdown cell while editing it:\n",
"\n",
"![pycon-logo.jpg](attachment:pycon-logo.jpg)\n",
Expand Down Expand Up @@ -355,7 +294,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.0"
"version": "3.6.1"
}
},
"nbformat": 4,
Expand Down

0 comments on commit d0c1c2a

Please sign in to comment.