This was spooged by Revision #263 (to accommodate) BlahTeX/PNG support. Hopefully this way will work in both modes.