For the diagrams that only LaTeX can draw, MojoPad speaks TikZ — the drawing language behind countless papers and textbooks. Node graphs, trees, geometry, commutative diagrams, circuit-style layouts, and function and bar plots (via pgfplots) all render right in your page. A real TeX engine runs it, bundled and entirely on your Mac — no account, no server, no internet, and nothing to install.
Type / and choose TikZ diagram (or the Insert + menu), then pick a starter —
Nodes & arrows, Flowchart, Graph, Tree, Function plot, Bar chart, Geometry, or Commutative
diagram — and MojoPad drops in a working picture you can edit, so you never face a blank canvas.
Write ordinary TikZ inside a tikzpicture (the surrounding LaTeX document is handled for
you); common libraries — arrows.meta, positioning, calc,
shapes, patterns, decorations, and more — are preloaded, and
pgfplots loads automatically when you draw an axis.
Click a diagram to open its editor: the TikZ source on top, a live preview below. Because TeX does real work, the preview updates a moment after you pause typing. Press Escape, ⌘Return, or Done to close it. If the source has a mistake, you'll see a friendly note with your code intact to fix — never a broken box.
Hover a diagram for a toolbar. Set its size — S, M, L, or XL — click ⛶ to enlarge it full-screen (scroll to zoom, drag to pan), or ↧ to export or copy it as a PNG or SVG. The exported image carries its own fonts, so it's correct anywhere you paste or open it.
On a Markdown page a TikZ diagram is just a fenced code block:
```tikz
\begin{tikzpicture}
\node[draw,rounded corners] (a) {Start};
\node[draw,right=of a] (b) {End};
\draw[->] (a) -- (b);
\end{tikzpicture}
```
so it round-trips cleanly to and from Markdown and travels with your notes as plain text. Labels
can use LaTeX math — write $\gamma$ or $x^2$ in a node and it
typesets properly.
With local AI set up (see Local AI), choose ✦ Draft with AI… from the picker and describe what you want — “a labelled right triangle with the hypotenuse marked” — and MojoPad drafts the TikZ for you to refine. The model runs on your Mac; nothing leaves it.
A diagram's default ink follows your active theme, so it reads well in light or dark and
re-colors instantly when you switch — while any explicit colors you set (a fill=blue!20
node) are kept exactly. And each diagram is baked to a self-contained vector image at export time, so
it appears correctly, with fonts embedded, in your PDF, ePub, HTML, Word, and static-site
exports — offline, exactly as on screen.