TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This is similar to this question about using subfigures in memoir class and this one about using subfigure memoir and hyperref together

Is it possible to use memoir class with sucaption package? I tried dissemulating the ccaption packages but it doesn't work.




        \centering\large A
        \caption{A subfigure}\label{fig:1a}
        \centering\large B
        \caption{Another subfigure}\label{fig:1b}
    \caption{A figure}\label{fig:1}


I get the following error

LaTeX Error: Command \subcaption already defined.

LaTeX Error: Command \subfloat already defined.

any ideas?


This doesn't work with hyperref... Adding \usepackage{hyperref} leads to compilation errors.

So the new question is, is it possible to use memoir class with sucaption and hyperref packages? Are the 3 packages compatible?

share|improve this question
up vote 11 down vote accepted

Unfortunately the combination of memoir, caption, and hyperref is not fully compatible. (Not true anymore, see Addendum 2011-10-12.)

When the memoir document class detects the caption package it will re-define some macros to full-feed the needs of the caption package; so this combination works fine alone. But when you load the hyperref package, the memoir class loads the memhfixc package additionally which redefines \caption which makes the caption package to enter the fall-back or so called "compatibility mode".



Package caption Info: Incompatible package detected (regarding \caption).
(caption)             \caption = \long macro:->\donemaincaptiontrue \m@moldhypcaption .

Package caption Warning: \caption will not be redefined since it's already
(caption)                redefined by a document class or package which is
(caption)                unknown to the caption package.
See the caption package documentation for explanation.

The subcaption package does not work well in "compatibility mode", causing it to behave strange. (The very next version will issue an error message instead.)

My proposal:

  1. I will add the redefinition of the memhfixc package to the database of my caption package. This will stop the caption package from operating in compatibility mode.
  2. I will ask the current maintainer of the memoir document class if any further adoption is necessary.

So hopefully this issue will be fixed very soon.

P.S.: Sorry for the late answer

Addendum 2011-10-12

A new version of the caption package bundle is finally available on CTAN and as TeXlive update which fixes the hyperref compatibility issue. But one still needs


before loading the subcaption package since the memoir document class is not adapted to the subcaption package (yet).

Addendum 2012-04-10

Finally I have found some time to take a closer look at this issue, and it seems that I was able to adapt the subcaption package for usage with the memoir document class. I'll release it with the upcoming version 3.3 of the caption package.

share|improve this answer
Thank you very much for your efforts. – pmav99 Sep 4 '11 at 11:47
The issue is finally fixed, at least on the (sub)caption package side. See Addendum 2011-10-12 I just added to my answer. – Axel Sommerfeldt Oct 12 '11 at 16:23
Thank you very much! – pmav99 Oct 12 '11 at 20:09
Let me know if there is anything from the memoir side we can do to make caption vs. memoir easier. Eventhough I maintain memoir, I use caption a lot more than I use the memoir interface for captions. – daleif Oct 13 '11 at 7:51
@daleif: I'll write you an e-mail about that... – Axel Sommerfeldt Oct 13 '11 at 16:11



before loading those packages


as for the hyperref try this (I do not garantee for other problems)

share|improve this answer
it worked thank you – pmav99 May 24 '11 at 10:36
@ daleif it works but only when "hyperref" is missing. Any more ideas? thank you – pmav99 May 24 '11 at 12:20
@pmav99: Take a look at my (new) answer – Axel Sommerfeldt Sep 4 '11 at 11:29

Your Answer


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.