You can try combining the TeX-to-DVI tool (e.g. tex.latex2dvi or pytex ) with the DVI-to-image tool (e.g. dvipng ). To implement this on the server side, you will need an API endpoint that accepts TeX code as input and serves to output the image. Thus, you can display mathematical formulas in the form of images, pointing to their source on this URL with the appropriate parameters. It's quite complicated, but the good news is that the Google Chart Math Formulas API already provides such a service.
In any case, I would consider using MathML to display mathematical notation on the client side, since all major web browsers (except Internet Explorer) support this function in accordance with HTML5 standards. Or just enable Mathjax, for example StackExchange (this is also client-side rendering). This seems like the easiest and cross-platform alternative.
source share