Click here to Skip to main content
15,886,816 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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

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/[^].
 
Share this answer
 
Comments
ChineseGuy 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
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.
 
Share this answer
 
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/[^].
 
Share this answer
 
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.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900