Comments (10)
I tried with remark-math
and rehype-katex
and I don't see any error: https://stackblitz.com/edit/github-hdma5n?file=docusaurus.config.js,docs%2Fintro.md&initialpath=docs/intro
Make sure the versions you are using work with mdx v2. If you are still having problems, post a stackblitz example and I'll take a look.
from docusaurus-mdx-2.
Also, make sure to escape any opening braces {
that aren't part of expressions. See here: https://mdxjs.com/docs/troubleshooting-mdx/#could-not-parse-expression-with-acorn-error
from docusaurus-mdx-2.
@pomber Interesting, on my setup your example is showing that equations still aren't being parsed into katex.
I'll try some things and then post a stackblitz example.
from docusaurus-mdx-2.
Still can't get any of our other remark plugins are able to work either it seems.
Stackblitz here:
https://stackblitz.com/edit/tdocs?file=docusaurus.config.js
from docusaurus-mdx-2.
Seems related to your comment here:
facebook/docusaurus#4029 (comment)
from docusaurus-mdx-2.
Using remark directives would also be helpful for us.
from docusaurus-mdx-2.
Seems related to your comment here:
Admonition doesn't work with mdx v2. Math and katex should work (according to the remark-math docs).
But I'm not familiar with those plugins. I don't see any error, and I don't know what's the expected output. It would help if you could provide an example with the correct output (maybe using another framework that support mdx v2, like nextjs).
from docusaurus-mdx-2.
I found an example of what Katex math equations should look like using next.js mdx2, rehypeKatex and remarkMath:
https://codesandbox.io/s/next-mdx-math-katex-vd1qx?file=/package.json
Let me know if you need anything else.
from docusaurus-mdx-2.
I updated the plugins in your example
"rehype-katex": "^6.0.2",
"remark-math": "^5.1.1"
Looks like it works now https://stackblitz.com/edit/tdocs-vjasmd?file=docs%2Findex.mdx
from docusaurus-mdx-2.
Awesome! Thank you for your help!
from docusaurus-mdx-2.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docusaurus-mdx-2.