Skip to content
Brett Terpstra edited this page Dec 6, 2025 · 1 revision

Syntax Reference

This page documents all syntax features available in unified mode. For mode-specific syntax, see Modes.

Basic Markdown

Headers

# H1
## H2
### H3
#### H4
##### H5
###### H6

H1 Alternative
==============

H2 Alternative
--------------

Emphasis

*italic*
_italic_
**bold**
__bold__
***bold italic***
___bold italic___

Lists

Unordered:

- Item 1
- Item 2
  - Nested item
  - Another nested
- Item 3

Ordered:

1. First item
2. Second item
   1. Nested item
   2. Another nested
3. Third item

Task Lists:

- [ ] Todo item
- [x] Completed item
- [ ] Another todo

Links and Images

[Link text](https://example.com)
[Link with title](https://example.com "Title")

![Alt text](image.png)
![Alt with title](image.png "Image title")

<https://example.com>
<email@example.com>

Code

Inline code:

Use `code` in text.

Fenced code blocks:

```python
def hello():
    print("Hello, World!")
```

Indented code blocks:

    def hello():
        print("Hello, World!")

Blockquotes

> This is a quote.
> It can span multiple lines.
>
> > Nested quotes are supported.

Horizontal Rules

---
***
___

Tables

Standard Tables

| Header 1 | Header 2 | Header 3 |
| -------- | :------: | -------: |
| Left     |  Center  |    Right |
| Data     |   Data   |     Data |

Column alignment:

  • :--- or --- - Left (default)
  • :---: - Center
  • ---: - Right

Relaxed Tables

In unified and kramdown modes, tables don't require separator rows:

one | two | three
1 | 2 | 3
4 | 5 | 6

This automatically becomes a table. See Modes for details.

Advanced Table Features

Column spans (empty cells):

| A   | B   | C   |
| --- | --- | --- |
| D   |     |     |

Empty cells merge with the previous cell.

Row spans:

| A   | B   |
| --- | --- |
| C   | D   |
| ^^  | E   |

The ^^ marker creates a row span.

Table captions:

[Table Caption]

| A   | B   |
| --- | --- |
| C   | D   |

Footnotes

Reference Style

Here's a footnote[^1] and another[^note].

[^1]: First footnote content.
[^note]: Second footnote with custom ID.

Inline Style (Kramdown)

This is a footnote^[inline content here].

Inline Style (MultiMarkdown)

This is a footnote[^inline content with spaces].

Definition Lists

Term
: Definition text with **Markdown** support

Apple
: A fruit
: A company

Term with multiple definitions
: First definition
: Second definition

Math

Inline math:

The equation $E = mc^2$ is famous.

Display math:

$$
\int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi}
$$

Math is wrapped in spans with appropriate classes for MathJax or KaTeX.

Wiki Links

[[Page Name]]                   # Link to page
[[Page Name|Display Text]]      # Custom display text
[[Page Name#Section]]           # Link to section
[[Page Name#Section|Display]]   # Custom display with section

Critic Markup

Track changes and annotations:

{++addition++}              # Added text
{--deletion--}              # Deleted text
{~~old text~>new text~~}    # Substitution
{==highlighted==}           # Highlighted text
{>>comment text<<}         # Comment/annotation

See Command Line Options for --accept and --reject modes.

Callouts

Bear/Obsidian/Xcode Playground syntax:

> [!NOTE] Title
> This is a note callout

> [!WARNING] Be Careful
> Warning content

> [!TIP] Pro Tip
> Helpful advice

> [!DANGER] Critical
> Dangerous operation

> [!INFO] Information
> Informational content

Collapsible callouts:

> [!NOTE]+ Expandable
> Defaults to open

> [!NOTE]- Collapsed
> Defaults to closed

File Includes

Marked syntax:

<<[file.md]      # Include and process Markdown
<<(code.py)      # Include as code block
<<{raw.html}     # Include raw HTML

MultiMarkdown transclusion:

{{file.md}}      # Include file
{{*.md}}         # Wildcard include

iA Writer syntax:

/image.png       # Intelligent include (detects type)
/code.py         # Auto-detects as code block
/document.md     # Auto-detects as Markdown

CSV and TSV files automatically convert to tables!

Metadata

YAML Front Matter

---
title: My Document
author: John Doe
date: 2025-12-06
---

MultiMarkdown Metadata

Title: My Document
Author: John Doe
Date: 2025-12-06

Pandoc Title Block

% My Document
% John Doe
% 2025-12-06

Metadata Variables

Use [%key] to insert metadata values anywhere:

---
title: Apex Guide
version: 0.1.0
---

# [%title]

Version: [%version]

Abbreviations

Classic MMD syntax:

*[HTML]: Hypertext Markup Language
*[CSS]: Cascading Style Sheets

HTML and CSS are essential.

MMD 6 reference syntax:

[>MMD]: MultiMarkdown

Using [>MMD] here and [>MMD] again.

MMD 6 inline syntax:

This is [>(MD) Markdown] and [>(CSS) Cascading Style Sheets].

Inline Attribute Lists (IAL)

Kramdown syntax for adding attributes:

# Header {: #custom-id}

Paragraph with class.
{: .important}

## Another Header {: #section-2 .highlight key="value"}

Table of Contents

Multiple marker formats:

<!--TOC-->              # Basic TOC
<!--TOC max2 min1-->    # With depth control
{{TOC}}                 # MMD style
{{TOC:2-4}}            # With range

Smart Typography

Automatic conversion:

  • "text""text" (smart quotes)
  • 'text''text' (smart apostrophes)
  • -- (en dash)
  • --- (em dash)
  • ... (ellipsis)
  • <<« (left guillemet)
  • >>» (right guillemet)

GitHub Emoji

Success! :rocket: :tada: :sparkles:
I :heart: Markdown!

Supports 350+ GitHub emoji, converted to Unicode characters.

Special Markers

Page breaks:

<!--BREAK-->            # HTML comment style
{::pagebreak /}         # Kramdown style

Autoscroll pauses:

<!--PAUSE:5-->          # Pause for 5 seconds

End-of-block marker:

- Item 1

^

- Item 2

Forces list separation.

HTML

Raw HTML is supported (when unsafe option is enabled, which is default):

<div class="custom">
Custom HTML content
</div>

Related

Quick Links

Clone this wiki locally