harunurhan / react-latex-next

Render LaTeX in React apps
https://react-latex.netlify.app
91 stars 17 forks source link

Curly braces conflict #43

Closed nahasco closed 1 year ago

nahasco commented 1 year ago

Not sure why I a missing here but LateX has curly braces and these conflict with React since React sees curly braces as variables.

For example:

% \f is defined as #1f(#2) using the macro \f\relax{x} = \int_{-\infty}^\infty \f\hat\xi\,e^{2 \pi i \xi x} \,d\xi

Will not work.

harunurhan commented 1 year ago

You should be able to avoid this by having your LaTex as a string literal?

<Latex>{'my LaTeX string with { and }'}</Latex>

Btw overall your LaTeX seems incorrect apart from this issue.

nahasco commented 1 year ago

That's right.
Thank you for the great package!