9

I switched to using the memoir class and stopped including subfigures. All of my subfigures now interpret the caption as actual text, i.e. as [caption...], which shows up in the document with the square brackets. How do I created captioned subfigures using memoir?

Neil G
  • 17,947

2 Answers2

7

Use

\newsubfloat{<float>}

to activate

\subbottom
\subtop

inside environments.

Martin Heller
  • 11,391
  • I'm sorry, I don't think I know how to use it. It says 'no counter "" defined' – Neil G Aug 06 '10 at 07:59
  • 3
    \newsubfloat{figure} if you want to use \subtop or \subbottom inside a figure environment. \newsubfloat{table} for tables. – Leo Liu Aug 06 '10 at 08:14
6

In addition to Marin's answer, if you also want to use cleveref with memoir, I have found sub figures can not be properly referenced unless loading subfig. Here is what I do:

\RequirePackage[caption=false,position=top]{subfig}
\let\subtop\subfloat

so that I can continue using \subtop and if one day I decide to drop subfig my document needs no change.

A full example can look like this:

\begin{figure}
  \subtop[1 pass]{\includegraphics{eye1}}%
  \subtop[5 passes]{\includegraphics{eye5}}%
  \caption{loop performance comparison}
  \label{fig:eye-comparison}
\end{figure}
Leo Liu
  • 5,445