google / mathsteps

Step by step math solutions for everyone
https://socratic.org
Apache License 2.0
2.11k stars 276 forks source link

How to render these steps using Mathjax or something else? #256

Open rohitcoder opened 4 years ago

rohitcoder commented 4 years ago

Hi Team,

I am getting output like this one after solving one question.

But how to render these steps in web page without crafting these JSON keys/values manually?

Is there anyway to just pass steps in a function and it renders everything?

Screenshot 2020-06-07 at 12 25 44 AM

Thanks, Rohit

m93a commented 4 years ago

Don't the equations have a toTex method? Or their left and right nodes? Since this project is based on math.js, this example code could be useful for you: https://mathjs.org/examples/browser/pretty_printing_with_mathjax.html.html