Cross-References in LaTeX

Use \label and \ref to create automatically-updated cross-references to sections, figures, and equations.

Quick Answer

latex
\section{Methods}\label{sec:methods}

% Later:
As described in Section~\ref{sec:methods}, ...

Labeling Different Elements

latex
% Sections:
\section{Introduction}\label{sec:intro}
\subsection{Background}\label{sec:background}

% Equations:
\begin{equation}
  E = mc^2 \label{eq:einstein}
\end{equation}

% Figures:
\begin{figure}[htbp]
  \includegraphics[width=\linewidth]{plot.pdf}
  \caption{Results}\label{fig:results}
\end{figure}

% Tables:
\begin{table}[htbp]
  \caption{Summary}\label{tab:summary}
  ...
\end{table}

Referencing

latex
% Basic ref (number only):
see Section~\ref{sec:intro}         % → "see Section 1"
see Figure~\ref{fig:results}         % → "see Figure 3"
see Equation~\eqref{eq:einstein}     % → "see Equation (1)"
see Table~\ref{tab:summary}          % → "see Table 2"

% Page reference:
see page~\pageref{sec:intro}

% Note: ~ is a non-breaking space — keeps "Figure" and "3" together

Writing your thesis in LaTeX?

MonsterWriter's LaTeX Workspace gives you real-time PDF preview with no compile limits — at a fraction of Overleaf's price. Works just like Overleaf, costs 11× less.

Try MonsterWriter free

autoref (Smart References)

With hyperref, use \autoref to automatically include the element type name.

latex
\usepackage{hyperref}

\autoref{sec:intro}      % → "Section 1"
\autoref{fig:results}    % → "Figure 3"
\autoref{eq:einstein}    % → "Equation (1)"
\autoref{tab:summary}    % → "Table 2"

% Customize the type names:
\renewcommand{\sectionautorefname}{Section}
\renewcommand{\figureautorefname}{Figure}

Label Naming Conventions

Use prefixes to keep labels organized. There's no enforced convention — choose one and be consistent.

ElementConventionExample
Sectionsec:sec:intro
Figurefig:fig:results
Tabletab:tab:summary
Equationeq:eq:einstein
Chapterch:ch:methods
Appendixapp:app:data

Compile Twice

Labels are written to a .aux file on the first compile and read on the second. Always compile twice (or use latexmk) to resolve all references. ?? in the output means unresolved references.

Related Topics