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 -
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.
\documentclass{article}
\begin{document}
[$1-2$]
[$-2$]
[$-$]
[$--$]
[$---$]
[$----$]
[${}----{}$]
[${-}{-}{-}{-}$]
\end{document}
The final two lines show two ways of getting even space, with \mathbin
or \mathord
spacing.
\star
is a\mathbin
so looking for something to each side to give even spacing. Cf. just\star\star
. Add{}
after the final\star
to get uniform wide spacing back.\star
into braces:{\star}