Rewrite Rulesphysics/physics-bra-expand

physics/physics-bra-expand

Expand bra to an explicit angle-bracket and bar fence form.

Rewrite patterns#

  1. bra-auto-sized\bra{#1}\left\langle #1 \right\vert
  2. bra-fixed-size\bra*{#1}\langle #1 \vert

Examples#

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

bra acting on operator#

Before

\bra{\psi} H

After this rule

\left\langle \psi \right\vert H

Rendering verified with the declared packages.

bra star fixed size#

Before

\bra*{\psi} H

After this rule

\langle \psi \vert H

Rendering verified with the declared packages.

Same family#

Notes#

Covers the physics star branch, where star suppresses automatic fence sizing. The parser-level branch that merges an immediately following ket is outside this rule’s single-command rewrite.

Disable this rule#

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

Open in Playground