Add a function for printing equations in LaTeX
evykassirer opened this issue · 15 comments
We can print equations to asciimath, but there's no one function call for LaTeX.
It would live in https://github.com/socraticorg/mathsteps/blob/master/lib/equation/Equation.js below print
and look like:
this.leftNode.toTex() + this.comparator + this.rightNode.toTex()
If we particularly wanted to, there is an npm module just for conversion between the two.
Ah, cool find!
MathJS's toTex function is probably most accurate for printing the tree exactly as it is, and since it's a one line addition I'd rather use it :)
Oh alright, that's probably simpler than lol.
We
can print equations to asciimath, but there's no one function call for LaTeX.
It would live in https://github.com/socraticorg/mathsteps/blob/master/lib/equation/Equation.js below print and look like:
this.leftNode.toTex() + this.comparator + this.rightNode.toTex()
where below print?
I think I was talking about line 16 https://github.com/socraticorg/mathsteps/blob/master/lib/equation/Equation.js#L16
I can't make it work @evykassirer
can you give me a bit more details with what's going wrong? What have you tried and what isn't working?
I'll see what I can do to help
Just writing to let someone know that I'd like to work on this.
great @SirFurness ! Thanks so much for your interest and for getting involved :D
@physedo was already working on this though and very recently (just yesterday). I'd like to give people already working on things priority. I'll add the assigned label now, I had forgotten to do that
I'll give them another 5 days to let us know if they still want to work on this, and if they don't respond then it's all yours! (and I'll look at your PR at that point). How's that sound?
Also if you'd like to jump on something else feel free to take a look around open issues or chat with me about a refactoring thing we're gonna start again on soon :)
Sounds great! It's my fault for just going for it, but I enjoyed doing it anyway so it's all good.
You can take this @Sirfurness
Is it working now @SirFurness
yay ok! glad you enjoyed it :) will take a look at the PR soon - am at a conference this week so it might take a few days