- MathML 教程
- MathML - 首頁
- MathML - 概述
- MathML - 所有元素
- MathML - 基本元素
- MathML - 載體
- MathML - 閉合元素
- MathML - 界限符
- MathML - 分數
- MathML - 長除法
- MathML - 矩陣
- MathML - 乘法
- MathML - 上標
- MathML - 填充
- MathML - 虛元素
- MathML - 根式
- MathML - 迴圈小數
- MathML - 樣式
- MathML - 下標
- MathML - 下標-上標
- MathML - 上標
- MathML - 下下標
- MathML - 下下標-上標
- MathML 符號
- MathML - 代數符號
- MathML - 微積分符號
- MathML - 省略號符號
- MathML - 函式符號
- MathML - 幾何符號
- MathML - 希臘字母
- MathML - 無形運算子
- MathML - 邏輯符號
- MathML - 集合符號
- MathML 有用資源
- MathML - 快速指南
- MathML - 有用資源
- MathML - 討論
MathML - 矩陣
<mtable> 標籤用於繪製矩陣。
語法
mtable 類似於 HTML 的 table 標籤,此標籤使用 mtr、mtd 元素,它們類似於 HTML 的 tr 和 td 標籤。
<mtable> <mtr> <mtd></mtd></mtr></mfrac>
屬性
以下是此標籤所有屬性的描述:
align − 指定表格的垂直對齊方式。有效值為:axis、baseline、bottom、center、top。預設值為 axis。
class, id, style − 與樣式表一起使用。
columnalign − 指定單元格的水平對齊方式。有效值為:left、center 和 right。預設值為 center。
columnlines − 指定列邊框。有效值為:none、solid 和 dashed。預設值為 none。
columnspacing − 指定表格列之間的間距。
displaystyle − 如果為 true,則為顯示的方程式使用更多垂直空間;如果為 false,則使用更緊湊的佈局來顯示公式。
frame − 指定整個表格的邊框。有效值為:none、solid 和 dashed。預設值為 none。
framespacing − 指定在表格和邊框之間新增的額外空間。
href − 指定指向指定 uri 的超連結。
mathbackground − 指定背景顏色。有效格式為 #rgb、#rrggbb 和 html 顏色名稱。
mathcolor − 指定文字顏色。有效格式為 #rgb、#rrggbb 和 html 顏色名稱。
rowalign − 指定單元格的垂直對齊方式。有效值為 axis、baseline、bottom、center 和 top。預設值為 baseline
rowlines − 指定行邊框。有效值為:none、solid 和 dashed。預設值為 none。
width − 指定整個表格的寬度。
示例
讓我們繪製一個 3 x 3 矩陣。
<math xmlns = "http://www.w3.org/1998/Math/MathML">
<mrow>
<mo>[</mo>
<mtable>
<mtr>
<mtd><mn>1</mn></mtd>
<mtd><mn>0</mn></mtd>
<mtd><mn>0</mn></mtd>
</mtr>
<mtr>
<mtd><mn>0</mn></mtd>
<mtd><mn>1</mn></mtd>
<mtd><mn>0</mn></mtd>
</mtr>
<mtr>
<mtd><mn>0</mn></mtd>
<mtd><mn>0</mn></mtd>
<mtd><mn>1</mn></mtd>
</mtr>
</mtable>
<mo>]</mo>
</mrow>
</math>