James Howison's idea is very neat. I think it might probably be difficult to write cross-browser, performant JavaScript that parses the PNG bytes for this data, and it would introduce an undesirable dependency on users having JS enabled that may be unrealistic in educational settings. But it would probably be comparatively easy to write a webservice that does the same thing and returns an XML representation that can be downloaded:
<span class="hequation"><a rel="equation" href="http://webservice.example.org/png2mathml.php?uri=http% 3A//images.example.com/345.png" type="application/xhtml+xml"><img alt="energy equals mass times velocity squared" src="http://images.example.com/345.png" type="image/png"></a></span> Now you could layer some JavaScript on top of that which collects all the hequation IMG source URIs, rolls them up into a single request to the webservice, and receives back a MathML document into memory. But I'm not clear how you'd like the script to expose the resulting information to the end user. Intercepting attempts to copy the image to the clipboard would probably be problematic, both in terms of how to achieve it and in terms of confusing end users. Adding items to the context menu would be nice, but very hard to do with JavaScript. So adding little icons after each equation might be a better bet. If developers of other MathML software could be persuaded to parse data from images, that would be good. But I think it's important to have a link to MathML serialization within the HTML layer, given the existence of multiple browsers and assistive technologies that can cope with MathML (at least to some degree). -- Benjamin Hawkes-Lewis _______________________________________________ microformats-new mailing list [email protected] http://microformats.org/mailman/listinfo/microformats-new
