# MathJax one-liner equation breaks the line

**URL:** https://meta.discourse.org/t/mathjax-one-liner-equation-breaks-the-line/128046
**Category:** UX
**Created:** [September 9, 2019, 2:44pm UTC](https://meta.discourse.org/t/mathjax-one-liner-equation-breaks-the-line/128046 "2019-09-09T14:44:38Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![verilog15](https://avatars.discourse-cdn.com/v4/letter/v/9f8e36/32.png) [@verilog15](https://meta.discourse.org/u/verilog15)
#### Post date: [September 9, 2019, 2:44pm UTC](https://meta.discourse.org/t/mathjax-one-liner-equation-breaks-the-line/128046/1 "2019-09-09T14:44:38Z")

</div>

Hi all,  
It looks like MathJax has stopped working. Every equation is on a separate line:

 ![image](https://global.discourse-cdn.com/meta/original/3X/f/5/f575e27aef6250b8a4313b79f0ad967dfb4cccec.png)

It is the same pattern for all the opened topics. Another example:

![image](https://global.discourse-cdn.com/meta/original/3X/2/5/258f19f8b94dd54b53cadc3ba0629647557b5155.png)

I have no non-supported plugins installed:

 ![image](https://global.discourse-cdn.com/meta/original/3X/d/c/dcf95e4eaa1bd3de0d0902e7180cb7d964cec7fe.png)

I also tried to cleanup and rebuild the app.  
What could be the issue?

I also noticed that there was a [RTL fix](https://github.com/discourse/discourse/commit/27f7bd427365307ddaca511632a6e21821f7ddc6) lately, could this be the reason?

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [September 9, 2019, 4:25pm UTC](https://meta.discourse.org/t/mathjax-one-liner-equation-breaks-the-line/128046/2 "2019-09-09T16:25:12Z")

</div>

👋

I have no repro with latest discourse and discourse-math, using the following test code and a RTL locale:

```plaintext
$$
\hat{H}\Psi=E\Psi
$$

```

 ![31](https://global.discourse-cdn.com/meta/original/3X/f/c/fc8e0204d3464192924c14a84f435da64275cbc8.png)

Can you give me a better repro please ? Also try `/safe-mode` to disable current theme to ensure nothing is altering this.

Last, but not least, check your browser console, my bet would be that you will find a js error preventing mathjax to do its conversion.

---

<div class="post-metadata">

### Author: ![verilog15](https://avatars.discourse-cdn.com/v4/letter/v/9f8e36/32.png) [@verilog15](https://meta.discourse.org/u/verilog15)
#### Post date: [September 9, 2019, 4:31pm UTC](https://meta.discourse.org/t/mathjax-one-liner-equation-breaks-the-line/128046/3 "2019-09-09T16:31:11Z")

</div>

Thanks for your reply!  
have you tried one-liner equation? it looks like you showed only the multi-line equations. For one line equation is should be wrapped with one dollar sign `$` and with extra words, something like: `היי $y=x+5$. זאת בדיקה`.  
Multi-lines equations work just fine 🙂, the one-liners are the problem.  
I checked the DevTools but no errors there. The console is clear.  
What is `/safe-mode`?  
Also I have tried to switch back to the old theme but I get the same error:

 ![image](https://global.discourse-cdn.com/meta/original/3X/1/3/13c4d8b1d0e5fcd964c16f2867ffadf2650ff242.png)  
Thanks again!

**EDIT** : Could someone please verify that it is a problem from my side so I could act accordingly? It’s impossible to use my website now 😕 Thanks you all.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [September 9, 2019, 7:20pm UTC](https://meta.discourse.org/t/mathjax-one-liner-equation-breaks-the-line/128046/4 "2019-09-09T19:20:01Z")

</div>

Try searching here for info on [safe mode](https://meta.discourse.org/t/53504?silent=true).

---

<div class="post-metadata">

### Author: ![verilog15](https://avatars.discourse-cdn.com/v4/letter/v/9f8e36/32.png) [@verilog15](https://meta.discourse.org/u/verilog15)
#### Post date: [September 9, 2019, 7:26pm UTC](https://meta.discourse.org/t/mathjax-one-liner-equation-breaks-the-line/128046/5 "2019-09-09T19:26:25Z")

</div>

Thanks for the reply.  
I have entered the [safe mode](https://meta.discourse.org/t/53504?silent=true). At first I checked all of the three available options but it does not tell me where the problem is because then I don’t have MathJax. Then I tried to check only the first two options (without checking the “Disable all extensions” checkbox). In that mode, I still facing with the same situation (equations wrapped with one `$` break, as shown before).  
Thanks again.

---

<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: [September 9, 2019, 9:52pm UTC](https://meta.discourse.org/t/mathjax-one-liner-equation-breaks-the-line/128046/6 "2019-09-09T21:52:26Z")

</div>

I doubt this is that RTL fix, but the wrapping fix @Johani made in mathjax may not be accounting for inline math, only block form

---

<div class="post-metadata">

### Author: ![verilog15](https://avatars.discourse-cdn.com/v4/letter/v/9f8e36/32.png) [@verilog15](https://meta.discourse.org/u/verilog15)
#### Post date: [September 9, 2019, 10:04pm UTC](https://meta.discourse.org/t/mathjax-one-liner-equation-breaks-the-line/128046/8 "2019-09-09T22:04:12Z")

</div>

Thanks for the reply Sam.  
So what could be the problem? Any ideas? 🙂

---

<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: [September 9, 2019, 10:05pm UTC](https://meta.discourse.org/t/mathjax-one-liner-equation-breaks-the-line/128046/9 "2019-09-09T22:05:01Z")

</div>

We will investigate this and report back in the next week or so

---

<div class="post-metadata">

### Author: ![verilog15](https://avatars.discourse-cdn.com/v4/letter/v/9f8e36/32.png) [@verilog15](https://meta.discourse.org/u/verilog15)
#### Post date: [September 9, 2019, 11:37pm UTC](https://meta.discourse.org/t/mathjax-one-liner-equation-breaks-the-line/128046/10 "2019-09-09T23:37:23Z")

</div>

I found out where the problem is coming form. There is a [new commit](https://github.com/discourse/discourse-math/commit/9615034d78f7eaeee7038ec491423791ba4f5196) in the discourse-math plugin that add a new attribute ‘math-container’.  
In the dev tools I see:

 ![image](https://global.discourse-cdn.com/meta/original/3X/3/0/30c8d947e55113d4cb93ed0b8c70d50a055f878d.png)

If I checkout this attribute, It will work:

 ![image](https://global.discourse-cdn.com/meta/original/3X/6/5/6505903936ceddafcc8de6d28ee967b3b12cfb48.png)

---

<div class="post-metadata">

### Author: ![Johani](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/johani/32/176920_2.png) [@Johani](https://meta.discourse.org/u/Johani)
#### Post date: [September 10, 2019, 5:09am UTC](https://meta.discourse.org/t/mathjax-one-liner-equation-breaks-the-line/128046/11 "2019-09-10T05:09:20Z")

</div>

This is fixed via

[https://github.com/discourse/discourse-math/pull/17](https://github.com/discourse/discourse-math/pull/17)

Thanks for reporting the issue @verilog15 👍

---

<div class="post-metadata">

### Author: ![Johani](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/johani/32/176920_2.png) [@Johani](https://meta.discourse.org/u/Johani)
#### Post date: [September 10, 2019, 5:09am UTC](https://meta.discourse.org/t/mathjax-one-liner-equation-breaks-the-line/128046/12 "2019-09-10T05:09:23Z")

</div>


