Inline math not rendering in Wordpress embed

I’m working to embed linked Forum Topics on some of our Wordpress posts/pages, and discovered that while display math works fine in the embed, inline math is not getting converted.

An example is on our DEV site as the single “Notable Reply” here: https://mathenodev7.wpengine.com/4-steps-solve-related-rates-problem-part-2/

The non-rendering bits are wrapped in <span class="math">...</span>, with no MathJax present.
By contrast, the correctly rendered bits, are wrapped in <div> ... and then have the expected <mjx-container class="MathJax ...> etc.

Thanks in advance for insights into how to get inline math rendering as well!

Bumping this item with the hope that someone might have a suggestion.

Really appreciate this community, and thanks in advance again for any thoughts.

Screenshot 2023-07-24 at 12.41.32 PM

Hi, Bruce,
Just to be sure, is the post using the math plugin on Discourse?

Hi, @Canapin,

Yes, we’re using the official Discourse Math plugin. The forum is hosted by the great folks at Communiteq.

Everything works perfectly on the forum itself; it’s just the Wordpress embed where inline math doesn’t render as it should.

Thanks for the reply and checking, and for any suggestions.

I tracked this down: While Discourse is running MathJax v2.7.5, the current version is v.3.2.2, which is what we run on our site. Since the config file is handled differently between v2 and v3, our config isn’t getting applied to what Discourse displays on the embed on our site. Among other things, that means that the single dollar signs aren’t being recognized as indicating inline math, since that’s not the default in MathJax (or LaTeX, for that matter), and so must be specified via local config.

MathJax is now in the process of rolling out v4.

Curious @sam as to whether there are plans to update the version of MathJax Discourse is using?

Really appreciate that Discourse has the capability to display beautiful math via MathJax!

1 Like

Absolutely open to it, if someone feels like helping out I would be delighted.

3 Likes