In the text environment, I want to centering some stars between paragraphs. I know I can do this by
\begin{center}
\color{cyan}\makebox[5cm]{* * * * * * * * * * * * * * * * * * * *}
\end{center}
but the vertical space is hard to control. I do not know why the following does not work
$\centering{\color{cyan}\makebox[5cm]{* * * * * * * * * * * * * * * * * * * *}}$
The result will not in the center.
\centering{$\color{cyan}\makebox[5cm]{* * * * * * * * * * * * * * * * * * * *}$}
does it for me... note that$
structurally is an environmentlike structure where a lot of macros don't work...\centering
outside of the$
? If that still does not work you should provide a MWE and tell us which latex you use