<mmultiscripts>
<mmultiscripts> MathML 元素用於一次性將任意數量的下標和上標附加到表示式上,從而概括了 <msubsup> 元素。指令碼可以是前置指令碼(放置在表示式之前)或後置指令碼(放置在表示式之後)。
MathML 使用以下語法,即一個基本表示式,後跟任意數量的後下標-後上標對(按給定順序附加),可選地後跟一個 <mprescripts> 和任意數量的前下標-前上標對(按給定順序附加)。此外,空的 <mrow> 元素可用於表示缺失的指令碼。
html
<mmultiscripts>
base
postsubscript1 postsuperscript1
postsubscript2 postsuperscript2
postsubscript3 postsuperscript3
...
postsubscriptN postsuperscriptN
<mprescripts/> ⎫
presubscript1 presuperscript1 ⎪
presubscript2 presuperscript2 ⎬ Optional
presubscript3 presuperscript3 ⎪
... ⎪
presubscriptM presuperscriptM ⎭
</mmultiscripts>
屬性
此元素的屬性包括 全域性 MathML 屬性 以及以下已棄用的屬性
subscriptshift已棄用 非標準-
一個
<length-percentage>,指示下標基線向下移動的最小量。 superscriptshift已棄用 非標準-
一個
<length-percentage>,指示上標基線向上移動的最小量。
注意:對於 subscriptshift 和 superscriptshift 屬性,某些瀏覽器也可能接受 舊版 MathML 長度。
示例
使用 <mprescripts/>
<mprescripts/> 元素後的子元素作為前置指令碼(位於基本表示式之前)放置
html
<math display="block">
<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>
空指令碼
空的 <mrow> 元素可用於表示缺失的指令碼
html
<math display="block">
<mmultiscripts>
<mi>X</mi> <!-- base expression -->
<mrow></mrow> <!-- postsubscript -->
<mi>c</mi> <!-- postsuperscript -->
<mprescripts />
<mi>b</mi> <!-- presubscript -->
<mrow></mrow> <!-- presuperscript -->
</mmultiscripts>
</math>
指令碼順序
這是一個包含許多指令碼的更復雜的示例,因此您可以看到它們以什麼順序附加到基準上
html
<math display="block">
<mmultiscripts>
<mtext>base</mtext>
<mtext>postsubscript1</mtext>
<mtext>postsupscript1</mtext>
<mtext>postsubscript2</mtext>
<mtext>postsupscript2</mtext>
<mtext>postsubscript3</mtext>
<mtext>postsupscript3</mtext>
<mtext>postsubscript4</mtext>
<mtext>postsupscript4</mtext>
<mprescripts />
<mtext>presubscript1</mtext>
<mtext>presupscript1</mtext>
<mtext>presubscript2</mtext>
<mtext>presupscript2</mtext>
<mtext>presubscript3</mtext>
<mtext>presupscript3</mtext>
</mmultiscripts>
</math>
規範
| 規範 |
|---|
| MathML Core # prescripts-and-tensor-indices-mmultiscripts |
瀏覽器相容性
BCD 表僅在啟用 JavaScript 的瀏覽器中載入。