-
Notifications
You must be signed in to change notification settings - Fork 207
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
algebra manipulation tool #1083
Comments
You might want to check out https://github.com/josdejong/mathjs/ for parsing and manipulation/computation. Then you can "pretty print" via |
oh thank you for getting back to me! i had tried something like that originally, but i could not find a way to map the MathJax expression elements in the browser to the math expression tree in mathjs. i was able to catch mouse events from the MathJax expression on the web page, which is expressed is a tree in the dom, but that "dom tree" is not isomorphic to the tree in mathjs tree. my workaround was to break the expression out into all the sub-elements, but that does not feel like a great UI. :( now that i am writing this, i realize i asked the wrong question, i think the better question would be: can i map mouse events in the dom to nodes, to nodes the math expression tree, be that mathjs or maybe MmlTree? |
Ah ok, now I understand why you were asking about SRE's annotation - it overlays a similarly "orthogonal" informational structure on top of the visual format. I don't usually think of SRE's tree as suitable for computational work but if you have enough control over the input, then maybe you can use SRE's tree (which is exposed as data attributes) to reconstruct enough information.
The MathJax team will know best but I don't think that's doable without preparing the input yourself, e.g., adding data attributes (which MathJax will then preserve in its output). Maybe the mathjs people have an idea on how to generate something suitable; their docs on customizations include several |
a while back, i worked on an algebra manipulation tool, algebranch that used older MathJax. sadly the prototype is now way out of date and broken, but it gives you some idea of what i'm shooting for. i'd like to take another crack at it, and strongly suspect that MathJax has done a lot of the work to make this easier for me, but i can't seem to find my way to getting underway on the project. the API doc is a bit thin. :(
what i need to be able to do is:
x = 2 * y
into an math expression tree, maybe an MmlTree?my questions:
thanks for any help getting started here.
The text was updated successfully, but these errors were encountered: