2
\documentclass{amsart}

\begin{document}
We have
\begin{align*}
x^{2} &= x\cdot x\\
&= x^{6/3} 
\end{align*}
for all real $x$
\end{document}

To illustrate, suppose I would like to number only the first equality. I tried the command \tag{a} where $a$ is a natural number, but the number thus generated seems to be fixed, i.e. I would still get the label (a) even if there is another labeled equation preceding equation (a). What I want is that (a) should be (a+1) when there is another equation labeled before equation (a), say.

1 Answer 1

3

While it is possible to tag equations in an align* environment, the \tag command does indeed uses a fixed equation 'number' etc. then.

The align* environment however does not count the equation number, but the align environment does. If specific equations should not be numbered, \notag suppresses the numbering then.

\documentclass{amsart}

\begin{document}
We have
\begin{align}
x^{2} &= x\cdot x \\
&= x^{6/3} \notag
\end{align}

And once again:

\begin{align}
x^{2} &= x\cdot x  \\
&= x^{6/3} \notag
\end{align}

for all real $x$
\end{document}

However ... if align* is used, a non-fixed tagging can be used with a faking command, say \tagitanyway.

This command has an optional argument, which defaults to equation and must be a counter name. This counter is \refstepcountered then and a 'fixed' tag is applied, using \the'countername'.

\documentclass{amsart}

\newcommand{\tagitanyway}[1][equation]{\refstepcounter{#1}\tag{\csname the#1\endcsname}}


\begin{document}

\begin{equation}
  E = mc^2 
\end{equation}
We have


\begin{align*}
x^{2} &= x\cdot x \tagitanyway \\
&= x^{6/3}
\end{align*}

And once again:

\begin{align*}
x^{2} &= x\cdot x \tagitanyway \\
& = x^{6/3} \\
& = x^{42/21} \tagitanyway 
\end{align*}

for all real $x$
\end{document}

enter image description here

6
  • Thanks. I did not make my question clear enough. Sorry that I have to say that I literally know the align trick with \nonumber or \notag. But, since at most of time I need occasionally to number equations, I think align* solution would be better; for otherwise I have to extensively type "\nonumber" or "\notag". I hope now I have made it clear. :)
    – Yes
    Jul 7, 2015 at 2:32
  • @Chou: Yes, this clearification would helped me ;-)
    – user31729
    Jul 7, 2015 at 2:33
  • Thank you. It is somewhat disappointed to know that there is no such "service" out there for align*, frankly.
    – Yes
    Jul 7, 2015 at 2:36
  • @Chou: I believe there is but I don't know/remember -- see my updated 'example' -- perhaps, I've reinvented the wheel ;-)
    – user31729
    Jul 7, 2015 at 2:41
  • 1
    @Sigur: Well, I thought of subequation, for example?
    – user31729
    Jul 7, 2015 at 10:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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