Rate this:
See more:
\frac{x+y}{x-y}
for example,I want to convert the latex code above to a picture that
contaions a fraction（numerator：x+y denominator:x-y）

I have found some source code of big Latex Editor with a lot of funtions
but I want a source code of a simple Latex Editor(c/c++，windows)
thanks.
Posted 27-Aug-12 18:40pm

Rate this:

## Solution 1

TeX2PNG (http://www.nawouak.net/?cat=informatics.tex2png+lang=en[^]) is a tool for converting a LaTeX formula into a PNG image. It is written in C++ and uses classical software of Linux distributions: LaTeX, GhostScript and NetPBM (more precisely the programs pnmtopng and pnmscale).

And you can use http://www.forkosh.com/mimetex.zip[^]. The source code was written in C.

At least you can see http://habrahabr.ru/qa/17294/[^].
ChineseGuy at 28-Aug-12 10:29am

mimetex is good,it doesnt need any extra library,but it seems to be a huge project
Is the whole mimetex for generating math formula? or it does something peripheral that takes up most of the code
Rate this:

## Solution 2

Usually, the LaTeX is used to create documents and for these purposes you should setup MikTeX or another TeX system. If you want to create only the formula, then you should consider the type of problem to be solved. For sites with dynamic content, it is advisable to use a modules like MathJs, jsMath or online servises that provide the conversion (see http://www.codecogs.com/latex/eqneditor.php[^]).

In applications, the generation of formulas is rarely necessary.To display the formulas used images. If you need a good quality pictures use vector images. And if you create a control to display graphs, it is advisable to look for a ready-made solution from the Internet. By the way, to generate formulas the mimetex is not so huge.
Rate this:

## Solution 3

You could also use MathML, there is a library that can render it: http://nugeneqml.codeplex.com/[^]. And you can use this one to convert from latex to MathML: http://latex2mathml.codeplex.com/[^].
Rate this:

## Solution 4

Notice nobody LaTeX does not overwrite its just execute. Use MathML is not always a good way out of this situation. Although in some situations, you could use it, for example when programming applications for browser or Microsoft Office or if you use MFC project with HTML Dialogs.

 0 Sergey Alexandrovich Kryukov 345 1 OriginalGriff 210 2 DamithSL 210 3 Kornfeld Eliyahu Peter 210 4 Peter Leow 95
 0 OriginalGriff 7,215 1 DamithSL 5,199 2 Maciej Los 4,866 3 Sergey Alexandrovich Kryukov 4,757 4 Kornfeld Eliyahu Peter 4,514

Web02 | 2.8.141223.1 | Last Updated 28 Aug 2012