<mmultiscripts>

  • Revision slug: MathML/Element/mmultiscripts
  • Revision title: mmultiscripts
  • Revision id: 34502
  • Created:
  • Creator: fscholz
  • Is current revision? No
  • Comment remove labels, use new compat table; 109 words added, 110 words removed

Revision Content

Summary

The MathML <mmultiscripts> element allows you to create tensor-like objects. In a descriptive way tensors are multidimensional matrices (mathematical imprecise but exemplified). The degree of a tensor depends on the dimensionality of a representative array. For example, a number is a 0-dimensional array, or a 0th-order tensor. A 1-dimensional array (e.g. vectors) is a 1st-order tensor and so 2nd-order tensors are needed to represent square matrices. To learn more about the mathematical background of tensors refer to the entry on Wikipedia.

MathML uses a special syntax to describe subscripts and superscripts for both, postscripts and prescripts, attached to a base expression:

<mmultiscripts>
    base
     (subscript superscript)*
     [ <mprescripts/> (presubscript presuperscript)* ]
</mmultiscripts>

After the base expression you can specify a postsubscript and a postsuperscript. Prescripts are optional and are separated by the empty tag <mprescripts/>. In addition you are able to use <none/> as a placeholder for empty positions.

Attributes

class, id, style
Provided for use with stylesheets.
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.
subscriptshift
The minimum space by which to shift the subscript below the baseline of the expression, as a CSS length.
superscriptshift
The minimum space by which to shift the superscript above the baseline of the expression, as a CSS length.

Examples

Example 1: Using <mprescripts/>

Rendering:

<math>  

    <mmultiscripts>

        <mi>X</mi>      <!-- base expression -->  

        <mi>d</mi>      <!-- postsubscript -->
        <mi>c</mi>      <!-- postsuperscript -->

        <mprescripts />
        <mi>b</mi>      <!-- presubscript -->
        <mi>a</mi>      <!-- presuperscript -->

    </mmultiscripts>

</math>

Example 2: Using <none/>

Rendering:

<math>  

    <mmultiscripts>

        <mi>X</mi>      <!-- base expression -->

        <none />        <!-- postsubscript -->
        <mi>c</mi>      <!-- postsuperscript -->

        <mprescripts />
        <mi>b</mi>      <!-- presubscript -->
        <none />        <!-- presuperscript -->

    </mmultiscripts>

</math>

Browser compatibility

{{ CompatibilityTable() }}

{{ CompatTableDesktop( ['Basic support', CompatNo(), CompatGeckoDesktop("1.0"), CompatNo(), CompatNo(), CompatNo()], ['href', CompatNo(), CompatGeckoDesktop("7.0"), CompatNo(), CompatNo(), CompatNo()], ['mathbackground', CompatNo(), CompatGeckoDesktop("2.0"), CompatNo(), CompatNo(), CompatNo()], ['mathcolor', CompatNo(), CompatGeckoDesktop("2.0"), CompatNo(), CompatNo(), CompatNo()] ) }}

{{ CompatTableMobile( ['Basic support', CompatNo(), CompatNo(), CompatGeckoMobile("2.0"), CompatNo(), CompatNo(), CompatNo()], ['href', CompatNo(), CompatNo(), CompatGeckoMobile("7.0"), CompatNo(), CompatNo(), CompatNo()], ['mathbackground', CompatNo(), CompatNo(), CompatGeckoMobile("2.0"), CompatNo(), CompatNo(), CompatNo()], ['mathcolor', CompatNo(), CompatNo(), CompatGeckoMobile("2.0"), CompatNo(), CompatNo(), CompatNo()] ) }}

Specification

  • {{ spec("http://www.w3.org/TR/MathML/chapter3.html#presm.mmultiscripts","MathML 3.0 Presentation Markup mmultiscripts", "REC") }}

See also

  • {{ MathMLElement("msub") }} (Subscript)
  • {{ MathMLElement("msup") }} (Superscript)
  • {{ MathMLElement("msubsup") }} (Subscript-superscript pair)

Revision Source

<h2 id="Summary">Summary</h2>
<p>The MathML <code>&lt;mmultiscripts&gt;</code> element allows you to create tensor-like objects. In a descriptive way <a class="external" href="http://en.wikipedia.org/wiki/Tensor" title="http://en.wikipedia.org/wiki/Tensor">tensors</a> are multidimensional matrices (mathematical imprecise but exemplified). The degree of a tensor depends on the dimensionality of a representative array. For example, a number is a 0-dimensional array, or a 0th-order tensor. A 1-dimensional array (e.g. vectors) is a 1st-order tensor and so 2nd-order tensors are needed to represent square matrices. To learn more about the mathematical background of tensors refer to the <a class="external" href="http://en.wikipedia.org/wiki/Tensor" title="http://en.wikipedia.org/wiki/Tensor">entry on Wikipedia</a>.</p>
<p>MathML uses a special syntax to describe subscripts and superscripts for both, postscripts and prescripts, attached to a base expression:</p>
<pre>&lt;mmultiscripts&gt;
    <em>base</em>
     (<em>subscript superscript</em>)*
     [ &lt;mprescripts/&gt; (<em>presubscript presuperscript</em>)* ]
&lt;/mmultiscripts&gt;
</pre>
<p>After the base expression you can specify a postsubscript and a postsuperscript. Prescripts are optional and are separated by the empty tag <code>&lt;mprescripts/&gt;</code>. In addition you are able to use <code>&lt;none/&gt;</code> as a placeholder for empty positions.</p>
<h2 id="Attributes">Attributes</h2>
<dl> <dt id="attr-class-id-style">class, id, style</dt> <dd>Provided for use with <a href="/en/CSS" title="en/CSS/">stylesheets</a>.</dd> <dt id="attr-href">href</dt> <dd>Used to set a hyperlink to a specified URI.</dd> <dt id="attr-mathbackground">mathbackground</dt> <dd>The background color. You can use <code>#rgb</code>, <code>#rrggbb</code> and <a href="/en/CSS/color_value#HTML.2fSVG.2fX11.c2.a0_Color_Keywords" title="en/CSS/color value#HTML.2fSVG.2fX11.c2.a0 Color Keywords">HTML color names</a>.</dd> <dt id="attr-mathcolor">mathcolor</dt> <dd>The text color. You can use <code>#rgb</code>, <code>#rrggbb</code> and <a href="/en/CSS/color_value#HTML.2fSVG.2fX11.c2.a0_Color_Keywords" title="en/CSS/color value#HTML.2fSVG.2fX11.c2.a0 Color Keywords">HTML color names</a>.</dd> <dt id="attr-subscriptshift">subscriptshift</dt> <dd>The minimum space by which to shift the subscript below the baseline of the expression, as a <a href="/en/CSS/length" title="en/CSS/length">CSS length.</a></dd> <dt id="attr-superscriptshift">superscriptshift</dt> <dd>The minimum space by which to shift the superscript above the baseline of the expression, as a <a href="/en/CSS/length" title="en/CSS/length">CSS length.</a></dd>
</dl>
<h2 id="Examples">Examples</h2>
<h4 id="Example_1:_Using_&lt;mprescripts/>">Example 1: Using <code>&lt;mprescripts/&gt;</code></h4>
<p>Rendering: <img alt="" src="/@api/deki/files/4932/=mmultiscripts_prescripts.png" style="vertical-align: middle; margin-left: 10px;"></p>
<pre class="brush: html">&lt;math&gt;  

    &lt;mmultiscripts&gt;

        &lt;mi&gt;X&lt;/mi&gt;      &lt;!-- base expression --&gt;  

        &lt;mi&gt;d&lt;/mi&gt;      &lt;!-- postsubscript --&gt;
        &lt;mi&gt;c&lt;/mi&gt;      &lt;!-- postsuperscript --&gt;

        &lt;mprescripts /&gt;
        &lt;mi&gt;b&lt;/mi&gt;      &lt;!-- presubscript --&gt;
        &lt;mi&gt;a&lt;/mi&gt;      &lt;!-- presuperscript --&gt;

    &lt;/mmultiscripts&gt;

&lt;/math&gt;
</pre>
<h4 id="Example_2:_Using_&lt;none/>">Example 2: Using <code>&lt;none/&gt;</code></h4>
<p>Rendering: <img alt="" src="/@api/deki/files/4931/=mmultiscripts_none.png" style="vertical-align: middle; margin-left: 10px;"></p>
<pre class="brush: html">&lt;math&gt;  

    &lt;mmultiscripts&gt;

        &lt;mi&gt;X&lt;/mi&gt;      &lt;!-- base expression --&gt;

        &lt;none /&gt;        &lt;!-- postsubscript --&gt;
        &lt;mi&gt;c&lt;/mi&gt;      &lt;!-- postsuperscript --&gt;

        &lt;mprescripts /&gt;
        &lt;mi&gt;b&lt;/mi&gt;      &lt;!-- presubscript --&gt;
        &lt;none /&gt;        &lt;!-- presuperscript --&gt;

    &lt;/mmultiscripts&gt;

&lt;/math&gt;
</pre>
<h2 id="Browser_compatibility">Browser compatibility</h2>
<p>{{ CompatibilityTable() }}</p>
<p>{{ CompatTableDesktop( ['Basic support', CompatNo(), CompatGeckoDesktop("1.0"), CompatNo(), CompatNo(), CompatNo()], ['href', CompatNo(), CompatGeckoDesktop("7.0"), CompatNo(), CompatNo(), CompatNo()], ['mathbackground', CompatNo(), CompatGeckoDesktop("2.0"), CompatNo(), CompatNo(), CompatNo()], ['mathcolor', CompatNo(), CompatGeckoDesktop("2.0"), CompatNo(), CompatNo(), CompatNo()] ) }}</p>
<p>{{ CompatTableMobile( ['Basic support', CompatNo(), CompatNo(), CompatGeckoMobile("2.0"), CompatNo(), CompatNo(), CompatNo()], ['href', CompatNo(), CompatNo(), CompatGeckoMobile("7.0"), CompatNo(), CompatNo(), CompatNo()], ['mathbackground', CompatNo(), CompatNo(), CompatGeckoMobile("2.0"), CompatNo(), CompatNo(), CompatNo()], ['mathcolor', CompatNo(), CompatNo(), CompatGeckoMobile("2.0"), CompatNo(), CompatNo(), CompatNo()] ) }}</p>
<h2 id="Specification">Specification</h2>
<ul> <li>{{ spec("http://www.w3.org/TR/MathML/chapter3.html#presm.mmultiscripts","MathML 3.0 Presentation Markup mmultiscripts", "REC") }}</li>
</ul>
<h2 id="See_also">See also</h2>
<ul> <li>{{ MathMLElement("msub") }} (Subscript)</li> <li>{{ MathMLElement("msup") }} (Superscript)</li> <li>{{ MathMLElement("msubsup") }} (Subscript-superscript pair)</li>
</ul>
Revert to this revision