MathML教程

MathML mtable

<mtable> 标签用于绘制矩阵。

语法

mtable 类似于 HTML 的 table 标签,该标签使用了类似于 HTML 的 tr 和 td 标签的 mtr、mtd 元素。
<mtable> <mtr> <mtd></mtd></mtr></mfrac>

属性

这里是这个标签的所有属性的描述-
align-指定表格的垂直对齐方式。有效值为:轴、基线、底部、中心、顶部。默认为轴。 class、id、style-与样式表一起使用。 columnalign-指定单元格的水平对齐方式。有效值为:左、中和右。默认为居中。 columnlines-指定列边框。有效值为:无、实线和虚线。默认为无。 columnspacing-指定表列之间的空间。 displaystyle-如果 true 更多的垂直空间用于显示方程,如果 false,则使用更紧凑的布局来显示公式。 frame-指定整个表格的边框。有效值为:无、实线和虚线。默认为无。 framespacing-指定在表格和框架之间添加的额外空间。 href-指定指向指定 uri 的超链接。 mathbackground-指定背景颜色。有效格式为 #rgb、#rrggbb 和 html 颜色名称。 mathcolor-指定文本颜色。有效格式为#rgb、#rrggbb 和 html 颜色名称。 rowalign-指定单元格的垂直对齐方式。有效值为轴、基线、底部、中心和顶部。默认为基线 rowlines-指定行边框。有效值为:无、实线和虚线。默认为无。 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> 

输出

[ 1 0 0 0 1 0 0 0 1 ]
昵称: 邮箱:
Copyright © 2022 立地货 All Rights Reserved.
备案号:京ICP备14037608号-4