Writing a paper
Cross-references
Label sections, figures, tables and equations, and refer to them so the numbers stay right.
Open as a project 3 min read
Label and refer
Put \label{…} after a section heading, inside a figure or table (after the caption), or in an equation. Refer to it with \ref{…} (the number) or \pageref{…} (the page). Numbers update by themselves when you reorder things. Use a prefix like sec:, fig:, tab:, eq: to keep labels readable.
\section{Method}\label{sec:method}
…
As explained in Section~\ref{sec:method} and Table~\ref{tab:results} …Let LaTeX write "Figure"
With the cleveref package (loaded after hyperref), \cref{fig:results} prints "Figure 2" or "fig. 2" for you, in the right form. hyperref makes every reference a clickable link in the PDF.
\usepackage{hyperref}
\usepackage{cleveref}
…
\Cref{sec:method} describes the model; results are in \cref{tab:results}.Try it: the full example compiles as it is. Open as a project