Rendering LaTeX to an image
Look at dvipng. I wouldn't write a wrapper over it in C but in a scripting language.
Try:
- TeX2PNG - generate png image for given equation
- MathJax - JavaScript library that find and render math equations in HTML
- KaTeX - lighter and a little bit less capable alternative to MathJax
If it's not a high-traffic website, you can try online rendering with sites like the Online LaTeX Equation Editor. In particular, this site allows you to put LaTaX directly into the URL like the following:
The URL being: http://latex.codecogs.com/gif.latex?\sum_k%20a_k