5

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 (*)
$$
Epsilon
  • 365

2 Answers2

8

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}
Mico
  • 506,678
3

Use the \tag{\textasteriskcentered} command to provide for a (*) equation 'number', either in align* or in align environment, equation would do too.

\documentclass{article}

\usepackage{mathtools}
\usepackage{mleftright}
\DeclarePairedDelimiter{\floor}{\lfloor}{\rfloor}


\begin{document}

\begin{align*}
    \floor{7\mleft(n\pi - \floor{n\pi}\mright)}  \tag{\textasteriskcentered} \label{flooreq}
\end{align*}

In \eqref{flooreq} we see that 

\end{document}

enter image description here

  • 1
    Since there doesn't seem to be anything to be aligned, I wouldn't use an align or align* environment in this case. – Mico Jul 07 '15 at 11:21
  • 1
    @Mico: Well, yes, but I doubt that the floor stuff will just be put alone -- it's a term, but not an equation. Of, course \[...\] would be nice too. –  Jul 07 '15 at 11:23