Syntax cheat sheet
A one-page reference to everything Twain renders. Each section links to its fuller page.
Text
**bold** *italic* ~~strikethrough~~ `inline code`
[a link](https://twain.md) and a bare URL: https://twain.md
Headings
# Heading 1
## Heading 2
### Heading 3
Every heading can be linked to with [text](#heading-slug). See
Markdown support.
Lists and tasks
- Bulleted
- List
1. Numbered
2. List
- [x] Done
- [ ] To do
Tables
| Column | Column |
| ------ | ------ |
| Cell | Cell |
Horizontal rules
---
A rule also marks a slide break in presentation mode.
Quotes and code
> A blockquote.
```js
console.log('fenced code, with syntax highlighting')
```
Footnotes
A statement.[^1]
[^1]: The supporting note.
The note is collected into a footnotes section at the end of the document. Clicking the superscript marker does not jump to the note, and the return arrow does not jump back, so treat them as visual references rather than as navigation.
Frontmatter
---
title: My document
tags: [one, two]
---
Shown as a card, with title becoming the heading. See
Markdown support.
Alerts
> [!NOTE]
> The kinds are NOTE, TIP, IMPORTANT, WARNING, and CAUTION.
See Alerts and callouts.
Maths
Inline $a^2 + b^2 = c^2$ and display:
$$
\sum_{i=1}^{n} i = \frac{n(n+1)}{2}
$$
See Maths.
Diagrams
```mermaid
flowchart LR
A --> B
```
See Diagrams.
MDX components
<Note title="Heads up">
Recognised components render as real UI in .mdx files. Anything else becomes a
labelled placeholder.
</Note>
See MDX components.
Images


Local images resolve relative to the document's folder.