Markdown with LaTeX math to PDF
Write formulas in LaTeX between dollar signs — $…$ inline, $$…$$ on their own line — and Cropmark typesets them with KaTeX in the preview and in the PDF. The math fonts are embedded in the file, so formulas look the same on every computer, and a formula with an error is flagged instead of breaking the document.
Syntax
| What | Write | Result |
|---|---|---|
| Inline formula | $E = mc^2$ | Math inside the sentence |
| Display formula | $$\int_0^1 x^2\,dx$$ | Centered on its own line |
| Numbered equation | $$a^2+b^2=c^2 \tag{1}$$ | Display formula with “(1)” |
| A literal dollar sign | \$5 | $5 |
Good to know
Prices stay prices
“$5 and $10” is left as text; math needs a formula between the signs.
Code is never math
Dollar signs inside code blocks and
inline codeare left alone.Errors are contained
An invalid formula shows in red; the rest of the document prints normally.
Questions
Which LaTeX commands are supported?
The ones KaTeX supports: fractions, roots, integrals, sums, matrices, aligned equations and most amsmath commands. It is not a full LaTeX engine — no packages or \documentclass.
Are formulas turned into images?
No. They are typeset text and vector shapes, sharp at any zoom.
Why did two dollar signs become a formula?
Text between two dollar signs is read as math. Write \$ for a literal dollar sign.
See also
Updated .