1

It would be useful to have a page number like (see page # for more details) that is tied to a specific section or figure, and as a consequence, automatically updates the text to say where that page # of that section or figure is if a change pushes it to a new page. Can this be done?

user14554
  • 155

1 Answers1

1

The magic command you are looking for is \pageref{<label>}.

A short example:

\documentclass{article}

\usepackage{lipsum}% <- only for random text in the example

\begin{document}

\pageref{foo}

\lipsum

\section{title}
\label{foo}


\end{document}

Or you could use the cleveref package which will not only insert the pagenumber but also automatically add the word "page" in front of it:

\documentclass{article}

\usepackage{lipsum}
\usepackage{cleveref}

\begin{document}

\cpageref{foo}

\lipsum

\section{title}
\label{foo}


\end{document}