docs/help/contents/rich-text-editor/math-and-formulas.md
Notesnook renders LaTeX math with KaTeX, so you can write \frac{a}{b} in a note and see a real fraction. There are two kinds: inline math, which sits inside a line of text, and a math block, which is centered on its own line in display mode.
Inline math flows with the sentence around it, the way $E = mc^2$ would in a paper.
{{more}} button in the first toolbar group (the one holding {{bold}}, {{italic}} and {{underline}}) and choose {{mathInline}}.There is no keyboard shortcut for inline math. With Markdown shortcuts on, typing $$2 + 2 = 4$$ converts to inline math as soon as you close the second pair of dollar signs.
The {{mathInline}} button is disabled while the cursor is inside a code block.
A math block is rendered in display mode — centered, on its own line, with full-size operators.
+ (Insert) button in the toolbar.{{mathAndFormulas}}.Ctrl+Shift+M (⌘+Shift+M on macOS) inserts a math block from anywhere in the note.
With Markdown shortcuts on, typing $$$ followed by a space also creates a math block.
::: info Markdown shortcuts need Essential
The $$…$$ and $$$ shortcuts are Markdown shortcuts, part of the Essential plan and above, and they are off by default on web and desktop — switch on {{mardownShortcuts}} in {{settings}} → {{customization}} → {{editor}}. They are on by default on mobile. The toolbar buttons and Ctrl+Shift+M work on every plan.
:::
Click (or tap) a rendered formula. It expands to show its LaTeX source in a small editor in place, with the rendered result above it. Change the source, then click outside the formula — or move the cursor away — and it re-renders immediately.
An empty formula renders as an empty placeholder rather than disappearing, so you can always find it again.
The mhchem extension is loaded alongside KaTeX, so \ce{...} notation works out of the box:
\ce{2H2 + O2 -> 2H2O}
\ce{SO4^2- + Ba^2+ -> BaSO4 v}
Notesnook never throws away your input over a typo. KaTeX renders unrecognized commands in red inside the formula and leaves everything it could parse rendered normally, so a stray \frac{1} shows you exactly where the problem is. The raw LaTeX you typed is untouched — click the formula and fix it.