<< Chapter < Page | Chapter >> Page > |
Evidently, output is not what was intended. It is, therefore, always advisable to maintain same numbers of columns in each row. If there is no content, then that column should be kept as an empty column. Introducing the column definition back without any content restores the structure of table.
<m:mtd>
</m:mtd>
The out put now is :
<m:math display="block">
<m:mtable frame="solid" columnlines="solid" rowlines="solid">
<m:mtr>
<m:mtd>
<m:mi>x</m:mi>
</m:mtd>
<m:mtd>
</m:mtd>
<m:mtd>
<m:mi>z</m:mi>
</m:mtd>
</m:mtr>
<m:mtr>
<m:mtd>
<m:mn>1</m:mn>
</m:mtd>
<m:mtd>
<m:mn>2</m:mn>
</m:mtd>
<m:mtd>
<m:mn>3</m:mn>
</m:mtd>
</m:mtr>
</m:mtable>
</m:math>
Save the file after editing as “test.xml”. The display looks like :
$$\begin{array}{|ccc|}\hline x& & z\\ 1& 2& 3\\ \hline\end{array}$$
The default setting for “frame”, “rowlines” and columnlines are “none”. For this reason, the rendering of a table with bare “mtable” results in a frame-less invisible table. Only content of the columns are displayed. A 2X3 table is drawn with default values in the example given here.
<m:math display="block">
<m:mtable>
<m:mtr>
<m:mtd>
<m:mi>x</m:mi>
</m:mtd>
<m:mtd>
<m:mi>y</m:mi>
</m:mtd>
<m:mtd>
<m:mi>z</m:mi>
</m:mtd>
</m:mtr>
<m:mtr>
<m:mtd>
<m:mn>1</m:mn>
</m:mtd>
<m:mtd>
<m:mn>2</m:mn>
</m:mtd>
<m:mtd>
<m:mn>3</m:mn>
</m:mtd>
</m:mtr>
</m:mtable>
</m:math>
Save the file after editing as “test.xml”. The display looks like :
$$\begin{array}{ccc}x& y& z\\ 1& 2& 3\end{array}$$
Notification Switch
Would you like to follow the 'A primer in mathml' conversation and receive update notifications?