Suppose I have a document structure like this and I am using hyperref:

Chapter 1 \label{chapter:one}
  Section 1 \label{sec:one}
Chapter 2

If I input

\ref{chapter:one}, \ref{sec:one}

I get

1, 1.1

I want to get instead:

Chapter 1, Section 1.1

Can I get this within hyperref? If yes, how?


1 Answer 1


With hyperref you can use \autoref, like \autoref{chapter:one}, \autoref{sec:one}

If you want to get Chapter and Section instead of chapter and section, you can redefine the auto referencing names to be used.



\renewcommand\chapterautorefname{Chapter} % use Chapter instead of chapter <<<<<<<<<<<
\renewcommand\sectionautorefname{Section} % use Section instead of section <<<<<<<<<<<
    \autoref{chapter:one}, \autoref{sec:one}    % <<<<<<<<<<<<<<<<<<<<      



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