Is there a way to include KaTeX extensions? (mhchem extension) #99
Answered
by
yhatt
vedranmiletic
asked this question in
Q&A
|
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. |
Answered by
yhatt
Apr 28, 2021
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 moduleTo 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 |
2 replies
Answer selected by
yhatt
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.