Rewrite Rulesams/bmatrix-env-to-bracket-matrix

ams/bmatrix-env-to-bracket-matrix

Rewrite the fenced bmatrix environment to explicit brackets around a core matrix environment.

Rewrite patterns#

  1. \begin{bmatrix} #1 \end{bmatrix}\left[\begin{matrix} #1 \end{matrix}\right]

Examples#

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

bmatrix#

Before

\begin{bmatrix} a & b \\ c & d \end{bmatrix}

After this rule

\left[\begin{matrix} a & b \\ c & d \end{matrix}\right]

Rendering verified with the declared packages.

Same family#

Disable this rule#

TransformEngine(profile="corpus", disable_rules=["ams/bmatrix-env-to-bracket-matrix"])
new TransformEngine({ profile: 'corpus', disableRules: ['ams/bmatrix-env-to-bracket-matrix'] })

Open in Playground