Time for action – introducing variable references
We will use the varioref
commands, \vref
and \vpageref
, to achieve enhanced reference texts:
- Open our current example. Add the package
varioref
to your preamble:\usepackage{varioref}
- Edit the content of the second chapter:
\emph{amsmath}, on position \ref{item:amsmath} of the top list in section~\vref{sec:packages}, is indispensable to high-quality mathematical typesetting in \LaTeX. \emph{amssymb}, on position \ref{item:amssymb}, provides a huge amount of math symbols. See also the footnote \vpageref{fn:project}.
- Typeset twice and look at the result:
What just happened?
The command \vref
checked the ...
Get LaTeX Beginners Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.