I was just curious as to whether or not there's a library that converts mathematical expressions (non latex) to crisp looking images like wolfram alpha does.
For example, (n^2+5x+3)/n should output this.
Begin here. But as it looks, it's not too simple to achieve this and in MathML, you can just show the formulas in the Browser, but not render it to images. Remember that the whole Mathematica software framework, which is extremely powerful and for sure has builtin functionality for such things, stands behind WolframAlpha.
EDIT: https://math.stackexchange.com/ does it too (MathML)., e.g. this post. Ask them how they do it (on meta).
EDIT again: tadaaaa, just what you needed http://www1.chapman.edu/~jipsen/mathml/asciimath.html