<mmultiscripts>

Baseline 2023
Newly available

Since January 2023, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.

<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 非推奨; 非標準

<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

ブラウザーの互換性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
mmultiscripts
subscriptshift
DeprecatedNon-standard
superscriptshift
DeprecatedNon-standard

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support
Non-standard. Check cross-browser support before using.
Deprecated. Not for use in new websites.

関連情報