Hi,
  I just searched for some LaTex stuff, and I found this http://goessner.net/articles/wiky/ .

   Wiky is a clientside Wiki markup to HTML converter written in javascript. As it is bidirectional, it can convert Wiki markup to HTML and later convert that generated HTML text back to Wiki markup. Optionally Wiky will create math formulas from a simple notation similar to LaTeX.

It may be great to make inline math editor.
Or another option how to get latex math syntax is JSPWiki Math Plugin. It is written in pure java.

Honza