K

KOD

Koder Document Format

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

.kd extension text/kod MIME type UTF-8

Three Core Principles

KOD is designed from the ground up around these ideas.

Visual Mnemonics

Every markup symbol visually resembles its effect. / slants like italic. _ sits under text like an underline. - strikes through like deleted.

Minimal Verbosity

The fewest characters possible for each operation. Bold is *text* not **text**. Strikethrough is -text- not ~~text~~.

Self-Sufficient

No dependency on HTML or external formats. Native support for alignment, tables with widths, headers/footers, variables, includes, and more.

KOD vs Markdown

Same simplicity. More power. Better mnemonics.

Feature KOD Markdown
Bold *text* — single char **text**
Italic /text/ — slanted *text* — overloaded
Underline _text_ native not supported
Strikethrough -text- native ~~text~~ GFM only
Highlight =text= native not supported
Text Alignment >> >< <> not supported
Table Column Widths [30%] [200px] [*] not supported
Cell Merging || colspan, ::: rowspan not supported
Video / Audio !![](vid) !~[](aud) not supported
Variables {!name="val"!} {name} not supported
File Includes {{file.kd}} not supported
Comments // and /* */ <!-- --> HTML
Admonitions !!! type native extension only
Columns Layout ::: columns N not supported
Header / Footer ---header--- / ---footer--- not supported

Everything You Need

A complete document format with native support for features that other formats lack.

Visual Mnemonics

Every symbol looks like what it does. Slash / slants for italic. Underscore _ underlines. Asterisk * is dense for bold. Hyphen - strikes through.

Native Alignment

Right-align with >>, center with ><, justify with <>. The symbols point where the text goes.

Advanced Tables

Column widths [30%], row heights [h:50px], vertical alignment, colspan ||, rowspan :::. Real tables, not basic grids.

Media Embedding

Native video with !![](url) and audio with !~[](url). With optional dimensions and alignment, just like images.

Variables & Includes

Define variables with {!name="val"!} and reuse with {name}. Include other files with {{file.kd}}. DRY documents.

Comments

C-style comments with // and /* */. Add notes to your source that never appear in output. No HTML hacks needed.

Headers & Footers

Define document headers and footers with ---header---. Use automatic variables like {page}, {date}, {title}.

Columns Layout

Multi-column layouts with ::: columns N and custom widths [60%|40%]. Native column support without any CSS.

Admonitions

Seven callout types: note, tip, warn, error, success, info, quote. With optional custom titles.

See It in Action

KOD source on the left, rendered output on the right.

Source (.kd)
--- title: Quarterly Report author: Koder Team --- // Define reusable variables {!company = "Acme Corp"!} # {company} Q1 Report This is a *bold statement* with /italic emphasis/ and _underlined terms_. Some data is -no longer valid- and other is =highlighted=. >< *Centered Title* | Product [50%] | Qty [20%] | Total [30%] | |:--------------|:---------:|------------:| | Laptop | 5 | 17,500.00 | | Mouse | 10 | 899.00 | | *Subtotal* ||| 18,399.00 | ## Media ![Dashboard](dashboard.png 600x300 ><) !![Product Demo](https://example.com/demo.mp4) !~[Podcast Episode](https://example.com/ep1.mp3) ## Diagram ```diagram type=flowchart Input --> Parser --> AST --> Renderer --> HTML ``` !!! tip "Pro Tip" KOD uses visual mnemonics — each symbol looks like its effect. [!badge green "Stable"] [!badge blue "v1.0"] +++ Implementation Details The parser uses a two-pass approach: 1. Tokenization 2. AST Construction +++
Rendered Output

Acme Corp Q1 Report

This is a bold statement with italic emphasis and underlined terms. Some data is no longer valid and other is highlighted.

Centered Title

ProductQtyTotal
Laptop517,500.00
Mouse10899.00
Subtotal18,399.00

Media

dashboard.png (600×300)

Product Demo

video — example.com/demo.mp4

Podcast Episode

audio — example.com/ep1.mp3

Diagram

Input Parser AST Renderer HTML

💡 Pro Tip

KOD uses visual mnemonics — each symbol looks like its effect.

Stable v1.0

Implementation Details

The parser uses a two-pass approach:

  1. Tokenization
  2. AST Construction

Complete Syntax at a Glance

Everything KOD offers, in one compact table.

ElementSyntaxDescription
Inline Formatting
Bold*text*Dense asterisk — strong emphasis
Italic/text/Slanted slash — italic tilt
Strikethrough-text-Horizontal line through text
Underline_text_Line sits under text
Highlight=text=Thick bar — marker highlight
Inline Code`text`Standard backtick convention
Blink@@text@@Eye-catching effect
Superscript^text^Caret points up
Subscript~text~Tilde dips down
Block Alignment
Right>> textPushes text to the right
Center>< textSqueezes text to center
Justify<> textStretches text to both edges
Structure
Headings# H1 ... ###### H6Six heading levels
Unordered List- itemDash prefix
Ordered List1. itemNumber prefix
Task List[ ] / [x] itemCheckbox items
Definition ListTerm + : DefinitionTerm followed by colon-prefixed definition
Blockquote> textStandard quote block
Horizontal Rule---Three or more hyphens
Page Break===Three or more equals
Links & Media
Link[text](url)Inline hyperlink
Image![alt](url)With optional dimensions & alignment
Video!![alt](url)Double bang for video
Audio!~[alt](url)Tilde as sound wave
Tables
Basic Table| col | col |Pipe-delimited columns
Column Width[30%] [200px] [*]In header row
Row Height[h:50px]At end of row
Vertical Align^top =mid _bottomCell content prefix
Colspan||Double pipe merges columns
Rowspan:::Merges with cell above
Advanced
Front Matter--- yaml ---YAML metadata block
Code Block```langWith line numbers, highlighting, title
Comment// or /* */C-style, stripped from output
Footnote[^id]Reference + definition at bottom
Admonition!!! type "Title"note, tip, warn, error, success, info, quote
Collapsible+++ summaryExpandable section
Columns::: columns NMulti-column layout
Badge[!badge color "text"]Colored inline badge
Variable Def{!name = "val"!}Define reusable variable
Variable Use{name}Insert variable value
Include{{file.kd}}Include another KOD file
Math (inline)$expr$LaTeX math expression
Math (block)$$expr$$Displayed math equation
Diagram```diagram type=Xflowchart, sequence, graph, gantt, pie
TOC[TOC]Auto table of contents
Header/Footer---header---Document header/footer regions
Raw HTML{{{ html ... }}}Pass-through HTML block
Escape\charLiteral delimiter character