ShaMan123 / react-native-math-view

Math view for react native! No WebView!
https://github.com/ShaMan123/react-native-math-view
MIT License
77 stars 24 forks source link

The lib does not correctly render some latex types that are normally rendered by MathJax #92

Open GleidsonDaniel opened 11 months ago

GleidsonDaniel commented 11 months ago

Describe the bug If you pass the latex directly to lib via props, for example, the lib will crash. If you pass the latex manually, the lib works, but it renders the wrong latex.

LaTeX Latex: \[\tiny A\, \scriptsize A \, \small A \, \normalsize A \, \large A \, \Large A\, \LARGE A \, \huge A \, \Huge A\] Escaped Latex: \tiny A\, \scriptsize A \, \small A \, \normalsize A \, \large A \, \Large A\, \LARGE A \, \huge A \, \Huge A

Expected behavior 268870577-83ab3d13-0a06-450c-a3b4-89d574bf8263

What is rendered: Screenshot 2023-09-19 at 11 06 49

Error when i pass the value as prop: Screenshot 2023-09-19 at 11 08 03

Related: https://github.com/RocketChat/Rocket.Chat.ReactNative/issues/5215

ShaMan123 commented 11 months ago

seems to me you are not escaping the values properly

https://github.com/ShaMan123/react-native-math-view#troubleshooting

GleidsonDaniel commented 11 months ago

In this example I sent, what would be the correct escaping? Because as I said, playing it directly on the web it returns correctly.

ShaMan123 commented 11 months ago

I have attached the link that explain exactly what to do

GleidsonDaniel commented 11 months ago

I think you didn't understand what I said. Currently we already use your lib to render Katex, the escape of other katex works normally. Only this specific one that doesn't work.

ShaMan123 commented 11 months ago

If mathjax manages then this repo should also because it uses mathjax. Maybe the version is outdated. Try updating and building

ShaMan123 commented 11 months ago

Also maybe you need to define these macros

AASHIK-2512 commented 7 months ago

will you please help me related to RNMathVIew not found in UI Manager error. what if the problem and what to do ?