Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I switched to memoir and stopped including subfig and now all my subfigures interpret the caption as actual text, i.e., "[caption...]" shows up in the document with the square brackets. How do I have captioned subfigures with memoir?

share|improve this question
add comment

2 Answers

up vote 6 down vote accepted

Use

\newsubfloat{<float>}

to activate

\subbottom
\subtop

inside environments.

share|improve this answer
    
I'm sorry, I don't think I know how to use it. It says 'no counter "<float>" defined' –  Neil G Aug 6 '10 at 7:59
2  
\newsubfloat{figure} if you want to use \subtop or \subbottom inside a figure environment. \newsubfloat{table} for tables. –  Leo Liu Aug 6 '10 at 8:14
add comment

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}
share|improve this answer
    
how do you add captions? –  Neil G Aug 6 '10 at 8:04
    
For sub captions: \subtop[caption]{\includegraphics{fig1}} –  Leo Liu Aug 6 '10 at 8:11
    
Thanks! I wasn't able to include subfig though: ! Missing \endcsname inserted. <to be read again> \@classoptionslist l.297 \ProcessPackageOptions –  Neil G Aug 6 '10 at 8:15
    
I added an example. –  Leo Liu Aug 6 '10 at 8:37
    
Thanks, it works, but I get this weird warning: pdfTeX warning (ext4): destination with the same identifier (name{subfigure.2}) has been already used, duplicate ignored Any ideas? –  Neil G Aug 6 '10 at 8:42
show 2 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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