Leed Markdown carries LaTeX in two forms: a fenced block for an equation that stands on its own, and a double-backtick span for one that sits inside a sentence. In the CMS you write neither by hand. Inline Math on the editor toolbar opens a dialog where you type the expression and see it typeset before inserting it, and Math Block turns the block at the cursor into a math fence you edit in place. The syntax below is what those controls store, and what an AI client or an importer has to produce for itself.
Block math
An equation on its own line goes in a fenced block whose language is math:
```math
E = mc^2
### How it renders {data-id="igs5hvdg"}
```math {data-id="yscmpqs0"}
E = mc^2The fence produces <pre><code class="math">…</code></pre>. To the parser this is a code block that happens to hold LaTeX rather than code, which is why a math block travels with the code blocks in almost every part of the system — the syntax highlighter skips it, it gets no copy button, and the page-type switch that governs it is the one for code blocks rather than the one named for math.
Inline math
An equation inside a sentence is delimited by two backticks, the word math, and a single space:
The equation ``math E = mc^2`` is famous.How it renders
The equation E = mc^2 is famous.
The space is part of the opening delimiter, not decoration around it. ``mathE = mc^2`` with the space removed does not match the rule and comes out as an ordinary code span reading mathE = mc^2. The closing delimiter is the next pair of backticks anywhere after the opening, so an expression cannot contain two consecutive backticks of its own — nothing in LaTeX needs them.
Dollar signs are not the delimiter
What LaTeX works
The content of both forms is LaTeX, typeset by KaTeX, which implements a large subset of it. KaTeX’s own supported functionslist is the authority on what is in that subset; this page does not duplicate it. The commands you reach for most are all there:
| Command | What it makes |
|---|---|
\frac | a fraction |
\sqrt | a square root |
\int, \sum, \prod | large operators |
^ and _ | superscript and subscript |
\infty, \pi, \alpha | symbols |
\to, \le, \ge, \approx | relations and arrows |
\colon, \quad, \, | spacing |
\displaystyle | switch to display-size typesetting |
\displaystyle \int_{-\infty}^{\infty} e^{-x^2}\,dx = \sqrt{\pi}
\displaystyle f\colon[a,b]\to\R \quad\text{where}\quad \frac{a}{b} = \sum_{i=1}^{n} x_i
Everything is typeset inline-size unless you ask
Leed calls KaTeX the same way for both forms, and KaTeX’s default is inline typesetting. A summation in a math block therefore gets its limits beside the sigma rather than above it, and integrals get short signs — correct for a sentence, cramped for an equation on its own line. Start the expression with \displaystyle and you get the display-size treatment, as both blocks above do. Compare:
\sum_{i=1}^{n} x_i
\displaystyle \sum_{i=1}^{n} x_i
Where the rendering happens
Math is typeset in the reader’s browser, after the page loads. The build injects the KaTeX script and stylesheet — pinned to a specific version, currently 0.18.4, from a public CDN — only into pages that actually contain a math element, alongside the highlighter and the diagram library, which are detected the same way. A page with no math loads neither file.
Two consequences worth knowing. The published HTML contains your LaTeX, not the typeset markup: view the source of this page and you will find \displaystyle \sum where the sigma appears. And a math block is deliberately excluded from the code machinery it otherwise resembles — the highlighter skips any code element carrying the math class, and the copy button is attached to pre code:not(.math), so there is no Copy control on an equation.
Backslashes
Write LaTeX commands with single backslashes exactly as you would anywhere else: \frac, \int, \sqrt. Nothing in the markdown layer eats them.
If you are emitting an equation from a Handlebars template rather than from page content, the escaping rules are different again and are covered in the template formatting reference.
Page types can switch math off — on blogs only
Nine formatting features can be turned off per page type, math among them. The switches exist for posts-type page types alone: on a documentation or api page type they are inert on every surface — the API does not evaluate them, the toolbar shows every control, and Settings does not render the toggle block at all. So if you are looking for a way to disable math on a documentation set, there is not one, and nothing is hiding it from you.
On a posts-type page type the gate applies to writes made through the API and MCP as well as to the toolbar, and it rejects with a 400 naming what it refused and what the type does allow:
This page type does not allow: math blocks. Allowed formatting features: code blocks.One detail decides which switch you actually want. Inline math is gated by the option labeled math blocks. A math fence is a code block, so it is gated by the code blocks option — which is on by default, while math is off. On a stock posts-type page type the practical result is that a fenced equation is accepted and an inline one is rejected. Formatting by page type has the full list of switches and where to set them.
The general rules for fences — attributes on the opening line, four backticks to show three, what is and is not highlighted — are on code blocks, and math is one of the two fence languages that are not code at all. The other is mermaid, covered under diagrams.