MathML の <mmultiscripts>
要素によって、テンソル的なものを作ることができます。見た目は、 テンソル は多次元の行列です(数学的には不正確だが喩えて言えば)。テンソルの階数は、それを表す配列の次元によって決まります。例えば、数は0次元の配列であり、0階のテンソルです。1次元配列(つまり数ベクトル)は1階のテンソルです。同様に、2階のテンソルは四角い行列(訳注:ふつうの意味での行列のこと)で表すことになります。テンソルの数学的背景についてもっと知りたければ、 ウィキペディアの記事 を参照してください。
MathML は、基部(base expression)に対する後付け(postscripts)および前付け(prescripts)の下付き/上付きの添字を表すために次のような特定の構文を使います:
<mmultiscripts> base (subscript superscript)* [ <mprescripts/> (presubscript presuperscript)* ] </mmultiscripts>
基部のあとに後付けの下付き添字と後付けの上付き添字を指定することができます(訳注:下付き/上付きの組は2個以上繰り返すこともできる)。前付けは任意で、空タグ <mprescripts/>
で区切って置きます(<mprescripts /> 要素は一つしか置くことができず、これを破ると エラーコンソール で DuplicateMprescripts
エラーとなり、表示は "invalid-markup" となります)。また、空の添字にはプレースホルダーとして <none/>
を置くことができます(基部には使えません)。正しい使い方は例をご覧ください。
属性
- class, id, style
- Provided for use with stylesheets.
- href
- 特定の URI へのハイパーリンクをセットするのに使います。
- mathbackground
- 背景色。
#rgb
,#rrggbb
および HTML color names が使えます。 - mathcolor
- 文字色。
#rgb
,#rrggbb
および 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.
例
<mprescripts/> の使い方
Sample rendering:
Rendering in your browser:
<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>
<none/> の使い方
Sample rendering:
Rendering in your browser:
<math>
<mmultiscripts>
<mi>X</mi> <!-- base expression -->
<none /> <!-- postsubscript -->
<mi>c</mi> <!-- postsuperscript -->
<mprescripts />
<mi>b</mi> <!-- presubscript -->
<none /> <!-- presuperscript -->
</mmultiscripts>
</math>
仕様
Specification | Status | Comment |
---|---|---|
MathML 3.0 mmultiscripts の定義 |
勧告 | Current specification |
MathML 2.0 mmultiscripts の定義 |
勧告 | Initial specification |
ブラウザ実装状況
BCD tables only load in the browser
Gecko-specific notes
- Starting with Gecko 26.0 (Firefox 26 / Thunderbird 26 / SeaMonkey 2.23 / Firefox OS 1.2) it is no longer possible to use
<none />
as the base element. The rendering has been made more consistent with equivalent configurations of<msup>
and<msubsup>
. A bug with the incorrect application ofsubscriptshift
andsuperscriptshift
attributes has been fixed (see バグ 827713 for details).