[uf-new] an equation/MathML/TeX microformat?

Scott Reynen scott at makedatamakesense.com
Fri Oct 26 13:49:27 PDT 2007

On Oct 26, 2007, at 9:58 AM, Paul Topping wrote:

> Also, I want to put the MathML or TeX in the page, not in separate
> documents.

This seems to be the fundamental problem, and I doubt microformats  
can solve it.  With microformats we can make maximum use of existing  
HTML tags, but we can't create new tags.  And I don't think any  
existing HTML tags allow embedding of XML-based data directly in HTML  
documents.  You could escape all the XML with entities, e.g.  
<math>, but that would be far more work than a separate  
document.  <script> can include XML, but implies the XML is a script,  
which MathML isn't really.  If you're okay with such redefinition of  
HTML elements, you could do something like this:

<script type="text/mathml">
	[MathML version]
<script type="text/tex">
	[Tex version]
	<img src="[image version]" alt="[text version]" />

Note that's just plain HTML, no microformat.  You could also just  
wrap the XML in a comment, but HTML comments by definition don't have  
any semantics.  You could wrap a container around the comment with  
semantics, but again you're getting into redefining HTML elements:

<div class="math">
	<img src="[image version]" alt="[text version]" class="photo" />
	<div class="mathml">
		[MathML version]
	<div class="tex">
		[TeX version]

That's closer to what microformats do, but not likely to be accepted  
by this community as it requires treating an HTML element as  
something completely different from what the HTML spec suggests.  I  
believe anywhere else you put raw XML will cause it to be treated as  
(invalid) HTML.

Scott Reynen

More information about the microformats-new mailing list