-
Notifications
You must be signed in to change notification settings - Fork 1
Syntax
This page documents all syntax features available in unified mode. For mode-specific syntax, see Modes.
# H1
## H2
### H3
#### H4
##### H5
###### H6
H1 Alternative
==============
H2 Alternative
--------------*italic*
_italic_
**bold**
__bold__
***bold italic***
___bold italic___Unordered:
- Item 1
- Item 2
- Nested item
- Another nested
- Item 3Ordered:
1. First item
2. Second item
1. Nested item
2. Another nested
3. Third itemTask Lists:
- [ ] Todo item
- [x] Completed item
- [ ] Another todo[Link text](https://example.com)
[Link with title](https://example.com "Title")


<https://example.com>
<email@example.com>Inline code:
Use `code` in text.Fenced code blocks:
```python
def hello():
print("Hello, World!")
```Indented code blocks:
def hello():
print("Hello, World!")> This is a quote.
> It can span multiple lines.
>
> > Nested quotes are supported.---
***
___| Header 1 | Header 2 | Header 3 |
| -------- | :------: | -------: |
| Left | Center | Right |
| Data | Data | Data |Column alignment:
-
:---or---- Left (default) -
:---:- Center -
---:- Right
In unified and kramdown modes, tables don't require separator rows:
one | two | three
1 | 2 | 3
4 | 5 | 6This automatically becomes a table. See Modes for details.
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 |Here's a footnote[^1] and another[^note].
[^1]: First footnote content.
[^note]: Second footnote with custom ID.This is a footnote^[inline content here].This is a footnote[^inline content with spaces].Term
: Definition text with **Markdown** support
Apple
: A fruit
: A company
Term with multiple definitions
: First definition
: Second definitionInline 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.
[[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 sectionTrack changes and annotations:
{++addition++} # Added text
{--deletion--} # Deleted text
{~~old text~>new text~~} # Substitution
{==highlighted==} # Highlighted text
{>>comment text<<} # Comment/annotationSee Command Line Options for --accept and --reject modes.
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 contentCollapsible callouts:
> [!NOTE]+ Expandable
> Defaults to open
> [!NOTE]- Collapsed
> Defaults to closedMarked syntax:
<<[file.md] # Include and process Markdown
<<(code.py) # Include as code block
<<{raw.html} # Include raw HTMLMultiMarkdown transclusion:
{{file.md}} # Include file
{{*.md}} # Wildcard includeiA Writer syntax:
/image.png # Intelligent include (detects type)
/code.py # Auto-detects as code block
/document.md # Auto-detects as MarkdownCSV and TSV files automatically convert to tables!
---
title: My Document
author: John Doe
date: 2025-12-06
---Title: My Document
Author: John Doe
Date: 2025-12-06
% My Document
% John Doe
% 2025-12-06Use [%key] to insert metadata values anywhere:
---
title: Apex Guide
version: 0.1.0
---
# [%title]
Version: [%version]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].Kramdown syntax for adding attributes:
# Header {: #custom-id}
Paragraph with class.
{: .important}
## Another Header {: #section-2 .highlight key="value"}Multiple marker formats:
<!--TOC--> # Basic TOC
<!--TOC max2 min1--> # With depth control
{{TOC}} # MMD style
{{TOC:2-4}} # With rangeAutomatic conversion:
-
"text"→"text"(smart quotes) -
'text'→'text'(smart apostrophes) -
--→–(en dash) -
---→—(em dash) -
...→…(ellipsis) -
<<→«(left guillemet) -
>>→»(right guillemet)
Success! :rocket: :tada: :sparkles:
I :heart: Markdown!Supports 350+ GitHub emoji, converted to Unicode characters.
Page breaks:
<!--BREAK--> # HTML comment style
{::pagebreak /} # Kramdown styleAutoscroll pauses:
<!--PAUSE:5--> # Pause for 5 secondsEnd-of-block marker:
- Item 1
^
- Item 2Forces list separation.
Raw HTML is supported (when unsafe option is enabled, which is default):
<div class="custom">
Custom HTML content
</div>- Modes - Which syntax is available in each mode
- Header IDs - Automatic header ID generation
- Command Line Options - Feature flags
Copyright 2025 Brett Terpstra, All Rights Reserved | MIT License
- Getting Started - Your first steps with Apex
- Installation - How to build and install Apex
- Usage - Basic usage examples
- Syntax - Complete syntax reference for unified mode
- Modes - Understanding processor modes
- Command Line Options - All CLI flags explained
- Header IDs - How header IDs are generated
- C API - Programmatic API documentation
- Xcode Integration - Using Apex in Xcode projects
- Examples - Practical usage examples
- Troubleshooting - Common issues and solutions
- Credits - Acknowledgments and links to related projects