Is there a library for rendering mathematical equations? The way Microsoft Word Equation Editor works.

I looked at Wikipedia's LaTeX images and Firefox MathML renderer and both seem to produce good equations, but what does it take to render those?

Printable View

- 01-31-2009gloRendering math equations
Is there a library for rendering mathematical equations? The way Microsoft Word Equation Editor works.

I looked at Wikipedia's LaTeX images and Firefox MathML renderer and both seem to produce good equations, but what does it take to render those? - 02-01-2009scwizzo
Are you talking about graphing equations? I made a program for graphic parametric equations for a course i took and it's roughly 1300 lines of code, although it cannot plot very sophisticated equations, it'll still plot sin/cos functions. If you want to see if it's in my signature. Also, I do not know of any library that is specifically used for plotting functions, sorry I can't be of any help there.

- 02-01-2009glo
Hi scwizzo,

I'm after rendering mathematical expressions as in

Code:`4^2`

--- = 8

2

- 02-01-2009Perspective
What is the application? LaTeX is great but it's better suited for static output. You quite literally have to compile the expression and generate an output file (ps, eps, pdf, etc...). Then you can render the output file using a regular rendering library.

If you want something more dynamic (like an editor) LaTeX probably isn't a great idea. I'm not sure how MathML rendering works. - 02-01-2009glo
I need it dynamic to some extent - although I won't need to edit expressions in a WYSIWYG manner, I do want to be able to pass a LaTeX like syntax string to a function and be able to render it.

This should allow me to render math expressions on say, a wxWidgets application. - 02-01-2009Perspective
Well if you don't mind a delay, just generate a latex expression from whatever the application input is, write it to a file, fork off a latex command to generate an ps file, then use a ps library to render the resulting file in your window.

Basically all of the hard parts are handled for you, you just need to write the code that glues it all to your application. - 02-01-2009glo
Yes it seemed like a way to do it at first, only then I realised that I'll need a TeX engine that weighs hundreds of mbs?

- 02-01-2009Perspective
or assume one exists on the system and just list it as a dependency. For linux, all major distros will have a latex package in their source tree. For windows, an extra couple hundred megs is good punishment :P