fast-reflexes / better-react-mathjax

MIT License
124 stars 16 forks source link

I am having problem displaying inline math inside the paragraph text #29

Closed PrimozRome closed 1 year ago

PrimozRome commented 1 year ago

Hello,

I am trying to display inline math but looks like I am doing something wrong. I wrap entire HTML content that comes from a database into <MathJaxContext> and <MathJax> objects like this:

{myHtml}

This is my source HTML from the CMS:

Screenshot 2022-10-18 at 09 28 59

And this is the render result:

Screenshot 2022-10-18 at 09 28 09

How do I need to wrap my inline math inside paragraph to render correctly?

PrimozRome commented 1 year ago

Oh I have figured out that correct inline synthax is \(MATH_HERE)\. Works greatly, thanks!