-
-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some LaTeX symbols not rendering #56
Comments
Hi, you should define macros so mathjax knows what to do. |
for example <MathView
config={{ macros: {
'placeholder': ''
}}
/> |
The macros work but they are virtually the same as 'find and replace'. And the issue remains - we can't be sure we've caught all unknown tags that come from the https://cortexjs.io/mathlive/demo/ library. |
Random bystander here. Both mathlive and mathjax are completely separate systems, even if both use TeX-like syntax (and TeX itself is different still). If you use one tool for authoring and another for rendering, you're bound to run into such issues. The relevant docs are http://docs.mathjax.org/en/latest/input/tex/macros/index.html and https://cortexjs.io/mathlive/reference/commands/. You can diff them and create all missing macros -- or do the community a favor and create a proper MathJax extension. |
Thanks @pkra for the clear and accurate comment. |
Thank you very much for the answers! |
I'm using MathView to render LaTeX exported from https://cortexjs.io/mathlive/demo/. It works well for the most part but some symbols are not rendering (see screenshot). They appear in the same way in the www.mathjax.org/#demo - red, without proper rendering.
Example troublesome latex would be: \exponentialE\imaginaryI\pi - it renders well in cortexjs but doesn't in react-native-math-view
Is there a way to render those symbols properly? Or to add them to the library myself and instruct the library how to render them, if needed?
Also, a latex with coloring exported from cortejx like so: \colorbox{#fff1c2}{[ \textcolor{#63b215}{x+42\operatorname{sign}(\placeholder{⬚})} ]}
It results in an error - '[' is only supported in math mode. If I wrap the whole latex with '$' for math mode - it results in another error - '#' macro is not supported in math mode.
Currently I do: replaceAll(String.raw
\[
, '$') and for the other symbols that don't render like \exponentialE -> e before passing the latex to the mathview which works but seems like a bad workaround.In conclusion - is there a good way to safely and reliably render the output from https://cortexjs.io/mathlive/demo/ in react-native-math-view without using workarounds like find and replace?
.
The text was updated successfully, but these errors were encountered: