Nos bénévoles n'ont pas encore traduit cet article en Français. Aidez-nous à réaliser cette tâche !
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.
Attributes
- dir
- Overall directionality of formulas. Possible values are either
ltr
(left to right) orrtl
(right to left). - decimalpoint
- This attribute is specifying the character for the alignment point within
<mstack>
and<mtable>
columns, if thedecimalpoint
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 elements 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>
.
Examples
Using displaystyle
and mathcolor
to effect style changes in the layout of the whole sum.
<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>
Specifications
Specification | Status | Comment |
---|---|---|
MathML 3.0 The definition of 'mstyle' in that specification. |
Recommendation | Current specification |
MathML 2.0 The definition of 'mstyle' in that specification. |
Recommendation | Initial specification |
Browser compatibility
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|
Basic support | Not supported | 1.0 (1.7 or earlier) | Not supported | Not supported | 5.1 |
decimalpoint |
Not supported | Not supported | Not supported | Not supported | Not supported |
dir |
Not supported | 12.0 (12.0) | Not supported | Not supported | Not supported |
displaystyle |
Not supported | 1.0 (1.7 or earlier) | Not supported | Not supported | Not supported |
infixbreakstyle |
Not supported | Not supported | Not supported | Not supported | Not supported |
scriptlevel |
Not supported | 1.0 (1.7 or earlier) | Not supported | Not supported | Not supported |
scriptminsize |
Not supported | 1.0 (1.7 or earlier) | Not supported | Not supported | Not supported |
scriptsizemultiplier |
Not supported | 1.0 (1.7 or earlier) | Not supported | Not supported | Not supported |
Feature | Android | Chrome for Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|
Basic support | Not supported | Not supported | 1.0 (1.9.2) | Not supported | Not supported | Not supported |
decimalpoint |
Not supported | Not supported | Not supported | Not supported | Not supported | Not supported |
dir |
Not supported | Not supported | 12.0 (12.0) | Not supported | Not supported | Not supported |
displaystyle |
Not supported | Not supported | 1.0 (1.9.2) | Not supported | Not supported | Not supported |
infixbreakstyle |
Not supported | Not supported | Not supported | Not supported | Not supported | Not supported |
scriptlevel |
Not supported | Not supported | 1.0 (1.9.2) | Not supported | Not supported | Not supported |
scriptminsize |
Not supported | Not supported | 1.0 (1.9.2) | Not supported | Not supported | Not supported |
scriptsizemultiplier |
Not supported | Not supported | 1.0 (1.9.2) | Not supported | Not supported | Not supported |
Gecko-specific notes
- Prior to Gecko 6.0 (Firefox 6.0 / Thunderbird 6.0 / SeaMonkey 2.3) the implementation of
<mstyle>
was not complete and has been corrected. In particular, setting these attributes onmstyle
had no effect to its children:- The
bevelled
attribute on<mfrac>
elements. - The
notation
attribute on<menclose>
elements. - The
open
,close
andseparators
attributes on<mfenced>
elements. - The
accent
andaccentunder
attributes on<mover>
,<munder>
and<munderover>
elements. - The
selection
attribute on<maction>
elements. - The
mathvariant
attribute on<mi>
elements.
- The
- Starting with Gecko 20.0 (Firefox 20.0 / Thunderbird 20.0 / SeaMonkey 2.17) unitless values and percent values for the
scriptminsize
attribute are allowed and interpreted as multiple of "8pt". - Starting with Gecko 29.0 (Firefox 29.0 / Thunderbird 29.0 / SeaMonkey 2.26), the attributes accepted on the
<mstyle>
element have been restricted to those actually used in practice:id, class, style, href, mathcolor, mathbackground, scriptlevel, displaystyle, scriptsizemultiplier, scriptminsize, dir, mathsize, mathvariant, fontfamily, fontweight, fontstyle, fontsize, color, background
.
Étiquettes et contributeurs liés au document
Étiquettes :
Dernière mise à jour par :
Draussenduscher,