Rewrite Rulesbase/double-quad-to-qquad

base/double-quad-to-qquad

Merge two adjacent quads into one qquad for authoring normalization.

Rewrite patterns#

  1. \quad\quad\qquad

Examples#

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

Double quad#

Before

A\quad\quad B

After this rule

A\qquad B

Rendering verified with the declared packages.

Text double quad#

Before

\text{A\quad\quad B}

After this rule

\text{A\qquad B}

Rendering verified with the declared packages.

Upstream rules#

Downstream rules#

  • base/qquad-drop Drop qquad in math mode and collapse each text-mode qquad run to one ordinary space.

Same family#

Notes#

Both commands are MathJax Spacer nodes at scriptlevel 0, so two 1 em quads exactly equal one 2 em qquad. This Authoring-level canonicalization scans from left to right and replaces every two adjacent quads; one trailing quad remains for odd-length runs. The base owner also matches the same-name textmacros record by command name, covered by the text-mode example. The Equiv spacing-drop family eliminates both quad and qquad, so enabling or omitting this canonicalization does not change the final Equiv normal form. Every Applied result consumes two adjacent cmd:quad nodes and produces no cmd:quad, so the total cmd:quad count strictly decreases.

Disable this rule#

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

Open in Playground