# Specification

The rules of the Koma language, chapter by chapter. Each rule has a named link.

Version 0.0.0, in development. The rules come from the specification in the Koma repository; the syntax tree and the `.komadoc` package are in the [reference](https://komalang.org/reference/).

## Chapters

- [Lexical structure](https://komalang.org/spec/lexical/)Characters, line ends, delimiter lines, comments, and code and math fences.
- [Document structure](https://komalang.org/spec/structure/)Document settings, pages, page settings, page size and layouts.

- [Elements and attributes](https://komalang.org/spec/elements/)The form of an element, names and attributes, groups, callouts and curves.
- [Text and inline markup](https://komalang.org/spec/text/)Markdown and LaTeX inside elements, definition lists and footnotes.

- [Styles and themes](https://komalang.org/spec/styles/)Document CSS, looks for one layout, style classes and theme documents.
- [Semantics](https://komalang.org/spec/semantics/)Placement, size, splitting an area, the syntax tree and every diagnostic.

- [Conformance](https://komalang.org/spec/conformance/)What conforms, the conformance suite, and rendering described in prose.

To search all of it with your browser’s find, read [the specification on one page](https://komalang.org/spec/all/).

## How to read this specification

A rule is normative unless it is marked *Informative*. Normative rules define syntax and meaning, and the [conformance suite](https://komalang.org/spec/conformance/#promise) checks them. Informative rules describe how output is drawn; they are written in prose and promise no pixel-equal result.
