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


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


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


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

      a=b \tag{2}

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

Likewise, environments like align need explicit tags:

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

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

  • 4
    $\begingroup$ 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. $\endgroup$ – Davide Cervone Apr 1 '12 at 23:23
  • $\begingroup$ @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 $\endgroup$ – Tobias Kienzler Oct 24 '13 at 6:40
  • 1
    $\begingroup$ 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 $\endgroup$ – Tobias Kienzler Oct 24 '13 at 6:42
  • $\begingroup$ @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. $\endgroup$ – Davide Cervone Oct 24 '13 at 11:28
  • $\begingroup$ @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 $\endgroup$ – Tobias Kienzler Oct 25 '13 at 8:10

You must log in to answer this question.

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