Skip to content

Commit d0c1c2a

Browse files
committed
update markdown cells
remove outdated references to heading cells, merge some cells
1 parent cd5ac03 commit d0c1c2a

File tree

1 file changed

+27
-88
lines changed

1 file changed

+27
-88
lines changed

examples/Notebook/Working With Markdown Cells.ipynb

Lines changed: 27 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -4,36 +4,21 @@
44
"cell_type": "markdown",
55
"metadata": {},
66
"source": [
7-
"# Markdown Cells"
8-
]
9-
},
10-
{
11-
"cell_type": "markdown",
12-
"metadata": {},
13-
"source": [
7+
"# Markdown Cells\n",
8+
"\n",
149
"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",
1510
"\n",
16-
"<http://daringfireball.net/projects/markdown/>"
17-
]
18-
},
19-
{
20-
"cell_type": "markdown",
21-
"metadata": {},
22-
"source": [
11+
"<http://daringfireball.net/projects/markdown/>\n",
12+
"\n",
2313
"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. "
2414
]
2515
},
2616
{
2717
"cell_type": "markdown",
2818
"metadata": {},
2919
"source": [
30-
"## Markdown basics"
31-
]
32-
},
33-
{
34-
"cell_type": "markdown",
35-
"metadata": {},
36-
"source": [
20+
"## Markdown basics\n",
21+
"\n",
3722
"You can make text *italic* or **bold**."
3823
]
3924
},
@@ -112,39 +97,23 @@
11297
"cell_type": "markdown",
11398
"metadata": {},
11499
"source": [
115-
"## Headings"
116-
]
117-
},
118-
{
119-
"cell_type": "markdown",
120-
"metadata": {},
121-
"source": [
122-
"If you want, you can add headings using Markdown's syntax:\n",
100+
"You can add headings using Markdown's syntax:\n",
123101
"\n",
124102
"# Heading 1\n",
103+
"\n",
125104
"# Heading 2\n",
105+
"\n",
126106
"## Heading 2.1\n",
107+
"\n",
127108
"## Heading 2.2"
128109
]
129110
},
130111
{
131112
"cell_type": "markdown",
132113
"metadata": {},
133114
"source": [
134-
"**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."
135-
]
136-
},
137-
{
138-
"cell_type": "markdown",
139-
"metadata": {},
140-
"source": [
141-
"## Embedded code"
142-
]
143-
},
144-
{
145-
"cell_type": "markdown",
146-
"metadata": {},
147-
"source": [
115+
"## Embedded code\n",
116+
"\n",
148117
"You can embed code meant for illustration instead of execution in Python:\n",
149118
"\n",
150119
" def f(x):\n",
@@ -163,13 +132,8 @@
163132
"cell_type": "markdown",
164133
"metadata": {},
165134
"source": [
166-
"## LaTeX equations"
167-
]
168-
},
169-
{
170-
"cell_type": "markdown",
171-
"metadata": {},
172-
"source": [
135+
"## LaTeX equations\n",
136+
"\n",
173137
"Courtesy of MathJax, you can include mathematical expressions both inline: \n",
174138
"$e^{i\\pi} + 1 = 0$ and displayed:\n",
175139
"\n",
@@ -186,13 +150,8 @@
186150
"cell_type": "markdown",
187151
"metadata": {},
188152
"source": [
189-
"## Github flavored markdown (GFM)"
190-
]
191-
},
192-
{
193-
"cell_type": "markdown",
194-
"metadata": {},
195-
"source": [
153+
"## Github flavored markdown (GFM)\n",
154+
"\n",
196155
"The Notebook webapp support Github flavored markdown meaning that you can use triple backticks for code blocks \n",
197156
"<pre>\n",
198157
"```python\n",
@@ -221,7 +180,7 @@
221180
"| a | table| \n",
222181
"</pre>\n",
223182
"\n",
224-
"A nice Html Table\n",
183+
"A nice HTML Table\n",
225184
"\n",
226185
"| This | is |\n",
227186
"|------|------|\n",
@@ -232,13 +191,8 @@
232191
"cell_type": "markdown",
233192
"metadata": {},
234193
"source": [
235-
"## General HTML"
236-
]
237-
},
238-
{
239-
"cell_type": "markdown",
240-
"metadata": {},
241-
"source": [
194+
"## General HTML\n",
195+
"\n",
242196
"Because Markdown is a superset of HTML you can even add things like HTML tables:\n",
243197
"\n",
244198
"<table>\n",
@@ -261,13 +215,8 @@
261215
"cell_type": "markdown",
262216
"metadata": {},
263217
"source": [
264-
"## Local files"
265-
]
266-
},
267-
{
268-
"cell_type": "markdown",
269-
"metadata": {},
270-
"source": [
218+
"## Local files\n",
219+
"\n",
271220
"If you have local files in your Notebook directory, you can refer to these files in Markdown cells directly:\n",
272221
"\n",
273222
" [subdirectory/]<filename>\n",
@@ -291,13 +240,8 @@
291240
"cell_type": "markdown",
292241
"metadata": {},
293242
"source": [
294-
"### Security of local files"
295-
]
296-
},
297-
{
298-
"cell_type": "markdown",
299-
"metadata": {},
300-
"source": [
243+
"### Security of local files\n",
244+
"\n",
301245
"Note that this means that the IPython notebook server also acts as a generic file server\n",
302246
"for files inside the same tree as your notebooks. Access is not granted outside the\n",
303247
"notebook folder so you have strict control over what files are visible, but for this\n",
@@ -308,13 +252,6 @@
308252
"to authenticated users unless read-only views are active."
309253
]
310254
},
311-
{
312-
"cell_type": "markdown",
313-
"metadata": {},
314-
"source": [
315-
"### Markdown attachement"
316-
]
317-
},
318255
{
319256
"attachments": {
320257
"pycon-logo.jpg": {
@@ -324,7 +261,9 @@
324261
"cell_type": "markdown",
325262
"metadata": {},
326263
"source": [
327-
"Since Jupyter ntoebook version 5.0, in addition to referencing external file you can attach a file to a markdown cell. \n",
264+
"### Markdown attachments\n",
265+
"\n",
266+
"Since Jupyter notebook version 5.0, in addition to referencing external file you can attach a file to a markdown cell. \n",
328267
"To do so drag the file from in a markdown cell while editing it:\n",
329268
"\n",
330269
"![pycon-logo.jpg](attachment:pycon-logo.jpg)\n",
@@ -355,7 +294,7 @@
355294
"name": "python",
356295
"nbconvert_exporter": "python",
357296
"pygments_lexer": "ipython3",
358-
"version": "3.6.0"
297+
"version": "3.6.1"
359298
}
360299
},
361300
"nbformat": 4,

0 commit comments

Comments
 (0)