Rewrite patterns#
\mathrel{\mathrel{#1}}\mathrel{#1}
Examples#
Each example shows this rule applied in isolation. A complete normalization profile may make additional changes.
Direct duplicate#
Rendering verified with the declared packages.
Related rules#
Upstream 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/buildrel-to-stackrelRewrite plain TeX buildrel syntax to stackrel.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#
Match only a direct same-name wrapper whose outer and inner MathContent slots each contain exactly the required structure. Other TeX-class wrappers, mixed wrapper names, extra siblings, and nested structural boundaries remain unchanged. Every Applied result removes one directly nested cmd:mathrel wrapper, so both the wrapper count and duplicate-wrapper nesting depth strictly decrease; non-duplicate shapes return Skipped.
Disable this rule#
TransformEngine(profile="corpus", disable_rules=["base/duplicate-mathrel-wrapper-drop"])new TransformEngine({ profile: 'corpus', disableRules: ['base/duplicate-mathrel-wrapper-drop'] })