# Request: Support MathJax plugin

**URL:** <https://boards.straightdope.com/t/request-support-mathjax-plugin/913855>\
**Category:** Site Feedback\
**Created:** [June 30, 2020, 9:56pm UTC](https://boards.straightdope.com/t/request-support-mathjax-plugin/913855 "2020-06-30T21:56:39Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dr.Strangelove](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dr.strangelove/32/6613_2.png) [@Dr.Strangelove](https://boards.straightdope.com/u/Dr.Strangelove)\
**Post date:** [June 30, 2020, 9:56pm UTC](https://boards.straightdope.com/t/request-support-mathjax-plugin/913855/1 "2020-06-30T21:56:39Z")

</div>

MathJax allows inline mathematical expressions in LaTeX:  
[https://www.discourse.org/plugins/mathjax.html](https://www.discourse.org/plugins/mathjax.html)

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

---

<div class="post-metadata">

**Author:** ![Dr.Strangelove](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dr.strangelove/32/6613_2.png) [@Dr.Strangelove](https://boards.straightdope.com/u/Dr.Strangelove)\
**Post date:** [September 6, 2020, 9:52pm UTC](https://boards.straightdope.com/t/request-support-mathjax-plugin/913855/2 "2020-09-06T21:52:36Z")

</div>

So I found a way to fake it, kinda:  
[![](https://latex.codecogs.com/png.latex?%5Cdpi%7B200%7D%5Cint&space;%5Cfrac%7B1%7D%7Bx%7D&space;dx&space;=&space;%5Cln&space;%5Cleft%7C&space;x&space;%5Cright%7C&space;+&space;C.png) ](https://latex.codecogs.com/png.latex?%5Cdpi%7B200%7D%5Cint&space;%5Cfrac%7B1%7D%7Bx%7D&space;dx&space;=&space;%5Cln&space;%5Cleft%7C&space;x&space;%5Cright%7C&space;+&space;C.png)

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?

---

<div class="post-metadata">

**Author:** ![GreenWyvern](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/greenwyvern/32/2834_2.png) [@GreenWyvern](https://boards.straightdope.com/u/GreenWyvern)\
**Post date:** [September 8, 2020, 5:40am UTC](https://boards.straightdope.com/t/request-support-mathjax-plugin/913855/3 "2020-09-08T05:40:15Z")

</div>

@Ed_Zotti

I agree that MathJax should be enabled.

---

<div class="post-metadata">

**Author:** ![Dr.Strangelove](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dr.strangelove/32/6613_2.png) [@Dr.Strangelove](https://boards.straightdope.com/u/Dr.Strangelove)\
**Post date:** [September 8, 2020, 9:28pm UTC](https://boards.straightdope.com/t/request-support-mathjax-plugin/913855/4 "2020-09-08T21:28:35Z")

</div>

With some minor hackery, I found a way to make the extension invisible:  
[![](https://latex.codecogs.com/png.latex?%5Cdpi%7B200%7D%5Cint&space;%5Cfrac%7B1%7D%7Bx%7D&space;dx&space;=&space;%5Cln&space;%5Cleft%7C&space;x&space;%5Cright%7C&space;+&space;C%5Cphantom%7B.png) ](https://latex.codecogs.com/png.latex?%5Cdpi%7B200%7D%5Cint&space;%5Cfrac%7B1%7D%7Bx%7D&space;dx&space;=&space;%5Cln&space;%5Cleft%7C&space;x&space;%5Cright%7C&space;+&space;C%5Cphantom%7B.png)

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

---

<div class="post-metadata">

**Author:** ![GESancMan](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/gesancman/32/2923_2.png) [@GESancMan](https://boards.straightdope.com/u/GESancMan)\
**Post date:** [September 9, 2020, 2:40pm UTC](https://boards.straightdope.com/t/request-support-mathjax-plugin/913855/5 "2020-09-09T14:40:37Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![DPRK](https://avatars.discourse-cdn.com/v4/letter/d/4491bb/32.png) [@DPRK](https://boards.straightdope.com/u/DPRK)\
**Post date:** [September 9, 2020, 4:21pm UTC](https://boards.straightdope.com/t/request-support-mathjax-plugin/913855/6 "2020-09-09T16:21:32Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Dr.Strangelove](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dr.strangelove/32/6613_2.png) [@Dr.Strangelove](https://boards.straightdope.com/u/Dr.Strangelove)\
**Post date:** [September 9, 2020, 6:34pm UTC](https://boards.straightdope.com/t/request-support-mathjax-plugin/913855/7 "2020-09-09T18:34:24Z")

</div>

> [@DPRK](#):
>
> Right, basically he just posted an image (of black text) there, but that does not replicate the functionality of the plug-in.

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.

---

<div class="post-metadata">

**Author:** ![DPRK](https://avatars.discourse-cdn.com/v4/letter/d/4491bb/32.png) [@DPRK](https://boards.straightdope.com/u/DPRK)\
**Post date:** [September 11, 2020, 3:54am UTC](https://boards.straightdope.com/t/request-support-mathjax-plugin/913855/8 "2020-09-11T03:54:03Z")

</div>

If you are going to do that, at least screw with the image

[![](https://latex.codecogs.com/svg.latex?%5Cdisplaystyle%26space%3B%5Clim_%7B%26space%3Bn%26space%3B%5Cto%26space%3B%5Cinfty%7D%5Cfrac%7B%5Csqrt%7B2%5Cpi%26space%3Bn%7D%7D%7Bn%21%7D%5Cleft%26space%3B%28%26space%3B%5Cfrac%7Bn%7D%7Be%7D%5Cright%26space%3B%29%5En%26space%3B%3D%26space%3B1%5Cphantom%7B.png) ](https://latex.codecogs.com/svg.latex?%5Cdisplaystyle%26space%3B%5Clim_%7B%26space%3Bn%26space%3B%5Cto%26space%3B%5Cinfty%7D%5Cfrac%7B%5Csqrt%7B2%5Cpi%26space%3Bn%7D%7D%7Bn%21%7D%5Cleft%26space%3B%28%26space%3B%5Cfrac%7Bn%7D%7Be%7D%5Cright%26space%3B%29%5En%26space%3B%3D%26space%3B1%5Cphantom%7B.png)

[![](https://latex.codecogs.com/svg.latex?%5Cdisplaystyle%5Cint%5Cfrac%7B1%7D%7Bx%7D%5C%2Cdx%3D%5Clog%7Cx%7C%26plus%3BC%5Cphantom%7B.png) ](https://latex.codecogs.com/svg.latex?%5Cdisplaystyle%5Cint%5Cfrac%7B1%7D%7Bx%7D%5C%2Cdx%3D%5Clog%7Cx%7C%26plus%3BC%5Cphantom%7B.png)

so that it be not fuzzy:

[![](https://latex.codecogs.com/png.latex?%5Cdisplaystyle%26space%3B%5Clim_%7B%26space%3Bn%26space%3B%5Cto%26space%3B%5Cinfty%7D%5Cfrac%7B%5Csqrt%7B2%5Cpi%26space%3Bn%7D%7D%7Bn%21%7D%5Cleft%26space%3B%28%26space%3B%5Cfrac%7Bn%7D%7Be%7D%5Cright%26space%3B%29%5En%26space%3B%3D%26space%3B1%5Cphantom%7B.png) ](https://latex.codecogs.com/png.latex?%5Cdisplaystyle%26space%3B%5Clim_%7B%26space%3Bn%26space%3B%5Cto%26space%3B%5Cinfty%7D%5Cfrac%7B%5Csqrt%7B2%5Cpi%26space%3Bn%7D%7D%7Bn%21%7D%5Cleft%26space%3B%28%26space%3B%5Cfrac%7Bn%7D%7Be%7D%5Cright%26space%3B%29%5En%26space%3B%3D%26space%3B1%5Cphantom%7B.png)

[![](https://latex.codecogs.com/png.latex?%5Cdpi%7B200%7D%5Cint&space;%5Cfrac%7B1%7D%7Bx%7D&space;dx&space;=&space;%5Cln&space;%5Cleft%7C&space;x&space;%5Cright%7C&space;+&space;C%5Cphantom%7B.png) ](https://latex.codecogs.com/png.latex?%5Cdpi%7B200%7D%5Cint&space;%5Cfrac%7B1%7D%7Bx%7D&space;dx&space;=&space;%5Cln&space;%5Cleft%7C&space;x&space;%5Cright%7C&space;+&space;C%5Cphantom%7B.png)  
😄

---

<div class="post-metadata">

**Author:** ![Dr.Strangelove](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dr.strangelove/32/6613_2.png) [@Dr.Strangelove](https://boards.straightdope.com/u/Dr.Strangelove)\
**Post date:** [September 11, 2020, 4:20am UTC](https://boards.straightdope.com/t/request-support-mathjax-plugin/913855/9 "2020-09-11T04:20:49Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![GreenWyvern](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/greenwyvern/32/2834_2.png) [@GreenWyvern](https://boards.straightdope.com/u/GreenWyvern)\
**Post date:** [September 11, 2020, 5:00am UTC](https://boards.straightdope.com/t/request-support-mathjax-plugin/913855/10 "2020-09-11T05:00:24Z")

</div>

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

> **[Online Latex Equation Editor - Sciweavers](http://www.sciweavers.org/free-online-latex-equation-editor)**
>
> Tex2Img is a free online Latex equation editor that converts Latex equations to high resolution images to embed in documents and presentations. Render Latex equations into plain text ASCII to insert as comments in source-code, e-mail, or forum. You...

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! ☹

---

<div class="post-metadata">

**Author:** ![DPRK](https://avatars.discourse-cdn.com/v4/letter/d/4491bb/32.png) [@DPRK](https://boards.straightdope.com/u/DPRK)\
**Post date:** [September 11, 2020, 5:32am UTC](https://boards.straightdope.com/t/request-support-mathjax-plugin/913855/11 "2020-09-11T05:32:54Z")

</div>

This?

[![](http://www.sciweavers.org/tex2img.php?eq=%5Cint_0%5E%5Cinfty%5Cfrac%7B1%7D%7Bx%7D%5C%2Cdx&bc=Transparent&fc=Black&im=ps&fs=12&ff=arev&edit=0&.png) ](http://www.sciweavers.org/tex2img.php?eq=%5Cint_0%5E%5Cinfty%5Cfrac%7B1%7D%7Bx%7D%5C%2Cdx&bc=Transparent&fc=Black&im=ps&fs=12&ff=arev&edit=0&.png)

[![](http://www.sciweavers.org/tex2img.php?eq=%5Cint_%7B0%7D%5E%7B%5Cpi%7D%20%5Csin%20x%20%5C%2C%20dx%20%3D%202&bc=Transparent&fc=Black&im=png&fs=12&ff=txfonts&edit=0&.png) ](http://www.sciweavers.org/tex2img.php?eq=%5Cint_%7B0%7D%5E%7B%5Cpi%7D%20%5Csin%20x%20%5C%2C%20dx%20%3D%202&bc=Transparent&fc=Black&im=png&fs=12&ff=txfonts&edit=0&.png)

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

---

<div class="post-metadata">

**Author:** ![Dr.Strangelove](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dr.strangelove/32/6613_2.png) [@Dr.Strangelove](https://boards.straightdope.com/u/Dr.Strangelove)\
**Post date:** [September 11, 2020, 5:36am UTC](https://boards.straightdope.com/t/request-support-mathjax-plugin/913855/12 "2020-09-11T05:36:36Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![GreenWyvern](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/greenwyvern/32/2834_2.png) [@GreenWyvern](https://boards.straightdope.com/u/GreenWyvern)\
**Post date:** [September 11, 2020, 5:42am UTC](https://boards.straightdope.com/t/request-support-mathjax-plugin/913855/13 "2020-09-11T05:42:52Z")

</div>

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:

[![](https://i.ibb.co/d0wtgvB/tex2img.png) ](https://i.ibb.co/d0wtgvB/tex2img.png)

---

<div class="post-metadata">

**Author:** ![Dr.Strangelove](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dr.strangelove/32/6613_2.png) [@Dr.Strangelove](https://boards.straightdope.com/u/Dr.Strangelove)\
**Post date:** [September 11, 2020, 5:51am UTC](https://boards.straightdope.com/t/request-support-mathjax-plugin/913855/14 "2020-09-11T05:51:12Z")

</div>

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](https://boards.straightdope.com/t/gravity-and-time-dilation/920109/25) work without too much problem. You could still use the Sciweavers editor if you prefer that.

---

<div class="post-metadata">

**Author:** ![GreenWyvern](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/greenwyvern/32/2834_2.png) [@GreenWyvern](https://boards.straightdope.com/u/GreenWyvern)\
**Post date:** [September 11, 2020, 5:51am UTC](https://boards.straightdope.com/t/request-support-mathjax-plugin/913855/15 "2020-09-11T05:51:23Z")

</div>

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.
