Rewrite Rulesphysics/pqty-to-paren-fence

physics/pqty-to-paren-fence

Rewrite pqty to explicit parenthesis fences.

Rewrite patterns#

  1. auto-sized\pqty{#1}\left( #1 \right)
  2. fixed-size\pqty*{#1}( #1 )

Examples#

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

pqty#

Before

\pqty{a+b}

After this rule

\left( a+b \right)

Rendering verified with the declared packages.

pqty star fixed size#

Before

\pqty*{a+b}

After this rule

( a+b )

Rendering verified with the declared packages.

Same family#

Notes#

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

Disable this rule#

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

Open in Playground