Re: Super and Subscripts

Dave Raggett (dsr@hplb.hpl.hp.com)
Fri, 20 Jan 95 09:01:00 EST

Jim asks:

> How would you cope with
> n
> 2
> e

This is a case where using the same shortref character to start and end
an element causes problems.

this will do: <math>e^2<sup>n</sup>

as will: <math>e^2<sup>n^^</math>

but: <math>e^2^n^^</math>

is the same as <math>e<sup>2</sup>n<sup></sup></math>
which is not what you want at all!

2n
while <math>{e^2^}^n^</math> is e and again not what you want.

I felt that people could easily learn to use _ and ^ as shortrefs for
subscripts and superscripts. Learning a further two characters to
distinguish opening from closing tags is much harder, particularly,
given the less than obvious choices available.

With the BOX element, the problem doesn't arise, as the { and } chars
are obvious candidates. Note: &lbrace; and &rbrace; are used when you
need curly braces in your expressions.

-- Dave Raggett <dsr@w3.org> tel: +44 272 228046 fax: +44 272 228003
Hewlett Packard Laboratories, Filton Road, Bristol BS12 6QZ, United Kingdom