I'd like to write something as

f(x) & = x + 1 \nonumber \\
& =: \eqref{eq:foo} \label{eq:foo} \nonumber \\
g(x) & = x + 2 \nonumber \\
& =: \eqref{eq:bar} \label{eq:bar} \nonumber

but amsmath does not allow me to do it:

! Package amsmath Error: Multiple \label's: label 'eq:foo' will be lost.See the amsmath package documentation for explanation.Type H for immediate help....

So what shall I do to solve this problem?


f(x) & = x + 1 \nonumber \\
& =: \eqref{eq:foo} \label{eq:foo} \nonumber

is accepted by LaTeX, but the reference always stays a (??), even if I run LaTeX multiple times.

  • Can you explain what you are trying to achieve here? As it stands, amsmath rejects your code because it doesn't make sense! Feb 27, 2015 at 9:42
  • If you have \label{...} you must either have \tag or not have \nonumber. What should \eqref{eq:foo} refer to, otherwise?
    – egreg
    Feb 27, 2015 at 9:42
  • @Ian Thompson What I want to achiveve here, should be clear: don't show an equation number (\nonumber), but assign one (\label) and show it at another place (\eqref).
    – Nubok
    Feb 27, 2015 at 9:48
  • 1
    It's always best to give an explanation; guessing the intended purpose of incorrect code is difficult at the best of times. Feb 27, 2015 at 20:02

1 Answer 1


I find doing this quite disputable. Anyway, here it is:



Here's a normal equation
and now the thing you want
f(x) & = x + 1 \\
& =: \assignnumber{eq:foo} \\
g(x) & = x + 2  \\
& =: \assignnumber{eq:bar}
with another equation to check the assigned numbers are correct
with references to \eqref{eq:foo} and \eqref{eq:bar}.


The bulk is to override the amsmath way of assigning numbers and labels.

enter image description here

You must log in to answer this question.

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