Stretchy mathematical operator (source code)

= Stretchy mathematical operator

A \b[stretchy mathematical operator] can adapt its extent to the surrounding mathematical layout. In <MathML Core>, an `mo` element's `stretchy` property participates in this decision. A <mathematical delimiter> around a tall <typeset fraction> is a familiar example. Actual stretching also requires an applicable constraint and suitable <computer font> data.<MathML Core by World Wide Web Consortium>[§§3.2.4.2–3.2.4.3: operator properties, layout and fallback]{ref}

For an original example, use `<math xmlns="http://www.w3.org/1998/Math/MathML"><mrow><mo stretchy="true" minsize="2em" maxsize="3em">(</mo><mfrac><mi>x</mi><mn>2</mn></mfrac><mo stretchy="true" minsize="2em" maxsize="3em">)</mo></mrow></math>`. The row places two <mathematical delimiters> around a <typeset fraction> with <numerator> $x$ and <denominator> 2.

Suppose the positive block-axis target totals, already expressed at a common scale, are $1.5$, $2.5$ and $4$ <em>. The stated size bounds adjust them to $2$, $2.5$ and $3$ <em>, respectively. This is the target-size constraint step, not a prediction of exact rendered ink heights. The complete algorithm also handles ascent/descent and symmetry about the <Math axis>.<MathML Core by World Wide Web Consortium>[§3.2.4.3: minsize/maxsize normalization and target-size adjustment]{ref}

Suitable <mathematical glyph variants> or <mathematical glyph assemblies> can supply the extended form. Setting `stretchy="false"` changes the operator's instruction without changing the fraction's two operands. Layout properties and font constructions therefore belong in a controlled comparison; enlarging every outline uniformly is not the definition of stretching.