# Formatting chemical formulae

In this answer I tried to improve the formatting of chemical formulae using the method I learned from Chemistry SE, but it backfired (and yes, that's especially bad in space exploration). Without enough rep to re-edit I'm stuck until peers reject or fix the edit, but even with enough rep -- how to format chemical formulae here? And why doesn't the Chemistry SE method work?

Subscripts can be written in the format $_n$. For example, H$_2$O becomes H$$_2$$O.

Superscripts can be written in the format $^n$. For example, Na$^+$ becomes Na$$^+$$.

Values longer than one character should be enclosed in curly brackets {}. For example, Ca$^{2+}$ becomes Ca$$^{2+}$$.

Chemical formulas frequently-used in Space.SE, ready to cut-and-paste. Enjoy!

• H$$_2$$O $$\leftarrow$$ H$_2$O
• H$$_2$$ $$\leftarrow$$ H$_2$
• O$$_2$$ $$\leftarrow$$ O$_2$
• N$$_2$$ $$\leftarrow$$ N$_2$
• CO $$\leftarrow$$ CO
• CO$$_2$$ $$\leftarrow$$ CO$_2$
• CH$$_4$$ $$\leftarrow$$ CH$_4$
• NH$$_3$$ $$\leftarrow$$ NH$_3$
• NH$$_4^+$$ $$\leftarrow$$ NH$_4^+$
• N$$_2$$H$$_4$$ $$\leftarrow$$ N$_2$H$_4$
• H$$_2$$O$$_2$$ $$\leftarrow$$ H$_2$O$_2$

Here we do not have the notation plugin that Chemistry has, but you can use the normal MathJax notation which should be sufficient for most things you may need to write out as formulae on Space.SE.

Because there is overhead at server end, sites don't generally get more complex plugins unless absolutely needed, and Space doesn't have a burning need for anything more complex yet.