5

I want to tag some equations with \ast, for \ast and \ast \ast it's good, but for the third I would like to have the three \ast placed like in a triangle, so two \ast at the bottom and the third in the middle about above the base two.

$$\tag{$\ast$} \label{eq-1}$$
$$\tag{$\ast \ast$} \label{eq-2}$$
$$\tag{$\threeast$} \label{eq-3}$$

because $\ast\ast\ast$ is too long

3
  • 2
    Just as a note, you shouldn't use $$ x $$ use \[ x \] instead. Oct 19, 2011 at 9:36
  • I use \begin{equation*}, \begin{align*}, \begin{multline} dependening on the situation, I just put $$ to make the code sample short
    – Johannes L
    Oct 19, 2011 at 9:40
  • You shouldn't actually write $\ast\ast\ast$ or $***$ anyway, because TeX interprets the middle one as being an operator and adds spaces. Write $\ast{\ast}\ast$ or $*{*}*$ instead to hide its operator-ness.
    – Ryan Reich
    Oct 19, 2011 at 14:26

4 Answers 4

8

Here's my attempt. It's not ideal. And it borrows from Ian Thompson's answer in its use of the two commands, one for the symbol, one to protect it. It is more compact that Ian's and uses \shortstack rather than tabular. EDIT: I've changed the adjustments to be in ex rather than pt on egreg's suggestion. I've also got rid of the \ensuremath{\displaystyle… stuff I had before which I thought I needed...

\newcommand\iiiastsym{\raisebox{-.5ex}{\shortstack{%
  \(\ast\)\\[-.5ex]%
  \(\ast\ast\)}}%
}
\newcommand\iiiast{\protect\iiiastsym}

three asts as a triangle

By way of comparison, here are the proposed solutions:

enter image description here

Warning: egreg's solution has been changed as compared to the way he gave it in order for it to display. Namely, I've put it inside \( and \) for mathmode and I've removed a # which is needed because the doubled ## is for use inside a \newcommand...

8
  • Why \ensuremath in the argument of \shortstack?
    – egreg
    Oct 19, 2011 at 11:33
  • So I can write \tag{$\iiiast$} or \tag{\iiiast} maybe?
    – Johannes L
    Oct 19, 2011 at 12:02
  • I accepted your solution, it looks the best because the \ast's are not above/bewow the parethesis
    – Johannes L
    Oct 19, 2011 at 12:05
  • @egreg I guessed it would be slightly more robust than explicitly going into mathmode. Is there a reason I shouldn't use \ensuremath?
    – Seamus
    Oct 19, 2011 at 12:09
  • @JohannesL in fairness, all of the solutions can be made to fit inside the parentheses with suitable \raisebox adjustments and the like...
    – Seamus
    Oct 19, 2011 at 12:10
4

Just to participate to the contest, here is a "primitive" solution:

\newcommand{\threeast}{%
  \vcenter{\offinterlineskip\halign{##\cr
    \hfil$*$\hfil\cr$*\mkern4mu*$\cr}}}

enter image description here

3

There seem to be some limitations on what can go in the argument of a \tag command, which makes this awkward. Nevertheless...

\documentclass{article}
\usepackage{amsmath}
\newcommand\threeastsym{\begin{tabular}{@{}c@{}} $\displaystyle\ast$ \\[-5pt] 
                                             $\displaystyle \ast\ast$ \end{tabular}}
\newcommand\threeast{\protect\threeastsym}
\begin{document}
\[ \tag{$\ast$} \label{eq-1} \]
\[ \tag{$\ast \ast$} \label{eq-2} \]
\[ \label{eq-3} \tag{\threeast} \]
\end{document}
1

You could try the following definition of \threeast (which requires the use of the amsmath package):

\newcommand{\threeast}{\ensuremath{\overset{\textstyle\ast}{\ast\ast}}}

You may wish to lower the entire construct by a couple of points in order to improve its vertical positioning.

1
  • 2
    overset requires amsmath. It's worth making that clear...
    – Seamus
    Oct 19, 2011 at 11:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .