Rewrite patterns#
- thin-triple
\,\,\,\enspace - colon-semicolon
\:\;\enspace - semicolon-colon
\;\:\enspace
Examples#
Each example shows this rule applied in isolation. A complete normalization profile may make additional changes.
Thin triple#
Rendering verified with the declared packages.
Colon semicolon#
Rendering verified with the declared packages.
Semicolon colon#
Rendering verified with the declared packages.
Thin multiple one pass#
The rendered result has pixel differences from the input.
Mixed pair multiple one pass#
Rendering verified with the declared packages.
Text run preserved#
Rendering verified with the declared packages.
Related rules#
Upstream rules#
ams/impliedby-to-LongleftarrowCollapse impliedby to the explicit AMS long-left-arrow spelling with source-backed spacing.ams/implies-to-LongrightarrowCollapse implies to the explicit AMS long-right-arrow spelling with source-backed spacing.ams/idotsint-expandExpand idotsint to explicit repeated integral surfaces.base/gt-space-to-colon-spaceCollapse \> to the canonical medium math space command \:base/thinspace-to-comma-spaceCollapse thinspace to the explicit thin math space command.
Downstream rules#
base/double-enspace-to-quadRewrite two adjacent enspaces to one exact-width quad.base/enspace-dropDrop enspace in math mode and collapse each text-mode enspace run to one ordinary space.
Same family#
ams/nobreakspace-to-tildeCollapse nobreakspace to the canonical nonbreaking space token.base/break-to-linebreakCollapse break to the explicit linebreak command.base/newline-to-linebreakCollapse newline to the explicit linebreak command.base/control-space-to-tildeRewrite math-mode control space to the canonical active space token.base/gt-space-to-colon-spaceCollapse \> to the canonical medium math space command \:base/hfil-to-hfillCollapse hfil to the canonical hfill command under MathJax spacing semantics.base/hfilll-to-hfillCollapse hfilll to the canonical hfill command.base/hskip-to-hspaceCollapse hskip to the explicit hspace command.base/negthinspace-to-neg-comma-spaceCollapse negthinspace to the explicit negative thin math space command.base/space-to-tildeCollapse space to the explicit nonbreaking space token.base/thinspace-to-comma-spaceCollapse thinspace to the explicit thin math space command.base/double-enspace-to-quadRewrite two adjacent enspaces to one exact-width quad.base/double-quad-to-qquadMerge two adjacent quads into one qquad for authoring normalization.base/allowbreak-dropDrop allowbreak as a pure linebreak hint during cleanup-oriented normalization.base/badbreak-dropDrop badbreak as a pure linebreak hint during cleanup-oriented normalization.base/goodbreak-dropDrop goodbreak as a pure linebreak hint during cleanup-oriented normalization.base/mathstrut-dropDrop the invisible mathstrut layout helper in cleanup-oriented normalization.base/nobreak-dropDrop nobreak as a pure linebreak hint during cleanup-oriented normalization.base/strut-dropDrop the fixed empty strut node in cleanup-oriented normalization.base/enspace-dropDrop enspace in math mode and collapse each text-mode enspace run to one ordinary space.base/qquad-dropDrop qquad in math mode and collapse each text-mode qquad run to one ordinary space.base/quad-dropDrop quad in math mode and collapse each text-mode quad run to one ordinary space.base/mkern-to-mspaceCollapse mkern to the explicit mspace command.base/mskip-to-mspaceCollapse mskip to the explicit mspace command.
Notes#
Authoring-level exact-width canonicalization for math-mode sibling runs. Starting at the first matching Spacer in a maximal run, scan left to right and replace every non-overlapping declared chunk in one rule application: each three consecutive \, commands become one \enspace, and each \:\; or \;\: pair becomes one \enspace. Process all available multiples at once instead of relying on later fixed-point iterations; for example, seven consecutive \, commands become \enspace\enspace\,, and \:\;\;\: becomes \enspace\enspace. Preserve unmatched remainder commands in their original order. MathJax defines \, as exactly 3/18 em and \enspace as exactly 0.5 em, so the declared width algebra is exact. The reviewed inline mismatch for repeated thin-space chunks is an accepted browser layout quantization exception: separately positioned mspace elements can accumulate to a one-pixel raster size difference even though their MathJax lengths are equal. Do not generalize this exception beyond these declared chunks or relax the global rendering threshold. Do not generalize this rule into arbitrary width decomposition or reorder other equal-width runs. Text-mode records, groups, scripts, cells, other slots, negative spacing, ActiveSpace, control space, hspace, and mspace remain unchanged. Every Applied result consumes at least one complete source chunk and produces no touched small-spacer target, so the total count of touched source spacer nodes strictly decreases.
Disable this rule#
TransformEngine(profile="corpus", disable_rules=["base/small-spacer-merge-to-enspace"])new TransformEngine({ profile: 'corpus', disableRules: ['base/small-spacer-merge-to-enspace'] })