-
Hi all, when I try to
I get a similar error, when I try to use commands from the mathtools-Package, for example
I have configured rehypeMathjax as follows: rehypeMathjax,
{
loader: { load: ["[tex]/mathtools", "[tex]/color", "[tex]/require"] },
tex: {
inlineMath: [
["$", "$"],
["\\(", "\\)"],
],
packages: { "[+]": ["mathtools", "color", "require"] },
},
}, Any ideas? :) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Welcome @mzietlow! 👋 Some sandbox starters:
|
Beta Was this translation helpful? Give feedback.
-
Hi @ChristianMurphy, thank you for getting me started with the sandboxes :) Initially, I was using the following setup: const file = await unified()
.use(remarkParse)
.use(remarkMath)
.use(remarkRehype)
.use(rehypeMathjax, {
loader: { load: ['[tex]/mathtools', '[tex]/color', '[tex]/require'] },
tex: {
packages: { '[+]': ['mathtools', 'color', 'require'] },
},
})
.use(rehypeStringify)
.process(sourceMarkdown); But by tinkering a little, I found out that all of it was unnecessary. Unlike my experience with <script type="text/javascript" id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script> rehypeMathjax seems to include mathtools out of the box already. Thus, the following config suffices const file = await unified()
.use(remarkParse)
.use(remarkMath)
.use(remarkRehype)
.use(rehypeMathjax)
.use(rehypeStringify)
.process(sourceMarkdown); And while # example
$\\bigtimes$ do work and also $\\newcommand{\\given}[0]{\\mid}$
$P(A\\given B)$ works like a charm :) Now I'm left wondering, why my initial configuration led to such strange behavior - but happy that it works 😌 |
Beta Was this translation helpful? Give feedback.
Hi @ChristianMurphy, thank you for getting me started with the sandboxes :)
I am using quartz and did not have any exposure to remarkjs before.
Initially, I was using the following setup:
But by tinkering a little, I found out that all of it was unnecessary. Unlike my experience with