Error in toTex?
Closed this issue · 2 comments
websimon commented
Hi, thanks for this library, really nice. I´m trying to build an equation solver for students and noticed something with the toTex() method.
var expr = new Expression("x").multiply(new Fraction(-9,10));
expr.toString()
"-9/10x"
expr.toTex()
"-\frac{-9}{10}x" (notice the "-" before \frac)
Maybe I´m doing something wrong or is it something wrong with how the toTex method work?
nicolewhite commented
Looks like a bug to me. I'll investigate.
nicolewhite commented
Fixed! Thanks for the heads up. If you don't want to wait until we release these changes to npm / the bundle available on http://algebra.js.org, you can build the latest yourself:
https://github.com/nicolewhite/algebra.js#latest-development-release