Cross-references in LaTeX
Mark any numbered element with a \label and refer to it later with \ref. LaTeX fills in the right number even after you reorder figures. The prefixes fig:, tab: and eq: help keep labels apart.
References in the text
The results are listed in Table~\ref{tab:pendulum}, and Figure~\ref{fig:chart} on page~\pageref{fig:chart} shows the trend.Common mistakes
- "??" in the PDF: references are only filled in on the second compilation.
- A normal space before \ref: the number can wrap to the next line. A tilde ~ keeps it attached.
See also
Don't want to memorize commands?
Draw a formula or paste a screenshot, and CamteX turns it into ready LaTeX.