<mstyle> - MathML 编辑

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) or rtl (right to left).
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, when displaystyle is set to true. See also largeop and movablelimits on <mo>.
infixlinebreakstyle
Specifies the default linebreakstyle to use for infix operators. The values before, after and duplicate 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, the scriptlevel attribute can never reduce the font size below scriptminsize in order to avoid unreadable small font sizes and depends on the multiplier specified in scriptsizemultiplier.
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:

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">&sum;</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

SpecificationStatusComment
MathML Core
The definition of 'mstyle' in that specification.
DraftDraft specification
MathML 3.0
The definition of 'mstyle' in that specification.
RecommendationCurrent specification
MathML 2.0
The definition of 'mstyle' in that specification.
RecommendationInitial specification

Browser compatibility

BCD tables only load in the browser

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 on mstyle had no effect to its children:
  • 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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:62 次

字数:9479

最后编辑:7年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文