Setting labels and references
To be able to refer to a certain point, we have to mark it with a label. The name of that label will serve us afterward for referencing.
We will now typeset a list of the most used packages for papers, according to a survey on https://latex.org. Through the \label
command, we will mark items that we can later refer to with the \ref
command, as shown here:
- Create a new
book
document:\documentclass{book} \begin{document}
- Start a chapter and a section, and place a label for this section:
\chapter{Statistics} \section{Most used packages by LaTeX.org users} \label{sec:packages}
- Continue with some text, including a footnote:
The Top Five packages, used by LaTeX.org members\footnote{according to the 2021 survey on LaTeX.org\label{fn:project}}:
- Write an enumerated list and put a label on a few items for referring to them:
\begin{enumerate} \item graphicx\label{item:graphicx} \item babel \item amsmath\label...