# Markdown in Unmarked

Write math in Markdown with Unmarked

Last updated

Put LaTeX between dollar signs and Unmarked typesets it: $…$ for math inside a sentence, $$…$$ on its own lines for an equation that stands alone. Read mode, Present, PDF and Print show the finished equation. Write mode shows the LaTeX you typed, so it stays easy to edit.

Inline and display math

Inline math sits inside a sentence:

The area of a circle is $A = \pi r^2$.

Display math gets its own lines and is centered on the page:

$$
\int_0^1 x^2 \, dx = \frac{1}{3}
$$

A fenced code block tagged math does the same job as $$. Files written for GitHub often use it:

```math
e^{i\pi} + 1 = 0
```

Press ⌘E to switch to Read mode and see the result. Equations follow your theme's light or dark appearance.

LaTeX between \( and \) or \[ and \] isn't read as math, so use dollar signs.

Prices stay prices

A sentence like "it costs $5 and $10" doesn't turn into math. Unmarked uses the same rule as Pandoc: the opening $ needs a non-space character right after it, and the closing $ needs a non-space character right before it and no digit after it. For a literal dollar sign anywhere, type \$.

Dollar signs inside code, raw HTML, image syntax and link addresses are never read as math.

What you can write

The LaTeX you reach for in notes, papers and AI answers works: fractions, roots, sums, integrals and limits, Greek letters, \text{…}, font commands like \mathbf and \mathbb, binomials, accents, \left( … \right), matrices such as pmatrix and bmatrix, cases, and multi-line aligned and gather blocks. align and equation are drawn as aligned blocks, without equation numbers.

When a piece of LaTeX can't be drawn, Unmarked shows its source in a code font, with no error message and nothing lost. Equations that use color commands show their source the same way.

In tables and on slides

Math inside a table cell is typeset in Read mode, so a column of formulas reads as formulas.

In Present, equations appear on the slides at presentation size. A --- line inside a $$ block never starts a new slide.

In exports

  • PDF and Print draw each equation as real vector text with an embedded math font, so it stays sharp at any zoom and in print.
  • HTML turns each equation into MathML, which browsers draw themselves, with the LaTeX kept inside. That holds for both the self-contained file and the minimal one, and nothing loads from the web.
  • Word gets real Word equations that you can keep editing in Word.
  • Copy as Rich Text, and plain copying from Read mode, give you the LaTeX source, so pasting into another editor keeps the math editable.

More on each format: Export to PDF, Export to HTML, Export to Word.