Rewrite Rulesbase/double-enspace-to-quad

base/double-enspace-to-quad

Rewrite two adjacent enspaces to one exact-width quad.

Rewrite patterns#

  1. \enspace\enspace\quad

Examples#

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

Double enspace#

Before

A\enspace\enspace B

After this rule

A\quad B

Rendering verified with the declared packages.

Text double enspace preserved#

Before

\text{A\enspace\enspace B}

After this rule

\text{A\enspace\enspace B}

Rendering verified with the declared packages.

Upstream rules#

Downstream rules#

Same family#

Notes#

Authoring-level exact-width canonicalization for two adjacent math-mode enspaces in one sibling container and slot. Do not cross groups, scripts, cells, modes, or non-Spacer nodes. Text-mode records remain unchanged. The Equiv spacing-drop family eliminates both enspace and the produced quad, so enabling or omitting this canonicalization does not change the final Equiv normal form. Every Applied result consumes two adjacent cmd:enspace nodes and produces no cmd:enspace, so the total cmd:enspace count strictly decreases; ineligible text-mode and boundary cases return Skipped.

Disable this rule#

TransformEngine(profile="corpus", disable_rules=["base/double-enspace-to-quad"])
new TransformEngine({ profile: 'corpus', disableRules: ['base/double-enspace-to-quad'] })

Open in Playground