Math and Equations

MarkNode renders LaTeX math directly in the preview and in mind map nodes. You write equations using the standard $...$ and $$...$$ syntax, and they render as typeset mathematics without leaving the editor and without a network connection.

Inline Equations

Wrap a short equation in single dollar signs to embed it in a sentence:

The total energy is $E = mc^2$, where $c$ is the speed of light.

The preview renders the equation in line with the surrounding text. The opening $ must be followed by a non-whitespace character, and the closing $ must be preceded by a non-whitespace character — so prose like “It cost $5 and $10” is left alone and not interpreted as math.

To insert a literal dollar sign in prose, escape it with a backslash: \$5.

Display Equations

Wrap an equation in double dollar signs to render it on its own line, centred, in a larger typeface:

$$
\int_0^\infty e^{-x}\,dx = 1
$$

Display equations can span multiple lines between the opening and closing $$.

Math in Fenced Code Blocks

If you prefer the explicit code-fence style, you can also write display math using a fenced block with math as the language identifier:

```math
\sum_{i=1}^{n} i = \frac{n(n+1)}{2}
```

This renders the same as a $$...$$ block.

Math in Headings and Mind Map Nodes

When a heading contains inline math, the corresponding mind map node displays it as typeset math rather than raw LaTeX source. For example:

## Newton's Second Law: $F = ma$

The mind map node shows the equation rendered, making it easy to scan a STEM outline visually.

Errors

If you write a LaTeX expression the renderer cannot parse — for example, an unknown command or a mismatched brace — the preview shows the raw source with an inline error indicator instead of silently dropping the equation. Hover the error to see what went wrong, then fix the source.

Supported Syntax

MarkNode supports a broad subset of LaTeX math suitable for prose documents — Greek letters, sums, integrals, fractions, matrices, aligned environments, and most operators. Heavy package-level features (tikz, custom macros, full document classes) are not supported because there is no full LaTeX installation involved; everything renders locally and offline.

Note: Equations render in the in-app preview and the mind map. They also survive DOCX export — when you save as DOCX, equations come through in Word as real, editable equations (not literal $...$ text). DOCX is currently the only export format; other formats such as PDF and EPUB are planned for a future release.