Skip to content

Math and Diagrams

James Merrix edited this page Jun 9, 2026 · 1 revision

Math and diagrams

Math with KaTeX

Markappoly renders LaTeX math through KaTeX. Write inline math between single dollar signs and block math between double ones.

Inline math sits in a sentence:

Euler's identity is $e^{i\pi} + 1 = 0$.

A display block stands on its own:

$$
\int_0^\infty e^{-x^2}\,dx = \frac{\sqrt{\pi}}{2}
$$

The math renders live in the preview, the way any LaTeX-aware tool would show it.

Diagrams with Mermaid

A fenced code block tagged mermaid renders as a diagram instead of code. For example:

```mermaid
graph LR
  A[Write] --> B[Preview]
  B --> C[Export]
```

That draws a small flowchart in the preview. Mermaid handles flowcharts, sequence diagrams, Gantt charts, and more; the Mermaid documentation has the full syntax.

Diagrams run with Mermaid's strict security setting, so a diagram can't execute scripts or reach outside the document.

Clone this wiki locally