Details
Description
Some symbols (< > & ) Latex (in my case Tetex 3.0) display as text <, >, etc.As far as I understand Tex filter make some clenups, but only for mimetex section of code...
Section of code that works in my case:
<...>
// try and render with latex first
$latex = new latex();
$density = $CFG->filter_tex_density;
$background = $CFG->filter_tex_latexbackground;
$texexp = $texcache->rawtext;
$texexp = str_replace('<','<',$texexp);
$texexp = str_replace('>','>',$texexp);
$texexp = str_replace('&','&',$texexp);
$texexp = str_replace(' ',' ',$texexp);
$latex_path = $latex->render( $texexp, $md5, 12, $density, $background );
if ($latex_path)
else {
// failing that, use mimetex
$texexp = preg_replace('Unable to render embedded object: File (\r\n?) not found.',' ',$texexp);
$texexp = '\Large ' . $texexp;
$texexp = escapeshellarg($texexp);
<...>