Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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

share|improve this question
2  
Just as a note, you shouldn't use $$ x $$ use \[ x \] instead. –  Roelof Spijker Oct 19 '11 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 '11 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 '11 at 14:26
add comment

4 Answers

up vote 6 down vote accepted

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...

share|improve this answer
    
Why \ensuremath in the argument of \shortstack? –  egreg Oct 19 '11 at 11:33
    
So I can write \tag{$\iiiast$} or \tag{\iiiast} maybe? –  Johannes L Oct 19 '11 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 '11 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 '11 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 '11 at 12:10
show 3 more comments

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

share|improve this answer
add comment

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}
share|improve this answer
add comment

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.

share|improve this answer
1  
overset requires amsmath. It's worth making that clear... –  Seamus Oct 19 '11 at 11:20
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.