|
4 | 4 | "cell_type": "markdown",
|
5 | 5 | "metadata": {},
|
6 | 6 | "source": [
|
7 |
| - "# Markdown Cells" |
8 |
| - ] |
9 |
| - }, |
10 |
| - { |
11 |
| - "cell_type": "markdown", |
12 |
| - "metadata": {}, |
13 |
| - "source": [ |
| 7 | + "# Markdown Cells\n", |
| 8 | + "\n", |
14 | 9 | "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",
|
15 | 10 | "\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", |
23 | 13 | "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. "
|
24 | 14 | ]
|
25 | 15 | },
|
26 | 16 | {
|
27 | 17 | "cell_type": "markdown",
|
28 | 18 | "metadata": {},
|
29 | 19 | "source": [
|
30 |
| - "## Markdown basics" |
31 |
| - ] |
32 |
| - }, |
33 |
| - { |
34 |
| - "cell_type": "markdown", |
35 |
| - "metadata": {}, |
36 |
| - "source": [ |
| 20 | + "## Markdown basics\n", |
| 21 | + "\n", |
37 | 22 | "You can make text *italic* or **bold**."
|
38 | 23 | ]
|
39 | 24 | },
|
|
112 | 97 | "cell_type": "markdown",
|
113 | 98 | "metadata": {},
|
114 | 99 | "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", |
123 | 101 | "\n",
|
124 | 102 | "# Heading 1\n",
|
| 103 | + "\n", |
125 | 104 | "# Heading 2\n",
|
| 105 | + "\n", |
126 | 106 | "## Heading 2.1\n",
|
| 107 | + "\n", |
127 | 108 | "## Heading 2.2"
|
128 | 109 | ]
|
129 | 110 | },
|
130 | 111 | {
|
131 | 112 | "cell_type": "markdown",
|
132 | 113 | "metadata": {},
|
133 | 114 | "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", |
148 | 117 | "You can embed code meant for illustration instead of execution in Python:\n",
|
149 | 118 | "\n",
|
150 | 119 | " def f(x):\n",
|
|
163 | 132 | "cell_type": "markdown",
|
164 | 133 | "metadata": {},
|
165 | 134 | "source": [
|
166 |
| - "## LaTeX equations" |
167 |
| - ] |
168 |
| - }, |
169 |
| - { |
170 |
| - "cell_type": "markdown", |
171 |
| - "metadata": {}, |
172 |
| - "source": [ |
| 135 | + "## LaTeX equations\n", |
| 136 | + "\n", |
173 | 137 | "Courtesy of MathJax, you can include mathematical expressions both inline: \n",
|
174 | 138 | "$e^{i\\pi} + 1 = 0$ and displayed:\n",
|
175 | 139 | "\n",
|
|
186 | 150 | "cell_type": "markdown",
|
187 | 151 | "metadata": {},
|
188 | 152 | "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", |
196 | 155 | "The Notebook webapp support Github flavored markdown meaning that you can use triple backticks for code blocks \n",
|
197 | 156 | "<pre>\n",
|
198 | 157 | "```python\n",
|
|
221 | 180 | "| a | table| \n",
|
222 | 181 | "</pre>\n",
|
223 | 182 | "\n",
|
224 |
| - "A nice Html Table\n", |
| 183 | + "A nice HTML Table\n", |
225 | 184 | "\n",
|
226 | 185 | "| This | is |\n",
|
227 | 186 | "|------|------|\n",
|
|
232 | 191 | "cell_type": "markdown",
|
233 | 192 | "metadata": {},
|
234 | 193 | "source": [
|
235 |
| - "## General HTML" |
236 |
| - ] |
237 |
| - }, |
238 |
| - { |
239 |
| - "cell_type": "markdown", |
240 |
| - "metadata": {}, |
241 |
| - "source": [ |
| 194 | + "## General HTML\n", |
| 195 | + "\n", |
242 | 196 | "Because Markdown is a superset of HTML you can even add things like HTML tables:\n",
|
243 | 197 | "\n",
|
244 | 198 | "<table>\n",
|
|
261 | 215 | "cell_type": "markdown",
|
262 | 216 | "metadata": {},
|
263 | 217 | "source": [
|
264 |
| - "## Local files" |
265 |
| - ] |
266 |
| - }, |
267 |
| - { |
268 |
| - "cell_type": "markdown", |
269 |
| - "metadata": {}, |
270 |
| - "source": [ |
| 218 | + "## Local files\n", |
| 219 | + "\n", |
271 | 220 | "If you have local files in your Notebook directory, you can refer to these files in Markdown cells directly:\n",
|
272 | 221 | "\n",
|
273 | 222 | " [subdirectory/]<filename>\n",
|
|
291 | 240 | "cell_type": "markdown",
|
292 | 241 | "metadata": {},
|
293 | 242 | "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", |
301 | 245 | "Note that this means that the IPython notebook server also acts as a generic file server\n",
|
302 | 246 | "for files inside the same tree as your notebooks. Access is not granted outside the\n",
|
303 | 247 | "notebook folder so you have strict control over what files are visible, but for this\n",
|
|
308 | 252 | "to authenticated users unless read-only views are active."
|
309 | 253 | ]
|
310 | 254 | },
|
311 |
| - { |
312 |
| - "cell_type": "markdown", |
313 |
| - "metadata": {}, |
314 |
| - "source": [ |
315 |
| - "### Markdown attachement" |
316 |
| - ] |
317 |
| - }, |
318 | 255 | {
|
319 | 256 | "attachments": {
|
320 | 257 | "pycon-logo.jpg": {
|
|
324 | 261 | "cell_type": "markdown",
|
325 | 262 | "metadata": {},
|
326 | 263 | "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", |
328 | 267 | "To do so drag the file from in a markdown cell while editing it:\n",
|
329 | 268 | "\n",
|
330 | 269 | "\n",
|
|
355 | 294 | "name": "python",
|
356 | 295 | "nbconvert_exporter": "python",
|
357 | 296 | "pygments_lexer": "ipython3",
|
358 |
| - "version": "3.6.0" |
| 297 | + "version": "3.6.1" |
359 | 298 | }
|
360 | 299 | },
|
361 | 300 | "nbformat": 4,
|
|
0 commit comments