MathJax one-liner equation breaks the line

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

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

image

I have no non-supported plugins installed:

image

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

I also noticed that there was a RTL fix lately, could this be the reason?

1 Like

:wave:

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

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

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.

1 Like

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 :slight_smile:, 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
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 :confused: Thanks you all.

Try searching here for info on safe mode.

1 Like

Thanks for the reply.
I have entered the safe mode. 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.

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

1 Like

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

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

1 Like

I found out where the problem is coming form. There is a new commit in the discourse-math plugin that add a new attribute ‘math-container’.
In the dev tools I see:

image

If I checkout this attribute, It will work:

1 Like

This is fixed via

https://github.com/discourse/discourse-math/pull/17

Thanks for reporting the issue @verilog15 :+1:

5 Likes