Version 2 (modified by 19 years ago) (diff) | ,
---|
Render Latex formula to image
Notice: This plugin is unmaintained and available for adoption.
Description
Render a latex formula to an image using Latex, dvips, and ImageMagick.
The images are named based on a sha1 hash of the formula and parameters, so that images don't have to be regenerated every time they are viewed.
In order to create the image from the formula text, the following is performed:
- create .tex file in temporary directory
- run latex on .tex file to produce .dvi file
- run dvips on .dvi file to produce .eps file
- run convert on .eps file to produce .jpg file
If the image doesn't exist, I get an internal error after the first run. But then the second time everything is good. The only error in the logs is this:
... malformed header from script. Bad header=This is TeX, Version 3.14159 (: /home/httpd/vhosts/default/cgi-bin/trac.cgi
I don't know what's causing the problem. If you hit preview after entering a formula, you'll get an internal error page. Hit back and hit preview again and then it works.
Bugs/Feature Requests
There is one known bug, see the description above.
Existing bugs and feature requests for LatexFormulaMacro are here.
If you have any issues, create a new ticket.
Download
Source
You can check out the source for LatexFormulaMacro from Subversion at http://trac-hacks.swapoff.org/svn/latexformulamacro.
Example
[[formula(100| \mat{R'\\G'\\B'} = \mathbf{A} \mat{R\\G\\B} + \mathbf{x})]]
Author/Contributors
Author: vgough
Contributors:
Attachments (1)
-
matrixequation.png (727 bytes) - added by 8 years ago.
Matrix equation
Download all attachments as: .zip