New itexToMML for WordPress 1.5
WordPress 1.5 has been out for a month or so, and it finally makes using my itexToMML plugin practical. A certain amount of hacking of the WordPress source code is still required, but it’s pretty manageable.
The required patches can be applied with a simple
patch < WordPress1.5_math.patch
Here’s what they do:
wp-blog-header.php
is patched to send the correct MIME-type to MathML-capable browsers.wp-includes/functions-formatting.php
is patched so that wp-texturize plays nice with MathML.wp-content/plugins/textile1.php
is patched so that the Textile filter plays nice with MathML. Markdown works just fine as-is.wp-content/themes/default/header.php
andwp-content/themes/classic/header.php
are patched to send out an XML declaration and the correct XHTML+MathML DOCTYPE to capable browsers. If you use another theme, you’ll have to patch it on your own.
I also decided to dispense with the “deprecated” my-hacks.php
file and set the allowed XHTML+MathML tags directly in the plugin. In fact, that’s the only change to the plugin itself.
If you’re running WordPress 1.5, you can
- install the itex2MML commandline utility,
- install the plugin,
- apply the patches,
and be running a MathML-capable blog in minutes.
Having said that, you’re still probably better-off installing MovableType. After you’ve played around a bit with a basic MathML-capable installation, you’re going want to start converting XHTML+MathML named entities to NCRs on output. You’re going to want to start adding things like comment-validation, per-post and per-comment selectable text filters and so forth. MT is still far-and-away the better platform to build on for this sort of “advanced” weblog functionality. But competition is good. And WordPress is a very nimble competitor…
Posted by distler at March 21, 2005 11:07 AM
Re: New itexToMML for WordPress 1.5
Pretty neat. Might I ask what prompted you to integrate itexToMML with WordPress?