dirroot.'/filter/tex/lib.php'); if (!filter_is_enabled('filter/tex')) { error ('Filter not enabled!'); } error_reporting(E_ALL); $texexp = urldecode($_SERVER['QUERY_STRING']); $texexp = str_replace('formdata=','',$texexp); if ($texexp) { $image = md5($texexp) . ".gif"; $filetype = 'image/gif'; if (!file_exists("$CFG->dataroot/filter/tex")) { make_upload_directory("filter/tex"); } $texexp = str_replace('<','<',$texexp); $texexp = str_replace('>','>',$texexp); $texexp = preg_replace('!\r\n?!',' ',$texexp); $pathname = "$CFG->dataroot/filter/tex/$image"; $cmd = tex_filter_get_cmd($pathname, $texexp); system($cmd, $status); if (file_exists($pathname)) { require_once($CFG->libdir . '/filelib.php'); send_file($pathname, $image); } else { echo "Image not found!"; } exit; } else { echo "No tex expresion specified"; } ?> mimeTeX Previewer

Now enter your own expression or use the sample provided, press the Submit button, and mimeTeX's rendering should be displayed in the little window immediately below it.