This site is a showcase for using LatexRender for mathematics in WordPress

Using LaTeX in WordPress

Image Transparency Bug

Saturday 17th March 2007

Filed under: — Steve @ 4:14 pm

Some versions of ImageMagick fail to process the transparency command properly. If you find that this is causing problems for you then in class.latexrender.php remove the transparency command

-transparent "#FFFFFF"

so

// imagemagick convert ps to image and trim picture
$command = $this->_convert_path." -density ".$this->_formula_density." -trim -transparent "#FFFFFF" ".$this->_tmp_filename.".ps ".$this->_tmp_filename.".".$this->_image_format;

becomes

// imagemagick convert ps to image and trim picture
$command = $this->_convert_path." -density ".$this->_formula_density." -trim ".$this->_tmp_filename.".ps ".$this->_tmp_filename.".".$this->_image_format;

Thanks to Kevin Knuth for pointing out this workaround.


 

This site is a showcase for using LatexRender for mathematics in WordPress