1

I am using the appendices and the varioref package to refer at them.

The code for the appendices is the following:

\documentclass{book}
    \begin{document}
    \begin{appendices}
    \appendixpage
    \noappendicestocpagenum
    \addappheadtotoc

    \chapter[MATLAB codes]{List of MATLAB codes} \label{app:MATLAB}

    \begin{lstlisting} [language=Matlab, caption=Reconstruction function., label=code:reconstruction]

    some text

    \end{lstlsiting}
    \end{appendices}
    \end{document}

when i quote them in the text i do it this way:

In appendix \vref{app:MATLAB} we have the code \vref{code:reconstruction}

the results are strange, like:"In the appendix chapter A we have the code ?? A.1 on page 121".

Is it normal?

I am using (in this order) these packages:

\usepackage{varioref}
\usepackage{hyperref}
\usepackage{cleveref}

Thank you in advance.

1

1 Answer 1

1

I resolved my problem: it was caused by the clevref package which has a problem with listings.

The solution is explained here: cleveref + listings

Thanks a lot to Dennis!

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