# Discourse Math Plugin

Summary: The math plugin uses MathJax (default) or KaTeX to render maths.

Install: Follow the plugin installation guide.

### Features

You can render blocks of maths by wrapping with $$ $$
\hat{H}\Psi=E\Psi
$$ You can render inline math by wrapping with a single  like so: E=mc^2. Discourse math uses a heuristic to ensure that sentences such as: “I spent 20 and another 100” do not get converted. When using MathJax, you can also enable asciimath processing which uses % as a delimiter: %E=mc^2% ### Configuration This plugin is disabled by default, after installing be sure to enable it via site settings. ### CHANGELOG ### TODO • We would love to support server-side rendering, there is already an online sample. ### Extras #### What about the old plugin? There is a plugin maintained by @Kasper/ @masda70 called Discourse MathJax. This plugin is a ground up re-write to support the new markdown it engine. The main differences are: • It is much stricter about block and inline syntax, only  and$$ blocks are supported

• It embeds MathJax or KaTeX renderer so you do not need to use a CDN

• It only loads the math renderer if it detects equations on the page.

• It surgically applies renderer as opposed to performing full page scans.

• It is well specified using specs

54 Likes

Seems to be not working properly.

I was writing a very long topic, with many formulas, but seems the plugin is not working when we have many formulas.

Anyone found the same phenomenon?

1 Like

Can you try switching the engine from MathJax to KaTeX in the plugin settings?

3 Likes