MathJax and mchchem package

Right click over the math or chemistry notation and select "Show Math As" and then "TeX Commands" to see the LaTeX text displayed on the page.

Some math:

When $a \ne 0$, there are two solutions to \(ax^2 + bx + c = 0\) and they are $$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$

Some chemistry using the ce command from the mhchem LaTeX package:

Inline formula \( \ce{C6H5-CHO} \) or display: \[ \ce{C6H5-CHO} \] \[ \ce{$A$ ->[\ce{+H2O}] $B$} \] \[ \ce{SO4^2- + Ba^2+ -> BaSO4 v} \] \[ \ce{H\bond{->}A-B=C#D\bond{~}E\bond{~-}F\bond{...}G\bond{<-}E} \] cf (like ce) and cee commands are also available. Here is a cee command to align formulas: \[ \begin{align*} \cee{RNO2 &<=>C[+e] RNO2^{-.} \\ RNO2^{-.} &<=>C[+e] RNO2^2-} \end{align*} \]

Judy's equation:

The MathJax version of the mhcmem LateX package keeps the 2- above the 8 when it should be just to the right of the 8:

\[ \ce{S2O8^2-} \]

\[ \ce{S2O8^2-} \]

To work around this in MathJax, use one or two extra LaTeX thin spaces (\,) before the superscript, like this (which looks fine in LaTeX too):

\[ \ce{S2O8^{\,2-}} \] with one \, or next with two \,\,
\[ \ce{S2O8^{\,\,2-}} \]

\[ \ce{S2O8^{\,2-}} \] \[ \ce{S2O8^{\,\,2-}} \]

Don't use extra braces to group both the element body and superscript like this because while it looks ok here in MathJax, it it looks like S208 (without subscripts) in LaTeX:

\[ \ce{{S2O8}^{2-}} \] shows in MathJax as
\[ \ce{{S2O8}^{2-}} \]
and in LaTeX the same \[ \ce{{S2O8}^{2-}} \] shows as
\[ \mathrm{S2O8}^{2-} \] \[ \ce{S2O8^2-} \] \[ \ce{S2O8^{2-}} \] \[\ce{OCl^-(aq) + H2O(l) + 2e^-}\] \[\ce{OCl^{-}(aq) + H2O(l) + 2e^-}\]