MathML and "Clipboard API and events"


I was just reading this document ( My company has been heavily involved in MathML since its creation. We are obviously interested in clipboard APIs since we want to be able to copy, cut, and paste mathematics to/from web apps. I have a few comments.

Mathematical information

This section says "MathML often needs to be transformed to be copied as plain text, for example to make sure "to the power of" is shown with the caret "^" sign in a formula plain-text input." Such a transformation should not be part of a normal copy operation since that would transfer MathML. My concern is that readers get the idea that x2 should always or often be transformed to x^2. If such a conversion is done by default, it risks interfering with the transfer of MathML. People have gotten so used to typing math with such constructs as x^2 that there is a tendency to think that is how math should be represented and rendered. Of course, a web app or even a browser might give the user the option of copying math as this sort of "ASCII math". With the inclusion of MathML in HTML5, we finally have reason to hope that math notation may be treated as a first class citizen in the web world "real soon now".

10. Mandatory data types

I am surprised not to see a MathML type in this list. I suppose MathML could be typed as application/xml but SVG gets its own image/svg+xml type so I would expect MathML to be treated in an analogous manner. I will admit to not knowing the ramifications of this.

I also want to mention MathJax (<>). MathJax is an open source JavaScript engine for rendering MathML and LaTeX in browsers. It could be looked at as a polyfill for the current lack of good browser support for MathML. However, it also has its own UI and processes LaTeX so it will definitely have a place even after browsers routinely render MathML.

I mention MathJax here as it is a good use case for the clipboard API. It transforms MathML or LaTeX in the web page to a chunk of renderable HTML, CSS, SVG, or even MathML if the browser supports it natively. The user would like to be able to select, cut, copy, and paste a mathematical expression rendered this way as if it was a single object. It sounds like MathJax should be able to do this using this clipboard API, though it does not address the selection aspect. Taking this a step further, someday we might hope to allow the user to select sub-expressions of a mathematical equation for the purpose of cut and copy.

Paul Topping

Design Science, Inc.

Received on Friday, 12 April 2013 20:04:56 UTC