16
$\begingroup$

You may or may not be aware that Worldbuilding.SE (partially) supports the mhchem MathJax extension, that allows for nice rendering of chemical formulae. I only discovered it quite recently. It lets you do stuff like this: \ce{H2O}$ to generate output like this: $\require{mhchem} \ce{H2O}$ (the plain latex equivalent would be $\mathrm{H_2O}$ -> $\mathrm{H_2O}$)

Chemistry Stack Exchange is obviously the main consumer of this feature and has a nice FAQ on its use. The chemists get two things that we don't:

  • \require{mhchem} is implicit... you get support automatically without having to require it explicitly.
  • They get physical unit formatting via $\pu{273.15 K}$, which currently renders as a grumpy error on WB.SE and WB meta that looks like this mathjax markup error

My requests are that we a) support \pu, and optionally b) support automatic \require{mhchem}.

There have been two related meta questions in the past:

The former was never officially completed, but we seem to have (partial) mhchem support anyway (presumably all of Stack Exchange has basic support). The latter was fixed by suggesting use of the \text macro, but only around unit names because it breaks rendering of underscores, etc. If you look at this Meta Stack Exchange answer on which sites use MathJax you can see that 4 already have mhchem fully enabled, and the space exploration people are also looking into getting it too.

Given that it doesn't appear to affect page loading times or rendering performance, and is entirely optional for people to use, is there any reason not to enable it?

$\endgroup$
3
  • 1
    $\begingroup$ I have asked Prerequisites to enable mhchem on a site to see what are the prerequisites to have it. Feel free to chip in with further explanations. $\endgroup$
    – L.Dutch Mod
    Mar 25 at 15:35
  • 1
    $\begingroup$ I have added two options as answers. Any user can upvote the option they prefer. $\endgroup$
    – L.Dutch Mod
    Mar 25 at 16:11
  • $\begingroup$ Silly q: what's the advantage of this over plain MathJax with \text? Is it just that it's less arcane? $\text{H}_2\text{O}$ and $\text{273.15 K}$ appear to render similarly (although not quite identically - the subscript appears to be slightly higher) to $\ce{H2O}$ and $\pu{273.15 K}$. $\endgroup$
    – TLW
    May 14 at 20:52

3 Answers 3

17
$\begingroup$

I support this request: Worldbuilding users can benefit from having mhchem enabled.

$\endgroup$
5
$\begingroup$

I've enabled this as of an hour ago (26 April 2022) Adam said it should be fine but if you run into any issues, let me know and we'll disable it and investigate what's going on.

$\endgroup$
1
  • $\begingroup$ Tested it and seems to be working OK $\endgroup$
    – L.Dutch Mod
    Apr 27 at 14:06
-7
$\begingroup$

I don't support this request: Worldbuilding users do not benefit from having mhchem enabled.

$\endgroup$
1
  • $\begingroup$ Why do they not benefit? $\endgroup$ May 20 at 15:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .