# Discourse Math

**URL:** https://meta.discourse.org/t/discourse-math/65770
**Category:** Plugin
**Tags:** official, math, included-in-core
**Created:** [July 6, 2017, 9:27pm UTC](https://meta.discourse.org/t/discourse-math/65770 "2017-07-06T21:27:02Z")
**Posts on this page:** 17
**Page:** 1

<div class="post-metadata">

### Author: ![Discourse](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/discourse/32/148734_2.png) [@Discourse](https://meta.discourse.org/u/Discourse)
#### Post date: [July 6, 2017, 9:27pm UTC](https://meta.discourse.org/t/discourse-math/65770/1 "2017-07-06T21:27:02Z")

</div>

| | | |
| --- | --- | --- |
| :discourse2: | **Summary** | **Discourse Math** uses [MathJax](https://www.mathjax.org/) (default) or [KaTeX](https://katex.org/) to render maths in your Discourse forum. |
| 📖 | **Install Guide** | **This plugin is bundled with Discourse core**. There is no need to install the plugin separately. |

> [@](#):
>
> :discourse2: As this is an #official plugin maintained by the Discourse team, #Support, #Contribute > Bug, #Contribute > UX, and #Contribute > Feature requests can be made in the respective categories here on Meta, and tagged with the appropriate plugin tag. Click on a link below to get one started. 👍
> 
> [❓&nbsp; **Support**](https://meta.discourse.org/new-topic?category_id=6&body=%3E%20Before%20asking,%20did%20you%20search%20first%3F%20Press%20%F0%9F%94%8D%20at%20the%20upper%20right%20to%20search.&tags=math "Ask for support on configuring and using Discourse Math") [🐛&nbsp; **Bug**](https://meta.discourse.org/new-topic?category_id=1&tags=math "A bug report means something is broken, preventing normal/typical use of the plugin") [👀&nbsp; **UX**](https://meta.discourse.org/new-topic?category_id=9&tags=math "Discussion about the user interface of Discourse Math, and how features are presented (including language and UI elements)") [💡&nbsp; **Feature**](https://meta.discourse.org/new-topic?category_id=2&tags=math "Discussion about how existing Discourse Math features can be improved or enhanced, and how proposed new features could work")

### Enabling Math

The Math plugin can be enabled from its settings, accessed from your `admin/plugins` page:

![Math settings](https://global.discourse-cdn.com/meta/original/4X/0/7/8/0783e5858f4219b6624393a8e9ffad5ecdfec133.png)

### Features

Once enabled, you can render inline math by wrapping with a single `$` like so: `$E=mc^2$`.

You can render blocks of math by wrapping with `$$`

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

```

 ![I am the math plugin](https://global.discourse-cdn.com/meta/original/4X/a/f/8/af8a522f78267c2d96eb7b3366c65e6a95fb55f5.png)

Discourse Math uses a heuristic to ensure that sentences such as: “I spent 20$ and another 100$” do not get converted.

#### LaTeX Delimiters

When enabled via site settings, you can also use standard LaTeX delimiters:

- **Inline:** `\(...\)` - Example: `\(E=mc^2\)`
- **Block:** `\[...\]` - Example:

```plaintext
\[
\frac{1}{2}
\]

```

#### AsciiMath (MathJax only)

When using MathJax, you can enable [asciimath](http://asciimath.org/) processing which uses `%` as a delimiter: `%E=mc^2%`

### Composer Integration

The composer includes an **Insert Math** button in the toolbar with keyboard shortcut Shift+M. This opens a modal where you can:

- Toggle between inline and block mode
- Write your LaTeX expression
- Preview and insert into your post

In the rich text editor, math expressions appear as editable nodes with an edit button to modify the expression.

### Chat Support

Math expressions are also rendered in Discourse Chat messages using the same settings and rendering engine.

### Rendering Engines

#### MathJax (Default)

- **Version:** 4.1
- **Output formats:** HTML (default) or SVG
- **Features:**
  - Contextual menu (right-click on math)
  - Accessibility enrichment for screen readers
  - Zoom on alt-click (175% zoom)
  - AsciiMath support

#### KaTeX (Alternative)

- **Features:**
  - Fast rendering
  - [Mhchem extension](https://mhchem.github.io/MathJax-mhchem/) for chemical equations
  - [CopyTex extension](https://github.com/KaTeX/KaTeX/tree/main/contrib/copy-tex) - click math to copy LaTeX source to clipboard
  - Cross-reference support with `\label`, `\ref`, and `\eqref` macros

### Site Settings

See all relevant site settings by searching your admin settings for “math”.

| Name | Description |
| --- | --- |
| discourse math enabled | Enable Discourse Math plugin (adds special processing to $ and $$ blocks) |
| discourse math provider | Math rendering provider: `mathjax` (default) or `katex` |
| discourse math enable latex delimiters | Enable LaTeX-style delimiters: `\(...\)` for inline and `\[...\]` for block math |
| discourse math mathjax output | MathJax output format: `html` (default) or `svg` (MathJax only) |
| discourse math enable menu | Enable contextual menu for math expressions (MathJax only) |
| discourse math enable accessibility | Enable accessibility features like text enrichment (MathJax with menu only) |
| discourse math zoom on click | Zoom 175% on alt-click interaction (MathJax with menu only) |
| discourse math enable asciimath | Enable asciimath processing with `%` delimiter (MathJax only) |

> :discourse2: Hosted by us? This plugin is available on all of our hosting tiers [Math | Discourse - Civilized Discussion](https://www.discourse.org/plugins/math.html)

> Last edited by @sam 2026-01-16T05:05:47Z
> 
> > **Check document**
> >
> > Perform check on document:

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [January 16, 2026, 5:40am UTC](https://meta.discourse.org/t/discourse-math/65770/213 "2026-01-16T05:40:58Z")

</div>

2 posts were split to a new topic: [Add support for email formatting of mathjax](https://meta.discourse.org/t/add-support-for-email-formatting-of-mathjax/393636)

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [January 16, 2026, 5:43am UTC](https://meta.discourse.org/t/discourse-math/65770/215 "2026-01-16T05:43:16Z")

</div>

2 posts were split to a new topic: [Can Mathjax be upgraded to Version 3?](https://meta.discourse.org/t/can-mathjax-be-upgraded-to-version-3/393637)

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [January 16, 2026, 5:46am UTC](https://meta.discourse.org/t/discourse-math/65770/217 "2026-01-16T05:46:19Z")

</div>

6 posts were split to a new topic: [Add support for Latex style blocks and inlines for Math](https://meta.discourse.org/t/add-support-for-latex-style-blocks-and-inlines-for-math/393638)

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [January 16, 2026, 5:50am UTC](https://meta.discourse.org/t/discourse-math/65770/223 "2026-01-16T05:50:44Z")

</div>

A post was split to a new topic: [Equations do not render properly in blocks](https://meta.discourse.org/t/equations-do-not-render-properly-in-blocks/393640)

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [January 16, 2026, 5:52am UTC](https://meta.discourse.org/t/discourse-math/65770/224 "2026-01-16T05:52:02Z")

</div>

A post was split to a new topic: [Math not rendering in Preview](https://meta.discourse.org/t/math-not-rendering-in-preview/393641)

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [January 16, 2026, 5:54am UTC](https://meta.discourse.org/t/discourse-math/65770/225 "2026-01-16T05:54:48Z")

</div>

15 posts were split to a new topic: [Math and AI workarounds](https://meta.discourse.org/t/math-and-ai-workarounds/393642)

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [January 5, 2026, 1:52am UTC](https://meta.discourse.org/t/discourse-math/65770/242 "2026-01-05T01:52:52Z")

</div>

26 posts were split to a new topic: [Upgrading Mathjax to version 4](https://meta.discourse.org/t/upgrading-mathjax-to-version-4/392669)

---

<div class="post-metadata">

### Author: ![Ethsim2](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ethsim2/32/522255_2.png) [@Ethsim2](https://meta.discourse.org/u/Ethsim2)
#### Post date: [February 10, 2026, 8:25am UTC](https://meta.discourse.org/t/discourse-math/65770/243 "2026-02-10T08:25:46Z")

</div>

Just a quick (positive) real-world note after moving to the newer MathJax (v4.1) integration in Discourse Math.

One quality-of-life improvement I’ve noticed is that MathJax now gives **very specific, localised feedback** when input is invalid or a macro isn’t defined:

- It still renders the surrounding valid structure correctly (e.g. `\frac{...}{...}`, parentheses, etc.)
- But it leaves the unrecognised command visible **literally** (e.g. showing `\sinc` as text) rather than failing the entire expression or producing a confusing partial error.

In practice, this makes it immediately obvious what needs fixing, without obscuring what’s already correct — which is especially helpful in teaching contexts and when iterating on math-heavy posts.

For example, rather than relying on `\sinc` being defined, the robust approach is to write it explicitly as an operator:

\frac{\Delta}{T}\operatorname{sinc}\!\left(\frac{\omega\_r\Delta}{2}\right)

with:

\operatorname{sinc}(x)=\frac{\sin x}{x}

Overall this “render what you can, show the rest clearly” behaviour feels like a big usability win compared to older / less transparent failure modes. Thanks to everyone involved in the MathJax upgrade work.

---

<div class="post-metadata">

### Author: ![LeafGlowPath](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/leafglowpath/32/549258_2.png) [@LeafGlowPath](https://meta.discourse.org/u/LeafGlowPath)
#### Post date: [April 2, 2026, 1:48am UTC](https://meta.discourse.org/t/discourse-math/65770/244 "2026-04-02T01:48:08Z")

</div>

I just want to warn everyone who came here via Google that this plugins is not available for the free tier of hosting plan. 😑

---

<div class="post-metadata">

### Author: ![NateDhaliwal](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/natedhaliwal/32/313494_2.png) [@NateDhaliwal](https://meta.discourse.org/u/NateDhaliwal)
#### Post date: [April 2, 2026, 9:17am UTC](https://meta.discourse.org/t/discourse-math/65770/246 "2026-04-02T09:17:40Z")

</div>

Hi, I can understand your frustration. I’m sorry you feel that way. For future cases, you can take a look at the Plugins directory per plan [here](https://discourse.org/plugins).

---

<div class="post-metadata">

### Author: ![LeafGlowPath](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/leafglowpath/32/549258_2.png) [@LeafGlowPath](https://meta.discourse.org/u/LeafGlowPath)
#### Post date: [April 2, 2026, 11:16am UTC](https://meta.discourse.org/t/discourse-math/65770/248 "2026-04-02T11:16:53Z")

</div>

The math plugin is not listed on this [page](https://discourse.org/plugins) as a pro/business/enterprise plugin. So one may assume that is available for free plan. I am not suggesting that you should provide it for free. I just think it should be made a bit clearer.

---

<div class="post-metadata">

### Author: ![NateDhaliwal](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/natedhaliwal/32/313494_2.png) [@NateDhaliwal](https://meta.discourse.org/u/NateDhaliwal)
#### Post date: [April 2, 2026, 11:39am UTC](https://meta.discourse.org/t/discourse-math/65770/249 "2026-04-02T11:39:09Z")

</div>

Right. The page at [Discourse pricing | Discourse - Civilized Discussion](http://discourse.org/pricing) lists all plans and their limits, including plugins, where you can quickly see which plugins are allowed.

---

<div class="post-metadata">

### Author: ![xiasummer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/xiasummer/32/82790_2.png) [@xiasummer](https://meta.discourse.org/u/xiasummer)
#### Post date: [May 26, 2026, 7:50am UTC](https://meta.discourse.org/t/discourse-math/65770/253 "2026-05-26T07:50:48Z")

</div>

I see a new tool, RaTeX,  
written in Rust, 100% compatible with Katex.

[GitHub - erweixin/RaTeX: \>99.5% KaTeX syntax coverage. LaTeX math renderer in pure Rust. No JavaScript, no WebView, no DOM. One Rust core → iOS, Android, Flutter, Web, PNG. C ABI · WASM · Server-side PNG/SVG. · GitHub](https://github.com/erweixin/RaTeX)

It might be a good substitute.

---

<div class="post-metadata">

### Author: ![xiasummer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/xiasummer/32/82790_2.png) [@xiasummer](https://meta.discourse.org/u/xiasummer)
#### Post date: [June 30, 2026, 1:39am UTC](https://meta.discourse.org/t/discourse-math/65770/254 "2026-06-30T01:39:56Z")

</div>

found an interesting problem.

I’m calculating physics problems, I found  
`\dot, \ddot` works fine, but there’s no `\dddot`, and once this function contains \dddot, the formulas following are all not working then.

---

<div class="post-metadata">

### Author: ![mcmcclur](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mcmcclur/32/115456_2.png) [@mcmcclur](https://meta.discourse.org/u/mcmcclur)
#### Post date: [June 30, 2026, 1:56am UTC](https://meta.discourse.org/t/discourse-math/65770/255 "2026-06-30T01:56:06Z")

</div>

@xiasummer Let’s try \dddot{r} and

\dddot{r}.

They seem to work here. I’ve tried it on my site using both MathJax and KaTeX.

---

<div class="post-metadata">

### Author: ![xiasummer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/xiasummer/32/82790_2.png) [@xiasummer](https://meta.discourse.org/u/xiasummer)
#### Post date: [July 11, 2026, 9:27am UTC](https://meta.discourse.org/t/discourse-math/65770/256 "2026-07-11T09:27:43Z")

</div>

Solved! I updated the discourse system. I was using discourse-math plugin 0.9, and now I cleanup the plugin(for now math is not as a plugin) and rebuild the system. Now it works fine with \dddot r.
