Rewrite Rulesphysics/Bqty-to-brace-fence

physics/Bqty-to-brace-fence

Rewrite Bqty to explicit brace fences.

Rewrite patterns#

  1. auto-sized\Bqty{#1}\left\{ #1 \right\}
  2. fixed-size\Bqty*{#1}\{ #1 \}

Examples#

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

Bqty#

Before

\Bqty{a+b}

After this rule

\left\{ a+b \right\}

Rendering verified with the declared packages.

Bqty star set builder#

Before

\Bqty*{x\mid x>0}

After this rule

\{ x\mid x>0 \}

Rendering verified with the declared packages.

Same family#

Notes#

The star branch preserves fixed-size braces instead of introducing left/right fences.

Disable this rule#

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

Open in Playground