0

I have tried to add a reference to an appedix inside a subsection title. When I compile it appears a ?? and there is a link to the right place but I want in the link the number of the appendix and not the ??. Am I doing something wrong?

The code is:

\subsubsection{4 Herculis \ref{fig.A.1}}

The appendix:

\appendix
\section{Espectros red 150 lin/mm}\label{ap.A}

\subsection{4 Herculis}

and the error message:

 Reference `fig.A.1' on page 32 undefined on input line 677.
 Token not allowed in a PDF string (PDFDocEncoding):(hyperref)                removing `\<def>-command' on input line 677. Token not allowed in a PDF string (PDFDocEncoding):(hyperref)                removing `\<def>-command'
 Token not allowed in a PDF string (PDFDocEncoding):(hyperref)                removing `\@refundefined' on input line 677. Token not allowed in a PDF string (PDFDocEncoding):(hyperref)                removing `\@refundefined'
 Token not allowed in a PDF string (PDFDocEncoding):(hyperref)                removing `\<def>-command' on input line 677. Token not allowed in a PDF string (PDFDocEncoding):(hyperref)                removing `\<def>-command'
Mensch
  • 65,388

1 Answers1

2

The following example works without warnings and errors:

\documentclass{article}
\usepackage{hyperref}
\begin{document}
\tableofcontents
\section{4 Herculis \ref{fig.A.1}}
\begin{figure}
\caption{Caption of figure}
\label{fig.A.1}
\end{figure}
\end{document}

Perhaps you are using version of hyperref that is too old. The current version is 2012/11/06 v6.83m.

Heiko Oberdiek
  • 271,626