Skip to content
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

Is this library compatible with mathJS? #31

Open
corinnaSchultz opened this issue Jun 16, 2020 · 1 comment
Open

Is this library compatible with mathJS? #31

corinnaSchultz opened this issue Jun 16, 2020 · 1 comment

Comments

@corinnaSchultz
Copy link

I'm interested in finding out if I can use fromLatex() in combination with toString() to get a suitable input for mathJS.

Are these libraries compatible? Has anyone tested them for compatibility?

Example:

import { create, all } from 'mathjs'
math = create(all, {})
exp = MathExpression.fromLatex(myLatexMathString)
expStr = MathExpression.toString(exp)
evaluatedMath = math.evaluate(expStr)

@markhats
Copy link

This should be possible, although you can also evaluate without using math.js e.g.

const exp = MathExpression.fromLatex(myLatexMathString)
const evalFunc = exp.f()
const result = evalFunc([scope])

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

No branches or pull requests

2 participants