Skip to main content

Math (LaTeX)

You can write mathematical expressions in LaTeX; they render fully offline (no internet required).

Delimiters

Which delimiters you use can be chosen in Settings:

  • Backslash (default): inline \(...\), block \[...\]
  • Dollar sign: inline $...$, block $$...$$
  • Both: recognizes either format

The math button in the toolbar inserts an empty expression with whichever delimiter matches the selected mode; you just fill in the contents.

Commonly used commands

What you wantWhat you writeResult (conceptual)
Fraction\frac{a}{b}a over b, stacked
Exponentx^2x squared
Subscriptx_1x sub 1
Root\sqrt{x}the square root of x
Sum\sum_{i=1}^{n} x_isum from i=1 to n
Integral\int_0^1 f(x)\,dxintegral from 0 to 1
Greek letter\alpha, \beta, \piα, β, π
Matrix\begin{matrix} a & b \\ c & d \end{matrix}2x2 matrix

An inline example: writing \(E = mc^2\) renders as E = mc².

Rendering engine

The rendering engine is the flutter_math_fork package. It's not a complete implementation of TeX; it supports a subset close to KaTeX. So don't assume every LaTeX command will work: commands that require rare or specialized packages may not. For the full list of supported commands, check the package's own source (the version Tsunagi uses, and its support coverage, may change over time).

A note specific to Tsunagi

Rendering is fully native (using Flutter widgets); it doesn't use a WebView or a browser engine. That puts it in a different category from the other diagram/visual types (see Diagrams and visuals): all of those run a JavaScript library inside a WebView, whereas math rendering doesn't use JavaScript at all.