mtable

(Excerpt from "The MathML Handbook" by Pavi Sandhu)

Syntax

<mtable>(child)*</mtable>

Description

The mtable element is used to represent tables or matrices. It takes zero or more mtr or mlabeledtr elements, each of which corresponds to a single row of the table or matrix.

Attributes

This element accepts the eighteen attributes shown in the following table.

Table: Attributes of mtable.

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

For several of these attributes, the value can be a sequence of zero or more entries. In such cases, the first entry applies to the first row or column, the second entry to the second row/column, and so on. If there are fewer entries than rows/columns in the table, the last entry is repeated as many times as necessary. If there are more entries than rows/columns, the extra entries are ignored.

These attributes have the following meaning:

  • align: specifies where to align the table with respect to its environment. If the value of this attribute ends with a number between 1 and n (for a table with n rows), the value of that entry is applied to that row of the table only. The top row is numbered 1 and the bottom row is numbered n. Alternatively, you can use a negative number between -1 and -n, in which case the top row is referred to as -n and the bottom row as -1. Possible values of this attribute are:

    • top: aligns the top of the table along the environment's baseline.
    • bottom: aligns the bottom of the table along the environment's baseline.
    • center: aligns the center of the table (that is, the midpoint of the table's vertical extent) along the environment's baseline.
    • baseline: same as center.
    • axis: aligns the center of the table along the environment's axis (that is, the line on which the minus sign typically lies).

  • rowalign: specifies how the entries in each row should be aligned. Possible values are:

    • top:specifies that the top of all entries in the row should be aligned.
    • bottom: specifies that the bottom of all entries in the row should be aligned.
    • center: specifies that the center of all entries in the row should be aligned.
    • baseline:specifies that the baseline of all entries in the row should be aligned.
    • axis: specifies that the axis of all entries in the row should be aligned.

  • columnalign: specifies how the entries in each column should be aligned. Possible values are:

    • left: specifies that the left edge of all entries in the column should be aligned.
    • center: specifies that the center of all entries in the column should be aligned.
    • right: specifies that the right edge of all entries in the column should be aligned.

  • columnwidth: specifies how wide a column should be. Possible values are:

    • auto: specifies that the column is as wide as needed to accommodate its contents.
    • number h-unit or namedspace: specifies a fixed width either by giving a number and a unit or any of the seven named spaces, each of which define a fixed width between 1/18 em and 7/18 em.
    • fit: adjusts the width of the columns so the table spans the width of the page; the width of each column that is set to a fixed width or auto is subtracted from the page width and the resulting number is divided by the remaining number of columns.

  • width: specifies the width of the entire table. It can be set to a fixed number or auto, which means that the renderer should adjust the width of the table, depending on its contents.
  • rowspacing: specifies the amount of space between any two rows. The spacing before the first row and after the last row is determined by the attribute framespacing.
  • columnspacing: specifies the amount of space between any two columns. The spacing before the first column and after the last column is determined by the attribute framespacing.
  • rowlines: specifies the type of line to be drawn between any two rows, if any.
  • columnlines: specifies the type of line to be drawn between any two columns, if any.
  • equalrows: if true, forces all the rows to have the same height.
  • equalcolumns: if true, forces all the columns to have the same width.
  • frame: specifies if a frame should be drawn around the table.
  • framespacing: if frame is set to either solid or dashed, determines how much space should be left between the frame and the first and last row or column. It is given as a sequence of two numbers; the first one determines the spacing between the frame and the first and last row, and the second determines the spacing between the frame and the first and last column.
  • displaystyle: specifies the display mode for each cell of the table. The default value is false and is appropriate when the table is embedded in a block of text. A value of true is appropriate if the table is displayed in a separate block by itself. In either case, the value of scriptlevel in the cells of the table is unchanged.
  • side: specifies on what side of the table the label for a labeled row should be displayed. The label is displayed on the left if set to left and on the right if set to right. If the table fits on the page without the label but does not fit when the label is added, the label overlaps the row and is shown above the row if rowalign for that row is top and below the row otherwise.
  • minlabelspacing: specifies the minimum space allowed between a label and the adjacent entry in the corresponding row.
  • groupalign: specifies the alignment point for alignment groups defined using the maligngroup element.
  • alignmentscope: specifies if alignment information defined using the maligngroup and malignmark elements should be interpreted or ignored.

   

<< back next >>

 

 

 

Tipp der data2type-Redaktion:
Zum Thema MathML bieten wir auch folgende Schulungen zur Vertiefung und professionellen Fortbildung an:

 

Copyright © CHARLES RIVER MEDIA, INC., Massachusetts (USA) 2003
Printing of the online version is permitted exclusively for private use. Otherwise this chapter from the book "The MathML Handbook" is subject to the same provisions as those applicable for the hardcover edition: The work including all its components is protected by copyright. All rights reserved, including reproduction, translation, microfilming as well as storage and processing in electronic systems.


CHARLES RIVER MEDIA, INC., 20 Downer Avenue, Suite 3, Hingham, Massachusetts 02043, United States of America