Examples

Product introduction

Koma · A language for visual communication

Koma

The Koma 0.1.0 language in eight slides: structure, CSS themes, native TeX math and charts, layout modes, export and .komadoc, layout checks, LSP, and MCP.

Output of koma export

Page 1

Cover: Koma markup and a short editable source example

Page 2

A document is one readable text file, with Koma source and structural elements

Page 3

The same slide rendered in the Default, Editorial and Dark CSS themes

Page 4

Newton’s law of cooling with a LaTeX equation and a plotted Koma chart

Page 5

Three layout capabilities: flow and multi-column, exact placement, and semantic CSS

Page 6

One file exported to PDF, PowerPoint, HTML, PNG, and a .komadoc archive with cover

Page 7

Verify documents like code: koma check --layout, koma format, koma lsp, and koma mcp

Page 8

Edit live at komalang.org

Source

===
title: "Koma · A language for visual communication"
theme: default
paginate: true
css: |
  page.language-cover { background: #112820; color: #eef8f3; }
  box.eyebrow, box.url { color: #94d6b9; font-family: monospace; font-size: 0.70em; letter-spacing: 0.10em; }
  box.masthead { color: #eafef4; font-family: monospace; font-weight: 700; font-size: 3.05em; }
  box.message { color: #eef8f3; font-size: 1.18em; font-weight: 700; }
  box.cover-note { color: #a7c4b6; font-size: 0.76em; }
  box.source-sample { background: #e9f5ee; border-radius: 14px; padding: 26px 22px; color: #14382c; font-size: 0.73em; }
  page { background: #fbfbfa; color: #181a20; }
  page.dark { background: #14161b; color: #f2f3f6; }
  label { color: #0d7a66; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.72em; }
  label.on-dark { color: #5fe3c8; }
  title.on-dark { color: #ffffff; }
  subtitle { color: #525866; font-weight: 400; }
  subtitle.on-dark { color: #b8becb; }
  authors.on-dark { color: #9be0cf; font-weight: 500; }
  date.on-dark { color: #5fe3c8; font-weight: 500; }
  box.card {
    background: #ffffff;
    border: 1px solid #dfe3ea;
    border-radius: 14px;
    padding: 18px 22px;
    row-gap: 8px;
  }
  box.card h3 { font-size: 1.05em; margin: 0; color: #0d7a66; }
  box.accent-bar {
    background: #e8f5f1;
    border-left: 5px solid #0d7a66;
    border-radius: 0 10px 10px 0;
    padding: 14px 18px;
    font-size: 0.92em;
  }
  figure.theme-card {
    border: 1.5px solid #d5dbe5;
    border-radius: 10px;
    background: #ffffff;
    padding: 8px 8px 10px;
  }
===

---
layout: blank
class: language-cover
---

[box .eyebrow x=7% y=10% w=85% h=6%:
  KOMA MARKUP LANGUAGE / 0.1
]
[box .masthead x=7% y=23% w=45% h=23%:
  `[koma:]`
]
[box .message x=7% y=54% w=43% h=15%:
  Plain text for visual communication
]
[box .cover-note x=7% y=73% w=43% h=8%:
  Structure in brackets. Style in CSS.
]
[box .url x=7% y=88% w=43% h=6%:
  komalang.org
]
[box .source-sample x=54% y=29% w=39% h=47%:
  ```koma
  [title: Start with a title]
  [main:
    - Write with **Markdown**.
    - Set the look with CSS.
  ]
  ```
]

+++

[label: 01 · Structure]
[title: Every document is one readable text file]
[subtitle:
  Pages split on `+++`; structural roles sit in brackets; Markdown and LaTeX live inside
]
[main:
  [col weight=3:
    ```koma
    ===
    theme: default
    ===
    [title: Coffee cools fastest at first]
    [main:
      - Heat loss scales with $\Delta T$.
      - Drink within ==ten minutes==.
    ]
    +++
    [title: Next steps]
    ```
  ]
  [col weight=2:
    [box .card:
      # Clear roles, zero hidden state

      - Elements: `[title:]`, `[main:]`, `[col:]`, `[box:]`, `[chart:]`
      - Settings sit between `===` and `---`
      - Notes live between `"""` lines
    ]
    [box .accent-bar:
      Set `type: article` + `size: A4`, or `type: poster` + `size: A0`.
    ]
  ]
]

"""
Point at the brackets: every part of a page has an explicit role, while the body stays plain Markdown.
"""

+++

[label: 02 · Themes & CSS]
[title: One source, any density or CSS theme]
[subtitle:
  Choose `talk`, `default`, `report`, or a custom `theme.koma`
]
[main:
  [row:
    [col:
      [figure .theme-card:
        [image src="assets/theme-default.png" alt="The bridge slide rendered in the built-in Default theme":]
        **Default** · built-in (`34px`)
      ]
    ]
    [col:
      [figure .theme-card:
        [image src="assets/theme-editorial.png" alt="The bridge slide rendered in the Editorial CSS theme":]
        **Editorial** · `theme.koma`
      ]
    ]
    [col:
      [figure .theme-card:
        [image src="assets/theme-dark.png" alt="The bridge slide rendered in the Dark CSS theme":]
        **Dark** · `theme.koma`
      ]
    ]
  ]
  [box .accent-bar:
    Set `theme: ./themes/editorial/theme.koma` in the document.
    Write styles under `css: |` and add layouts in the same theme file as needed.
  ]
]

+++

[label: 03 · Math & Charts]
[title: Native TeX equations and plotted charts]
[subtitle:
  LaTeX equations are typeset automatically, and `[chart:]` draws axes, ticks, and legends from functions or CSV
]
[main:
  [col weight=2:
    Newton's law of cooling:

    $$
    T(t) = T_{\text{room}} + (T_0 - T_{\text{room}})\,e^{-kt}
    $$

    Plotted directly with one Koma element:

    ```koma
    [chart f="20 + 70*exp(-0.08*x)"
      labels=("T(t)")
      domain=(0, 40) range=(0, 100)
      x-title="$t$ (min)"
      y-title="$T$ (°C)":]
    ```
  ]
  [col weight=3:
    [figure:
      [chart h=470px f="20 + 70*exp(-0.08*x)" labels=("T(t)") domain=(0, 40) range=(0, 100) x-title="$t$ (min)" y-title="$T$ (°C)":]
      Rendered natively as vector SVG and editable PowerPoint chart.
    ]
  ]
]

+++

[label: 04 · Layout]
[title: Flow by default, exact geometry when needed]
[subtitle: Combine theme columns, CSS multi-column flow, and percentage placement in one language]
[main:
  [col:
    [box .card style="flex: 1":
      # Flow & columns

      Nested `[col:]` and `[row:]` fill the page automatically — plus CSS `columns: 2` for multi-column worksheets and articles.

      ```koma
      [main:
        [col weight=2: ...]
        [col weight=3: ...]
      ]
      ```
    ]
  ]
  [col:
    [box .card style="flex: 1":
      # Exact placement

      Place callouts, flyers, or annotations with `x=`, `y=`, `w=`, and `h=` in `%` or `px`.

      ```koma
      [box x=60% y=30%
        w=32% h=42%: ...]
      ```
    ]
  ]
  [col:
    [box .card style="flex: 1":
      # Semantic CSS styling

      Style classes with `--koma-*` variables under `css: |` in the document or in `theme.koma`.

      ```koma
      [box .accent: ...]
      [callout: ...]
      ```
    ]
  ]
]

+++

[label: 05 · Export & Packages]
[title: One file, every delivery format]
[subtitle:
  The `@komalang/koma` CLI exports print PDFs, editable PowerPoint, HTML, PNGs, and `.komadoc` archives
]
[main:
  [col weight=3:
    ```sh
    # Print-ready PDF, editable PowerPoint, HTML, or PNG
    koma export talk.koma -o talk.pdf
    koma export talk.koma -o talk.pptx
    koma export talk.koma -o talk.html
    koma export talk.koma --to png -o pages

    # Self-contained archive with fonts, images, and cover
    koma pack talk.koma --cover -o talk.komadoc
    ```
  ]
  [col weight=2:
    [box .card:
      # Built for real hand-offs

      - **PDF** with embedded fonts and vector math
      - **PowerPoint** with native editable charts and text
      - **Single HTML** ready to share anywhere
      - **`.komadoc`** portable bundle with first-page cover thumbnail
    ]
  ]
]

+++

[label: 06 · Check, Git & AI]
[title: Verify documents like code]
[subtitle:
  Deterministic layout checks, canonical formatting, LSP, and read-only MCP built into `@komalang/koma`
]
[main:
  [col:
    [box .card style="flex: 1":
      # `koma check --layout`

      Measures rendered pages in a real browser to catch clipped text, box overflow, and collisions before you present.
    ]
    [box .card style="flex: 1":
      # `koma format --write`

      Writes the single canonical form defined by the specification, keeping Git diffs small and reviewable.
    ]
  ]
  [col:
    [box .card style="flex: 1":
      # `koma lsp` & VS Code

      Syntax highlighting, live diagnostics, outline, hover, and side-by-side preview in VS Code, Zed, or Neovim.
    ]
    [box .card style="flex: 1":
      # `koma mcp` & AI agents

      Read-only local MCP server and standard unist AST let humans and AI agents co-author safely via Git diffs.
    ]
  ]
]

+++

---
layout: section
class: dark
---

[label .on-dark: Try it now]
[title .on-dark: Edit live at komalang.org]
[subtitle .on-dark: Try the interactive Playground in your browser, or open any example in KomaDocs at komadocs.com]

"""
Koma 0.1.0 is open to try at komalang.org; its companion editor is KomaDocs at komadocs.com.
"""