So I am using the IEEEtran document class for the first time and I have a problem. When I cross-reference a figure/table/section/whatever with \ref I get the expected reference number. But I would like to automatically insert the associated prefix -- Figure, Section, whatever -- which can be done with the package cleveref. However, when I use the \cref command, I get the output ?? in the pdf document.

My preamble is like this

% The preceding line is only needed to identify funding in the first 
% footnote. If that is unneeded, please comment it out.



One of my figures is defined like this:

  \caption{Experiment results for the Full Vector algorithm with generation size 8.}

And the \cref command is \cref{fig:res-fv-gen-8} for instance. None of my \cref commands work.

EDIT: Noticed that I get this warning: LaTeX Warning: Reference 'fig:res-fv-gen-8' on page 1 undefined on input line 3.

  • 3
    cleveref must always be loaded after hyperref. No exceptions. – Mico Feb 6 '18 at 21:22
  • 1
    Thank you so much @Mico and yes it is a duplicate then. I thought it was a problem with IEEETran and thanks for the edit :) – Lars Nielsen Feb 6 '18 at 21:38