[whatwg] Mathematics in HTML5
Michel Fortin
michel.fortin at michelf.com
Sat Jun 10 06:14:56 PDT 2006
Le 10 juin 2006 à 5:18, White Lynx a écrit :
>> But isn't this presentational instead of structural? Why not use
>>
>> <fence class="parenthesis">...</fence>
>>
>> with the proper CSS for presentation?
>
> But fence is used not only for brackets, it may appear in other
> constructions like |absolute value|, ||norm||.
What's the problem? Why couldn't we write
<fence class="absolute">...</fence>
<fence class="norm">...</fence>
?
>> I suppose one reason may lie in
>> the non-obviousness of implementing different kinds of fences styles
>> in CSS.
>
> Another reason is that different bracket styles usually have
> different meanings, so this is sensitive information and
> transfering this kind of information to presentational layer makes
> it difficult to recover.
Good criticism, but who said classes are only presentational?
If someone cares much about semantics he will bind its document to a
microformat profile [1] and use relevant class names. Or he could go
"the cheaper way" by using "meaningful" class names without a
microformat.
Maybe, just maybe, we could define in the spec a default set of the
most expected class values (just like "rel" has its own set of
default values in HTML 4 [2]). Browsers could then provide some style
for these classes when they are used on the new mathematic elements
such as <var class="vector">.
[1]: http://www.whatwg.org/specs/web-apps/current-work/#profile
[2]: http://www.w3.org/TR/html401/types.html#type-links
> In particular this may affect functionality of HTML-Math to LaTeX
> or HTML-Math to MathML convertors, that are likely to be based on
> structural markup without paying any attention to what styling is
> actually specified in style sheets.
Nothing would prevents people from using purely presentational
classes such as "left-brace", or "right-bracket", and then combine
them at will.
I'm not really against the left and right attributes however, as they
are somewhat easier to use than left-* and right-* classes. My point
was that they *are* presentational. But I'd note that this isn't
necessarily wrong.
As most of you probably know, HTML 4 deprecated the "align" attribute
on <p>, <div> and many other elements, but it did not for table rows,
columns and cells [3]. Why? I can only speculate, but I would say it
is because cell alignment is usually tied to the data inside the
cell. It *is* presentational, but is still more a question of content
than page layout.
Could <fence> be in the same situation? It's not a question of
content, but a question of meaning, or semantics, that decides what
it should look like. In many cases however, it won't be possible to
extract the mathematical meaning, so the presentation will be the
closest thing to semantics we can have.
[3]: http://www.w3.org/TR/html401/struct/tables.html#adef-align-TD
Michel Fortin
michel.fortin at michelf.com
http://www.michelf.com/
More information about the whatwg
mailing list