Rewrite Rulesbase/enspace-drop

base/enspace-drop

Drop enspace in math mode and collapse each text-mode enspace run to one ordinary space.

Rewrite patterns#

  1. math-enspace\enspace∅ removed
  2. text-enspace-run\enspace\enspace

Examples#

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

Math enspace#

Before

A\enspace B

After this rule

AB

The rendered result has pixel differences from the input.

Text enspace run#

Before

\text{A\enspace\enspace B}

After this rule

\text{A B}

The rendered result has pixel differences from the input.

Text enspace singleton#

Before

\text{A\enspace B}

After this rule

\text{A B}

The rendered result has pixel differences from the input.

Upstream rules#

Same family#

Notes#

Owns the shared enspace target across base/math and textmacros/text active records. In math mode, remove every enspace, including singletons. In text mode, replace each maximal adjacent run of one or more enspace commands with one ordinary text space. Actual text nodes split text-mode runs. Do not cross groups, arguments, scripts, environment cells, slots, modes, or non-Spacer nodes. Authoring-level fixed-spacing canonicalizations may produce quad from enspace pairs; quad-drop owns that downstream Equiv target, so the final Equiv normal form is independent of whether double-enspace-to-quad runs first.

Disable this rule#

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

Open in Playground