Files
KaTeX/contrib/mhchem
ylemkimon c387b9c747 v0.12.0 release (#2302)
* Release v0.12.0

Bump master to v0.12.1-pre

* Update CHANGELOG

* Uncomment ES module documentation

* Update CHANGELOG.md

Co-authored-by: Erik Demaine <edemaine@mit.edu>

* Update CHANGELOG.md

Co-authored-by: Erik Demaine <edemaine@mit.edu>
2020-07-13 05:46:01 +09:00
..
2018-11-24 18:52:25 -05:00
2018-11-24 18:52:25 -05:00
2020-07-13 05:46:01 +09:00

mhchem extension

This extension adds to KaTeX the \ce and \pu functions from the mhchem package.

Usage

This extension isn't part of core KaTeX, so the script should be separately included. Write the following line into the HTML page's <head>. Place it after the line that calls katex.js.

<script src="https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/contrib/mhchem.min.js" integrity="sha384-5gCAXJ0ZgozlShOzzT0OWArn7yCPGWVIvgo+BAd8NUKbCmulrJiQuCVR9cHlPHeG"></script>

Syntax

See the mhchem Manual for a full explanation of the input syntax, with working examples. The manual also includes a demonstration box.

Note that old versions of mhchem.sty used \cf for chemical formula and \ce for chemical equations, but \cf has been deprecated in place of \ce. This extension supports only \ce. You can define a macro mapping \cf to \ce if needed.

Browser Support

This extension has been tested on Chrome, Firefox, Opera, and Edge.