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

The code for the appendices is the following:


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

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

    some text


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:


Thank you in advance.


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!

| improve this answer | |

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