# Do we really need to badger everyone to use MathJax for chemical formulas?

I've observed it a few times now that negative comments were posts simply because a user was not using MathJax to format chemical formulas. I don't mean gentle encouragements to properly format a post, but rather negative comments for posts that don't really have any large formatting issues, but simply don't use MathJax.

There isn't a huge difference between $\ce{H2O}$ and H2O except that the former is easier to write. I actually like the second version better for inline formulas as it doesn't switch fonts and has the proper size compared to the surrounding text. The non-MathJax version also doesn't have a rendering delay, personally I consider it superior to the MathJax version. I don't like the Unicode subscripts, which is the third option, but they're still perfectly readable.

MathJax is a useful tool, but it is only of limited use for chemical formulas inline with text. It is easier to type, but it is certainly not necessary to produce adequate formulas in questions.

Do we really want to force everyone to use MathJax for every chemical formula? And even if we want to do that, could we be a bit nicer about it?

• Not sure if this was prompted by the very recent post, but if it was, that had larger issues than $\ce{H2O}$ – Jan Sep 19 '15 at 21:25
• This was not about a particular post, I noticed this a few times now. – Mad Scientist Sep 19 '15 at 21:26
• In that case disregard my previous comment ^^ – Jan Sep 19 '15 at 21:26
• My rule of thumb is that if my eyes aren't bleeding and my brain isn't failing trying to read the non-mathjax-formulated version, I don't typically edit for the sake of adding mathjax. – M.A.R. Sep 19 '15 at 21:52
• Regarding the differing fonts, see my POC how to improve that. – mhchem Mar 7 '17 at 17:29

Typesetting using MathJax (including mhchem) should not be an end in itself but should be a value-adding activity.
As long as the individual expressions are correct and in accordance with the printing rules, it doesn’t matter whether the formatting is implemented using markup, HTML, Unicode, or MathJax.

NaOH
ρ = m/V
c = 1 mol/l

$\ce{NaOH}$
$\rho=m/V$
$c=1\ \mathrm{mol/l}$

It is true though that typesetting using MathJax offers more possibilities and that many ordinary expressions cannot be correctly set without using MathJax.

$\mathrm{SO_4^{2-}}$

However, simply surrounding any (flawless) text expression with dollar signs ($) does not automatically improve the formatting, but it can easily introduce new errors. 1 kg$1 kg$(wrong!) And of course, a wrong expression cannot be magically healed by mere conversion to MathJax. Furthermore, MathJax has its disadvantages. The expressions render slowly and are disruptive to comfortable reading (not to say they are a typographic disaster). In some rare cases, it is even impossible to correctly set an expression using the given features of MathJax. μm (micrometre) δf (infinitesimal variation of f)$\mathrm{\mu m}$(wrong!)$\mathrm \delta f$(wrong!) Anyway, the formatting should be used consistently throughout the post. It follows from this that if some expressions in the post have to be set using MathJax, then all other similar expressions should be set using MathJax as well.$\displaystyle a_0 = \frac{4\pi\varepsilon_0\hbar^2}{m_\mathrm{e}e^2}$where$e$is the elementary charge (not where e is the elementary charge)$\mathrm{NH_4^+}$is titrated with$\ce{NaOH}$(not$\mathrm{NH_4^+}$is titrated with NaOH) Notwithstanding the above, we should not demand that everyone use MathJax. If necessary, we may kindly ask for it. MathJax supports many different commands; the syntax is confusing and its use is not intuitive. A suitable documentation is hard to find; our own explanations are scattered over several meta posts. Therefore, it would be disproportionate to require that all users learn how to use MathJax before they are allowed to ask a question. (Note that although$\TeX\$ might be widely used in some disciplines of academia, it is rarely used in the real world outside of academia.)

Furthermore, as already discussed here, an introduction to MathJax does not solve the formatting problems. Even if new users know MathJax, they mostly do not really know what to do with it since they do not know how to properly write quantities, units, and equations. Preferably, any introduction should first state the requirements for quantities, units, and equations and then show how these requirements can be fulfilled with MathJax.

Anyway, users usually do not read introductions, guidelines, or help texts; they read existing questions and answers. Thus, new posts tend to adapt to the quality of existing posts. Therefore, we should be a good example to new users by writing properly typeset questions and answers as well as by making conforming edits including explanatory comments.

• This makes me think, should we request the upgreek package to also be loaded? But all in all, I didn't expect an answer to this one. Well done! – M.A.R. Sep 21 '15 at 17:07
• @M.A.R. and for the record, one cannot simply load LaTeX packages with MathJax, one has to re-implement them from scratch in a completely different language for a completely different framework. – mhchem Mar 7 '17 at 17:30