[Tex/LaTex] How to refer back to equations

cross-referencingequations

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?

Best Answer

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.