Here’s how to format the project readme file or Markdown cells in Jupyter notebooks. The differences between Markdown in the readme files and in notebooks are noted.
Headings: Use #s followed by a blank space for notebook titles and section headings:
## major headings
#### 4th level subheadings
Emphasis: Use this code: Bold:
Mathematical symbols: Use this code:
$ mathematical symbols $
Monospace font: Surround text with a back single quotation mark (`). Use monospace for file path and file names and for text users enter or message text users see.
Line breaks: Sometimes Markdown doesn’t make line breaks when you want them. Put two spaces at the end of the line, or use this code for a manual line break:
Indented quoting: Use a greater-than sign (
> ) and then a space, then type the text. The text is indented and has a gray horizontal line to the left of it until the next carriage return.
Bullets: Use the dash sign (
- ) with a space after it or a space, a dash, and a space (
- ), to create a circular bullet. To create a sub bullet, use a tab followed a dash and a space.
You can also use an asterisk instead of a dash, and it works the same.
Numbered lists: Start with
1. followed by a space, then your text. Hit return and numbering is automatic.
Start each line with some number and a period, then a space. Tab to indent to get subnumbering.
Checkboxes in readme files: Use this code for an unchecked box:
- [ ]
Use this code for a checked box:
Tables in readme files: Use this code:
| Heading | Heading | | ----| ----| | text | text | | text | text |
Graphics in notebooks: Drag and drop images to the Markdown cell to attach it to the notebook. To add images to other cell types, use graphics that are hosted on the web with this code:
<img src="url.gif" alt="Alt text" title="Title text" />
Graphics in readme files: Use this code:
![Alt text](url/filename.gif "Title text")
Geometric shapes: Use this code with a decimal or hex reference number from here:
UTF-8 Geometric shapes
Horizontal lines: Use three asterisks:
Internal links: To link to a section with the notebook, use this code:
For the text in the parentheses, replace spaces and special characters with a hyphen. Make sure to test all the links!
Alternatively, you can add an ID for a section right above the section title.
Use this code:
Make sure that the section_ID is unique within the notebook.
External links: Use this code and test all links!