$full_path_filename"; $command = "$mimetex_path -e ".$full_path_filename." ".escapeshellarg($mimetex_formula); if ($system_disabled==0) { system($command,$status_code); } else { $status_code=0; } if ($status_code != 0) { $url=false; } else { $url = $pictures_path_http."/".$filename; } } $alt_mimetex_formula = htmlentities($mimetex_formula, ENT_QUOTES); $alt_mimetex_formula = str_replace("\r"," ",$alt_mimetex_formula); $alt_mimetex_formula = str_replace("\n"," ",$alt_mimetex_formula); if ($url != false) { if ($system_disabled==0) { $text = substr_replace($text, "".$alt_mimetex_formula."",$pos,strlen($tex_matches[0][$i])); } else { $text = substr_replace($text, "".$alt_mimetex_formula."",$pos,strlen($tex_matches[0][$i])); } } else { $text = substr_replace($text, "[Mimetex cannot convert this formula]",$pos,strlen($tex_matches[0][$i])); } } return $text; } ?>