<mi> - MathML 编辑
The MathML <mi>
element indicates that the content should be rendered as an identifier such as function names, variables or symbolic constants. You can also have arbitrary text in it to mark up terms.
Attributes
- class, id, style
- Provided for use with stylesheets.
- dir
- The text direction. Possible values are either
ltr
(left to right) orrtl
(right to left). 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>
. - href
- Used to set a hyperlink to a specified URI.
- mathbackground
- The background color. You can use
#rgb
,#rrggbb
and HTML color names. - mathcolor
- The text color. You can use
#rgb
,#rrggbb
and HTML color names. - mathsize
- The size of the content. See length for possible values.
Deprecated values are:small
,normal
andbig
. These will be removed in the future. - mathvariant
- This logical class of the identifier, which varies in typography. That is, although the names suggest the typographic style for the class, semantically, items with the same class are treated "the same" within an expression, which might or might not involve displaying them with the named typography. The following values are allowed:
normal
(Default value for more than one character) ;bold
;italic
(Default value for a single character) ;bold-italic
;
double-struck
;bold-fraktur
;script
;bold-script
;fraktur
;
sans-serif
;bold-sans-serif
;sans-serif-italic
;sans-serif-bold-italic
;monospace
;
initial
;tailed
;looped
;stretched
;
Examples
<math>
<mi> y </mi>
<mi> sin </mi>
<mi mathvariant="monospace"> x </mi>
<mi mathvariant="bold"> π </mi>
</math>
Specifications
Specification | Status | Comment |
---|---|---|
MathML Core The definition of 'mi' in that specification. | Draft | Draft specification |
MathML 3.0 The definition of 'mi' in that specification. | Recommendation | Current specification |
MathML 2.0 The definition of 'mi' in that specification. | Recommendation | Initial specification |
Browser compatibility
BCD tables only load in the browser
Gecko-specific notes
- Some
mathvariant
values are only implemented starting with Gecko 28.0 (Firefox 28.0 / Thunderbird 28.0 / SeaMonkey 2.25) and require appropriate math fonts.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论