mhchem

The mhchem extension implements the \ce and \pu chemical equation macros of the LaTeX mhchem package. See the mhchem home page for more information and documentation for mhchem.

For example

\ce{[AgCl2]-}
\ce{$A$ ->[\ce{+H2O}] $B$}
\ce{SO4^2- + Ba^2+ -> BaSO4 v}

render as:

This extension is loaded automatically when the autoload extension is used. To load the mhchem extension explicitly, add '[tex]/mhchem' to the load array of the loader block of your MathJax configuration, and add 'mhchem' to the packages array of the tex block.

window.MathJax = {
  loader: {load: ['[tex]/mhchem']},
  tex: {packages: {'[+]': ['mhchem']}}
};

Alternatively, use \require{mhchem} in a TeX expression to load it dynamically from within the math on the page, if the require extension is loaded.

Note

The implementation of the mhchem extension was written for MathJax by the author of the original LaTeX package. An older version was available MathJax version 2.7, but it is no longer part of MathJax version 3 and above. Only the newer version of mhchem is available.


mhchem Commands

The mhchem extension implements the following macros: \ce, \mhchemBondDTD, \mhchemBondTD, \mhchemBondTDD, \mhchemleftarrow, \mhchemleftrightarrow, \mhchemlongleftarrow, \mhchemlongleftrightarrow, \mhchemlongleftrightarrows, \mhchemlongLeftrightharpoons, \mhchemlongrightarrow, \mhchemlongrightleftharpoons, \mhchemlongRightleftharpoons, \mhchemrightarrow, \mhchemxleftarrow, \mhchemxleftrightarrow, \mhchemxleftrightarrows, \mhchemxLeftrightharpoons, \mhchemxrightarrow, \mhchemxrightleftharpoons, \mhchemxRightleftharpoons, \pu, \tripledash