1

I'd like to convert expressions like these:

"a*x^2+b*x^2+c+d"...

"log((a*x)/sin(x))"...

"1/x"...

Into MathML using JavaScript. Any suggestions? The closest I found was ASCIIMathML (http://www1.chapman.edu/~jipsen/mathml/asciimath.html) but that's not the notation I'm looking for exactly.

2 Answers 2

2

The most modern extensive javascript library for MathML is mathjax http://www.mathjax.org/ although it's input syntax is more TeX-like than asciimath's (the latest version of mathjax can also parse asciimath input)

Sign up to request clarification or add additional context in comments.

1 Comment

FWIW, mathjax supports asciimathml just fine.
2

You might also look at my jqMath JavaScript library at http://mathscribe.com/author/jqmath.html - it's like MathJax, but simpler, smaller, and faster. If you know LaTeX and want its full power for advanced mathematics, and don't mind if pages load more slowly, then use MathJax. But for examples like yours, jqMath should be fine. In your examples, just omit the *s for multiplication, use \log and \sin, and use { } instead of ( ) for grouping when you don't want to show visible parentheses. You can try this out at the page I linked to above.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.