Skip to content

Commit affcd1f

Browse files
Merge pull request #276 from coding-for-reproducible-research/using-markdown-for-python-update
Using markdown for python update
2 parents efb07fa + f6e56f0 commit affcd1f

File tree

4 files changed

+35
-30
lines changed

4 files changed

+35
-30
lines changed

individual_modules/markdown_with_python/3-Markdown-Fundamentals.md

Lines changed: 28 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,12 @@ To create a Markdown file within the JupyterLab interface:
5050
- if you're already running it, go to your browser window.
5151
- if not, launch it from your terminal with 'jupyter lab'.
5252
3. Click the file menu.
53-
- At the top left, select File > New > Text File.
54-
4. Rename the File to `.md`.
53+
- At the top left, select File > New > Markdown File.
54+
4. Rename the File.
5555
- In the file browser on the left, right-click the new text file and choose `Rename`.
5656
5. Start Writing Markdown!
57-
- the rest of this section will guide you through the various formatting features you can use to present your content effectively.
57+
- Right-click on the file and choose `Show Makdown Preview` from the drop-down menu.
58+
- The rest of this section will guide you through the various formatting features you can use to present your content effectively.
5859

5960

6061
## 1. Headings
@@ -92,7 +93,7 @@ A line break within a paragraph is created by adding two spaces at the end of a
9293

9394
To create a full paragraph break (a blank line between paragraphs), you simply press Enter twice.
9495

95-
Here is an example:
96+
Here is **an example:**
9697

9798
```
9899
This is the first paragraph.
@@ -101,7 +102,7 @@ This is the second paragraph with a
101102
line break inside.
102103
```
103104

104-
### Output:
105+
**Output:**
105106
This is the first paragraph.
106107

107108
This is the second paragraph with a
@@ -132,7 +133,7 @@ Lists are a great way to make your documents easier to scan and helps readers fi
132133
### Unordered Lists (Bullets)
133134
To make a bullet point, start a line with `-`, `+`, or `*`. It is of note that the different symbols you can use to create a bulleted list are all treated the same by the Markdown processor and will therefore render identically as a disc bullet. Whilst they render the same, for consistency we recommend you use the same symbol within a list and not mix between them, because some Markdown parsers or linters may warn about inconsistent style. You can also create sublists by indenting with at least two spaces.
134135

135-
Example:
136+
**Example:**
136137
```
137138
- Item 1
138139
- Item 2
@@ -141,7 +142,7 @@ Example:
141142
142143
```
143144

144-
### Output:
145+
**Output:**
145146
- Item 1
146147
- Item 2
147148
- Subitem 2.1
@@ -158,7 +159,7 @@ To make a numbered list, just start each line with a number followed by a full s
158159
2. Subitem 2.2
159160
```
160161

161-
### Output:
162+
**Output:**
162163
1. First item
163164
2. Second item
164165
1. Subitem 2.1
@@ -171,14 +172,14 @@ Task lists are useful when you want to show items that need to be completed —
171172
- to make an unchecked box, use `- []`.
172173
- to make a checked box, use `- [x]`.
173174

174-
Example:
175+
**Example:**
175176
```
176177
- [ ] Task 1
177178
- [x] Task 2
178179
179180
```
180181

181-
### Output:
182+
**Output:**
182183

183184
- [ ] Task 1
184185
- [x] Task 2
@@ -191,13 +192,13 @@ Blockquotes are used to highlight quotes, important information, or notes in you
191192

192193
To create a blockquote, start a line with a `>` symbol. If you want to create a nested blockquote (a quote inside a quote), use `>>`.
193194

194-
Example:
195+
**Example:**
195196
```
196197
> This is a blockquote.
197198
>> This is a nested blockquote.
198199
```
199200

200-
### Output:
201+
**Output:**
201202
> This is a blockquote.
202203
>> This is a nested blockquote.
203204
@@ -210,27 +211,27 @@ Markdown makes it easy to format code, whether it's a single line or multiple li
210211

211212
To format a short piece of code inline, wrap it in single backticks (`).
212213

213-
Example:
214+
**Example**:
214215
```
215216
Use the `print()` function in Python.
216217
```
217218

218-
### Output:
219+
**Output:**
219220
Use the `print()` function in Python.
220221

221222

222223
### Code Blocks
223224

224225
For longer code or multi-line code blocks, use triple backticks (```) to create a block. You can also specify the programming language after the first set of backticks to enable syntax highlighting.
225226

226-
Example:
227+
**Example**:
227228
```
228229
```python
229230
def greet():
230231
print("Hello, World!")
231232
```
232233

233-
### Output:
234+
**Output:**
234235

235236
```python
236237
def greet():
@@ -251,7 +252,7 @@ Tables help make data clearer and more structured, especially when you need to p
251252
252253
```
253254

254-
### Output
255+
**Output:**
255256

256257
| Name | Age | Job |
257258
|-------|-----|----------|
@@ -267,7 +268,7 @@ Horizontal lines are used to separate sections of your document, providing a cle
267268
---
268269
```
269270

270-
### Output
271+
**Output:**
271272
---
272273

273274

@@ -279,12 +280,12 @@ Adding links and images is a great way to enrich your documents. In Markdown, ad
279280

280281
To create a link, use the format `[text](URL)`. This will display the text as a clickable link that directs to the specified URL.
281282

282-
Example:
283+
**Example:**
283284
```
284285
[Link text](https://www.exeter.ac.uk/)
285286
```
286287

287-
### Output
288+
**Output:**
288289
[Link text](https://www.exeter.ac.uk/)
289290

290291
**Images - Web**
@@ -295,7 +296,7 @@ To add an image from the web, use the format `![alt text](image URL)`. The '!' a
295296
![alt text for screen readers](https://i.natgeofe.com/n/548467d8-c5f1-4551-9f58-6817a8d2c45e/NationalGeographic_2572187.jpg?w=1436&h=958)
296297
```
297298

298-
### Output
299+
**Output:**
299300
![alt text for screen readers](https://i.natgeofe.com/n/548467d8-c5f1-4551-9f58-6817a8d2c45e/NationalGeographic_2572187.jpg?w=1436&h=958)
300301

301302
**Images - Local**
@@ -308,19 +309,21 @@ Format: `![alt text](image path)`.
308309
![alt text for screen readers](cat_pic.png)
309310
```
310311

311-
### Output
312+
**Output:**
312313
![alt text for screen readers](cat_pic.png)
313314

314315
## 11. Escaping
315316
Sometimes, you might want to display special characters (like `*`, `_`, or `#`) in your text without them being interpreted as formatting. To do this, you can escape the character by placing a backslash (`\`) before it.
316317

317318
For example, if you want to display `*` before a word without it making the text italic, use `\*`.
318319

319-
Example:
320+
**Example:**
320321
`\*Not italicized\*`
321322

322-
### Output:
323+
**Output:**
323324
\*Not italicized\*
324325

326+
## Final Thoughts
327+
These are the basics of Markdown formatting, most often used when creating a `README.md` file. A `README.md` file explains the purpose, setup, and usage of a coding project. It serves as the project's main documentation and is usually the first thing users see in a repository. Every Git repository typically includes one, making Markdown a great way to document and showcase your work clearly and effectively.
325328

326-
329+
While `md` files support rich formatting, `README` can also be plain `txt` files, though they won't include formatting like headings or lists.

individual_modules/markdown_with_python/4-Markdown-Task-1.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ In this section, write a short paragraph explaining what the document is about o
1010
> Lorem ipsum dolor sit amet. At excepturi ipsam aut tempora fugit ut porro facilis et aspernatur totam vel voluptatem quisquam qui recusandae quidem. Ut facilis dolor et ipsum error et voluptates sint aut nesciunt inventore et delectus enim et quidem animi. Sed repellat deleniti id maiores temporibus ea doloremque fuga. Vel laboriosam galisum in corrupti vero qui inventore voluptatibus.
1111
1212

13-
Lorem Ipsum is meaningless placeholder text used in design and publishing to mimic the look of real written content without conveying any actual meaning. Use it here to practise applying the formatting features we’ve discussed.
13+
`Lorem Ipsum` is meaningless placeholder text used in design and publishing to mimic the look of real written content without conveying any actual meaning. Use it here to practise applying the formatting features we’ve discussed.
1414

1515
For example:
1616
* Use bold or italic formatting for emphasis.
@@ -19,7 +19,7 @@ For example:
1919

2020
2. Methods (`## Methods`)
2121

22-
Describe how Markdown works, you can use Lorem ipsum again.
22+
Describe how Markdown works, you can use `Lorem ipsum` again.
2323

2424
* Use an ordered list to explain the steps of opening a MD document.
2525
* Include examples of different text formatting like **bold text**.

individual_modules/markdown_with_python/5-How-to-embed-Python-Code-in-Markdown.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,11 @@ import pandas as pd
7777

7878
Importing packages will give you access to external libraries like pandas, numpy or matplotlib. You may see an error when importing a package, this usually means the package isn't installed yet.
7979

80-
### Error Package Not Installed
80+
**Error Package Not Installed**
8181

8282
![Alt text](errorPack2.png)
8383

84-
### Solution
84+
**Solution**
8585
- Install package
8686
- in Jupyter Notebook: `!pip install pandas`
8787
- in a terminal: `pip install pandas`
@@ -201,7 +201,7 @@ Once you have executed this in a cell and the graph is displayed, have a play wi
201201

202202
Embedding Python in Markdown transforms static documents into interactive, dynamic tools that enhance data analysis, storytelling, and reproducibility.
203203

204-
## Note on Sensitive Data
204+
## Notes on Sensitive Data
205205
Before sharing or publishing your notebooks, ensure they do not contain any sensitive or restricted information. This includes:
206206

207207
- Personal identifiers (e.g. names, addresses, NHS numbers).

individual_modules/markdown_with_python/8-Further-Knowledge.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,7 @@ import ipywidgets as widgets
3232
widgets.IntSlider(min=0, max=10, step=1, value=5)
3333
```
3434

35+
Try it on!
36+
3537
## Always remember!
3638
Clear structure, consistent naming, and clean outputs make notebooks easier to share and maintain.

0 commit comments

Comments
 (0)