rdesign/frontend/node_modules/katex/contrib/mhchem
Jeff Emmett 80f1e96e6b Fix frontend build: type errors, SDK handling, docker context
- Use jq to cleanly remove encryptid SDK from package.json in Docker
- Fix TypeScript strict mode errors in dashboard and assistant
- Add .dockerignore to exclude node_modules from build context
- Use project root as Docker build context for frontend
- Fix Traefik routing: separate frontend/api/studio paths

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 02:21:52 +00:00
..
README.md Fix frontend build: type errors, SDK handling, docker context 2026-03-24 02:21:52 +00:00
mhchem.js Fix frontend build: type errors, SDK handling, docker context 2026-03-24 02:21:52 +00:00

README.md

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, and if you make use of the auto-render extension, place it before the line that calls auto-render.js.

<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.40/dist/contrib/mhchem.min.js" integrity="sha384-fB8BH//9nBzROkMUsu/Dr35jWHIbnKesUo9rW0hfEgw8mZGnkAyBAjKX9F98OVuo"  crossorigin="anonymous"></script>

If you remove the defer attribute from this tag, then you must also remove the defer attribute from the <script src="https://../katex.min.js"> tag.

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.