views:

489

answers:

3

Hi, How can I render LaTeX stuff like

\frac{1}{2}

in a Ruby on Rails application? I mean to get an image? Thanks!

A: 

By invoking an external program that does the processing for you, such as tex2png or tex2png.pl.

Then again, for simple formulas like that, you may also wish to consider using jsmath. The next step then would be to let your users choose which version they want to see …

Christopher Creutzig
A: 
Norman Ramsey
A: 

You could always try http://www.mathjax.org/, leaving the rendering to the client!

Andrew