Sub/Super-scripts are used in MathML not just for powers or indices, they are also used for limits.
Sub-Scripts are denoted with the <msub> tag. It accepts exactly 2 child elements, the first is the 'base', the second is the sub-script.
|
|
As usual, you can use grouping elements, such as <mrow>, to group multiple tags so that there are only two child elements within the <msub>.
The <msup> behaves in exactly the same way as for sub-scripts.
|
|
For the frequently encountered case when you need both sub and super-scripts we can use the <msubsup> tag:
|
|
Note that this is different to nesting sub/super scripts:
|
|
|
|
Exaclty like the sub and super scripts, we can place things above and below using three similar tags: <munder>, <mover> and <munderover>
|
|
|
|
As you can see from this second example, this is a suitable way to write summations.
Next: Tensors & Pre-scripts