[Tex/LaTex] Bizarre spacing with 4 $\star$s

math-modespacing

The spacing between the 3rd and 4th stars is non-existent. Anyone know what's up?

enter image description here

\documentclass[11pt]{article}

\usepackage{amsmath}

\begin{document}

\begin{gather*}
\star\star\star\star \\
\star\star\star\,\star \\
\star\star\star\star\star
\end{gather*}

\end{document}

Best Answer

Math symbols have different classifications and \star like - is a classed as binary operator. TeX assigns different space between symbols of each type, but also binary operators if not appearing in "infix" position, essentially revert to being an ordinary operator \mathord rather than \mathbin).

The motivation here can be seen better with -

enter image description here

1-2 the - is spaced as an infix operator but when not used between two symbols it reverts to closer spacing for -2.

When you have one or two - they are ordinary symbols with no space, but if you have three then the middle one acquires its natural mathbin spacing. Then the fourth, being between the third (which is a mathord) and the end of the math list, is again mathord so gets no space.

enter image description here

\documentclass{article}

\begin{document}

[$1-2$]

[$-2$]

[$-$]

[$--$]

[$---$]

[$----$]


\end{document}
Related Question