HTML5 MathML
HTML5 MathML scriptsizemultiplier Attribute
The scriptsizemultiplier attribute, set on <mstyle>, controls the factor by which the font shrinks at each successive script level - superscripts, subscripts and their nested scripts. The default is around 0.71.
Definition and Usage
Each time an expression nests deeper into a script (an exponent of an exponent, for instance), MathML reduces the font size by this multiplier. Lowering it makes deep scripts shrink faster; raising it keeps them larger. Set it on an <mstyle> wrapper to affect its subtree.
Syntax
<mstyle scriptsizemultiplier="0.6">
...
</mstyle>Example
This nests exponents so successive levels shrink by the given multiplier.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>MathML scriptsizemultiplier</title>
</head>
<body>
<math display="block">
<mstyle scriptsizemultiplier="0.6">
<msup>
<mi>x</mi>
<msup>
<mi>y</mi>
<mi>z</mi>
</msup>
</msup>
</mstyle>
</math>
</body>
</html>scriptsizemultiplier is defined by MathML and controlled via <mstyle>. Browser support for overriding the default varies; the default value produces standard textbook scaling.
Key Takeaways
- scriptsizemultiplier sets the shrink factor per script level.
- It is applied through an <mstyle> wrapper.
- The default (~0.71) matches conventional typesetting.
