W3C home > Mailing lists > Public > whatwg@whatwg.org > June 2006

[whatwg] Mathematics in HTML5

From: Michel Fortin <michel.fortin@michelf.com>
Date: Wed, 21 Jun 2006 10:48:25 -0400
Message-ID: <A1157EB7-B1EA-427F-B919-58FB9E94BC17@michelf.com>
Le 20 juin 2006 ? 6:53, Robert O'Callahan a ?crit :

> I would also like to see a complete description of the CSS  
> extensions required for real high-quality rendering.

I can't claim this is complete, but two ideas come to my mind right now:

1.  Some "border-character" property, which would work mostly like  
CSS 3's
     border-image, but would put a stretchable character in the  
border. The
     browser would be in charge of stretching. "border-image" with  
SVG could
     be an adequate substitute for some characters, but I'm not sure  
it would
     be so great with braces or arrows.

2.  Some people have suggested various handy text-transforms for maths,
     like math-italic, math-bold, and math-bold-italic that would change
     Latin an Greek characters to their appropriate mathematical  
variants in
     Unicode.

These improvements would make possible a much better rendering of  
White's markup proposal. Maybe he could suggest some other improvements.

Personally, there are things in his markup I don't like but which are  
necessary to have a correct rendering under CSS 2.1. If CSS could be  
smarter, the markup could be better and more logical, so I'd like to  
suggest this too:

3.  It would help to be able to set the vertical alignment relative  
to the
     height of the previous element's height. It would allow a markup  
like
     this to be used for exponents

         <fence> ... </fence><sup>2</sup>
         <matrix>...</matrix><sup>2</sup>

     instead of the complicated structure required by White's  
proposal. I
     do not have a clear idea of a CSS syntax to accomplish this  
however.

4.  In the same reasoning, it would be great if there was a way adjacent
     elements could share the same horizontal space, like <sup> and  
<sub>
     when they are next to each other:

         C<sup>1</sup><sub>2</sub>

     I'm thinking of something which I would call "inline-float" (for
     the lack of a better name), which would make two or more elements
     with that property collapse into the same horizontal space when
     they are following directly each other and are not overlapping
     vertically.

     It would have some uses outside mathematic formulas too. I'm  
thinking
     of chemistry which could would benefit of a better rendering for:

         SO<sub>3</sub><sup>2-</sup>

     (Example from Wikipedia: <http://en.wikipedia.org/wiki/Ion>)

I'd also add that better support for combining diacritics in Unicode,  
designed to stack over each other, would be great for maths too. But  
this is not in the scope of CSS, I think.


Michel Fortin
michel.fortin at michelf.com
http://www.michelf.com/
Received on Wednesday, 21 June 2006 07:48:25 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:27 UTC