Convert LaTex math expressions to PNG images
1, Install Essential Softwares
We need 3 softwares: LaTex, GhostScript and ImageMagic. To install on Ubuntu, just execute in terminal:
sudo apt-get install texlive-latex-base sudo apt-get install ghostscript sudo apt-get install imagemagick
You can install them on other linux distributions with little different commands.
2, Use L2P Script
The L2P website is here. It is a perl script, you can run it on any linux OS with perl installed. Click here to download L2P. Then untar it:
tar xvfz l2p-1.1.1.tgz cd l2p-1.1.1
you are now in the L2P dir and you will see the file l2p executable. try this:
./l2p -i '$4x^2-7=\cos{2 \pi x}$' -o 'eqn4.png'
If you get nothing wrong, you will see the file eqn4.png in the current directory. Type this to view the image:
eog eqn4.png
If you see a math expression, you did it.
转载请注明:来自pugWoo's Life
本文地址:http://www.pugwoo.com/2010/02/16/latex-to-png.html
8 条评论
我要留言