# equation and equation* is the same for me

Is it supposed that equation and equation* environments work exactly the same?
For example, for me

\begin{equation}
a=b
\end{equation}


\begin{equation} a=b \end{equation} is the same as

\begin{equation*}
a=b
\end{equation*}


\begin{equation*} a=b \end{equation*}

but i'd like that the equation environment number the equations as in my LaTeX pdf's. I have the same problem with align environment, which is the one i use the most.

• I wonder if \tag will work in comments. $E=mc^2\tag{SR}$ Oh, it turns the whole thing into display math. – user856 Mar 3 '12 at 21:43
• – Tobias Kienzler Oct 24 '13 at 6:37

In usual $\LaTeX$, the difference between starred environments and regular environments have to do with numbering equations. MathJax does not automatically number equations, so both methods produce the same output. If you want to add tags to equations, you can use the \tag command:

   $$a=b \tag{1}$$


Produces: $$a=b \tag{1}$$

Same with

  $$\begin{equation} a=b \tag{2} \end{equation}$$


which gives $$\begin{equation} a=b \tag{2} \end{equation}$$

Likewise, environments like align need explicit tags:

\begin{align} a&= b \tag{3}\\ c&= d \\ e&=f \tag{A} \end{align}


yields \begin{align} a&= b \tag{3}\\ c&= d \\ e&= f \tag{A} \end{align}

• Actually, MathJax does do automatic equation numbering, but it is off by default, so you have to configure it to turn it on, and it is not on by default here. That is probably the right behavior for SE. As you point out, you can use \tag if you want to refer to an equation. – Davide Cervone Apr 1 '12 at 23:23
• @DavideCervone I disagree that this is the "right" behaviour - anyone usually using amsmath expects unstarred environments to tag equations - I agree with this request to activate it, note that this would not change anything for $...$ and $$...$$ blocks but only for unstarred environments which could automatically be turned into starred ones for existing posts – Tobias Kienzler Oct 24 '13 at 6:40
• Note that you can also use \label (following a \tag) and \ref / \eqref the usual way (including references being hyperlinks), though there currently is a bug in preview of \label – Tobias Kienzler Oct 24 '13 at 6:42
• @TobiasKienzler, I understand your objection, but MSE is not an amsmath article, and since pieces of it move around as answers are up- and down-voted, the equation numbering for the various equations would change,which some would find disconcerting. While \label and \ref could be used make sure things remain consistent, I have a feeling that not everyone would do this, and it would be a source of problem. It would also be difficult to cross-reference equations from one question to another (the labels are available only within the page that defines them), if that is ever done. – Davide Cervone Oct 24 '13 at 11:28
• @DavideCervone Good point, which is why begingroup should be used for individual posts anyway. On the other hand, maybe the autonumbering could simply include a prefix for each post (similar to prepending section numbers in amsmath articles) - that way one could still \(eq)ref to other posts' \labels – Tobias Kienzler Oct 25 '13 at 8:10