Is there a way to include KaTeX extensions? (mhchem extension) #99
-
I looked into <script defer src="https://cdn.jsdelivr.net/npm/katex@0.13.3/dist/contrib/mhchem.min.js" integrity="sha384-LIgAiYlGSAdpNC9+YDjDPF6JeS/RRIumtNo0CmyQERZ/+g0h9MbuYQwf/5pQ4Y4M" crossorigin="anonymous"></script> I also tried using MathJax, but it also requires specifying mhchem as an extension. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Marp's markdown rendering will be completed within Node.js. In Marp CLI: // marp.config.js
const katex = require('katex');
require('katex/dist/contrib/mhchem.js'); // modify katex module To modify Marp Core's KaTeX, you may be required installing into local. npm i @marp-team/marp-core @marp-team/marp-cli
npx marp -c marp.config.js your-markdown.md |
Beta Was this translation helpful? Give feedback.
Marp's markdown rendering will be completed within Node.js.
<script>
is for browser side so will never work. Instead, you should follow KaTeX documentation for Node.js: https://github.com/KaTeX/KaTeX/blob/master/docs/node.md#using-mhchem-extensionIn Marp CLI:
To modify Marp Core's KaTeX, you may be required installing into local.