# MathJax has been added in to the SDMB. \[Like TeX/LaTeX\]

**URL:** <https://boards.straightdope.com/t/mathjax-has-been-added-in-to-the-sdmb-like-tex-latex/945190>\
**Category:** About This Message Board\
**Created:** [June 28, 2021, 5:08pm UTC](https://boards.straightdope.com/t/mathjax-has-been-added-in-to-the-sdmb-like-tex-latex/945190 "2021-06-28T17:08:12Z")\
**Posts on this page:** 20\
**Page:** 3

<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:** [July 2, 2021, 7:01pm UTC](https://boards.straightdope.com/t/mathjax-has-been-added-in-to-the-sdmb-like-tex-latex/945190/43 "2021-07-02T19:01:08Z")

</div>

> [@What\_Exit](#):
>
> RGB 0.128.255 you can set millions of colors, in theory 16,777,216 colors.
> 
> {\color[RGB]{0,128,255} \mathrm{{This\: is\: cyan\: text}}} \\ {\color[RGB]{255,128,0} \mathrm{{This\: is\: orange\: text}}} \\

\color{navy}{\text {Okay, this looks like an easier way to do it}} \\ \color{RoyalBlue}{\text {There are a lot of named colors}} \\ \color{purple}{\text {Dozens of them}} \\ \color{ForestGreen}{\text {And if you use the text command, then it handles spaces correctly}} \\  
[Here’s a list](https://en.wikibooks.org/wiki/LaTeX/Colors#The_68_standard_colors_known_to_dvips) of colors.

And this is the the way to do it:

`$\color{navy}{\text {Put your text here}}$`

---

<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:** [July 2, 2021, 7:32pm UTC](https://boards.straightdope.com/t/mathjax-has-been-added-in-to-the-sdmb-like-tex-latex/945190/44 "2021-07-02T19:32:55Z")

</div>

\textsf{This is a Sans Serif font}

\small \textsf{This is Sans Serif smaller}

\large \textit{Large Italics}

\small \color{blue}{\textsf{Small blue Sans Serif}}

---

<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:** [July 2, 2021, 8:17pm UTC](https://boards.straightdope.com/t/mathjax-has-been-added-in-to-the-sdmb-like-tex-latex/945190/45 "2021-07-02T20:17:14Z")

</div>

Finally, the last missing feature from the old boards is back:  
\color{purple}{\text {This post has been graped by The Grapist!}}

---

<div class="post-metadata">

**Author:** ![Karen\_Lingel](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/karen_lingel/32/18649_2.png) [@Karen\_Lingel](https://boards.straightdope.com/u/Karen_Lingel)\
**Post date:** [July 3, 2021, 4:59am UTC](https://boards.straightdope.com/t/mathjax-has-been-added-in-to-the-sdmb-like-tex-latex/945190/46 "2021-07-03T04:59:28Z")

</div>

\color{orange}\Delta x\Delta p \ge {h\over 4\pi}

Ahhhh, I always felt the Uncertainty Principle should be orange!

---

<div class="post-metadata">

**Author:** ![Karen\_Lingel](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/karen_lingel/32/18649_2.png) [@Karen\_Lingel](https://boards.straightdope.com/u/Karen_Lingel)\
**Post date:** [July 3, 2021, 5:04am UTC](https://boards.straightdope.com/t/mathjax-has-been-added-in-to-the-sdmb-like-tex-latex/945190/47 "2021-07-03T05:04:17Z")

</div>

Please select your favorite equation:

_Poll ([view on site](https://boards.straightdope.com/t/mathjax-has-been-added-in-to-the-sdmb-like-tex-latex/945190/47))_

Well that didn’t work at all. It rendered _just fine_ in my preview!!!

[poll type=regular results=always chartType=bar name=two]{

- \Delta x \Delta p \ge {h \over 4\pi}
- E=mc^2
- 2+2=4}  
[/poll]

This second attempt doesn’t render the poll in preview.

Third attempt:  
{

_Poll ([view on site](https://boards.straightdope.com/t/mathjax-has-been-added-in-to-the-sdmb-like-tex-latex/945190/47))_

}

Fourth attempt:  
$[poll type=regular results=always chartType=bar name=four]

- \Delta x \Delta p \ge {h \over 4\pi}
- E=mc^2
- 2+2=4  
[/poll]$

Fifth attempt:

_Poll ([view on site](https://boards.straightdope.com/t/mathjax-has-been-added-in-to-the-sdmb-like-tex-latex/945190/47))_

I give up.

---

<div class="post-metadata">

**Author:** ![BigT](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/bigt/32/12044_2.png) [@BigT](https://boards.straightdope.com/u/BigT)\
**Post date:** [July 3, 2021, 5:05am UTC](https://boards.straightdope.com/t/mathjax-has-been-added-in-to-the-sdmb-like-tex-latex/945190/48 "2021-07-03T05:05:57Z")

</div>

Did you surround them in dollar signs? If so, it looks like they were stripped out.

---

<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:** [July 3, 2021, 5:09am UTC](https://boards.straightdope.com/t/mathjax-has-been-added-in-to-the-sdmb-like-tex-latex/945190/49 "2021-07-03T05:09:48Z")

</div>

_Poll ([view on site](https://boards.straightdope.com/t/mathjax-has-been-added-in-to-the-sdmb-like-tex-latex/945190/49))_

Very strange. It indeed works in the preview, just not once posted.

---

<div class="post-metadata">

**Author:** ![BigT](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/bigt/32/12044_2.png) [@BigT](https://boards.straightdope.com/u/BigT)\
**Post date:** [July 3, 2021, 5:12am UTC](https://boards.straightdope.com/t/mathjax-has-been-added-in-to-the-sdmb-like-tex-latex/945190/50 "2021-07-03T05:12:40Z")

</div>

> [@GreenWyvern](#):
>
> \small \color{blue}{\textsf{Small blue Sans Serif}}

Inline test: I would like a \small \color{purple}{\textsf{purple}} car.

Good enough, but I wonder if there’s a way to get it to use the same font as the main text.

---

<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:** [July 3, 2021, 5:27am UTC](https://boards.straightdope.com/t/mathjax-has-been-added-in-to-the-sdmb-like-tex-latex/945190/51 "2021-07-03T05:27:16Z")

</div>

A future version will have more support for messing with the fonts. You can also switch around the Math Renderer from the menu and experience different results from some of the settings.

---

<div class="post-metadata">

**Author:** ![BigT](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/bigt/32/12044_2.png) [@BigT](https://boards.straightdope.com/u/BigT)\
**Post date:** [July 3, 2021, 5:35am UTC](https://boards.straightdope.com/t/mathjax-has-been-added-in-to-the-sdmb-like-tex-latex/945190/52 "2021-07-03T05:35:00Z")

</div>

> [@DPRK](#):
>
> You can also switch around the Math Renderer from the menu and experience different results from some of the settings.

I find that setting **Math Settings** \> **Scale All Math** to 120% gets me text that matches the inline text.

Edit: nope. It gets the x-height correct, but then the regular height is too large. It’s using its own webfont, not the main font of the theme.

That said, I suspect that this could be tweaked in the theme itself, as I was able to tweak it by changing the CSS property for `.MJXc-TeX-sans-R`.

---

<div class="post-metadata">

**Author:** ![Karen\_Lingel](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/karen_lingel/32/18649_2.png) [@Karen\_Lingel](https://boards.straightdope.com/u/Karen_Lingel)\
**Post date:** [July 3, 2021, 8:55pm UTC](https://boards.straightdope.com/t/mathjax-has-been-added-in-to-the-sdmb-like-tex-latex/945190/53 "2021-07-03T20:55:18Z")

</div>

Pick your favorite equation:

_Poll ([view on site](https://boards.straightdope.com/t/mathjax-has-been-added-in-to-the-sdmb-like-tex-latex/945190/53))_

Nope.

---

<div class="post-metadata">

**Author:** ![DMC](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dmc/32/18049_2.png) [@DMC](https://boards.straightdope.com/u/DMC)\
**Post date:** [September 30, 2021, 10:34pm UTC](https://boards.straightdope.com/t/mathjax-has-been-added-in-to-the-sdmb-like-tex-latex/945190/54 "2021-09-30T22:34:14Z")

</div>

> [@GreenWyvern](#):
>
> We haz colors!  
> (Although rather painfully.)
> 
> {\color[RGB]{0,0,255} \mathrm{{This: is: blue: text}}} \ {\color[RGB]{255,0,0} \mathrm{{This: is: red: text}}} \ \mathbf{{\color[RGB]{0,128,0} Bold: green}} ThisisbluetextThisisredtextBoldgreen

Weird. I noticed when someone responded to one of my posts that the MathJax dollar signs seemed to have disappeared when quoted, so I wanted to test it here. I highlighted your entire post and clicked quote and it seems to have done the same thing. Bye bye colors. ☹

---

<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:** [October 1, 2021, 4:56am UTC](https://boards.straightdope.com/t/mathjax-has-been-added-in-to-the-sdmb-like-tex-latex/945190/55 "2021-10-01T04:56:37Z")

</div>

> [@DMC](#):
>
> I noticed when someone responded to one of my posts that the MathJax dollar signs seemed to have disappeared when quoted

It does seem to strip out the dollar signs when you select text and quote, but it doesn’t if you reply to a post and then click the speech bubble in the edit box to quote the whole post.

But it’s not a big deal. You can always add back the dollar signs manually.

* * *

Besides \color{red}{\textsf{colored text }} you can also use boxes for background colors.

\fcolorbox{green}{Goldenrod}{Text in a box}

\large\color{white}\fcolorbox{white}{NavyBlue}{Large white text with blue background 🌠}

---

<div class="post-metadata">

**Author:** ![DMC](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dmc/32/18049_2.png) [@DMC](https://boards.straightdope.com/u/DMC)\
**Post date:** [October 1, 2021, 4:58am UTC](https://boards.straightdope.com/t/mathjax-has-been-added-in-to-the-sdmb-like-tex-latex/945190/56 "2021-10-01T04:58:26Z")

</div>

Adding them back manually requires the person who quoted me to understand the MathJax syntax, which is probably a bridge too far in many cases.

@codinghorror, I’m assuming that it’s not intentional that the quote function messes up MathJax encoding, correct?

---

<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:** [October 1, 2021, 11:19am UTC](https://boards.straightdope.com/t/mathjax-has-been-added-in-to-the-sdmb-like-tex-latex/945190/57 "2021-10-01T11:19:26Z")

</div>

I assume this is a manifestation of the well-known bug that prevents formatted text like italic and bold from being quoted correctly (extra spaces are inserted).

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [October 19, 2021, 1:38am UTC](https://boards.straightdope.com/t/mathjax-has-been-added-in-to-the-sdmb-like-tex-latex/945190/58 "2021-10-19T01:38:52Z")

</div>

I might be wrong, but I don’t think that @codinghorror was particularly connected to the implementation of MathJax on Discourse.

---

<div class="post-metadata">

**Author:** ![BigT](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/bigt/32/12044_2.png) [@BigT](https://boards.straightdope.com/u/BigT)\
**Post date:** [October 19, 2021, 8:17am UTC](https://boards.straightdope.com/t/mathjax-has-been-added-in-to-the-sdmb-like-tex-latex/945190/59 "2021-10-19T08:17:00Z")

</div>

> [@Chronos](#):
>
> I might be wrong, but I don’t think that @codinghorror was particularly connected to the implementation of MathJax on Discourse.

No, but the actual bug is in how the “highlight text and click quote” function works. It seems it just takes what text is selected and parses it, rather than find it in the post and then copying the markup.

The latter would eliminate this problem, though I understand it would be more difficult to implement.

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/codinghorror/32/4242_2.png) [@codinghorror](https://boards.straightdope.com/u/codinghorror)\
**Post date:** [October 19, 2021, 8:08pm UTC](https://boards.straightdope.com/t/mathjax-has-been-added-in-to-the-sdmb-like-tex-latex/945190/60 "2021-10-19T20:08:52Z")

</div>

I really don’t recommend using Mathjax unless you need to talk about hardcore mathematics. Abuse of it to get colors and formatting is just… abuse.

---

<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:** [October 19, 2021, 8:54pm UTC](https://boards.straightdope.com/t/mathjax-has-been-added-in-to-the-sdmb-like-tex-latex/945190/61 "2021-10-19T20:54:41Z")

</div>

Even for simple math it’s formatted much more beautifully than what’s otherwise possible. x^3 \over 3! just looks better than x3/3!, and is easier to type, too.

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/codinghorror/32/4242_2.png) [@codinghorror](https://boards.straightdope.com/u/codinghorror)\
**Post date:** [October 19, 2021, 11:17pm UTC](https://boards.straightdope.com/t/mathjax-has-been-added-in-to-the-sdmb-like-tex-latex/945190/62 "2021-10-19T23:17:49Z")

</div>

That’s fine, use math markup to discuss math. That’s the point. Gratuitous font and color formatting hacks… not so much.

[Previous page](https://boards.straightdope.com/t/mathjax-has-been-added-in-to-the-sdmb-like-tex-latex/945190.md?page=2)

[Next page](https://boards.straightdope.com/t/mathjax-has-been-added-in-to-the-sdmb-like-tex-latex/945190.md?page=4)
