Re: Shortref [was: Re: Super and Subscripts]

Bert Bos (bert@let.rug.nl)
Mon, 23 Jan 95 14:14:32 EST

Christian Mogensen writes:

|For double superscripts 3
| 2
| x = c m
|
| <math> x = c^2^3^^m </math> - this does not work (apparently)
| <math> x = c^2<sup>3</sup>^m </math> - but will this?
|

If it has to look like TeX, how about this :-)

<math>x=c^{2^{3}}m</math>

It can be done with shortrefs as follows:

<!DOCTYPE math [
<!ELEMENT math - - ANY>
<!ELEMENT sup - - ANY>
<!ENTITY opensup "<sup>">
<!ENTITY closesup "</sup>">
<!ENTITY null "">
<!SHORTREF mathmap
"^" opensup
"_" opensub>
<!USEMAP mathmap math>
<!SHORTREF supmap
"{" null
"}" closesup>
<!USEMAP supmap sup>
]>

and similarly for _{subscripts}, of course.

Bert

-- 
                          Bert Bos                      Alfa-informatica
                 <bert@let.rug.nl>           Rijksuniversiteit Groningen
    <http://www.let.rug.nl/~bert/>     Postbus 716, NL-9700 AS GRONINGEN