Path: blob/main/files/en-us/web/mathml/element/mmultiscripts/index.md
6540 views
------{{MathMLRef}}
The <mmultiscripts> MathML element is used to attach an arbitrary number of subscripts and superscripts to an expression at once, generalizing the {{ MathMLElement("msubsup") }} element. Scripts can be either prescripts (placed before the expression) or postscripts (placed after it).
MathML uses the syntax below, that is a base expression, followed by an arbitrary number of postsubscript-postsuperscript pairs (attached in the given order) optionally followed by an <mprescripts> and an arbitrary number of presubscript-presuperscript pairs (attached in the given order). In addition, empty <mrow> elements can be used to represent absent scripts.
Attributes
This element's attributes include the global MathML attributes as well as the following deprecated attributes:
subscriptshift{{deprecated_inline}} {{Non-standard_Inline}}: A
<length-percentage>indicating the minimum amount to shift the baseline of the subscript down.
superscriptshift{{deprecated_inline}} {{Non-standard_Inline}}: A
<length-percentage>indicating the minimum amount to shift the baseline of the superscript up.
Note: For the
subscriptshiftandsuperscriptshiftattributes, some browsers may also accept legacy MathML lengths.
Examples
Using <mprescripts/>
Children after the <mprescripts/> element are placed as pre-scripts (before the base expression):
{{ EmbedLiveSample('mprescripts_example', 700, 200, "", "") }}
Empty scripts
Empty <mrow> elements can be used to represent absent scripts:
{{ EmbedLiveSample('none_example', 700, 200, "", "") }}
Order of scripts
Here is a more complex example with many scripts, so you can see in which order they are attached to the base:
{{ EmbedLiveSample('order_of_scripts_example', 700, 200, "", "") }}
Specifications
{{Specifications}}
Browser compatibility
{{Compat}}
See also
{{ MathMLElement("msub") }} (Subscript)
{{ MathMLElement("msup") }} (Superscript)
{{ MathMLElement("msubsup") }} (Subscript-superscript pair)