Retrieved from a random google search because I couldn’t be bothered to type all this out myself.
An h1 Header
Paragraphs are separated by a blank line.
2nd paragraph. Italic, bold, and monospace
. Itemized lists
look like:
- this one
- that one
- the other one
You can use 3 dashes—which is quite an elegant solution—to insert an em-dash.
Block quotes are written like so.
They can span multiple paragraphs, if you like.
An h2 Header
Here’s a numbered list:
- first item
- second item
- third item
Here’s a link to a website, to a local doc, and to a section heading in the current doc. Here’s a footnote 1.
Here’s a monospaced sample made by indenting a block of text with 4 spaces:
# Let me re-iterate ...
for i in 1 .. 10 { do-something(i) }
For writing actual code in markdown, you can use code-fences by surrounding with ```:
Here’s how it looks written in the actual markdown:
```
define foobar() {
print "Welcome to flavor country!";
}
```
You can optionally mark the delimited block to syntax highlight it:
Here’s how it looks written in the actual markdown:
```python
import time
# Quick, count to ten!
for i in range(10):
# (but not *too* quick)
time.sleep(0.5)
print(i)
```
An h3 header
Now a nested list:
First, get these ingredients:
- carrots
- celery
- lentils
Boil some water.
Dump everything in the pot and follow this algorithm:
- find wooden spoon
- uncover pot
- stir
- cover pot
- balance wooden spoon precariously on pot handle
- wait 10 minutes
- goto first step (or shut off burner when done)
Tables can look like this:
size | material | colour |
---|---|---|
9 | leather | brown |
10 | hemp canvas | natural |
11 | glass | transparent |
A horizontal rule can be made with ---
or ***
on an empty line:
Inline math equations go in like so: $\omega = d\phi / dt$ . Display math should get its own line and be put in in double-dollarsigns within a katex-syntax code block:
```katex
$$I = \int \rho R^{2} dV$$
```
Alternatively the custom katex shortcode can be used instead of the code block:
{{<katex>}}
$$
\begin{pmatrix}
a & b \\
c & d
\end{pmatrix}
$$
{{</katex>}}
And note that you can backslash-escape any punctuation characters which you wish to be displayed literally, ex.: `foo`, *bar*, etc.
Footnote text goes here. ↩︎