[Tex/LaTex] Chapter ref with LaTeX


In LaTeX, we can say something like:

"See equation \ref{eq} on page \pageref{eq}..."

Is there any way to do:

"See equation \ref{eq} in chapter \chapterref{eq}..."

Best Answer

hyperref offers \autoref which will turn \autoref{chap:foo} into "chapter X"



    This is the beginning of \autoref{chap:foo}


chapter foo

To edit how hyperref references appear, see answers to this question

cleveref is another package that offers this sort of functionality.

The LaTeX wikibook has details on various cross-referencing options.

Related Question