I would like to generate an image file showing some kind of mathematical expression, taking a string like "(x + a) ^ n = Σ_ (k = 0) ^ n" as input and getting more image file as output. For example, AFAIK material is used on Wikipedia. Is there any java libraries that can do this?
Or maybe I'm using the wrong approach. What would you do if you wanted to include the insertion of formulas from MS Word into an HTML document? I would ask the user to just take a screenshot myself, but that would be a lazy way ^^
Edit: Thanks for the answers so far, but I really don't control the input. What I get is some messy Word-style formula, not pure latex formatting.
Edit2: http://www.panschk.de/text.tex Looks a bit like LaTeX, right? What I get when I do this is clipboard.getContents(RTFTransfer.getInstance()) after pasting the formula from Word07.
source share