1
$\begingroup$

We would like to generate simple mathematical formulas on the fly (e.g. $\sin^2 \theta$). The above function seems to be a MathJaX representation. Most of the solutions depend on writing mathematical equations using MathML or Latex or jsMath or MathJaX. I am assuming MathJaX would be the right solution to use if you are planning write these equations right now and most of these solutions get embedded as javascript directly.

Is there a way to generate these equations on the server side using a language like Java assuming the application logic provides a mechanism to embed them in the HTML. What kind of solutions are available if we have to go down this path.

I am a complete novice on this subject, looking for inputs so that we choose the right solution.

  • 0
    I would try to avoid generating static images, since I need to figure out a mechanism to store / host this information in my server which is additional maintenance for me.2011-01-05

1 Answers 1

3

There are two parts to the problem: how to express the mathematics and how to convert that expression into a visual representation. For the first part, how to express the mathematics, LaTeX is probably the easiest choice. For the second part, the benefit of something like MathJax is that it puts the work of doing the displaying on the client side, which is essentially the same as any web page—the server provides marked-up content, the client renders it. I suspect that it's also easier to work with quirks of different browsers with a client-side solution, but I don't know for sure. There are ways to render LaTeX on the server side, delivering images files (I know there's an extension for MediaWiki that does this), the results I've seen from it do not match the surrounding text as well as MathJax.