This looks really well fleshed out - http://asciimath.org/ Could add this in so that a user could input a math equation either through MathQuill, LaTeX or plain text via this library