Markdown syntax
Each example shows the source, then what charon renders from it. Charon reads CommonMark and GFM, plus the extensions below.
Text #
**Bold**, *italic*, ***both*** and ~~struck~~.
==Marked==, ++inserted++, H~2~O and x^2^.
Use `inline code` for names and commands.
Bold, italic, both and struck.
Marked, inserted, H2O and x2.
Use inline code for names and commands.
End a line with two spaces or a backslash to break it inside a paragraph. Put a
\ before a character to show it as is: \*not italic\*.
Headings #
## Section
### Subsection
#### Detail
Section
Subsection
Detail
Every heading gets an id from its text, so ## Set up gets set-up. Two
headings with one text get set-up and set-up-1. Set your own with
{#id}: ## Plans {#plans}.
Lists #
Oars
Coins
Silver
Board
Cross
Land
[x] Pay the fare
[ ] Look back
- Oars
- Coins
- Silver
- Board
- Cross
- Land
- Pay the fare
- Look back
Quotes and rules #
The river is wide.
---
Three dashes draw a rule.
The river is wide.
Three dashes draw a rule.
Callouts #
[!NOTE]
The ferry leaves at dusk.
[!WARNING] Exact fare
The ferryman gives no change.
[!TIP]- Click to open
Bring a coin for the way back.
Note
The ferry leaves at dusk.
Exact fare
The ferryman gives no change.
Click to open
Bring a coin for the way back.
Start a quote with a type in brackets. Text after it becomes the title; without
it, the type does. Put - after the type to fold the callout shut, or + to
fold it but start open.
The type sets the color:
| Color | Types |
|---|---|
| Blue | note, info, todo, abstract, summary, tldr |
| Green | tip, hint, success, check, done |
| Purple | important, example |
| Amber | warning, caution, attention, question, help, faq |
| Red | danger, error, failure, fail, missing, bug |
| Gray | quote, cite |
Any other type shows in blue. Case does not matter.
Links and images #
[Charon](https://charon.memomori.app) or just https://charon.memomori.app
{width=160}
Charon or just https://charon.memomori.app
Bare URLs become links. {width=…} sets an image's width. An image link to a
YouTube video becomes an embedded player.
Tables #
| Coin | Weight | Value |
| :----- | -----: | :---: |
| Obol | 0.7 g | 1 |
| Drachm | 4.3 g | 6 |
| Coin | Weight | Value |
|---|---|---|
| Obol | 0.7 g | 1 |
| Drachm | 4.3 g | 6 |
Colons in the second row align a column left, right or center.
Footnotes #
The fare was one obol.[^1]
[^1]: A small silver coin.
Definitions and abbreviations #
Styx
: The river between the worlds.
Charon reads HTML too.
*[HTML]: HyperText Markup Language
- Styx
- The river between the worlds.
Charon reads HTML too.
Emoji #
:boat: :coin: :white_check_mark:
⛵ 🪙 ✅
Attributes #
A paragraph with a class. {.lead}
[A link](https://example.com){target=_blank rel=noopener}
A paragraph with a class.
{.class}, {#id} and {key=value} set attributes on the element before
them.
Math #
Inline: $E = mc^2$
$$
\int_0^1 x^2\,dx = \frac{1}{3}
$$
Inline:
KaTeX draws the math. Pages with math need KaTeX's stylesheet; a docs site adds it for you.
HTML #
<details>
<summary>Spoiler</summary>
The ferryman never rows back empty.
</details>
Spoiler
The ferryman never rows back empty.Raw HTML passes through as written. Sanitize the output if the source comes from users.
Comments #
The river is cold. %%Check this before launch.%%
%%
Nothing here shows.
%%
The river is cold.
Text between %% marks stays in the source and out of the output, on one line
or across many.
Links between notes, embeds, tags and block ids have a page of their own. Code blocks, tables from CSV and diagrams are on Code blocks.