Rewrite patterns#
- operator
\buildrel #1 \over #2\stackrel{#1}{#2} - operator-external-scripts
\buildrel #1 \over #2_{#3}^{#4}\stackrel{#1}{#2}_{#3}^{#4}
Examples#
Each example shows this rule applied in isolation. A complete normalization profile may make additional changes.
Asymptotic relation stack#
Rendering verified with the declared packages.
Arrow relation stack#
Rendering verified with the declared packages.
Related rules#
Downstream rules#
base/stackrel-expandExpand stackrel to an explicit relation-level stacked operator form.
Same family#
ams/substack-expandExpand substack directly to the explicit centered subarray environment.base/duplicate-mathrel-wrapper-dropDrop one directly nested duplicate mathrel wrapper.base/widehat-to-hatDrop stretchiness from \widehat by rewriting it to \hat.base/widetilde-to-tildeDrop stretchiness from \widetilde by rewriting it to \tilde.base/stackbin-expandExpand stackbin to an explicit binary-level stacked operator form.base/stackrel-expandExpand stackrel to an explicit relation-level stacked operator form.
Notes#
buildrel has argspec u{\over} m: the annotation is read up to a level-0 \over and the operator is the following mandatory argument, so \over is ArgumentKind::Until delimiter metadata rather than a sibling infix node and touches is empty. As for a TeX delimited parameter, an annotation that is exactly one braced group loses that brace layer at parse time; a \over inside braces is not a terminator. Scripts after the operator argument stay attached to the whole stackrel, while scripts inside a braced operator stay inside it. stackrel is the accepted Authoring form; Faithful expands it further through stackrel-expand. Like other unbraced mandatory arguments, an unbraced compound operator such as \frac{a}{b} is accepted as one argument even though TeX would reject it.
Disable this rule#
TransformEngine(profile="corpus", disable_rules=["base/buildrel-to-stackrel"])new TransformEngine({ profile: 'corpus', disableRules: ['base/buildrel-to-stackrel'] })