RichMarkdown › Math in Markdown

Math in Markdown

Updated

Markdown has no math of its own. The common convention is LaTeX between dollar signs: $x^2$ inside a sentence and $$…$$ for a formula on its own line. RichMarkdown typesets both as you type and keeps them as plain LaTeX in the exported file.

In short

Syntax you will use most

You wantYou type
Superscript and subscript$x^2$, $a_i$, $x^{n+1}$
Fraction$\frac{a}{b}$
Square root$\sqrt{x}$, $\sqrt[3]{x}$
Sum and integral$\sum_{i=1}^{n} i$, $\int_0^1 x\,dx$
Greek letters$\alpha$, $\beta$, $\pi$, $\Delta$
Comparison and operators$\le$, $\ge$, $\ne$, $\times$, $\approx$
Text inside a formula$v = \text{distance} / \text{time}$
Matrix$$\begin{pmatrix} a & b \\ c & d \end{pmatrix}$$

Writing formulas in RichMarkdown

Where the formula goes next

DestinationWhat arrives
Export .mdPlain LaTeX between dollar signs, unchanged.
Download Word (.docx)Equations you can edit in Word.
Copy into desktop WordEditable equations (tested with Word 16). Other apps, such as Google Docs, receive the LaTeX as text.
Save as PDF / printTypeset formulas.
A shared linkTypeset formulas, with no scripts on the page.
ObsidianDisplays $…$ and $$…$$ as written.
GitHubDisplays $…$ and $$…$$ in README files, issues and comments.

Common mistakes

Related guides

FAQ

Does standard Markdown support math?

No. Math is an extension. Most tools that support it use LaTeX between dollar signs, which is what RichMarkdown writes.

Do I need to install LaTeX?

No. The formulas are typeset in your browser.

Will the formulas be editable in Word?

Yes. Download Word (.docx) writes them as Word equations, and copying into desktop Word does the same.

Why is my formula shown as plain text?

Check for a space right after the opening dollar sign or before the closing one, and check that the formula is not inside a code block.

Can I paste formulas from ChatGPT?

Yes. Pasted formulas keep their LaTeX, including the bracket forms that AI tools write.

Open the free editor