Code: Select all
\documentclass{article}
\begin{document}
\section{First Section}
Label page:1 is here.\label{page:1}
A line of text.
\section{Second Section}
Label labeltwo is here.\label{labeltwo}
A line of text.
\section{Third Section}
The page of label page:1 is \pageref{page:1}.
The section of label page:1 is \ref{page:1}.
The page of label labeltwo is \pageref{labeltwo}.
The section of label labeltwo is \ref{labeltwo}.
% The following yields: ! Missing \endcsname inserted.
The section of the label page:1 is \ref{page:\pageref{labeltwo}}.
\end{document}
Is there a way to get this to work?