82

Let's say I have written an equation in my paper and numbered it:

y = a + bx    (1)

Then, later in the paper, I want to remind the reader by showing the same equation with the same equation number.

Sure, I can repeat the equation, but LaTeX gives it a new equationn number:

y = a + bx     (2)

How do I force LaTeX to use the original equation numbers?

percusse
  • 157,807
phil
  • 821
  • 3
    I'm not sure whether I wouldn't be confused by such thing in a document, because when I search for a specific eq. number, I simply follow the numbers on the border and this makes a mess there. What you want to achieve is similar to including a term "foo" between "bar" and "baz" in a dictionary. I would recommend you to say it only in the text: "Let us recall the equation (1): ..." – yo' Aug 18 '12 at 06:37
  • Kind of duplicate of this: http://tex.stackexchange.com/q/33750/586 Same question, except that in that case a LyX answer was asked for. (A LaTeX answer is also given.) – Torbjørn T. Aug 18 '12 at 07:54

1 Answers1

110

Use the \label, \ref mechanism; once you have \labelled the equation you can use \ref inside \tag to retrieve the number:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{equation}\label{eq:test}
a = b + c.
\end{equation}

\begin{equation}
a = b + c. \tag{\ref{eq:test}}
\end{equation}

\end{document}

enter image description here

As Niel de Beaudrap mentions in his comment, one way to avoid equation numbering confusion for the reader would be to add "revisited" to the tag of the duplicated equation:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{equation}\label{eq:test}
a = b + c.
\end{equation}

\begin{equation}
a = b + c. \tag{\ref{eq:test} revisited}
\end{equation}

\end{document}

enter image description here

Small addition: Use equation* in stead of equation when repeating the number so that LaTeX knows it should not use a new number. This avoids warnings when using e.g. the hyperref package. Thus:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{equation}\label{eq:test}
a = b + c.
\end{equation}

\begin{equation*}
a = b + c. \tag{\ref{eq:test} revisited}
\end{equation*}

\end{document}
Torbjørn T.
  • 206,688
Gonzalo Medina
  • 505,128
  • Same as http://tex.stackexchange.com/questions/33750/using-the-same-number-for-repeated-use-of-the-same-equation – sandu Mar 02 '13 at 09:38
  • Using unstarred align instead of equation* doesn't give me any hyperref warning and skips the number properly [i.e., (1), (1 revisited), (2), ...]. – Alfredo Hernández May 07 '15 at 11:18
  • 4
    @GonzaloMedina Is there a way not to have to type the whole thing again? It seems kinda silly to type it again, not to mention error prone. Thanks for your excellent answer btw. – tBuLi Oct 11 '16 at 09:28
  • 1
    @tBuLi But you do not need to type it again. Just copy paste it! – luchonacho Sep 02 '18 at 08:08
  • 2
    @tBuLi you can define a new command that types your equation like \newcommand{\myeq}{a + b = y}. Then call it with \myeq. That way, if you need to correct your equation, you just need to do it in one place. – Pedro H. N. Vieira Jun 19 '19 at 15:24
  • This recipe does not work for beamer... :\ – user264218 Feb 23 '22 at 17:12
  • @PedroH.N.Vieira: It's workable, but defining new commands gets messy if you have many. – user2153235 Mar 10 '23 at 21:13