Menu
Compositor Typeset Guide About Us

Field guide / Rule 20 — From Markdown

Equations, actually set.

Type $e = mc^2$ in most exporters and that is exactly what lands on the page — a row of raw dollar signs and carets. In a set document, an equation should read as an equation. Write it in the LaTeX math you already know, and it comes across properly typeset — eiπ+1=0 — whether you hand someone a Word file, a PDF, or a link.

Write it the way you always have

The convention is the one Obsidian, GitHub and Pandoc all share. Wrap a formula in single dollar signs — $a^2 + b^2 = c^2$ — and it sits inline, on the line with your prose. Wrap it in double dollar signs — $$…$$ — and it becomes a display equation, centered on its own line. A fenced ```math block does the same job as $$…$$ for people who prefer it. Nothing new to learn: it’s LaTeX math, and your notes already speak it.

Three formats, three techniques

Each output typesets the same formula the best way it can. The PDF gets real, vector math — sharp at any zoom, set in the same New Computer Modern the professionals use. The Word document gets the identical equation rendered to a crisp, high-resolution image and placed in the text; it matches the PDF exactly, at the cost of not being an editable Word object. The web reader gets native MathML, which the browser draws itself — so it stays crisp, follows the page’s light or dark theme, and needs no scripts to load.

What isn’t an equation

The one risk with dollar-sign math is prices. We use the same rule Pandoc does: a $ followed by a space, or a closing $ that runs straight into a digit, is left as ordinary text — so R$ 10.000 and US$ 20 stay currency, not the start of an equation. And if a formula uses something we can’t convert, it degrades to visible code rather than breaking the document — you see the source, not an error.

On the web

On the web, your equations are drawn with the browser’s own math engine — theme-aware and selectable, no image. Write the quadratic formula in your Markdown as a display equation:

In your Markdown

$$x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}$$

In the browser

x=-b±b2-4ac2a
In the browser

In short

Math is content, not markup. Write it in the LaTeX you already use — $…$ inline, $$…$$ or ```math for display — and it arrives properly set in every format: vector math in the PDF, a matching image in Word, native MathML on the web. Prices stay prices, and anything we can’t typeset falls back to plain code.

Have notes full of formulas? Format a document and they come across as real equations.

Talk to us

Tell us what you’re trying to do — we read every message and usually reply the same day.