<mmultiscripts>

<mmultiscripts>MathML の要素で、 <msubsup> 要素を一般化して、式に任意の数の下付き添え字と上付き添え字を一度に付けるために使用されます。スクリプトは、プレスクリプト(式の前に配置)またはポストスクリプト(式の後に配置)のいずれかになります。

MathML は以下の構文を使用します。つまり、基本式に任意の数の後下付き添え字と後上付き添え字の組(指定された順序で付加される)が続き、オプションで <mprescripts> と任意の数の前下付き添え字と前上付き添え字の組(指定された順序で付加される)が続きます。さらに、空の <mrow> 要素を使用して、存在しないスクリプトを表すことができます。

html
<mmultiscripts>
  base
  後下付き添え字1 後上付き添え字1
  後下付き添え字2 後上付き添え字2
  後下付き添え字3 後上付き添え字3
  ...
  後下付き添え字N 後上付き添え字N
  <mprescripts/>                  ⎫
  前下付き添え字1 前上付き添え字1 ⎪
  前下付き添え字2 前上付き添え字2 ⎬ オプション
  前下付き添え字3 前上付き添え字3 ⎪
  ...                             ⎪
  前下付き添え字M 前上付き添え字M ⎭
</mmultiscripts>

属性

この要素の属性には、グローバル MathML 属性の他に以下の属性があります。

subscriptshift 非推奨 Non-standard

<length-percentage> で、式のベースラインより下に添字を移動させる最小の空間を示します。

superscriptshift 非推奨

<length-percentage> で、式のベースライン上に上付き文字を移動させる最小の空間を示します。

メモ: subscriptsshift 属性と superscriptsshift 属性については、ブラウザーによっては MathML における古い長さも受け付けます。

<mprescripts/> の使用

<mprescripts/> 要素以降の子要素はプレスクリプト(ベースとなる式の前)として置かれます。

html
<math display="block">
  <mmultiscripts>
    <mi>X</mi>      <!-- 基部 -->
    <mi>d</mi>      <!-- 後の下付き文字-->
    <mi>c</mi>      <!-- 後の上付き文字 -->
    <mprescripts />
    <mi>b</mi>      <!-- 前の下付き文字 -->
    <mi>a</mi>      <!-- 前の上付き文字 -->
  </mmultiscripts>
</math>

<none/> の使い方

空の <mrow> 要素は、スクリプトがないことを表します。

html
<math display="block">
  <mmultiscripts>
    <mi>X</mi>      <!-- 基部 -->
    <mrow></mrow>   <!-- 後の下付き文字 -->
    <mi>c</mi>      <!-- 後の上付き文字 -->
    <mprescripts />
    <mi>b</mi>      <!-- 前の下付き文字 -->
    <mrow></mrow>   <!-- 前の上付き文字 -->
  </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>

仕様書

Specification
MathML Core
# prescripts-and-tensor-indices-mmultiscripts

ブラウザーの互換性

BCD tables only load in the browser

関連情報