[whatwg] Mathematics in HTML5

Michel Fortin michel.fortin at michelf.com
Wed Jun 7 16:50:17 PDT 2006

Le 7 juin 2006 à 14:47, Ian Hickson a écrit :

> So, while I applaud the re-use of ISO12083 here, it seems like an odd
> choice. The resulting language seems to be just as verbose as  
> MathML, so
> why not just reuse MathML, which already has a Web presence? Also,  
> your
> version of the vocabulary doesn't seem quite the same as ISO12083,  
> which
> means we would be introducing yet another mathematical markup  
> language, in
> a space which already has many such languages.

I'd like to try something a little simpler. So here is my idea for a  
math markup.

I wrote that as a cheat sheet, not as a specification, because it was  
simpler for me and because I think it gives a good glimpse at what  
I'm trying to do. But surely a more formal specification with that  
later on. Here it is:

  - - -

Use <var> for variables of any kind, with a "type" attribute to  
identify vector, matrix or other special kinds of variables.

      <var type="vector">x</var>

Use <sup> for exponents.


Use <sub> for matrix indices.

      <var type="matrix">X</var><sub>2,2</sub>

Use <frac> for fractions, with <num> and <den> inside, as proposed by  
White and others.


Use <radical> for radicals, with <radix> and <radicand>, as proposed  
by White.


Use <matrix type="..."> for matrices, with <mr> for rows, and <md>  
for cells (like for tables). Just a one column- or a one row- matrix  
for vectors.

     <matrix type="det">

Use <fence type="..."> for any kind of fence.

     <fence type="floor">expression</fence>

Use <bounds>, <sup>, and <sub> to add lower and upper bounds to  
<fence type="bounds">:

     <fence type="bounds">

Use <integral> and <bounds> for integrals.

       3<var>x</var> d<var>x</var>

Use <sum> and <bounds> for big sum operators.

         <sub><var>x</var> = 0</sub>

Use <product> and <bounds> for big product operators.

         <sub><var>x</var> = 0</sub>

Use <limit> for limits:

       <var>x</var> -> 0

Use <formula> to delimit formulas that should stand out of the main  

Use ruby annotations for the purpose of over- and under- script/braces.

Assuming some generic element is adopted for localized numbers, it  
could be reused inside formulas too.

  - - -


16 new math-specific elements:

*  <frac>, <num>, and <den>
*  <radical>, <radix>, and <radicand>
*  <matrix>, <mr>, and <md>
*  <fence>
*  <bounds>
*  <integral>, <sum>, <product>
*  <limit>
*  <formula>

5 ruby annotation elements:

*  <ruby>
*  <rbc>, <rtc>
*  <rb>, <rt>, <rp>

3 reused HTML elements:

*  <var>
*  <sup>, <sub>

I think all of these new elements can be styled decently with CSS. I  
can't say much myself about how suitable it is for a conversion from  
LaTeX however. I'd appreciate comments on that and any other issue or  

Michel Fortin
michel.fortin at michelf.com

More information about the whatwg mailing list