josdejong/mathjs — pull request #112 by bpostlethwaite (2013-11-22 03:57:48+00:00)
Title: add prettyprinting of math expressions utilizing scope

This is a code demo for this recently [open issue](https://github.com/josdejong/mathjs/issues/111). I needed expression pretty printing and dealing with the mathjs nodetree seemed a good route. This isn't a serious patch, but it has accompanying tests and doesn't interfere with the existing codebase, rather calling `math.prettyprint(expr[, scope])` just cycles through the instances of SymbolNodes and OperatorNodes and adds a prettier `toString()` instance method to each which effectively override the Prototype toString methods.

We'll be using it over at [Plotly](https://plot.ly/)

Thanks for the great work!