Document editor
Math and Mermaid diagrams
Write inline and block math and Mermaid code fences that the Note kit draws as formulas and diagrams away from the caret.
Updated
By Kition Docs
Verified against Kition 0.2.0 (7d49036f) on 2026-11-06
Inline and block math
Inline math uses a single $ pair; display math uses $$...$$ and can span lines. Away from the caret, the Note kit lays out the TeX and draws it as a formula, including inside table cells.
Move the caret into an expression to show and edit its source. Insert → Math block or /math adds a $$ block, and the right-click Format → Maths item wraps the selection in inline math.
Inline: $E = mc^2$
Block:
$$
\int_0^1 x^2 \, dx = \frac{1}{3}
$$Mermaid code fences
A fenced code block with the language mermaid is drawn as its diagram, laid out by the bundled Mermaid, when the caret is outside it. A diagram that does not parse shows Mermaid’s error instead.
Clicking a diagram leaves the caret where it is; use its edit button to jump to the source.
```mermaid
flowchart LR
Draft --> Review --> Publish
```Review portability and errors
- The TeX and Mermaid source in the
.mdfile is the canonical content; keep it in version control or backups - Quote Mermaid labels that contain punctuation when Mermaid syntax requires it
- A diagram that fails in Kition should be simplified until Mermaid accepts it
- Another Markdown application may not draw math or Mermaid even though it can read the source
Export boundaries
HTML and PDF export do not draw math or Mermaid: both keep them as their source text. The PDF export dialog tells you how many formulas and diagrams will show as source before you export.