09.20.05
LatexRender Plugin
I’m trying the LaTeXRender plugin by Sixthform. Installation is easy, but at first I got no formulas, only error messages.
Using some of the hints found on the “Path problems in Linux” post, I was able to figure out what was going on.
My server’s “convert” command didn’t understand the “-trim” option. I was able to get reasonable results by using “-crop 0×0″ in the same place. That is, in the file class.latexrender.php, change this line:
$command = $this->_convert_path." -density ".$this->_formula_density.
" -trim -transparent \"#FFFFFF\" ".$this->_tmp_filename.".ps ".
$this->_tmp_filename.".".$this->_image_format;
to
$command = $this->_convert_path." -density ".$this->_formula_density.
" -crop 0x0 -transparent \"#FFFFFF\" ".$this->_tmp_filename.".ps ".
$this->_tmp_filename.".".$this->_image_format;
This doesn’t crop the image to 0×0, but trims to the smallest rectangle that includes all non-background data. See the convert man page
Here is a test:
. It does seem to crop a bit off the right of the omega character.
Another test:
.