Skip to content

LaTeX Math

Write mathematical equations in your markdown with Inkwell using KaTeX. Type LaTeX between dollar signs and it renders live in the preview pane as you write. No plugin to install, no math mode to switch into, no configuration. If you have written a fraction or an integral in LaTeX before, it already works here.

Inkwell uses KaTeX rather than MathJax on purpose. KaTeX renders synchronously and fast, so equations appear the instant you stop typing instead of reflowing a beat later. For a live split-view editor, that speed is the difference between math that feels native and math that feels bolted on. And like everything else in Inkwell, it runs fully offline. The rendering happens on your machine, with no call to a server.

Inline math

Wrap with single dollar signs:

markdown
The area of a circle is $A = \pi r^2$.

Display math

Wrap with double dollar signs:

markdown
$$\int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi}$$

Display math gets its own centered block.

What works

  • Greek letters: $\alpha$, $\beta$, $\gamma$
  • Fractions: $\frac{a}{b}$
  • Matrices: $\begin{pmatrix} a & b \\ c & d \end{pmatrix}$
  • Subscripts and superscripts: $x_i^2$
  • Everything KaTeX supports — full reference

Smart dollar sign handling

Inkwell won't turn your $50 or $PATH into math. The parser requires math expressions to start with a letter or backslash. Plain dollar amounts and shell variables are left alone.

In exports

Math renders in both HTML and PDF exports. HTML exports reference KaTeX fonts from a public CDN so math renders correctly when opened in a browser. PDF export (a Pro feature) preserves your equations at print-quality resolution through the Typst engine, so a document full of math prints like a textbook, not a screenshot.

Frequently asked questions

Does math rendering require internet?

No. Rendering happens locally through KaTeX, fully offline. The only time fonts load from a CDN is inside an exported HTML file opened in a browser, which keeps that file small. The editor itself never makes a network call to render math.

Why KaTeX instead of MathJax?

Speed. KaTeX renders synchronously, so equations appear immediately in the live preview instead of lagging behind your typing. MathJax supports a wider command set, but for a split-view writing tool the responsiveness of KaTeX is the better trade. See the full list of supported functions.

Will it break my prices and shell variables?

No. Inkwell requires a math expression to start with a letter or a backslash, so $50 and $PATH stay as plain text. You do not have to escape ordinary dollar signs.

Can I write multi-line and aligned equations?

Yes. Display math in $$ ... $$ supports environments like pmatrix, bmatrix, and aligned, along with fractions, integrals, sums, Greek letters, and the rest of the KaTeX command set.

Does math survive export to other tools?

Your source stays plain markdown with LaTeX in dollar signs, so it is portable to any tool that reads LaTeX math. Inside Inkwell it renders live, and it carries through to both HTML and PDF export.

  • Exports — math preserved in HTML and PDF output
  • Mermaid Diagrams — the other live-rendered block, no plugin required
  • Features — everything in the free editor