Math & formulas
Write LaTeX formulas inline or as centered blocks, rendered with KaTeX.
Inline formulas
Inline math sits inside a sentence, sized to match the surrounding text. Insert one with the slash menu (type /math), or press CtrlShiftM. You can also type a formula between double dollar signs on a single line — $$x^2$$ — and it converts as soon as you type the closing pair.
Math blocks
A math block stands on its own line and is centered, which suits longer expressions. Type two dollar signs followed by a space at the start of a line, use the slash menu (type /math block), or click the radical button in the formatting toolbar. Either way the block opens ready for you to type into.
Editing a formula
Click any formula to open it and see its source. Click elsewhere, or use the arrow keys to move out of it, and it renders again. Pressing Backspace immediately after a formula steps inside it rather than deleting the whole thing; CtrlBackspace from within removes the formula outright. An empty formula shows a placeholder until you type something, and one that cannot be parsed is marked so you can spot it — hover it to see what went wrong.
What you can write
Formulas use LaTeX notation, rendered by KaTeX: fractions like \frac{a}{b}, sums and integrals, Greek letters, matrices, and the usual operators and relations. Most of what you would write in a LaTeX document works here. Chemistry notation (the mhchem extension) is not included, and equations are not numbered automatically.
Prices and dollar signs
A single dollar sign never starts a formula while you are typing, so notes about money and code are safe: "$5 for coffee, $10 for lunch" stays exactly as written, and so does shell or template syntax like $PATH. Only a double dollar sign starts math. Imported Markdown is treated differently — see below.
Import, export, and copying
Importing a Markdown file or pasting Markdown brings formulas across, using the standard $...$ for inline math and $$...$$ for blocks. Exporting writes the same notation back out, so a note round-trips through other LaTeX-aware tools. Copying a formula as plain text keeps its dollar signs, pasting a rendered formula from a page like Wikipedia recovers the underlying LaTeX, and printing a note renders the formulas rather than their source.