
MathBlock adds two macros to Confluence Cloud. Math block puts a LaTeX formula on its own line, and Inline math puts a small one inside a sentence. Both are drawn as SVG pictures by MathJax 3.2.2 running inside the app on Atlassian's servers, so no formula ever leaves Atlassian.
It's built around two things people complain about in the older LaTeX apps, dark mode and PDF export. Formulas are coloured for Confluence's light or dark theme. When a page is exported, the app hands Confluence a static picture of each block formula, or its LaTeX source if you'd rather have that.
Math block (LaTeX) is for display formulas, centred or left-aligned, with equation numbers from \tag{}. Inline math (LaTeX) is for formulas inside a line of text, and hovering over one shows its source. Both come in four sizes (Small, Normal, Large, Extra large).
\left without \right, a misspelt command, a stray &).$$...$$, \[...\], \(...\) or $...$, MathBlock drops the outer pair for you.Type / in the editor, search for Math block or Inline math, and insert it. The settings panel opens. Type the LaTeX without dollar signs, as in this example.
\int_0^1 x^2 \, dx = \frac{1}{3}
Block formulas have two more settings. Alignment is Centre or Left. "In PDF and Word export" is either a picture of the formula (the default) or the LaTeX source as text.
MathBlock loads the MathJax TeX packages base, ams, amscd, bbox, boldsymbol, braket, cancel, cases, centernot, color, colortbl, configmacros, empheq, enclose, extpfeil, gensymb, mathtools, mhchem (\ce{} chemistry), newcommand, tagformat, textcomp, textmacros, unicode, upgreek and verb. bussproofs (proof trees) and the physics package aren't included.
A few things behave differently from a full LaTeX install.
\newcommand and \def work, but only inside the formula that defines them. Each macro on the page starts clean.\href{url}{text} shows the text without a link, since the formula is a picture.\style, \class, \cssId and \require aren't available. They'd write raw CSS into the drawing or load code at run time.\bbox[...], \unicode[...] and \mmlToken, anything that would end up as raw CSS, a link or a class is dropped. A \bbox background colour, padding and border still draw. Colours must be a name like red, a code like #ff0000, or a [rgb], [RGB] or [gray] value.Equations are numbered only by \tag{}. The align, gather and equation environments don't number themselves, because each macro is drawn on its own and the numbers would restart at (1) in every macro. \ref and \eqref aren't supported and show (???).
When Confluence exports a page, it asks the app for each macro.
If an export shows an empty frame where a block formula should be, switch that block to "LaTeX source as text" and tell us which export you used (see Support).
| Limit | Value |
|---|---|
| Formula length | 4,000 characters, where emoji and letters like 𝑥 count as two |
| Drawing size | 400 KB of SVG. Very long formulas can hit this before the length limit, and you get an error that says so |
| Picture size | 2,400 px on the longer side; larger formulas are scaled down. If that would leave a formula under 8 px tall (it's more than 300 times wider than it is tall), you get an error asking you to break it across lines |
| Sizes | Small 0.85×, Normal 1×, Large 1.3×, Extra large 1.7× |
| Macro expansion | 2,000 substitutions and 20,000 characters, so a self-referencing \def stops with an error |
| Formulas per page | No set limit. Each formula is drawn by its own call to the app when the page opens, and pages with hundreds of formulas haven't been tested yet |
Inline formulas are pictures, and the app can't shift a picture below the text baseline the way MathJax does on a web page. So a formula that dips below the line, like one with a subscript or a fraction, can sit a little higher than the words around it.
The app asks for no Confluence permissions (its scope list is empty), stores nothing, and makes no outside network calls. The LaTeX you type is saved by Confluence as part of the macro, like any other macro setting. The app's function reads it when the page is viewed or exported, draws it, and keeps the drawing (or the error) in memory for a short time so repeat views are quicker. See PRIVACY.md.
Use the support link on the Marketplace listing. Please include the formula and, for errors, the line and column MathBlock showed.
Zovo builds and maintains this app. If it saves you time, you can support the work on GitHub Sponsors. Sponsorship is optional, and the tool works the same without it.
Zovo is made by theluckystrike on GitHub.
The app is MIT licensed (LICENSE). It bundles MathJax 3.2.2, which is Apache-2.0 licensed.
If this app saves you time, you can support the work on GitHub Sponsors. Monthly tiers start at $5, and one-time tiers start at $15. Sponsorship is optional, and the tool works the same without it.