Minor Updates
MTValidate is up to version 0.3, with some gratuitous dependencies removed and even more helpful error messages from the W3C.
itex2MML is up to version 0.9. Only the binary changed, not the plugins for MovableType, WordPress or ecto. Particularly if you were having trouble using it with Markdown or Textile, you might want to check out the latest version. As usual, my distribution comes with the source code and a precompiled MacOSX binary. If James and Abiola are up to it, I’ll post links to precompiled Linux and Windows binaries, when they’re available.
Posted by distler at December 1, 2004 12:09 AM
Re: Minor Updates
Hello, I have done some modfication on the wordpress itexToMML plugin to make sure that itex2MMl only convert the string between two [mathml] tags into MathML
the following code is my two cents:
itexToMML ($text) {
// customize this location
$itex2MML = ‘/usr/local/bin/itex2MML’;
$text = str_replace(“\r\n”, “\n”, $text);
if (ereg(“^.+\[mathml\].+$”, $text)):
$sptag = “\[mathml\]”;
$mathmls = split($sptag, $text);
global $text;
$text = $mathmls[0];
for ($i = 1; $i array(‘pipe’, ‘r’),
1 => array(‘pipe’, ‘w’),
2 => array(‘pipe’, ‘w’)
);
$itex_process = proc_open($itex2MML, $fspec, $pipes);
if (is_resource($itex_process)) {
fwrite($pipes[0], $mathmls[$i]);
//fwrite($pipes[0], $text);
fclose($pipes[0]);
$mathmls[$i] = ”;
while (!feof($pipes[1])) {
$mathmls[$i] .= fgets($pipes[1], 1024);
}
fclose($pipes[1]);
fclose($pipes[2]);
proc_close($itex_process);
$mathmls[$i] = str_replace(“nn”, “n”, $mathmls[$i]);
$text .= $mathmls[$i];
$text .= $mathmls[$i+1];
}
}
endif;
return $text;
}