Rewrite patterns#
- diagonalmatrix-braced
\diagonalmatrix{#1}\dmat{#1} - diagonalmatrix-bare
\diagonalmatrix\dmat
Examples#
Each example shows this rule applied in isolation. A complete normalization profile may make additional changes.
dmat diagonal spectrum#
Rendering verified with the declared packages.
dmat bare no elements#
Rendering verified with the declared packages.
Related rules#
Same family#
ams/Bmatrix-env-to-brace-matrixRewrite the fenced Bmatrix environment to explicit braces around a core matrix environment.ams/Vmatrix-env-to-Vert-matrixRewrite the fenced Vmatrix environment to explicit double bars around a core matrix environment.ams/bmatrix-env-to-bracket-matrixRewrite the fenced bmatrix environment to explicit brackets around a core matrix environment.ams/pmatrix-env-to-paren-matrixRewrite the fenced pmatrix environment to explicit parens around a core matrix environment.ams/vmatrix-env-to-vert-matrixRewrite the fenced vmatrix environment to explicit vertical bars around a core matrix environment.base/cases-to-cases-envRewrite plain-TeX cases to the standard cases environment with row breaks.base/eqalign-to-aligned-envRewrite eqalign to the standard aligned environment.base/eqalignno-to-align-envRewrite eqalignno to the standard align* environment.base/matrix-to-matrix-envRewrite plain-TeX matrix to the standard matrix environment with row breaks.base/pmatrix-to-pmatrix-envRewrite plain-TeX pmatrix to the standard pmatrix environment with row breaks.physics/antidiagonalmatrix-to-admatCollapse antidiagonalmatrix to the shorter admat helper.physics/matrixdeterminant-to-mdetCollapse matrixdeterminant to the shorter mdet determinant helper.physics/bmqty-to-mqtyExpand bmqty to the core mqty builder with bracket fence syntax.physics/mdet-to-vmqtyExpand mdet to the vmqty determinant-style builder.physics/pmqty-to-mqtyExpand pmqty to the core mqty builder with paren fence syntax.physics/zmat-to-xmatExpand zmat to the explicit xmat zero-filled builder.
Notes#
Alias rewrite: diagonalmatrix and dmat share the same physics DiagonalMatrix handler and argspec, so the braced and bare forms are preserved by renaming the command.
Disable this rule#
TransformEngine(profile="corpus", disable_rules=["physics/diagonalmatrix-to-dmat"])new TransformEngine({ profile: 'corpus', disableRules: ['physics/diagonalmatrix-to-dmat'] })