1

I am using \begin{equation} \end{equation} to number my equations in my text. But I normally mention these equations in the further text. E.g., In equation 3 ....

But if I change the former equation number I have to search in the text where I mentioned it.

Is there any way to link those numbers so when I change the equation number it automatically changes the furthers mentions about it in the text?

4
  • 1
    For this you must use \label{eq.foo} and then \eqref{eq.foo}. – Sigur Jan 20 '16 at 1:12
  • 1
    Welcome! \label{<identifier>} and then \ref{<identifier>}. The first in the equation. The second where you want the cross-reference. – cfr Jan 20 '16 at 1:12
  • Sorry, but what is this eq.foo? @Sigur – André Gomes Jan 20 '16 at 1:17
  • 1
    @AndréGomes, it is any nickname for your equations. You can choose just to refer. Use different ones for different equations. – Sigur Jan 20 '16 at 1:20
4

Something like this?

first is an arbitrary identifier e.g. emc2 or a2o2h2 or whatever will have meaning for you. first is a bad example because the equation might not always be first. While this won't bother LaTeX, it will confuse me!

\documentclass{article}
\begin{document}
\begin{equation}
  abc\label{first}
\end{equation}
\ref{first}
\end{document}

cross-reference

If you load amsmath, then you can use \eqref{}:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation}
  abc\label{first}
\end{equation}
\eqref{first}
\end{document}

eqref

cleveref is a popular package for cross-referencing of all kinds:

\documentclass{article}
\usepackage{cleveref}
\begin{document}
\begin{equation}
  abc\label{first}
\end{equation}
\cref{first}
\end{document}

cleveref

I prefer fancyref:

\documentclass{article}
\usepackage{fancyref}
\begin{document}
\begin{equation}
  abc\label{eq:first}
\end{equation}
\fref{eq:first}
\end{document}

fancyref

In this case the eq: part of the identifier tells fancyref what kind of thing is referenced, whereas cleveref tries to figure this out from the context.

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