Math Notation with KaTeX
Math notation can be written directly in your doc content using LaTeX syntax, and WP Super Docs renders it as properly typeset formulas using KaTeX.
Inline math#
Wrap a formula in single dollar signs for inline math, right in the middle of a sentence:
The area of a circle is $A = \pi r^2$, where $r$ is the radius.
Display math#

Wrap a formula in double dollar signs for display math, shown on its own centered line:
$$
\sum_{i=1}^{n} i = \frac{n(n+1)}{2}
$$
You can also use \(...\) for inline math and \[...\] for display math instead of dollar signs, if you prefer that style or need to avoid ambiguity with literal dollar signs elsewhere in the doc.
KaTeX ships with the plugin and loads from your own site, with no requests to outside servers.
Currency and dollar signs#
KaTeX only renders text between a matching pair of delimiters, so a lone price like “$5” stays plain text. KaTeX also only loads on a doc that contains something that looks like a formula, so a doc that just mentions prices is never touched.
The one case to watch: a doc that has math and also two prices in the same paragraph, like $5 or $29. The two dollar signs form a pair, and the text between them is read as a formula. Use \(...\) for the math in that doc, or keep the prices in separate paragraphs.
Code blocks are ignored#
Math delimiters inside code blocks and inline code are never touched. If a code sample happens to contain a $ character, it renders as-is rather than being interpreted as the start of a formula.
Full LaTeX syntax#
KaTeX supports the full range of standard LaTeX math syntax: fractions, summations, integrals, matrices, Greek letters, and so on. If you already know LaTeX, everything you’d expect works. The complete syntax reference lives at katex.org, since it’s a general-purpose math typesetting library, not something specific to WP Super Docs.
Performance#
Like Mermaid diagrams, KaTeX only loads on doc pages that actually contain math notation. Docs without any math aren’t affected.
Was this helpful?
Thanks for your feedback!
✓ Feedback received. Thank you!