<mmultiscripts>

  • Revision slug: MathML/Element/mmultiscripts
  • Revision title: mmultiscripts
  • Revision id: 34497
  • Created:
  • Creator: fscholz
  • Is current revision? No
  • Comment new compat table; 124 words added, 40 words removed

Revision Content

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 {{ unimplemented_inline("534968") }}
Used to set a hyperlink to a specified URI.
mathbackground {{ gecko_minversion_inline("2.0") }}
The background color. You can use #rgb, #rrggbb and HTML color names.
mathcolor {{ gecko_minversion_inline("2.0") }}
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() }}

Feature Firefox (Gecko) Chrome Internet Explorer Opera Safari
Basic support {{ CompatGeckoDesktop("1.0") }} {{ CompatNo() }} {{ CompatNo() }} {{ CompatNo() }} {{ CompatNo() }}
subscriptshift and
superscriptshift attribute
{{ CompatGeckoDesktop("1.0") }} {{ CompatNo() }} {{ CompatNo() }} {{ CompatNo() }} {{ CompatNo() }}
Feature Firefox Mobile (Gecko) Android IE Phone Opera Mobile Safari Mobile
Basic support {{ CompatGeckoMobile("1.9.2") }} {{ CompatNo() }} {{ CompatNo() }} {{ CompatNo() }} {{ CompatNo() }}
subscriptshift and
superscriptshift attribute
{{ CompatGeckoMobile("1.9.2") }} {{ CompatNo() }} {{ 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

<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>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 {{ unimplemented_inline("534968") }}</dt> <dd>Used to set a hyperlink to a specified URI.</dd> <dt id="attr-mathbackground">mathbackground {{ gecko_minversion_inline("2.0") }}</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 {{ gecko_minversion_inline("2.0") }}</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>Examples</h2>
<h4>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>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>Browser compatibility</h2>
<p>{{ CompatibilityTable() }}</p>
<div id="compat-desktop">
<table class="compat-table"> <tbody> <tr> <th>Feature</th> <th>Firefox (Gecko)</th> <th>Chrome</th> <th>Internet Explorer</th> <th>Opera</th> <th>Safari</th> </tr> <tr> <td>Basic support</td> <td>{{ CompatGeckoDesktop("1.0") }}</td> <td>{{ CompatNo() }}</td> <td>{{ CompatNo() }}</td> <td>{{ CompatNo() }}</td> <td>{{ CompatNo() }}</td> </tr> <tr> <td><code>subscriptshift</code> and <br> <code>superscriptshift </code>attribute</td> <td>{{ CompatGeckoDesktop("1.0") }}</td> <td>{{ CompatNo() }}</td> <td>{{ CompatNo() }}</td> <td>{{ CompatNo() }}</td> <td>{{ CompatNo() }}</td> </tr> </tbody>
</table>
</div>
<div id="compat-mobile">
<table class="compat-table"> <tbody> <tr> <th>Feature</th> <th>Firefox Mobile (Gecko)</th> <th>Android</th> <th>IE Phone</th> <th>Opera Mobile</th> <th>Safari Mobile</th> </tr> <tr> <td>Basic support</td> <td>{{ CompatGeckoMobile("1.9.2") }}</td> <td>{{ CompatNo() }}</td> <td>{{ CompatNo() }}</td> <td>{{ CompatNo() }}</td> <td>{{ CompatNo() }}</td> </tr> <tr> <td><code>subscriptshift</code> and <br> <code>superscriptshift </code>attribute</td> <td>{{ CompatGeckoMobile("1.9.2") }}</td> <td>{{ CompatNo() }}</td> <td>{{ CompatNo() }}</td> <td>{{ CompatNo() }}</td> <td>{{ CompatNo() }}</td> </tr> </tbody>
</table>
</div><h2>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>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