From f2bf35a157aa52710fef03a8a48b19f81bc649fa Mon Sep 17 00:00:00 2001
From: David Carlisle Note: while [[MathML-Core]] supports the above attributes, it only allows the value to be a valid
+ While [[MathML-Core]] supports the above attributes, it only allows the value to be a valid
MathML 3 also allowed additional extensions: The [=pseudo-unit=] syntax symbol is described below.
- Also, These attributes specify the size of the bounding box of the Changes to
none
is
replaced by an empty mrow
throughout,
to match [[MathML-Core]].mlabeledtr
and the associacted attributes
+ mlabeledtr
and the associated attributes
side
and minlabelspacing
are no longer specified. They are removed from the default schema but valid in
the Legacy Schema.mpadded
length attributes
+ ( "+" | "-" )?
+ unsigned-number
+ ( ("%" pseudo-unit?)
+ | pseudo-unit
+ | unit
+ | namedspace
+ )?
is no longer supported.
+ Most of the functionality is still available using standard CSS
+ length syntax. See Note: mpadded
+ lengths.Attributes
@@ -4427,13 +4421,7 @@ height
- ( "+" | "-" )?
- [=unsigned-number=]
- ( ("%" [=pseudo-unit=]?)
- | [=pseudo-unit=]
- | unit
- | [=namedspace=]
- )?
+ length
same as content
Attributes
@@ -4446,13 +4434,7 @@ depth
- ( "+" | "-" )?
- [=unsigned-number=]
- (("%" [=pseudo-unit=]?)
- | [=pseudo-unit=]
- | unit
- | [=namedspace=]
- )?
+ length
same as content
Attributes
@@ -4465,13 +4447,7 @@ width
- ( "+" | "-" )?
- [=unsigned-number=]
- ( ("%" [=pseudo-unit=]?)
- | [=pseudo-unit=]
- | unit
- | [=namedspace=]
- )?
+ length
same as content
Attributes
@@ -4484,13 +4460,7 @@ lspace
- ( "+" | "-" )?
- [=unsigned-number=]
- ( ("%" [=pseudo-unit=]?)
- | [=pseudo-unit=]
- | unit
- | [=namedspace=]
- )?
+ length
0em
Attributes
@@ -4503,16 +4473,23 @@ voffset
- ( "+" | "-" )?
- [=unsigned-number=]
- ( ("%" [=pseudo-unit=]?)
- | [=pseudo-unit=]
- | unit
- | [=namedspace=]
- )?
+ length
0em
Attributes
-
- <length-percentage>
.
- Increments with the optional "+" or "-" signs are not supported in MathML Core nor are pseudo-units.
+
+ <length-percentage>
+ syntax: height="calc(100%+10pt)"
.height
, depth
and width
. These are not supported in MathML 4 however the main use cases are addressed using percentage values, `height="0.5height"` is equivalent to `height="50%`.height
, depth
and
- width
attributes are
- referred to as size attributes, while lspace
and voffset
attributes
- are position attributes.mpadded
element relative to the size of the bounding box of its child content, and specify
@@ -4526,71 +4503,16 @@ Attributes
dimensions of the normal rendering of the child content using so-called [=pseudo-unit=]s,
or they can be set directly using standard units, see .
If the value of a size attribute begins with a +
or -
sign,
- it specifies an increment or decrement to the corresponding
- dimension by the following length value. Otherwise the corresponding
- dimension is set directly to the following length value.
- Note that since a leading minus sign indicates a decrement, the size
- attributes (height
, depth
, width
)
- cannot be set directly to negative values. In addition, specifying a
- decrement that would produce a net negative value for these attributes
+
The corresponding
+ dimension is set to the following length value.
+ specifying a
+ length that would produce a net negative value for these attributes
has the same effect as
setting the attribute to zero. In other words, the effective
bounding box of an mpadded
element always has non-negative
dimensions. However, negative values are allowed for the relative positioning
attributes lspace
and voffset
.
Length values (excluding any sign) can be specified in several formats.
- Each format begins with an [=unsigned-number=],
- which may be followed by
- a %
sign (effectively scaling the number)
- and an optional [=pseudo-unit=],
- by a [=pseudo-unit=] alone,
- or by a unit (excepting %
).
- The possible [=pseudo-unit=]s are the keywords height
,
- depth
, and width
. They represent the length of the same-named dimension of the
- mpadded
element's child content.
-
For any of these length formats, the resulting length
- is the product of the number (possibly including the %
)
- and the following [=pseudo-unit=],
- unit,
- [=namedspace=]
- or the default value for the attribute if no such unit or space is given.
Some examples of attribute formats using [=pseudo-unit=]s (explicit or
- default) are as follows: depth="100%height"
and
- depth="1.0height"
both set the depth of the
- mpadded
element to the height of its content.
- depth="105%"
sets the depth to 1.05 times the content's
- depth, and either depth="+100%"
or
- depth="200%"
sets the depth to twice the content's
- depth.
The rules given above imply that all of the following attribute - settings have the same effect, which is to leave the content's - dimensions unchanged:
- -- <mpadded width="+0em"> ... </mpadded> - <mpadded width="+0%"> ... </mpadded> - <mpadded width="-0em"> ... </mpadded> - <mpadded width="-0height"> ... </mpadded> - <mpadded width="100%"> ... </mpadded> - <mpadded width="100%width"> ... </mpadded> - <mpadded width="1width"> ... </mpadded> - <mpadded width="1.0width"> ... </mpadded> - <mpadded> ... </mpadded> --
Note that the examples in the Version 2 of the MathML specification showed - spaces within the attribute values, suggesting that this was the intended format. - Formally, spaces are not allowed within these values, but implementers may - wish to ignore such spaces to maximize backward compatibility. -
-<mrow> <mi>x</mi> - <mpadded width="+90%width" height="+0.3ex" depth="+0.3ex"> + <mpadded width="190%" height="calc(100% +0.3ex)" depth="calc(100% +0.3ex)"> <mi>y</mi> </mpadded> <mi>z</mi> @@ -4762,7 +4684,7 @@Examples
<mrow> <mi>x</mi> - <mpadded lspace="0.3em" width="+0.6em"> + <mpadded lspace="0.3em" width="calc(100% +0.6em)"> <mi>y</mi> </mpadded> <mi>z</mi> From 40dd6ffb8fd318987042282148ce2f79eb218fd8 Mon Sep 17 00:00:00 2001 From: David CarlisleDate: Sat, 16 Nov 2024 20:32:56 +0000 Subject: [PATCH 2/2] adjust mpadded length reference in chapter 2 --- src/fundamentals.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/fundamentals.html b/src/fundamentals.html index 2c9a82a..213f5e7 100644 --- a/src/fundamentals.html +++ b/src/fundamentals.html @@ -407,14 +407,14 @@ Length Valued Attributes
-In addition, the attributes on mpadded - allow three pseudo-units,
height
, + +In MathML 3, the attributes on mpadded + allowed three pseudo-units,
-height
,depth
, andwidth
(taking the place of one of the usual CSS units) denoting the original dimensions of the content. -MathML 3 also allowed a deprecated usage with lengths specified as - a number without a unit. This was interpreted as a multiple of the - reference value. This form is considered invalid in MathML 4. + It also allowed a deprecated usage with lengths specified as + a number without a unit which was interpreted as a multiple of the + reference value. These forms are considered invalid in MathML 4.