W3C home > Mailing lists > Public > www-html@w3.org > October 2000

Re: XHTML: why are sub/sup in the presentation module?

From: <Jukka.Korpela@hut.fi>
Date: Wed, 4 Oct 2000 14:57:22 +0300 (EET DST)
To: www-html@w3.org
Message-ID: <Pine.OSF.4.10.10010041432560.25531-100000@gamma.hut.fi>
On Wed, 4 Oct 2000, Richard Lanyon wrote:

> With respect to the XHTML Modularization CR, why are the <sub> and <sup>
> elements placed in the Presentation Module?

Probably because they are regarded as presentational, to be used
in contexts like 1<sup>st</sup>.

> They are used extensively in
> science, and even in more common cases: if I want to say that my
> floorspace is 5 square metres, I might write 5 m<sup>2</sup>. The
> superscript there carries semantic, not merely presentational,
> information.

The problem is that <sub> and <sup> are now trying to serve two
masters, Presentation and Structure. This confusion has long history:
http://www.hut.fi/u/jkorpela/HTML3.2/SUBSUP.html

Consider what a character cell browser should do with <sup> and </sup>.
Obviously, it should render 1<sup>st</sup> simply as 1st.
For _exponents_, just ignoring the <sup> markup would be quite
incorrect. In some cases, you might get away with it - people
probably guess what m2 is intended to me. (In a few cases, a character
cell browser could use a character like superscript 2, but for most
characters, even ISO 10646 doesn't contain a superscript variant.)
In a case like 10<sup>9</sup>, a browser could use 10^9 or 10**9
or even display 10<sup>9</sup> literally, or otherwise indicate the
intended structure. But such replacements would make no sense
for 1<sup>st</sup> or other stylistic use of <sup>.

Even the graphic rendering should be different. For stylistic use,
an exponent-like notation is not nice. For exponents, an "exponent"
which is just slightly raised from the base line doesn't look good.

In the ideal world, we would have <exp> for exponents and <super>
for superscript style. But what we have now is MathML which is
hopelessly complex at least for authors who just casually need simple
math expressions, and we have the idea of putting all stylistic things
into style sheets, so that we're expected to write something like
<span style="superscript">st</span>
I suppose. For further confusion, the draft "Unicode in XML and other
Markup Languages", http://www.unicode.org/unicode/reports/tr20/
which (realistically IMHO) suggests, if I understand the ideas correctly,
that Unicode compatibility characters for superscripts and subscripts
(like superscript 2) should be replaced by the corresponding basic
characters and <sup> and <sub> markup. Yet, it refers specifically
to the use of superscripting for exponents.

-- 
Yucca, http://www.hut.fi/u/jkorpela/ or http://yucca.hut.fi/yucca.html
Received on Wednesday, 4 October 2000 07:57:25 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:15:44 GMT