# Request: Support MathJax plugin

MathJax allows inline mathematical expressions in LaTeX:

It appears to be available on all hosting plans. MathJax renders on the client side, so it should not increase server load at all.

Note the silly .png at the end. That was to convince Discourse that this was actually an image. I tried manually inserting an <img> tag, which worked in the preview, but upon posting Discourse said I wasn’t allowed to post media items. @codinghorror, is there any other workaround that doesn’t involve messing with the URL?

@Ed_Zotti

I agree that MathJax should be enabled.

With some minor hackery, I found a way to make the extension invisible:
$\dpi{200}\int&space;\frac{1}{x}&space;dx&space;=&space;\ln&space;\left|&space;x&space;\right|&space;+&space;C\phantom{.png$

Kinda stupid, though, as I’m sending invalid LaTeX to the server that it just happens to interpret correctly.

To those of us using a dark theme, the image shows up as black text on a dark background.

Right, basically he just posted an image (of black text) there, but that does not replicate the functionality of the plug-in.

I have installed that official MathJax plugin before; you need low-level access to the board to do it, but there is no reason not to squeeze it into a scheduled maintenance cycle.

Note that the image is dynamically rendered–the source is contained in the URL string. And the site itself has an equation editor. But it has some crappy limitations and I wouldn’t recommend it. I guess it renders the background as transparent so it shows up as black-on-black in dark mode.

I presume you’re on a high-DPI monitor? The two look about the same to me, but I have a standard DPI screen. I see that you’re using the SVG generator, presumably producing vector output. Makes sense.

I did notice that Discourse doesn’t care if it sees a PNG or JPG, regardless of the actual format. It’s mildly surprising that it takes SVG as well.

There’s a really nice online Latex image generator here:

http://www.sciweavers.org/free-online-latex-equation-editor

You can specify font, size, color, background color, and output image format, and it provides embeddable links for bulletin boards, etc.

But damned if I can get Discourse to accept it!

This?

Looks fuzzy on my monitor, though. I do not see SVG output, not that I really had a chance to mess with it.

The inline image is broken for me. I found the same thing myself earlier. The link works if you open it, though. Seems like they break access for external sites, even though it seems like embedding is the whole point.

I don’t think it’s broken for external sites in general.

For example, I can provide the URL to ImgBB, and it will accept it with no problem. Then I can embed the ImgBB image here:

imgBB is probably just pulling down the image in standalone style, though, not embedded in a web page. From Sciweavers’ perspective, it would just look like a user visiting their site. Once they pulled down the image and rehosted it, there’s no further contact with the original.

Or maybe Sciweavers whitelisted image rehosting sites, since the whole idea is to reduce the load on other sites.

The instructions I posted here work without too much problem. You could still use the Sciweavers editor if you prefer that.

I can view the URL directly in my browser with no problem, with an image extension or not. So in theory Discourse should also be able to use it.

I think the problem is that Discourse doesn’t like the dynamically generated images for some reason.