-
-
Notifications
You must be signed in to change notification settings - Fork 6
Modes
Apex supports multiple processor modes, each optimized for compatibility with different Markdown flavors.
| Mode | Description | Default ID Format |
|---|---|---|
unified |
All features enabled | GFM |
quarto |
Pandoc/Quarto markdown | GFM |
gfm |
GitHub Flavored Markdown | GFM |
mmd |
MultiMarkdown compatibility | MultiMarkdown |
kramdown |
Kramdown compatibility | Kramdown |
commonmark |
Pure CommonMark spec | GFM |
Command: apex document.md or apex --mode unified document.md
Unified mode enables all features from all other modes. This is the default mode.
- ✅ Tables (GFM style)
- ✅ Strikethrough (
~~text~~) - ✅ Task lists (
- [ ]and- [x]) - ✅ Autolinks (URLs and emails)
- ✅ Footnotes (reference and inline styles)
- ✅ Definition lists
- ✅ Smart typography
- ✅ Math support (
$inline$and$$display$$) - ✅ Superscript and subscript (
x^2^,H~2~O) - ✅ Wiki links (
[[Page]]) - Requires--wikilinksflag (disabled by default) - ✅ Critic Markup
- ✅ Callouts
- ✅ File includes
- ✅ Metadata blocks (YAML, MMD, Pandoc)
- ✅ Metadata variables (
[%key]) - See Metadata Transforms for transform syntax - ✅ Abbreviations
- ✅ Inline Attribute Lists (IAL), including fenced divs and bracketed spans
- ✅ Relaxed tables (default)
- ✅ Grid tables (Pandoc
+---+syntax) ---grid-tablesto enable,--no-grid-tablesto disable (off by default) - ✅ GitHub Emoji / emoji autocorrect (
:emoji_name:) - ✅ Image captions from Markdown image syntax (wrap images with title/alt in
<figure>/<figcaption>)
- Default: GFM format
- Can be overridden with
--id-format
Command: apex --mode quarto document.qmd
Pandoc/Quarto markdown compatibility for HTML-oriented documents. See Quarto Mode for syntax, metadata toggles, and limitations.
- ✅ Quarto callouts (
::: {.callout-note}) - ✅ Fenced divs and bracketed spans
- ✅ Raw content (
{=html},{=latex}, etc.) - ✅ Example lists
(@), roman lists, line blocks - ✅ Code fence attributes, diagram fences (
{mermaid},{dot}) - ✅ Shortcode shim (
{{< pagebreak >}},{{< kbd >}},{{< include >}}) - ✅ fig-alt, semantic span CSS in standalone output
- ❌ Marked extensions (page break markers, etc.)
- ❌ Wiki links (unless explicitly enabled)
- ❌ Index syntax (mmark, TextIndex, Leanpub)
Command: apex --mode gfm document.md
GitHub Flavored Markdown compatibility mode.
- ✅ Tables
- ✅ Strikethrough
- ✅ Task lists
- ✅ Autolinks
- ✅ Hard line breaks (newlines become
<br>)
- ❌ Footnotes
- ❌ Definition lists
- ❌ Smart typography
- ❌ Math
- ❌ Wiki links
- ❌ Critic Markup
- ❌ Callouts
- ❌ File includes
- ❌ Metadata
- ❌ Abbreviations
- ❌ IAL
- ❌ Relaxed tables
- GFM format (cannot be changed)
Command: apex --mode mmd document.md or apex --mode multimarkdown document.md
MultiMarkdown compatibility mode.
- ✅ Tables
- ✅ Footnotes (reference style)
- ✅ Definition lists
- ✅ Smart typography
- ✅ Math support
- ✅ Metadata blocks (YAML, MMD, Pandoc)
- ✅ Metadata variables (
[%key]) - See Metadata Transforms for transform syntax - ✅ Abbreviations
- ✅ File includes
- ✅ Image captions from Markdown image syntax (wrap images with title/alt in
<figure>/<figcaption>)
- ❌ Strikethrough
- ❌ Task lists
- ❌ Wiki links
- ❌ Critic Markup
- ❌ Callouts
- ❌ IAL
- ❌ Relaxed tables
- MultiMarkdown format (cannot be changed)
Command: apex --mode kramdown document.md
Kramdown compatibility mode.
- ✅ Tables
- ✅ Footnotes (reference and inline styles)
- ✅ Definition lists
- ✅ Smart typography
- ✅ Math support
- ✅ Inline Attribute Lists (IAL)
- ✅ Abbreviations
- ✅ Relaxed tables (default)
- ❌ Strikethrough
- ❌ Task lists
- ❌ Wiki links
- ❌ Critic Markup
- ❌ Callouts
- ❌ File includes
- ❌ Metadata
- ❌ Autolinks
- Kramdown format (cannot be changed)
Command: apex --mode commonmark document.md
Pure CommonMark specification compliance. No extensions.
- ✅ Basic Markdown only (headers, lists, emphasis, links, code, blockquotes, etc.)
- ❌ All extensions (tables, footnotes, etc.)
- GFM format (for consistency)
| Feature | Unified | GFM | MMD | Kramdown | CommonMark |
|---|---|---|---|---|---|
| Tables | ✅ | ✅ | ✅ | ✅ | ❌ |
| Strikethrough | ✅ | ✅ | ❌ | ❌ | ❌ |
| Task Lists | ✅ | ✅ | ❌ | ❌ | ❌ |
| Footnotes | ✅ | ❌ | ✅ | ✅ | ❌ |
| Definition Lists | ✅ | ❌ | ✅ | ✅ | ❌ |
| Smart Typography | ✅ | ❌ | ✅ | ✅ | ❌ |
| Math | ✅ | ❌ | ✅ | ✅ | ❌ |
| Wiki Links | ✅* | ❌ | ❌ | ❌ | ❌ |
| Critic Markup | ✅ | ❌ | ❌ | ❌ | ❌ |
| Callouts | ✅ | ❌ | ❌ | ❌ | ❌ |
| File Includes | ✅ | ❌ | ✅ | ❌ | ❌ |
| Metadata | ✅ | ❌ | ✅ | ❌ | ❌ |
| Abbreviations | ✅ | ❌ | ✅ | ✅ | ❌ |
| IAL | ✅ | ❌ | ❌ | ✅ | ❌ |
| Relaxed Tables | ✅ | ❌ | ❌ | ✅ | ❌ |
| Image Captions | ✅ | ❌ | ✅ | ❌ | ❌ |
* Wiki links are available in unified mode but disabled by default. Use --wikilinks to enable.
-
Quarto - Use for Pandoc/Quarto
.qmddocuments and HTML-oriented Quarto markdown - Unified - Use when you want all features or need compatibility with multiple Markdown flavors
- GFM - Use for GitHub compatibility or when publishing to GitHub
- MMD - Use for MultiMarkdown compatibility or when you need metadata
- Kramdown - Use for Kramdown compatibility or when you need IAL attributes
- CommonMark - Use for strict CommonMark compliance or minimal output
In unified mode, you can enable or disable specific features:
# Unified mode but disable footnotes
apex --mode unified --no-footnotes document.md
# Unified mode but disable math
apex --mode unified --no-math document.md
# Enable wiki links (disabled by default)
apex --mode unified --wikilinks document.md- Header IDs - How ID formats differ by mode
- Syntax - Syntax available in each mode
- Command Line Options - Mode selection and 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
- Callouts - All supported callout formats and flag requirements
- Tables - Complete table syntax reference including rowspan, colspan, alignment, and captions
- Inline Attribute Lists - IALs and ALDs guide with examples
- Modes - Understanding processor modes
-
Quarto Mode - Pandoc/Quarto markdown (
--mode quarto) - Command Line Options - All CLI flags explained
-
Rendering Markdown in the Terminal - Terminal output formats (
-t terminal,-t terminal256),--width,--theme, and theming -
Generating Man Pages - Generate man pages from Markdown using
apex -t man -
Multi-file Documents - Combining multiple files with
--combine,--mmd-merge, and includes - Citations - Citations and bibliography guide
- Indices - Index generation with mmark and TextIndex syntax
-
Metadata Transforms - Transform metadata values with
[%key:transform] - Integrating with Pandoc - Use Apex with Pandoc for DOCX, PDF, and more
- Using Apex with Jekyll - Use the apex-ruby gem as Jekyll’s Markdown converter (untested; feedback welcome)
- Header IDs - How header IDs are generated
- C API - Programmatic API documentation
- Writing Tests - How to add tests for new features
- Xcode Integration - Using Apex in Xcode projects
- Examples - Practical usage examples
- Plugins - Plugin system, examples, and recipes
- Filters - AST filters (Pandoc-style JSON), examples, and usage
- Troubleshooting - Common issues and solutions
- Credits - Acknowledgments and links to related projects