Topic overview
The “extended syntax” options below are not supported by all interpreters, but they are by most, such as GitHub-flavored Markdown.
Syntax | Result |
---|---|
*italic* |
italic (alternative: single underscore _ ) |
**bold** |
bold (alternative: double underscore __ ) |
<https://website.com> |
Clickable link: https://website.com |
[link text](website.com) |
Link with custom text: link text |
![](path/to/figure.png) |
Figure |
# My Title |
Header level 1 (largest) |
## My Section |
Header level 2 |
### My Subsection |
Header level 3 – and so forth |
- List item - Another item - Third item |
Bulleted (unordered) list |
1. List item 1. Another item 1. Third item |
Numbered (ordered) list (numbering will be automatic) |
`inline code` |
inline code formatting |
``` or 4 leading spaces |
Start/end of generic code block (``` is extended syntax) |
```bash |
Start of bash -formatted code block (end with ``` ) |
--- |
Horizontal rule (line) |
> Text |
Blockquote (think quoted text in email) |
blank line | New paragraph (white space between lines) |
two spaces at end of line | Force a line break. ddddddddddddddddddddddddddddddddddddddddddddd |
~~strikethrough~~ |
|
Footnote ref[^1] |
Footnote ref1 (extended syntax) |
[^1]: Text |
The actual footnote (extended syntax) |
Markdown generally ignores single line breaks: use two spaces at the end of a line to force a line break, or when appropriate, leave a blank line to start a new paragraph.
Multiple consecutive blank lines (or spaces) will be treated the same as a single blank line (or space). For extra vertical whitespace, use the HTML tag <br>
, each of which forces a new line break.
Note that the vertical bars |
don’t have to be aligned.
| blabla | blabla |
|———–|———–|
| blabla | blabla |
| blabla | blabla |
blabla | blabla |
---|---|
blabla | blabla |
blabla | blabla |
Most Markdown interpreters accept HTML syntax. Some simple examples:
Figures – a centered figure using 50% of the page width:
<p align="center">
<img src=my.png width=50%>
</p>
Text colors:
<span style="color:red">colored</span> text inline
inline colored text
Other:
Syntax | Result |
---|---|
superscript<sup>2</sup> |
superscript2 |
superscript<sub>2</sub> |
subscript2 |
<br> |
linebreak / empty line |
<!-- text --> |
comment |
pandoc README.md > README.html
pandoc -o README.pdf README.md
*Open Preview to the Side*
to see a preview.
Text and figures are licensed under Creative Commons Attribution CC BY 4.0. The figures that have been reused from other sources don't fall under this license and can be recognized by a note in their caption: "Figure from ...".