Subscripts and superscripts
(Excerpt from "The MathML Handbook" by Pavi Sandhu)
<msub> base subscript </msub>
Here is an example of a subscript:
<msub> <mi>a</mi> <mi>i</mi> </msub>
The msub element has one attribute called subscriptshift. This specifies the minimum amount by which the subscript should be shifted down relative to the baseline of the base expression.
The syntax of msup is:
<msup> base superscript </msup>
Here is an example of a superscript:
<msup> <mi>x</mi> <mn>2</mn> </msup>
The msup element has one attribute called superscriptshift. This specifies the minimum amount by which the superscript should be shifted up relative to the baseline of the base expression.
MathML also provides an additional element called msubsup. This is used to attach both a subscript and a superscript to a base expression. It has the following syntax:
<msubsup> base subscript superscript </msubsup>
The msubsup element accepts both subscriptshift and superscriptshift as attributes. Here is an example of msubsup’s use:
<msubsup> <mi>A</mi> <mi>i</mi> <mi>j</mi> </msubsup>
Copyright © CHARLES RIVER MEDIA, INC., Massachusetts (USA) 2003
Printing of the online version is permitted exclusively for private use. Otherwise this chapter from the book "The MathML Handbook" is subject to the same provisions as those applicable for the hardcover edition: The work including all its components is protected by copyright. All rights reserved, including reproduction, translation, microfilming as well as storage and processing in electronic systems.
CHARLES RIVER MEDIA, INC., 20 Downer Avenue, Suite 3, Hingham, Massachusetts 02043, United States of America