Rewrite Rulesphysics/vu-to-hat-mathbf

physics/vu-to-hat-mathbf

Canonicalize vu to an explicit hat-wrapped mathbf form.

Rewrite patterns#

  1. vu\vu{#1}\hat{\mathbf{#1}}
  2. vu-star\vu*{#1}\hat{\boldsymbol{#1}}

Examples#

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

vu boundary normal#

Before

\vu{n}\cdot\vb{E}=0

After this rule

\hat{\mathbf{n}}\cdot\vb{E}=0

Rendering verified with the declared packages.

vu star bold italic#

Before

\vu*{p}\cdot\vu*{\alpha}

After this rule

\hat{\boldsymbol{p}}\cdot\hat{\boldsymbol{\alpha}}

Rendering verified with the declared packages.

Upstream rules#

Same family#

Notes#

The star branch propagates into the nested vb under hat, so this rule maps it to hat over boldsymbol rather than hat over mathbf.

Disable this rule#

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

Open in Playground