Documentation comparing math plugins #39647
Unanswered
coreylionis
asked this question in
Ideas / Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
After two days of hard work, I managed to get .mdx documents with Katex segments to render correctly using gatsby-plugin-mdx extended with gatsby-remark-katex. This process was confounded by the lack of a clear recommendation or comparison across various forums and template sites: some people recommend remark-math and rehype-katex, some recommend gatsby-remark-katex, and there is also a gatsby-transformer-katex. Gatsby-remark-katex first worked for me once I had updated gatsby-config and gatsby-node to ESM, but this wasn't mentioned in the discussions of gatsby-remark-katex I found.
It seems that gatsby-remark-katex is the supported version, and mdx compatibility means it aligns with the tutorial documentation.
I think it would be best to consolidate current information about choosing a math parser into a separate blog post: recommendations would cover basic setups which are known to work/not to work, and which to preference over the other.
(it would also be nice to get some insight on gatsby-plugin-mdx not accepting remark-math and rehype-katex within mdxoptions. Using the GraphiQL layer I found that the strict : ignore option passed with rehypeKatex was associated with gatsby-plugin-mdx but the remark and rehype plugins were removed)
All reactions