Export Markdown math equations to PDF on Mac
A lecture, a technical note or a problem set has equations. In Markdown you write them in LaTeX syntax, between dollar signs. Marko shows them rendered in Visual mode, inside a sentence and as a centered block, and keeps them in the exported PDF. It all happens on your Mac.
Write an equation in the document
Marko recognizes two ways to write an equation, taken from the usual notation:
- For an equation inside a sentence, wrap it in a single dollar sign on each side, for example
$E = mc^2$. - For a standalone equation, centered on its own line, wrap it in two dollar signs, for example
$$a^2 + b^2 = c^2$$. - Switch to Visual mode: the equation appears rendered, in place of the source code.
Rendering relies on KaTeX. You write the syntax KaTeX supports, which is a subset of LaTeX: the usual math commands, fractions, exponents, sums, matrices. LaTeX packages and TikZ drawings are not part of it.
Some AI tools wrap equations in \( and \), or in \[ and \], instead of dollar signs. If one of those does not render, swap the delimiters for one or two dollar signs and Visual mode picks it up.
See the result, then export
In Visual mode, read your equations the way they will print: a stacked fraction, a subscript in the right spot, a sum symbol with its bounds. If an equation does not render, KaTeX did not recognize the syntax; fix it before you export.
- Check each equation in Visual mode.
- Choose File > Export as PDF…
- Name the file and confirm. The PDF is paginated as A4, and the equations appear rendered, inline and as blocks.
A word of caution if your text also mentions prices: a stray dollar sign can start an equation by accident, so a line such as a price range written with two dollar signs may render oddly. Check it in Visual mode, and escape a literal dollar with a backslash where needed.
What is supported
| In the document | On screen and in the PDF |
|---|---|
| Inline equation between single dollars | Rendered within the sentence |
| Block equation between double dollars | Rendered centered on its line |
| Syntax supported by KaTeX | Fractions, exponents, sums, matrices |
| Syntax outside KaTeX (packages, TikZ) | Not rendered |
The limit to know
The PDF is not tagged. It suits reading and printing, not a screen reader that relies on tagged structure.
If you mostly need to keep the source, save: Marko writes plain Markdown, with your equations in clear text between dollar signs, which your colleagues reopen in the editor of their choice.
Frequently asked questions
Which equation delimiters does Marko recognize?
Dollar signs: one single dollar on each side for an inline equation, two dollars for a block equation centered on its line.
Does all LaTeX syntax work?
No. Rendering relies on KaTeX, a subset of LaTeX. The usual math commands work, but LaTeX packages and TikZ drawings do not.
Do the equations stay in the PDF?
Yes. Equations rendered in Visual mode appear in the exported PDF, inline and as blocks. The PDF is not tagged for accessibility, though.
Try it on your own file. Open a .md your AI just wrote, fix it and export it. Marko runs on Apple Silicon Macs, macOS 12 or later.
Full 14-day trial, no account or credit card. See pricing