[Tex/LaTex] Displaying formula with a star

formattinghorizontal alignment

I want to display a centered formula to which can be referred as (*). Now, I have the following: enter image description here

But I want the formula to be more centered and the star to be right aligned. The code is now:

$$
    \floor{7(n\pi - \floor{n\pi})}  \qquad \qquad (*)
$$

Best Answer

You have a choice between a six-pointed asterisk, generated by \ast, and a five-pointed asterisk, generated by \star. Both of these macros need to be used in math-mode; choose whichever symbol you like better.

I would also enlarge the floor-related symbols of the "outer" \floor directive slightly as a visual aid towards parsing the equation.

enter image description here

\documentclass{article}
\usepackage{mathtools} % for \DeclarePairedDelimiter macro
\DeclarePairedDelimiter{\floor}{\lfloor}{\rfloor}
\setlength\textwidth{5cm} % just for this example
\begin{document}
either
\[
\floor[\big]{7(n\pi - \floor{n\pi})}  \tag{$\star$}
\]

or

\[
\floor[\big]{7(n\pi - \floor{n\pi})}  \tag{$\ast$}
\]

\end{document}
Related Question