Discourse Math plugin

|||
-|-|-|
:information_source: | Overview | Discourse Math uses MathJax (default) or KaTeX to let you use math formulas in your Discourse.
:hammer_and_wrench: | Repo Link | https://github.com/discourse/discourse-math
:open_book: | Install Guide | How to install plugins in Discourse

Enabling Math

The Math plugin can be configured in the settings, accessible via the admin/plugins page:

Features

Once you have successfully enabled this plugin, you can use $ symbols to delimit the math expressions you want to render, like in the following example: $E=mc^2$.

You can also use $$ delimiters for block mode math, like this:

$$
\sqrt{(-1)} \; 2^3 \; \sum \; \pi
$$


Discourse Math uses a heuristic method to ensure that the following content is not converted: “I spent 20$ and another 100$”.

When using MathJax, you can also enable asciimath to render formulas, using % as the delimiter: %E=mc^2%

Site Settings

  • See all site admin “math” settings
Name Description
Enable Discourse Math Enable the Discourse Math plugin (will recognize $ and $$ code blocks)
Discourse Math Renderer Default renderer is: [mathjax/katex]
Discourse Math Zoom Zoom in 200% when hovering over math formulas (MathJax only)
Enable Accessibility Enhancements Enable accessibility enhancements (MathJax only)
Enable Discourse Math Asciimath Enable asciimath (will use % as delimiter) (MathJax only)

If you are using Discourse’s official hosting service, the Discourse Match plugin is available for all users. Official link: Math | Discourse - Civilized Discussion

The official discussion about this plugin is at: Discourse Math.

You can directly access the official link. Our content is also translated from the official content.

If you have any confusion about the Chinese translation of this plugin or wish to change it, please visit: Crowdin

You can directly change the Chinese translation code.