Coder Social home page Coder Social logo

Comments (6)

ShaMan123 avatar ShaMan123 commented on May 20, 2024 2

Thanks @pkra for the clear and accurate comment.
Rendering math is tough, lots of workarounds are used getting this lib working.

from react-native-math-view.

hypnocill avatar hypnocill commented on May 20, 2024 1

Thank you very much for the answers!

from react-native-math-view.

ShaMan123 avatar ShaMan123 commented on May 20, 2024

Hi, you should define macros so mathjax knows what to do.
Also it is likely you need to escape backslashes (\\).
Refer to this commit: 6556598

from react-native-math-view.

ShaMan123 avatar ShaMan123 commented on May 20, 2024

for example

<MathView
   config={{ macros: {
                'placeholder': ''
            }}
/>

from react-native-math-view.

hypnocill avatar hypnocill commented on May 20, 2024

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.
We searched for 'exponentialE' in the mathjax's react native lib source code and it seems to be present in a few places yet it doesn't render.
Our issue is that with macros we can't be sure that we'll render all tags that could possibly come from cortexjs and it's very important for us to be sure that we can render the latex properly.

from react-native-math-view.

pkra avatar pkra commented on May 20, 2024

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.

from react-native-math-view.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.