MatejBransky / react-katex

Display math in TeX with KaTeX and ReactJS
https://codesandbox.io/s/github/MatejMazur/react-katex/tree/master/demo?fontsize=14&hidenavigation=1&module=%2Fsrc%2FExample.tsx&theme=dark
MIT License
147 stars 12 forks source link

Inline Latex parsing #96

Open nitin-deligence opened 3 years ago

nitin-deligence commented 3 years ago

Is there any way to parse latex inside a text paragraph through component.

ex: "Solve this: $$c = 2\sqrt{3}$$"

I can do this through katex but don't find any way to achieve this using component, I don't know where and how many times Latex will be added in a paragraph so I'm wondering how to get this using component.

paulsohn commented 2 years ago

Maybe you're looking for a markdown parser so that you can say which part of the paragraph is the latex. for example, remark with remark-math plugin gives you a syntax tree which contains $-chunks(in your case, c=2\sqrt{3}), and you want to render them using this package.