Document Format

Meet KMD

A lightweight, expressive document format where every symbol looks like what it does. Built for clarity, power, and self-sufficiency.

---
title: "Getting Started with KMD"
author: "Alice"
date: "2026-03-24"
---

## Welcome to KMD

Write **bold**, *italic*, and __underline__
with intuitive syntax.

[Visit Koder](https://koder.dev)

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

!!! tip "Pro Tip"
    KMD admonitions make your docs
    stand out with clear callouts.

Everything You Need to Write

Twelve powerful features that cover every documentation scenario, from simple notes to complex technical specifications.

Headings

Six levels of headings with ## syntax. Clean hierarchy for organizing documents of any size, from quick notes to full books.

## syntax6 levelsauto-anchors

Rich Text

Bold, italic, underline, strikethrough, highlight, subscript, and superscript. Every inline style you need with intuitive delimiters.

**bold***italic*__underline__
🔗

Links & Images

Inline links, reference links, auto-links, and images with alt text, titles, and optional sizing attributes.

[text](url)![alt](src)references
💻

Code Blocks

Fenced code blocks with ``` and language identifiers for syntax highlighting. Inline code with backticks for quick references.

``` fencedsyntax highlight`inline`

Tables

Pipe-delimited tables with column alignment (left, center, right). Clean syntax that reads well in both source and rendered form.

| pipe tablesalignmentheaders

Admonitions

Note, tip, warning, danger, and info callout blocks with !!! syntax. Make important information impossible to miss.

!!! note!!! tip!!! warning

Math

Inline and block math expressions with $$ delimiters. Full LaTeX math support for equations, formulas, and scientific notation.

$$LaTeX$$inline mathblock math

Front Matter

YAML front matter between --- delimiters for metadata. Define title, author, date, tags, and custom fields for any document.

--- YAMLmetadatacustom fields

Collapsible Sections

Toggle sections with +++ syntax. Hide verbose content behind expandable blocks to keep documents clean and scannable.

+++ toggleexpandabledetails
¹

Footnotes

Reference-style footnotes with [^1] syntax. Add citations, clarifications, and side notes without breaking the reading flow.

[^1]referencescitations

Task Lists

Interactive checklists with - [ ] and - [x] syntax. Track progress, create to-do lists, and manage project tasks inline.

- [ ] todo- [x] donechecklists

Table of Contents

Auto-generated table of contents with [TOC] placeholder. Navigable outline generated from your heading hierarchy.

[TOC]auto-generatednavigable

Rich Document Structure

Build well-structured documents with headings, front matter, and rich inline formatting. KMD reads naturally in both source and rendered form.

  • YAML front matter for metadata
  • Six heading levels with auto-anchors
  • Bold, italic, underline, and highlight
  • Footnotes and cross-references
---
title: "Architecture Overview"
author: "Engineering Team"
tags: ["architecture", "design"]
---

# System Architecture

The platform uses a **microservices**
architecture with *event-driven*
communication[^1].

## Components

Each service is __independently__
deployable and follows the
==twelve-factor== methodology.

[^1]: See the messaging docs for details.

Tables & Data

Present structured data with pipe-delimited tables. Support for column alignment, header rows, and clean formatting that reads well in source.

  • Pipe-delimited columns
  • Left, center, and right alignment
  • Inline formatting within cells
  • Task lists for tracking progress
## Performance Benchmarks

| Engine       | Parse    | Render   | Size   |
|:------------|--------:|---------:|-------:|
| KMD          | 1.2ms   | 0.8ms   | 12KB  |
| Markdown     | 1.8ms   | 1.1ms   | 15KB  |
| AsciiDoc     | 3.4ms   | 2.7ms   | 28KB  |
| reST         | 4.1ms   | 3.2ms   | 32KB  |

## Release Checklist

- [x] Write documentation
- [x] Add syntax tests
- [ ] Performance audit
- [ ] Publish release notes

Admonitions & Callouts

Draw attention to important content with styled callout blocks. Support for notes, tips, warnings, danger alerts, and custom types.

  • Five built-in types: note, tip, warning, danger, info
  • Custom titles for each callout
  • Collapsible sections with +++ syntax
  • Nested content including code blocks
!!! note "Important"
    KMD admonitions support **rich**
    formatting inside callout blocks.

!!! tip "Performance"
    Use `[TOC]` for auto-generated
    table of contents in long documents.

!!! warning "Breaking Changes"
    The v2 API removes deprecated
    endpoints. See migration guide.

+++ "Click to expand details"
    This content is hidden by default.
    Useful for verbose logs, examples,
    or optional reading.
+++

How It Compares

KMD combines the simplicity of Markdown with the power of AsciiDoc and the structure of reStructuredText.

Feature KMD Markdown AsciiDoc reStructuredText LaTeX
Headings
Bold / Italic
TablesExtensionPackage
Code BlocksPackage
Admonitions
MathExtensionExtension
FootnotesExtension
Front MatterExtension
CollapsiblePartial
TOCExtension
Columns
Alignment

Frequently Asked Questions

Common questions about the KMD document format.

KMD is a superset of Markdown with built-in support for admonitions, collapsible sections, front matter, math, footnotes, task lists, and table of contents. Where Markdown requires extensions and flavors, KMD includes these features natively in a single, consistent specification.
Yes. KMD is backward-compatible with standard Markdown. Any valid Markdown document is also a valid KMD document. You can gradually adopt KMD-specific features as needed without rewriting existing content.
KMD can be rendered to HTML, PDF, EPUB, and plain text. The reference implementation includes a parser library and a CLI tool for converting between formats. Custom renderers can be built using the AST API.
KMD syntax highlighting is available for VS Code, Vim, Emacs, and Sublime Text. The Koder Editor (ked) has native KMD support with live preview, auto-completion, and inline rendering of math and diagrams.
The reference parser, written in Koder Lang, processes documents at over 500 MB/s on modern hardware. It uses a single-pass streaming architecture with zero allocations for common patterns, making it suitable for real-time preview and large document sets.
Yes. The KMD specification is published under a permissive open-source license. The grammar is formally defined, and a comprehensive test suite ensures consistent behavior across implementations. Community contributions to the spec are welcome.

Ready to write better documents?

One format. Every feature. Zero extensions needed.

Download View Source