# hyperref and cross-referencing

When you are using the hyperref package, it creates nice, clickable links within the PDF output when you use cross references (\ref{chap:label}). But, when I refer to "Section 1", only the "1" is clickable. Is there away to add arbitrary, or semi-arbitrary text to one of these references?

Yes. hyperref provides \hyperref[<link>]{<stuff>}:

\documentclass{article}
\usepackage{hyperref}% http://ctan.org/pkg/hyperref
\begin{document}
\section{A section}\label{mysection}
See \hyperref[mysection]{Section~\ref*{mysection}}.
\end{document}


To avoid a hyperlink within a hyperlink, it also provides \ref*. For less arbitrary but still automated text additions to cross references, it provides \autoref:

\documentclass{article}
\usepackage{hyperref}% http://ctan.org/pkg/hyperref
%\providecommand{\sectionautorefname}{Section}
\begin{document}
\section{A section}\label{mysection}
See \hyperref[mysection]{Section~\ref*{mysection}} or \autoref{mysection}.
\end{document}


You need to set \<counter>autorefname for each of the <counter>s you would reference.