Rewrite Rulesphysics/absolutevalue-to-abs

physics/absolutevalue-to-abs

Collapse absolutevalue to the shorter abs helper before fence expansion.

Rewrite patterns#

  1. nonstar\absolutevalue{#1}\abs{#1}
  2. star\absolutevalue*{#1}\abs*{#1}

Examples#

Each example shows this rule applied in isolation. A complete normalization profile may make additional changes.

abs alias power context#

Before

\absolutevalue{z}^2=x^2+y^2

After this rule

\abs{z}^2=x^2+y^2

Rendering verified with the declared packages.

abs alias star power context#

Before

\absolutevalue*{z}^2=x^2+y^2

After this rule

\abs*{z}^2=x^2+y^2

Rendering verified with the declared packages.

Downstream rules#

Same family#

Notes#

This alias preserves the star marker; fixed-size fence expansion belongs to abs-to-vert-fence.

Disable this rule#

TransformEngine(profile="corpus", disable_rules=["physics/absolutevalue-to-abs"])
new TransformEngine({ profile: 'corpus', disableRules: ['physics/absolutevalue-to-abs'] })

Open in Playground