mstyle
Summary
The MathML mstyle element is used change the style of its children. It accepts all attributes of all MathML presentation elements with some exceptions and additional attributes listed below.
Overview Table
Examples
This example demonstrates a simple usage of the mstyle element:
<math>
<mstyle displaystyle="true" mathcolor="teal">
<mrow>
<munderover>
<mo stretchy="true" form="prefix">โ</mo>
<mrow>
<mi>i</mi>
<mo form="infix">=</mo>
<mn>1</mn>
</mrow>
<mi>n</mi>
</munderover>
<mstyle displaystyle="true">
<mfrac>
<mn>1</mn>
<mi>n</mi>
</mfrac>
</mstyle>
</mrow>
</mstyle>
</math>
Related specifications
- MathML 3.0
- W3C Recommendation
Attributes
- decimalpoint
- This attribute is specifying the character for the alignment point within mstack and mtable columns, if the
decimalpoint
value is used to specify the alignment.
displaystyle - A Boolean value specifying whether more vertical space is used for displayed equations or, if set to
false
, a more compact layout is used to display formulas. The main effect is that larger versions of operators are displayed, whendisplaystyle
is set totrue
. See alsolargeop
andmovablelimits
on mo.
infixlinebreakstyle - Specifies the default
linebreakstyle
to use for infix operators. The valuesbefore
,after
andduplicate
are allowed.
scriptlevel - Controls mostly the font-size. The higher the
scriptlevel
, the smaller the font size. This attribute accepts a non-negative integer, as well as a โ+โ or a "-" sign, which increments or decrements the current value. In addition, thescriptlevel
attribute can never reduce the font size belowscriptminsize
in order to avoid unreadable small font sizes and depends on the multiplier specified inscriptsizemultiplier
.
scriptminsize - Specifies a minimum font size allowed due to changes in
scriptlevel
. The default value is 8pt.
scriptsizemultiplier - Specifies the multiplier to be used to adjust font size due to changes in
scriptlevel
. The default value is 0.71.
The <mstyle>
element accepts all attributes of all presentation attributes with the following exceptions:
height
,depth
orwidth
do not apply to mglyph, mpadded or mtable.rowalign
,columnalign
, orgroupalign
do not apply to mtr, mlabeledtr, mtd or maligngroup.lspace
orvoffset
do not apply to mpadded.fontfamily
does not apply to mglyph.align
does not apply to mtable or mstack.index
cannot be set on<mstyle>
.src
andalt
on mglyph cannot be set on<mstyle>
.actiontype
on maction cannot be set on<mstyle>
.
Attributions
Mozilla Developer Network : Article