1

Suppose I'm writing a book and there is a section in the book that I'd like to mention later. In this later part, I could write: "see - as an example - page 4". But then, I could make a lot of editions and add more material to the beginning of the book in a way that this thing in page 4 ends up in page 9 and I don't want to rewrite every part of the book with appropriate corrections. Is there some sort of markup for sections in the text in which I could reference a section and LaTeX automatically reads that page number and substitutes it?

I guess this must be a duplicate for some already existent question, but I'm Brazilian and don't know much about book edition, so I have no idea of what is the actual way to call this thing.

1 Answer 1

2

You can set a \label where you want to reference to and use \pageref. While the regular \ref will still point to a section number (say), the \pageref will point to the page where the \label is set:

enter image description here

\documentclass{article}

\usepackage{lipsum}

\begin{document}

See, for example, page~\pageref{sec:example}.

\section{A section}
\lipsum[1-20]

Here is some example text.\label{sec:example}

\lipsum[1-20]

\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .