Description

Render $...$ and $$...$$ with the Typst engine. LaTeX equations keep rendering with KaTeX, so existing notes are unaffected.

Additional Information

Links:
Maintainers: justinvulz
Version:0.2.0
Minimum app version:3.0
Downloads: This version:4
Last updated:2026-08-31T07:38:47Z

Typst Math

Renders $…$ and $$…$$ in the Joplin note viewer with the Typst engine instead of KaTeX. Works on desktop and mobile, entirely offline.

Read this first: Typst maths is not LaTeX

This is the one thing worth knowing before installing.

LaTeX (KaTeX) Typst
square root $\sqrt{3x-1}$ $sqrt(3x-1)$
fraction $\frac{a}{b}$ $a/b$ or $frac(a,b)$
sum $\sum_{i=1}^{n}$ $sum_(i=1)^n$
greek $\alpha$ $alpha$
text $\text{if } x$ $"if " x$

Your existing notes will not break. Every equation is still rendered by KaTeX first, and that rendering is kept. If Typst cannot compile the source — which is what happens to any LaTeX equation — the KaTeX version is shown instead, marked with a faint dotted underline you can hover for the compiler's message.

So old notes look exactly as they always did, new notes can use Typst syntax, and there is no migration. If you would rather see the error than the fallback, turn off Fall back to KaTeX in the settings.

Installing

Desktop (Joplin 3.0 or newer) — Options → Plugins, search for Typst Math, install, restart.

Mobile (Joplin 3.1 or newer) — Configuration → Plugins. The first time, tap Enable plugin support; then search for Typst Math and install.

Either way you can also install the .jpl file from the releases page by hand, which is worth knowing because the plugin repository can take a while to pick up a new version.

One requirement: Enable math expressions must stay on in Joplin's Markdown settings. This plugin changes how maths is rendered; it does not parse $ itself. With that option off there is nothing to render, and the plugin says so when it starts.

Everything else is bundled. No network access at any point, and no first-run download.

Writing equations

Inline maths goes between single dollars, display maths between double ones:

The sum $sum_(i=1)^n a_i$ converges when …

$$
integral_0^oo e^(-x^2) dif x = sqrt(pi)/2
$$

Typst's own maths documentation is the reference. A few things that catch people out coming from LaTeX:

  • Function arguments use parentheses, not braces: sqrt(x), frac(a,b).
  • Multi-character names are words, not backslash commands: alpha, sum, integral, arrow.r.
  • Literal text goes in quotes: $"if " x > 0$.
  • Anything more than one character binds as a unit: $x^10$ is x to the tenth.

If you type the same shorthand often, put it in the Preamble setting. The preamble is Typst code rather than maths, so wrap a maths definition in $…$:

#let ihat = $hat(bold(i))$

after which $ihat$ works in every note. To alias a function, reach for it through the math module instead — #let vb = math.bold makes $vb(x)$ bold. Keep the preamble small: one that does not compile breaks every equation in every note.

Settings

Found under Options → Typst Math (Configuration → Typst Math on mobile).

Setting Default What it does
Render equations with Typst on Off renders everything with KaTeX, as before.
Fall back to KaTeX on What keeps LaTeX notes working. Off shows the compiler error.
Mark fallbacks on The dotted underline, so a fallback is never silent.
Equation size 1.0 Multiplier on the surrounding text size.
Display equation alignment centred centred or left for $$…$$.
Preamble empty Typst inserted before every equation. Write \n for a line break.
Equations cached 500 Per viewer session.

If something looks wrong

An equation has a dotted underline. Typst could not compile it, so you are seeing KaTeX. Hover it (or long-press on mobile) for the reason — nine times out of ten the source is LaTeX rather than Typst.

No equations render at all. Enable math expressions is switched off in Joplin's Markdown settings.

The first equation takes a few seconds. The compiler is being loaded. That happens once per viewer session, not once per note; after it, equations appear as fast as you can scroll. It is noticeably slower on a phone than on a desktop.

What it does not do

Deliberately, in this version:

  • No ```typst blocks, whole documents or page layout — this renders maths.
  • No @preview packages, file access or image inclusion.
  • No LaTeX-to-Typst conversion.
  • No live preview in the Markdown editor. The viewer only.
  • The Rich Text editor is not corrupted — the Markdown round-trips unchanged — but equations are not rendered with Typst there.

Known limitations

  • PDF and HTML export. Compilation is asynchronous, so an export may capture the note before the equations have rendered. Open the note in the viewer once first: the export then picks up the warm cache.
  • Joplin Web. The browser build inlines plugin assets, which leaves the plugin with no way to reach the compiler. Equations fall back to KaTeX there.
  • Size. The plugin is about 30 MB, nearly all of it the Typst compiler compiled to WebAssembly. That is the price of working offline with no download. On a phone it is also 30 MB of storage and roughly that much memory while a note with equations is open.
  • Mobile is verified on one phone. It works, but memory and start-up time vary a lot between devices.

Licences

  • This plugin: MIT (LICENSE).
  • typst.ts and the Typst compiler, redistributed as WebAssembly: Apache-2.0 (assets/LICENSE-Apache-2.0.txt).
  • New Computer Modern: GUST Font License 1.0 (assets/fonts/GUST-FONT-LICENSE.txt).

Contributing

Build instructions, the architecture, how the mobile paths differ and how to cut a release are in DEVELOPMENT.md. The design this was built to is in SPEC.md.