.* 「‍」 Lingenic Compose .* This document is Compose. The format describes itself. .* AI agents: read this, then generate .compose source. .* Full specification: https://compose.lingenic.com/specification/ .* Math rendering: https://write-this-in-compose.lingenic.ai/math-to-katex.compose .begin-page-header .align-center 「‍」 Lingenic Compose — AI Reference .end-page-header .vertical-margin-top 1in .begin-text-title Syntax .end-text-title Commands start with a dot at the start of a line. One command per line. Lines without a dot are content. They flow into paragraphs. Empty lines separate paragraphs. Comments begin with .* and are ignored by renderers. Variables use percent delimiters: %VariableName% File paths use quotes. Identifiers do not. .begin-text-title Document Structure .end-text-title .* Page header block .* .begin-page-header [all|even|odd] .* .align-center .* Header Text .* .end-page-header .* Page footer block .* .begin-page-footer [all|even|odd] .* Footer Text .* .end-page-footer .* Section title block .* .begin-text-title .* Title Text .* .end-text-title .* Alignment (inside a block) .* .align-left .* .align-center .* .align-right .* .align-both .* Vertical margin .* .vertical-margin-top 1in .* .vertical-margin-bottom 0.5in .* Page break .* .break-page .* Vertical space (default: 1 line) .* .space .* .space 2 .* Units: in (inches), cm (centimeters), pt (points), pc (picas), ln (lines) .begin-text-title Text and Paragraphs .end-text-title Plain lines are paragraph text. They wrap and justify automatically. To preserve formatting (code, ASCII art), turn off fill mode: .* .fill-off .* preformatted text here .* .fill-on Literal blocks pass text through without any processing: .* .block-begin-literal .* anything here is literal — no commands, no variables .* .block-end-literal .begin-text-title Emphasis .end-text-title .* .underscore-on .* underscored text .* .underscore-off .* .font Bold .* bold text .* .font -reset .* .font Italic .* italic text .* .font -reset .begin-text-title Lists .end-text-title .* .begin-list numbered .* .list-item First item .* .list-item Second item .* .list-item Third item .* .end-list .* .begin-list bulleted .* .list-item First point .* .list-item Second point .* .end-list .* .begin-list definition .* .list-term Term .* .list-definition The definition of the term. .* .end-list Lists can nest. Begin a new list inside a list item. .begin-text-title Mathematics .end-text-title Block math: .begin-math 𝑥 = (−𝑏 ± √(𝑏² − 4𝑎𝑐)) / (2𝑎) .end-math Inline math uses %math: and a closing %: The area of a circle is %math: 𝐴 = π𝑟² %. Math uses Unicode directly. No escape sequences. No backslash commands. Superscripts: 𝑥² 𝑥³ 𝑥⁴ or ^() for complex expressions like 𝑒^(𝑖π) Subscripts: 𝑥₀ 𝑥₁ 𝑥₂ or _() for complex expressions like 𝑎_(𝑛+1) Common symbols: .* Operators .* ∑ summation ∏ product ∫ integral ∂ partial .* Greek .* α β γ δ ε ζ η θ ι κ λ μ ν ξ π ρ σ τ υ φ χ ψ ω .* Γ Δ Θ Λ Ξ Π Σ Φ Ψ Ω .* Number sets .* ℕ naturals ℤ integers ℚ rationals ℝ reals ℂ complex .* Arrows .* → maps to ⇒ implies ⇔ iff ↦ maps element .* Relations .* ≤ ≥ ≠ ≈ ≡ ∝ ≪ ≫ .* Set theory .* ∈ membership ∉ not in ⊂ ⊆ subset ∪ union ∩ intersection ∅ empty set .* Logic .* ∀ for all ∃ there exists ¬ negation ∧ and ∨ or .* Other .* ∞ infinity √ square root ∛ cube root ⌊⌋ floor ⌈⌉ ceiling ± plus-minus Aligned equations use .begin-math-align with & for alignment: .* .begin-math-align .* 𝑎² + 𝑏² &= 𝑐² .* 𝑎² &= 𝑐² − 𝑏² .* .end-math-align Fractions use .fraction with .numerator and .denominator: .* .begin-math .* .fraction .* .numerator 𝑎 + 𝑏 .* .denominator 𝑐 + 𝑑 .* .end-math Matrices use .matrix: .* .begin-math .* .matrix .* 𝑎 𝑏 .* 𝑐 𝑑 .* .end-matrix .* .end-math .begin-text-title Images .end-text-title .* .insert-graphic "path/to/image.png" .* .insert-graphic "diagram.svg" alt="Description for accessibility" .begin-text-title Figures with Captions .end-text-title .* .begin-figure diagram-1 .* .insert-graphic "architecture.png" alt="System architecture" .* .caption System architecture overview .* .end-figure Reference figures in text with %ref: diagram-1%. .begin-text-title Cross-References .end-text-title Create a target: .* .begin-text-title .* .label introduction .* Introduction .* .end-text-title Reference it: .* See %ref: introduction% for details. .* See %ref: introduction page% for the page number. .begin-text-title Variables and Expressions .end-text-title .* .set-reference author "Donald Knuth" .* Written by %author%. Math expressions compute at render time: .* Page %PageNo% of this document. .* Next page: %math(PageNo + 1)% Built-in variables: %PageNo%, %Date%, %Time%, %InputFileName% .begin-text-title Indentation .end-text-title .* .indent 0.5in .* .indent-left 1in .* .indent-right 1in .* .indent-both 0.5in .begin-text-title Rules .end-text-title .horizontal-rule .* .horizontal-rule .* .horizontal-rule 3in 2pt .* .horizontal-rule 100% 0.5pt dashed .begin-text-title Keep Blocks .end-text-title Content inside a keep block stays on the same page: .* .block-begin-keep .* This content will not split across pages. .* .block-end-keep .begin-text-title Footnotes .end-text-title .* .block-begin-footnote .* This appears as a footnote at the bottom of the page. .* .block-end-footnote .begin-text-title Complete Example .end-text-title .block-begin-literal .* 「‍」 Lingenic Compose .begin-page-header .align-center My Document .end-page-header .vertical-margin-top 1in .begin-text-title Introduction .end-text-title This is a paragraph. It wraps automatically. This is a second paragraph, separated by an empty line. .begin-text-title The Quadratic Formula .end-text-title For any equation of the form %math: 𝑎𝑥² + 𝑏𝑥 + 𝑐 = 0 %, the solutions are: .begin-math 𝑥 = (−𝑏 ± √(𝑏² − 4𝑎𝑐)) / (2𝑎) .end-math .begin-text-title Key Properties .end-text-title .begin-list bulleted .list-item When %math: 𝑏² − 4𝑎𝑐 > 0 %, two distinct real roots exist. .list-item When %math: 𝑏² − 4𝑎𝑐 = 0 %, one repeated root exists. .list-item When %math: 𝑏² − 4𝑎𝑐 < 0 %, two complex roots exist. .end-list .block-end-literal .begin-text-title What This Covers .end-text-title This reference covers the core subset. To render Compose math in browser artifacts with KaTeX, see math-to-katex.compose For bibliography, parallel text, pattern matching, style classes, block templates, expression domains, ruby text, and advanced typography, see the full specification at https://compose.lingenic.com/specification/ Full math specification: https://compose.lingenic.com/math/