Rewrite Rulesams/dbinom-and-tbinom-to-binom

ams/dbinom-and-tbinom-to-binom

Rewrite AMS display-style and text-style binomial commands to binom.

Rewrite patterns#

  1. display-style\dbinom{#1}{#2}\binom{#1}{#2}
  2. text-style\tbinom{#1}{#2}\binom{#1}{#2}

Examples#

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

dbinom plain#

Before

x+\dbinom{n}{k}

After this rule

x+\binom{n}{k}

The rendered result has pixel differences from the input.

dbinom script#

Before

x_{\dbinom{n}{k}}

After this rule

x_{\binom{n}{k}}

The rendered result has pixel differences from the input.

tbinom plain#

Before

x+\tbinom{n}{k}

After this rule

x+\binom{n}{k}

The rendered result has pixel differences from the input.

tbinom display#

Before

\displaystyle\tbinom{n}{k}

After this rule

\displaystyle\binom{n}{k}

The rendered result has pixel differences from the input.

tbinom script#

Before

x_{\tbinom{n}{k}}

After this rule

x_{\binom{n}{k}}

The rendered result has pixel differences from the input.

Same family#

Notes#

AMS defines dbinom and tbinom with forced display and text styles while binom inherits context. The binomial family has a different canonical target from fractions and therefore uses a separate rule; the style loss is intentional Reading normalization.

Disable this rule#

TransformEngine(profile="corpus", disable_rules=["ams/dbinom-and-tbinom-to-binom"])
new TransformEngine({ profile: 'corpus', disableRules: ['ams/dbinom-and-tbinom-to-binom'] })

Open in Playground