The picture above is generated by $\star$, $\star\star$ or $\star\star\star$.
Indeed, this phenomenon was mentioned in here. However they didn't give a solution, and I want to know how to get rid of it.
Redefine \star by \mathord which is \mathbin instead originally. See here for the differences on \mathord, \mathop, \mathbin, \mathrel, \mathopen, \mathclose, and \mathpunct. Of course, if you still need the original \star to be the binary operator, then you'd better rename the redefined\star command.
\documentclass{article}
\makeatletter
\DeclareMathSymbol{\star}{\mathord}{letters}{"3F}
\makeatother
\begin{document}
$\star$, $\star\star$ or $\star\star\star$
\end{document}
By the way please give a minimal working sample next time to make people answer your question conveniently.
{\star}{\star}{\star}".
– Teepeemm
Jul 21 '22 at 13:03
\star in other situations. It's mostly like \def\c{\gamma} that a colleague used to do, but he got a weird error when a paper of his had a Turkish coauthor.
– egreg
Jul 22 '22 at 09:04
Bizarre spacing with 4 $\star$s explaines why this happens.
I only see a place where this can happen. Quite likely you're tagging equations with , , and so on with
\tag{$\star$}
\tag{$\star\star$}
\tag{$\star\star\star$}
Well there's a much simpler solution for this case, namely using \textborn (which is a star).
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align}
x=1 \tag{\textborn} \
y=2 \tag{\textborn\textborn} \
z=3 \tag{\textborn\textborn\textborn}
\end{align}
\end{document}
However, since \textborn seems out of place there, it's better to define an alias such as \textstar
\documentclass{article}
\usepackage{amsmath}
\newcommand{\textstar}{\textborn}
\begin{document}
\begin{align}
x=1 \tag{\textstar} \
y=2 \tag{\textstar\textstar} \
z=3 \tag{\textstar\textstar\textstar}
\end{align}
\end{document}
Oh, well, maybe your font family doesn't fully cover the TS1 encoding. In this case you can take advantage of having defined a suitable command:
\documentclass{article}
\usepackage{amsmath}
%\usepackage{somestrangefontpackage}
%\newcommand{\textstar}{\textborn}
% somestrangefontpackage doesn't support \textborn
\newcommand{\textstar}{\mbox{$\star$}}
\begin{document}
\begin{align}
x=1 \tag{\textstar} \
y=2 \tag{\textstar\textstar} \
z=3 \tag{\textstar\textstar\textstar}
\end{align}
\end{document}
If my guess is incorrect and you're using \star as an ordinary math symbol that you happen to get repeated in formulas, then do
\documentclass{article}
\usepackage{amsmath}
\newcommand{\pstar}{{\star}} % choose a better name
\begin{document}
$\pstar+\pstar\pstar+\pstar\pstar\pstar=
\pstar\pstar\pstar\pstar\pstar\pstar$
\end{document}
In this case, it would be better to define a command that repeates the given number of stars, wouldn't it?
\documentclass{article}
\usepackage{amsmath}
\newcommand{\pstar}{{\star}} % choose a better name
\ExplSyntaxOn
\NewDocumentCommand{\pstars}{m}
{
\prg_replicate:nn { #1 } { \pstar }
}
\ExplSyntaxOff
\begin{document}
$\pstars{1}+\pstars{2}+\pstars{3}=\pstars{6}$
\end{document}
\star: one is as the difficulty or importance mark which is used in exercise headings or before section titles and in this case we may use 3 or 4 stars at most; another is as a binary operator, for example x\star y in which there should be spaces before and after the star, and \star is an abstract binary operator for \wedge, \vee and so on. For equation tags, we usually use *(or \ast or \textasteriskcentered) instead of \star, and \dagger, \ddagger, \S, \P and so on in sequel similar to footnote numbers in symbols.
– M. Logic
Jul 22 '22 at 16:46
{\star}{\star}{\star}– David Carlisle Jul 21 '22 at 07:47