Rewrite Rulesbase/hfil-to-hfill

base/hfil-to-hfill

Collapse hfil to the canonical hfill command under MathJax spacing semantics.

Rewrite patterns#

  1. \hfil\hfill

Examples#

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

hfil inside array item#

Before

\begin{array}{l}A\hfil B\end{array}

After this rule

\begin{array}{l}A\hfill B\end{array}

Rendering verified with the declared packages.

Same family#

Notes#

MathJax maps \hfil and \hfill to the same horizontal fill. Plain TeX gives them different stretch orders; fidelity follows MathJax as the declared target renderer.

Disable this rule#

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

Open in Playground