<< 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 :

Table with same numbers of columns

<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 :

x z 1 2 3

Displaying table

    Attribute value types

  • align (default : "axis") : (top | bottom | center | baseline | axis) [ rownumber ]
  • rowalign (default : "baseline") : (top | bottom | center | baseline | axis)+
  • columnalign (default : "center") : (left | center | right) +
  • groupalign (default : "left") : group-alignment-list-list
  • alignmentscope (default : "true") : (true | false) +
  • columnwidth (default : "auto") : (auto | number h-unit | namedspace | fit) +
  • width (default : "auto") : auto | number h-unit
  • rowspacing (default : "1.0ex") : (number v-unit) +
  • columnspacing (default : "0.8em") : (number h-unit | namedspace) +
  • rowlines (default : "none") : (none | solid | dashed) +
  • columnlines (default : "none") : (none | solid | dashed) +
  • columnlines (default : "none") : none | solid | dashed
  • frame (default : "none") : none | solid | dashed
  • framespacing (default : 0.4em, 0.5ex) : (number h-unit | namedspace) (number v-unit | namedspace)
  • equalrows (default : "false") : true | false
  • equalcolumns (default : "false") : true | false
  • displaystyle (default : "false") : true | false
  • side (default : "right") : left | right | leftoverlap | rightoverlap
  • minlabelspacing (default : "0.8em") : number h-unit | namedspace

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.

Table with defualt values

<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 :

x y z 1 2 3

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, A primer in mathml. OpenStax CNX. Apr 19, 2006 Download for free at http://cnx.org/content/col10345/1.16
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'A primer in mathml' conversation and receive update notifications?

Ask