From 7b3e78106311d908d9c4b3564bf9d0b7a57b6f42 Mon Sep 17 00:00:00 2001
From: David Carlisle Matrices, arrays and other table-like mathematical notation are marked
up using In addition to the table elements mentioned above, the A matrix or table is specified using the A matrix or table is specified using the Table rows that have fewer columns than other rows of the same
@@ -6388,9 +6370,8 @@ MathML does not specify a table layout algorithm. In
particular, it is the responsibility of a MathML renderer to resolve
@@ -6683,35 +6664,6 @@ Note that none of the areas occupied by lines
Changes to
but invalid in the default schema.
none
is
replaced by an empty mrow
throughout,
- to match [[MathML-Core]].
+ to match [[MathML-Core]].mlabeledtr
and the associacted attributes
+ side
and minlabelspacing
+ are no longer specified. They are removed from the default schema but valid in
+ the Legacy Schema.Table of argument requirements
-
- mtable
0 or more rows
- 0 or more
- mtr
or mlabeledtr
elements
-
- mlabeledtr
1 or more
- a label and 0 or more
+ mtd
elements0 or more
mtr
elements
@@ -922,11 +916,6 @@
- Tables and Matrices
table or matrix
-
-
- mlabeledtr
row in a table or matrix with a label or equation number
-
- mtr
row in a table or matrix
@@ -4060,7 +4049,7 @@ Description
mglyph
, mpadded
, or mtable
. Similarly, when
rowalign
or columnalign
are specified on an mstyle
element, they apply only to the
- mtable
element, and not the mtr
, mlabeledtr
,
+ mtable
element, and not the mtr
,
mtd
, and maligngroup
elements.
When the lspace
attribute is set with mstyle
, it
applies only to the mo
element and not to mpadded
.
@@ -6349,7 +6338,7 @@ Tabular Math
mtable
,
- mtr
, mlabeledtr
and
+ mtr
and
mtd
elements. These elements are similar to the
table
, tr
and td
elements of HTML, except that they provide
specialized attributes for the fine layout control
@@ -6360,13 +6349,7 @@ Tabular Math
For layout and for accessibility reasons, the mstack
and mlongdiv
elements discussed
in should be used for elementary math notations.
- mlabeledtr
element is used for labeling rows
- of a table. This is useful for numbered equations.
- The first child of mlabeledtr
is the label.
- A label is somewhat special in that it is not considered an expression
- in the matrix and is not counted when determining the number of columns
- in that row.Table or Matrix
@@ -6374,8 +6357,7 @@ <mtable>
Table or Matrix
Description
- mtable
element. Inside of the mtable
element, only mtr
- or mlabeledtr
elements may appear.
+ mtable
element. Inside of the mtable
element, only mtr
elements may appear.
Description
attributes may affect
the number of mtd
elements that should be given
in subsequent mtr
elements to cover a given
- number of columns.
- Note also that the label in an mlabeledtr
element
- is not considered a column in the table.
+ number of columns.
+
Attributes
-
-
- side
- "left" | "right" | "leftoverlap" | "rightoverlap"
- right
-
-
-
-
- specifies on what side of the table labels from enclosed
- mlabeledtr
(if any) should be placed.
- The variants leftoverlap
and rightoverlap
- are useful when the table fits with the allowed width
- when the labels are omitted, but not when they are included:
- in such cases, the labels will overlap the row placed above it
- if the rowalign
for that row is top
,
- otherwise it is placed below it.
-
-
-
- minlabelspacing
- length
- 0.8em
-
-
@@ -6730,8 +6682,7 @@
- specifies the minimum space allowed between a label and the adjacent cell in the row.
-
- Attributes
frame
, rowlines
and columnlines
,
- nor the spacing framespacing
, rowspacing
or columnspacing
,
- nor the label in mlabeledtr
are counted as rows or columns.framespacing
, rowspacing
or columnspacing
are counted as rows or columns.
The displaystyle
attribute is allowed on the mtable
element to set the inherited value of the attribute. If the attribute is
@@ -6848,100 +6799,25 @@
<mlabeledtr>
An mlabeledtr
element represents one row in
- a table that has a label on either the left or right side, as
- determined by the side
attribute. The label is
- the first child of mlabeledtr
, and should be enclosed in an mtd
.
- The rest of the children represent the contents of the row and are treated identically
- to the children of mtr
; consequently all of the children
- must be mtd
elements.
-
- An mlabeledtr
element is only allowed as a
- direct sub-expression of an mtable
element.
- Each argument of mlabeledtr
except for the first
- argument (the label) is placed in a different column
- of the table, starting at the leftmost column.
Note that the label element is not considered to be a cell in the
- table row. In particular, the label element is not taken into
- consideration in the table layout for purposes of width and alignment
- calculations. For example, in the case of an mlabeledtr
with a label and a single centered mtd
child, the child is first centered in the
- enclosing mtable
, and then the label is
- placed. Specifically, the child is not centered in the
- space that remains in the table after placing the label.
While MathML does not specify an algorithm for placing labels,
- implementers of visual renderers may find the following formatting
- model useful. To place a label, an implementor might think in terms
- of creating a larger table, with an extra column on both ends. The
- columnwidth
attributes of both these border
- columns would be set to fit
so that they expand
- to fill whatever space remains after the inner columns have been laid
- out. Finally, depending on the values of side
- and minlabelspacing
, the label is placed
- in whatever border column is appropriate, possibly shifted down if
- necessary, and aligned according to columnalignment
.
- The attributes for mlabeledtr
are the same
- as for mtr
. Unlike the attributes for the
- mtable
element, attributes of
- mlabeledtr
that apply to column elements
- also apply to the label. For example, in a one column table,
-
- - <mlabeledtr rowalign='top'> - --
means that the label and other entries in the row are vertically aligned
- along their top. To force a particular alignment on the label,
- the appropriate attribute would normally be set on the
- mtd
element that surrounds the label content.
-
One of the important uses of mlabeledtr
is
+
+
+
Earlier versions of MathML specified an mlabeledtr
element
for numbered equations. In an mlabeledtr
, the
- label represents the equation number and the elements in the row are
- the equation being numbered. The side
and minlabelspacing
attributes of mtable
determine the placement of the equation
- number.
mtd
represented the equation number and the remaining elements in the row
+ the equation being numbered. The side
and minlabelspacing
attributes of mtable
determined the placement of the equation
+ number.
+ This element was not widely implemented and is not specified in the current version, it is still valid
+ in the Legacy Schema.
In larger documents with many numbered equations, automatic
numbering becomes important. While automatic equation numbering and
automatically resolving references to equation numbers is outside the
scope of MathML, these problems can be addressed by the use of style
- sheets or other means. The mlabeledtr construction provides support
- for both of these functions in a way that is intended to facilitate
- XSLT processing. The mlabeledtr
element can be
- used to indicate the presence of a numbered equation, and the first
- child can be changed to the current equation number, along with
- incrementing the global equation number. For cross references, an
- id
on either the mlabeledtr element or on the first element
- itself could be used as a target of any link.
- Alternatively, in a CSS context, one could use an empty mtd
- as the first child of mlabeledtr
and use CSS counters and generated content
+ sheets or other means. Un a CSS context, one could use an empty mtd
+ as the first child of a mtr
and use CSS counters and generated content
to fill in the equation number using a CSS style such as
- <mtable> - <mlabeledtr id='e-is-m-c-square'> - <mtd> - <mtext> (2.1) </mtext> - </mtd> - <mtd> - <mrow> - <mi>E</mi> - <mo>=</mo> - <mrow> - <mi>m</mi> - <mo>⁢<!--InvisibleTimes--></mo> - <msup> - <mi>c</mi> - <mn>2</mn> - </msup> - </mrow> - </mrow> - </mtd> - </mlabeledtr> - </mtable> --
- -- -
<mtd>
An mtd
element represents one entry, or cell, in a
table or matrix. An mtd
element is only
allowed as a direct sub-expression of an mtr
- or an mlabeledtr
element.
The mtd
element accepts
a single argument possibly being an inferred mrow
of multiple children;
@@ -7083,13 +6927,7 @@
The rowspan
and columnspan
attributes
- can be used around an mtd
element that represents
- the label in an mlabeledtr
element.
- Also, the label of an mlabeledtr
element is not
- considered to be part of a previous rowspan
and
- columnspan
.
-
Earlier versions of MathML specified an mlabeledtr
element
for numbered equations. In an mlabeledtr
, the
- first mtd
represented the equation number and the remaining elements in the row
- the equation being numbered. The side
and minlabelspacing
attributes of mtable
determined the placement of the equation
+ first mtd
represents the equation number and the remaining elements in the row
+ the equation being numbered. The side
and minlabelspacing
attributes of mtable
determines the placement of the equation
number.
This element was not widely implemented and is not specified in the current version, it is still valid
in the Legacy Schema.
mtd
+ sheets or other means. In a CSS context, one could use an empty mtd
as the first child of a mtr
and use CSS counters and generated content
to fill in the equation number using a CSS style such as