1

When trying to reference to an appendix using autoref using the following code:

\documentclass[10pt,a4paper]{article}
\usepackage[titletoc]{appendix}

\usepackage{hyperref}

\begin{document}
\section{Title of Section}
See \autoref{sec:appendix}.

\begin{appendices}
\section{Title of Appendix}
\label{appendix}
Contents of Appendix.
\end{appendices}

\end{document}

The reference is not found, as shown here:

enter image description here

What am I doing wrong?

1
2

You have to use

\label{sec:appendix}

instead of

\label{appendix}

i.e., the label has to be identical to the reference you use with \autoref.

3
  • Ouch... True, that's right, and very much shame on me for posting this question :-S
    – vstrien
    Jun 1 '11 at 13:28
  • @vstrien: If this solves your problem consider marking the answer as a solution. Jun 1 '11 at 13:59
  • Of course I will - but yesterday I couldn't mark it yet as I had to wait for 5 minutes (and 5 minutes later I wasn't online anymore :-))
    – vstrien
    Jun 2 '11 at 11:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.