Skip to content

mathtools and require in rehypeMathjax? #1224

Answered by mzietlow
mzietlow asked this question in Q&A
Discussion options

You must be logged in to vote

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:

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/…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by ChristianMurphy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants