In LaTeX, we can reference sections, figures, tables, formulas, and other numbered elements using specific commands. To mark an object for referencing, use \label{marker}
. To refer back to this marked object, use \ref{marker}
, and to print the page number where the object is located, use \pageref{marker}
. Replace "marker" with a word of your choice that identifies the object.
For instance, to reference a previously created section titled "Introduction":
\section{Introduction} \label{sec:intro}
To refer to this section elsewhere in the document:
As discussed in section \ref{sec:intro}, on page \pageref{sec:intro}, this topic has been explored by other researchers.
Similarly, for referencing a figure:
\begin{figure}
\includegraphics[width = 10cm, height = 8cm]{figures/figure_1.jpg}
\caption{My laptop conducting analysis}
\label{fig:laptop}
\end{figure}
Later in the text:
As depicted in Figure \ref{fig:laptop}, one of the illustrations shows a laptop.
In larger documents with multiple references, it's helpful to use concise labels to avoid confusion.