Can't get any mathjax to render

Hi folks,
I can’t get any of the mathjax plugins to work on my discourse installation, which is a docker instance which has recently been updated. It stopped working with an update a few months ago, it previously worked with the rux-pizza/discourse-mathjax plugin, which I had used to replace the version it was forked from that worked originally. I also tried replacing these with the discourse-math plugin and also adding https://cdn.mathjax.org to the cors origins settings and also applying the patch referenced at Math not rendering in embedded posts, even though I’m not talking about embedded posts.
None of these things seems to be working. No LaTeX renders at all. Where should I start with troubleshooting? The plugin is loaded and turned on. Is there another plugin I should be using instead? Thanks in advance.

On our site is

Post for testing installed component themes and plugins

and when I see post like this I just bring up the page and check it.

Our site is a standard site hosted by Discourse so regularly updated.

image

HTH

So my takeaway from this is:

  1. The discourse-math plugin that I currently have installed on my installation is the correct one
  2. But it doesn’t work

Maybe I wasn’t clear… we know how to write posts so that the math shows up, we’ve been doing it for years. It stopped working with an update and now I can’t get it to work with any plugin. Or maybe I’m being obtuse and I don’t understand the point of that post/thread? Sorry if so.

I just created a new site and installed the plugin, and it’s working just fine for me :thinking:

Steps are:

  1. Install the plugin
  2. Enable it on the site settings
  3. Refresh the page

If it’s not working for you, you can share your site URL and I can take a look.

1 Like

Yes, I did that of course. Discourse Discourse - #90 by wjerikson - Meta - Push Language Discourse is the thread discussing this issue on our copy of discourse currently. The plugin is installed and enabled.

Looks like the site doesn’t have signups enabled, can you please invite me at rafael@discourse.org ?

1 Like

Done, thanks so much in advance!

1 Like

I think you indeed found a bug in our default differ with MathJax. If a MathJax is the first thing in a post it will thrown an exception an fail to render. An easy workaround is adding a paragraph before your equation.

An even better is enabling our new diff that @nbianca worked on in your site settings enable diffhtml preview. That appears to completely work around the diff bug.

1 Like

Thanks! I enabled that and now it seems to work even if it’s the first thing to post… and also it appears that double- $$'s no longer trigger the rendering in the same way as single ones do. A lot of the posts on that site that used to work used double $$'s, and if you change them to single, it works.

That may be a difference between the old plugins and the official one as

with $$ being for blocks and $ for inline.

Oh. Yeah. Duh. Thanks :slight_smile:

1 Like