# Hyperref and Subfigure warning

I am using the memoir class, with the hyperref package. At one point, I have a couple subfigures:

\begin{figure}[!ht]
\centering     %%% not \center
\subbottom[]{\label{fig:turtled}\includegraphics[height=4cm]{graphics/turtled.png}}
\subbottom[]{\label{fig:capsized}\includegraphics[height=4cm]{graphics/capsized.png}}
\subbottom[]{\label{fig:mast-lift}\includegraphics[height=4cm]{graphics/mast-lift.png}}
\caption{(a) A turtled vessel being brought to the capsized position. (b) A capsized vessel being brought to the upright position. (c) The assisted mast-lift technique.}
\label{fig:righting}
\end{figure}


using the subbottom command. I then reference them later in the code:

... shown in \autoref{fig:mast-lift}.


Unfortunately, I'm getting a warning about this that I can't seem to figure out:

Package hyperref Warning: No autoref name for subfigure' on input line ###


Anyone have an idea on how to get rid of this warning?

• Are you sure you want to use \autoref instead of \ref? – Mario S. E. Apr 26 '13 at 17:50
• @Mario Hmm, you're actually right. After a little experimentation, I've found that the best method for my purpose is to define a custom \hyperref that incorporates \ref*. – Jordan Apr 26 '13 at 18:50
• @Jordan glad to hear that :) – Mario S. E. Apr 26 '13 at 20:02

Simply provide the missing definition (I suppressed parts of the original code that were not relevant here):

\documentclass{memoir}
\usepackage[demo]{graphicx}
\usepackage{hyperref}

\providecommand\subfigureautorefname{Subfigure}
\newsubfloat{figure}

\begin{document}

\begin{figure}
\centering     %%% not \center
\subbottom[]{\label{fig:turtled}\includegraphics[height=4cm]{graphics/turtled.png}}
\end{figure}
\autoref{fig:turtled}

\end{document}


The demo option for graphicx` simply replaces actual figures with black rectangles; do not use that option in your actual document.