Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

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

Open
dnlsilva opened this issue Sep 19, 2023 · 7 comments

Comments

@dnlsilva
Copy link

dnlsilva commented Sep 19, 2023

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:
RocketChat/Rocket.Chat.ReactNative#5215

@ShaMan123
Copy link
Owner

seems to me you are not escaping the values properly

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

@dnlsilva
Copy link
Author

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
Copy link
Owner

I have attached the link that explain exactly what to do

@dnlsilva
Copy link
Author

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
Copy link
Owner

ShaMan123 commented Sep 19, 2023

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

@ShaMan123
Copy link
Owner

ShaMan123 commented Sep 19, 2023

Also maybe you need to define these macros

@AASHIK-2512
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants