diff --git a/src/presentation-markup.html b/src/presentation-markup.html index 1359ffd..dcaf573 100644 --- a/src/presentation-markup.html +++ b/src/presentation-markup.html @@ -483,7 +483,7 @@
dir
attribute is thus allowed on token elements to specify
the initial directionality that may be needed in rare cases.)
- Any mglyph
or malignmark
elements appearing within
+ Any mglyph
elements appearing within
a token element are effectively neutral and have no effect
on ordering.
@@ -1126,12 +1126,9 @@ mspace
element,
token elements can contain any sequence of zero or more Unicode characters,
- or mglyph
or
- malignmark
elements.
+ or mglyph
elements.
The mglyph
element is used
- to represent non-standard characters or symbols by images;
- the malignmark
element establishes an alignment point for use within
- table constructs, and is otherwise invisible (see ).
+ to represent non-standard characters or symbols by images.
Characters can be either represented directly as Unicode character data, or indirectly via numeric @@ -3370,9 +3367,7 @@
mtext
,
or in some cases mo
or mi
, but never with ms
.
- Note that the string literals encoded by ms
are made up of characters, mglyph
s and
- malignmark
s rather than ASCII
- strings
. For
+
Note that the string literals encoded by ms
are made up of characters, mglyph
s rather than ASCII strings
. For
example, <ms>&</ms>
represents a string
literal containing a single character, &
, and
<ms>&amp;</ms>
represents a string literal
@@ -6843,21 +6838,11 @@
malignmark
and maligngroup
are not supported in [[MathML-Core]].
- For most purposes it is recommended that alignment is implemented directly using mtable
columns. As noted in the following section these elements may be futher simplified or removed in a future version of MathML.
-
For existing MathML using malignmark
a Javascript polyfill
- is provided.
mtable
columns.
+ For existing MathML using malignmark
a Javascript polyfill is provided.
- With one significant exception, <maligngroup/>
and <malignmark/>
- have had minimal adoption and implementation.
- The one exception only uses the basics of alignment. Because of this, alignment in MathML is significantly
- simplified to align with the current usage and make future implementation simplier. In particular, the following simplifications are made:
+ The elements <maligngroup/>
and <malignmark/>
have been simplified compared to earlier release of MathML:
<maligngroup/>
and <malignmark/>
have been removed.<malignmark/>
used to be allowed anywhere, including inside of token elements;
it is now allowed in only the locations that <maligngroup/>
is allowed (see below)The discussion that follows will use the example of a set of - simultaneous equations that should be rendered with vertical - alignment of the coefficients and variables of each term, by - inserting spacing somewhat like that shown here:
- -8.44x | -+ | -55 | - y= | -- 0 |
3.1 | - x− | -- 0.7y | = | -−1.1 | -
If the example expressions shown above were arranged in a column - but not aligned, they would appear as:
- -8.44x - + - 55.7y - = - 0 | -
3.1x - − - 50.7y - = - −1.1 | -
The expressions whose parts are to be aligned (each equation, in the
example above) must be given as the table elements (i.e. as the mtd
elements) of one column of an
@@ -6939,14 +6876,13 @@
If there is only one alignment point, an alternative is to use linebreaking and indentation attributes
- on mo
elements as described in .
Although alignment groups need not +
Although alignment groups need not
coincide with the nested expression structure of layout schemata,
there are nonetheless restrictions on where maligngroup
and malignmark
@@ -6998,18 +6934,12 @@
an mrow
element, including an inferred
+
an mrow
or mstyle
element, including an inferred
mrow
such as the one formed by a multi-child
mtd
element, but excluding mrow
which
contains a change of direction using the dir
attribute;
an mstyle
element
- , but excluding those which change direction
- using the dir
attribute;
an mphantom
element;
a semantics
element.
These restrictions are intended to ensure that alignment can be @@ -7036,7 +6963,7 @@
For the table cells that are divided into alignment groups, every
element in their content must be part of exactly one alignment group,
- except for the elements from the above list that contain
+ except for the elements from the above list that contain
maligngroup
elements inside them and the
maligngroup
elements themselves. This means
that, within any table cell containing alignment groups, the first
@@ -7052,81 +6979,18 @@
Do we want to tighten this so that all rows have the same number of maligngroup
elements?
-
Do we still want to allow rows without maligngroup
as described in this section?
-
Expressions in a column that are to have no alignment groups
should contain no maligngroup
elements. Expressions with no alignment groups are aligned using only
the columnalign
attribute that applies to the table
- column as a whole. If such an expression is wider than the
- column width needed for the table cells containing alignment groups,
- all the table cells containing alignment groups will be shifted as a
- unit within the column as described by the columnalign
- attribute for that column. For example, a column heading with no
- internal alignment could be added to the column of two equations given
- above by preceding them with another table row containing an
- mtext
element for the heading, and using the
- default columnalign
="center" for the table, to
- produce:
equations with aligned variables | ||||||
- | 8.44x | -+ | -55 | - y= | -- 0 | - |
- | 3.1 | - x− | -- 0.7y | = | -−1.1 | -- |
or, with a shorter heading,
- -some equations | ||||
8.44x | -+ | -55 | - y= | -- 0 |
3.1 | - x− | -- 0.7y | = | -−1.1 | -
malignmark
element is provided within an
alignment group, it should only occur within the elements allowed for maligngroup
(see ).
- If there is more than one malignmark
element
- in an alignment group, all but the first one will be ignored. MathML
- applications may wish to provide a mode in which they will warn about
- this situation, but it is not an error, and should trigger no warnings
- by default. The rationale for this is that it would
- be inconvenient to have to remove all
- unnecessary malignmark
elements from
- automatically generated data.
+ If there should be at most one malignmark
element
+ in an alignment group.
A simple algorithm by which a MathML renderer can perform the
- alignment specified in this section is given here. Since the alignment
- specification is deterministic (except for the definition of the left
- and right edges of a character), any correct MathML alignment
- algorithm will have the same behavior as this one. Each
- mtable
column (alignment scope) can be treated
- independently; the algorithm given here applies to one
- mtable
column, and takes into account the
- alignment elements and the columnalign
attribute described
- under mtable
().
- In an RTL context, switch left and right edges in the algorithm.
This algorithm should be verified by an implementation. -
-maligngroup
and malignmark
- elements. The final rendering will be identical except for horizontal
- shifts applied to each alignment group and/or table cell.malignmark
, otherwise the left edge),
- and right edge are noted, allowing the width of
- the group on each side of the alignment point (left and right) to be
- determined. The sum of these two side-widths, i.e. the sum of the - widths to the left and right of the alignment point, will equal the - width of the alignment group.
The widths of the table cells that contain no alignment groups - were computed as part of the initial rendering, and may be different - for each cell, and different from the single width used for cells - containing alignment groups. The maximum of all the cell widths (for - both kinds of cells) gives the width of the table column as a - whole.
- -The position of each cell in the column is determined by the
- applicable part of the value of the columnalign
attribute
- of the innermost surrounding mtable
,
- mtr
, or mtd
element that
- has an explicit value for it, as described in the sections on those
- elements. This may mean that the cells containing alignment groups
- will be shifted within their column, in addition to their alignment
- groups having been shifted within the cells as described above, but
- since each such cell has the same width, it will be shifted the same
- amount within the column, thus maintaining the vertical alignment of
- the alignment points of the corresponding alignment groups in each
- cell.
Alignments marked wth maligngroup
+ may be converted to an equivalent mtable
+ that does not use maligngroup
, but uses
+ additional table columns.
+ A Javascript polyfill is provided
+ to implement such a transformation which may be useful with [[MathML-Core]] implementations.
??.