Click here to Skip to main content
14,208,191 members
Rate this:
Please Sign up or sign in to vote.
See more:
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)
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

TeX2PNG ([^]) 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[^]. The source code was written in C.

At least you can see[^].
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
Rate this: bad
Please Sign up or sign in to vote.

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[^]).

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: bad
Please Sign up or sign in to vote.

Solution 3

You could also use MathML, there is a library that can render it:[^]. And you can use this one to convert from latex to MathML:[^].
Rate this: bad
Please Sign up or sign in to vote.

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.

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

Advertise | Privacy | Cookies | Terms of Service
Web04 | 2.8.190612.1 | Last Updated 28 Aug 2012
Copyright © CodeProject, 1999-2019
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100