General ⇒ Extracting Latex source from .png
Extracting Latex source from .png
does anybody know you can extract the latex coding from the equations which are all in .png format??
thanks, this would be an enormous help
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Re: Extracting Latex source from .png
Best regards
Thorsten¹
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Extracting Latex source from .png
i found this on the net form here http://www-cdf.fnal.gov/~cplager/latex/#png
Code: Select all
Extracting Latex source from .png File
To get the source code out of a png file that has been made with tex2png.pl, you use the script itself:
cplager@Fcdflnx4> tex2png.pl -extract example.png
Extracting tex source from example.png to example.tex
or
cplager@Fcdflnx4> tex2png.pl -extract example.png savetexhere.tex
Extracting tex source from example.png to savetexhere.tex
or even this
http://www.fauskes.net/nb/htmleqII/
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Extracting Latex source from .png
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Extracting Latex source from .png

- Stefan Kottwitz
- Site Admin
- Posts: 10335
- Joined: Mon Mar 10, 2008 9:44 pm
Extracting Latex source from .png
I believe if you want to write LaTeX code, you will have to learn it. Of course it could save some time if you could convert those png images, but it does'nt require much knowledge to set common formulas.
Usually png files store all information with bitmap data, just pixels, plus some metadata. From the pixels you cannot reproduce the corresponding LaTeX code, at least I don't know a program that's able to do expression recognition this way.
The mentioned tex2png.pl puts latex code into the image as metadata. Very good, because you are able to extract the original LaTeX code later. But I'm afraid that will not help you, if the png files you need are not created this way.
I just ran pngmeta with one file, that was created by tex2png.pl, and one from that website. The first had LaTeX metadata inside, the other had not.
Stefan
Extracting Latex source from .png
I believe if you want to write LaTeX code, you will have to learn it.
lol, thankyou for your help, i feared as much
however i am wondering if i can copy and paste from wikipedia? is this possible?
- Stefan Kottwitz
- Site Admin
- Posts: 10335
- Joined: Mon Mar 10, 2008 9:44 pm
Re: Extracting Latex source from .png
mathmatical wikipedia articles use TeX Syntax. You can click on edit and see the embedded formulas between <math> ... </math> tags. This way you can get their TeX source code.
Stefan
Re: Extracting Latex source from .png
- Stefan Kottwitz
- Site Admin
- Posts: 10335
- Joined: Mon Mar 10, 2008 9:44 pm
Re: Extracting Latex source from .png
Stefan