MathML の <mtable>
要素は表や行列を作るのに使えます。<mtable>
の中には <mtr>
と <mtd>
のみが書けます。これらの要素の関係は,HTML の<table>
,<tr>
と <td>
の関係に似ています。
属性
- align
- Specifies the vertical alignment of the table with respect to its environment.
Possible values are:axis
(default): The vertical center of the table aligns on the environment's axis (typically the minus sign).baseline
: The vertical center of the table aligns on the environment's baseline.bottom
: The bottom of the table aligns on the environments baseline.center
: See baseline.top
: The top of the table aligns on the environments baseline.
align
attribute can end with a rownumber (e.g.align="center 3"
). This allows you to align the specified row of the table rather than the whole table. A negative Integer value counts rows from the bottom of the table. Starting with Gecko 8.0 (Firefox 8.0 / Thunderbird 8.0 / SeaMonkey 2.5) the interpretation of negative values has been corrected (バグ 601436). In Gecko 17.0 (Firefox 17.0 / Thunderbird 17.0 / SeaMonkey 2.14) the parsing has been updated to treat whitespace correctly. - alignmentscope
- class, id, style
- Provided for use with stylesheets.
- columnalign
- セル内の水平方向の揃えを指定します。スペース区切りで複数の値を書くこともでき,その場合,対応する列に適用されます(例:
columnalign="left right center"
)取り得る値はleft,center
(既定値)とright
です。 - columnlines
- 列間罫線を指定します。スペース区切りで複数の値を書くこともでき,その場合,対応する列の間に適用されます(例:
columnlines="none none solid"
)。取り得る値はnone
(既定値),solid
とdashed
です。 - columnspacing
- 列間スペースを指定します。
- columnwidth
- 列幅を指定します。
- displaystyle
- A Boolean value specifying whether more vertical space is used for displayed equations or, if set to
false
, a more compact layout is used to display formulas. The main effect is that larger versions of operators are displayed, whendisplaystyle
is set totrue
. - equalcolumns
- 全列の幅(訳注:原文は total height とあるが total width の誤りだろう)を強制的に同じにするか否かを示す真偽値。既定値は
false
。 - equalrows
- 全行の高さを強制的に同じにするか否かを示す真偽値。既定値は
false。
- frame
- Specifies borders of the entire table. Possible values are:
none
(default),solid
anddashed
. - framespacing
- Specifies additional space added between the table and frame.
- groupalign
- href
- Used to set a hyperlink to a specified URI.
- mathbackground
- The background color. You can use
#rgb
,#rrggbb
and HTML color names. - mathcolor
- The text color. You can use
#rgb
,#rrggbb
and HTML color names. - minlabelspacing
- A length value specifing the minimum space between a label and the adjacent cell in the row.
- rowalign
- セルの垂直方向の揃えを指定します。スペース区切りで複数の値を書くこともでき,その場合,対応する行に適用されます(例:
rowalign="top bottom axis"
)。取り得る値はaxis,baseline
(既定値),bottom,center
とtop
です。 - rowlines
- 行間罫線を指定します。スペース区切りで複数の値を書くこともでき,その場合,対応する列の間に適用されます。(例:
rowlines="none none solid"
)。取り得る値はnone
(既定値),solid
とdashed
です。 - rowspacing
- 行間スペースを指定します。
- side
<mlabeledtr>
ラベル要素を置く場所を指定します。 取り得る値はleft
,right
(既定値),leftoverlap
とrightoverlap
です。- width
- Specifies the width of the entire table. Accepts length values.
例
Example 1: 揃える位置を行番号で指定する
Rendering:
<math>
<mi>X</mi>
<mo>=</mo>
<mtable frame="solid" rowlines="solid" align="axis 3">
<mtr>
<mtd><mi>A</mi></mtd>
<mtd><mi>B</mi></mtd>
</mtr>
<mtr>
<mtd><mi>C</mi></mtd>
<mtd><mi>D</mi></mtd>
</mtr>
<mtr>
<mtd><mi>E</mi></mtd>
<mtd><mi>F</mi></mtd>
</mtr>
</mtable>
</math>
仕様
Specification | Status | Comment |
---|---|---|
MathML 3.0 mtable の定義 |
勧告 | Current specification |
MathML 2.0 mtable の定義 |
勧告 | Initial specification |
ブラウザ毎の互換性
BCD tables only load in the browser
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.