Add LaTeX equations to a diagram
The Math tool lets you place a typeset equation anywhere on the canvas, alongside the rest of your diagram. The source stays LaTeX, the render uses KaTeX, and you can re-open the source any time. This guide assumes you’ve done the 5-step tutorial and want a task-by-task recipe book.
Start an equation
Section titled “Start an equation”| You want to | Do this |
|---|---|
| Place a new equation | Click the fx icon in the bottom toolbar, then click on the canvas. |
| Same, keyboard-only | Press /, then click on the canvas. |
| Re-edit an existing equation | Double-click it. The inline editor reopens with the original LaTeX. |
| Cancel an empty equation | Press Esc while the input is empty — the shape is removed. |
Type math
Section titled “Type math”The textarea is plain LaTeX. The preview below it re-renders on every keystroke, so syntax errors show up immediately (highlighted in red, never breaking the editor).
\int_0^{\infty} e^{-x^2} \, dx = \frac{\sqrt{\pi}}{2}\sum_{i=1}^n i = \frac{n(n+1)}{2}\hat{y} = \sigma(W x + b)See the Math reference for the full vocabulary (Greek, operators, decorations, matrices, chemistry, etc.).
Multi-line systems with equation numbers
Section titled “Multi-line systems with equation numbers”Wrap the block in align for paper-style equation numbers (1),
(2), (3). drawtonomy ensures the equation bodies and the
numbers never overlap, even at large sizes.
\begin{align} \nabla \cdot \mathbf{E} &= \frac{\rho}{\varepsilon_0} \\ \nabla \cdot \mathbf{B} &= 0 \\ \nabla \times \mathbf{E} &= -\frac{\partial \mathbf{B}}{\partial t} \\ \nabla \times \mathbf{B} &= \mu_0 \mathbf{J} + \mu_0 \varepsilon_0 \frac{\partial \mathbf{E}}{\partial t}\end{align}Use align* or aligned if you want alignment without numbering.
Chemistry — mhchem
Section titled “Chemistry — mhchem”mhchem is bundled — \ce{...} for reactions and \pu{...} for
units render with proper arrows, subscripts, and roman-styled
units.
\ce{H2 + Cl2 -> 2 HCl}\ce{H2O ->[\text{electrolysis}] H2 + 1/2 O2}\pu{2.5 km/h}Color and size
Section titled “Color and size”Select the equation. The Math (LaTeX) panel sits in the top right:
- Color — palette swatch, or More… for the full color palette.
- Size — slider, 8 px (footnote) to 200 px (poster headline). Drag the slider to scrub; the change collapses into one undo step.
For grayscale-print figures (most IEEE / journal pages), pick black or a dark grey — the equation will still read after conversion.
Rotate
Section titled “Rotate”Grab the rotation handle on top of the selection box and drag. Math is a regular shape, so the entire rendered equation rotates together.
Move with the keyboard
Section titled “Move with the keyboard”With one or more Math shapes selected:
| Keys | Effect |
|---|---|
| Arrow keys | Move by 1 px |
| Shift + arrow | Move by 10 px |
Copy and paste
Section titled “Copy and paste”Cmd+C then Cmd+V. The copy is placed at +20 px offset so you can see it. The LaTeX source is preserved.
Persistence
Section titled “Persistence”While you’re working, drawtonomy autosaves the canvas to
localStorage (debounced, also flushed on tab close). After a
page reload, your equations come back exactly as they were —
LaTeX source, color, size, position.
Export to the right format
Section titled “Export to the right format”| You want to put the equation in… | Export as |
|---|---|
| A LaTeX paper (most common) | PDF — text is path-converted, no font issues. |
| A LaTeX paper, vector-embedded | SVG (via the svg package) or EPS. |
| Google Slides / Keynote / PowerPoint | PNG (transparent background) or SVG if the tool supports it. |
| A Notion / Confluence / blog post | SVG for sharp scaling, PNG if the platform rejects SVG. |
| A figure you’ll re-edit later | .drawtonomy.svg — drawtonomy’s native re-editable format. It’s also a valid SVG. |
See export formats for the full matrix. The render path for math is the same as for the rest of the canvas, so equations export at the same fidelity as everything else.
When not to use the Math tool
Section titled “When not to use the Math tool”- Inline math in a paragraph of text — drawtonomy’s Text and Math shapes are separate. For an equation that flows inside a sentence, use plain Text for the sentence and place a small Math shape next to it. (Real inline math belongs in your LaTeX source or a Notion-style editor, not in a whiteboard.)
- Computation — drawtonomy renders LaTeX, it doesn’t evaluate it. For step-by-step solutions, use a CAS (Mathematica, SymPy) and paste the resulting LaTeX into drawtonomy for the figure.