1

I tried with this MWE:

\documentclass{article}

\usepackage{caption,subcaption}
\usepackage{cleveref}
\usepackage{hyperref}

\begin{document}

See \cref{subfig1}, \ref{subfig1}

\begin{figure}
 \subcaptionbox{Subfigure\label{subfig1}}
  {A FIGURE}
\caption{Figure}
\label{fig1}
\end{figure}

\end{document}

Without hyperref, all is nice, with hyperref I get ?? for the \cref instance. I tried installing the latest versions of all three packages, nothing changed apparently.

Jellby
  • 3,323

1 Answers1

2

You have to load cleveref after hyperref. Then everything works.

See fig. 1a, 1a

It is kind of mentioned in the manual:

If you are using both varioref and hyperref, make sure you are loading them in the correct order, otherwise cross-references will reference completely the wrong thing without any warning in the LATEX output or log! The packages must be loaded in the following order: varioref, hyperref, cleveref.

Juri Robl
  • 4,763