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".
\documentclass{memoir}
\usepackage{caption,hyperref}
\begin{document}
A
\end{document}
causes
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:
- 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.
- 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
\let\subcaption\undefined
\let\subfloat\undefined
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.
You don't need caption
or subcaption
, if you don't want any special label for the graphics.
\documentclass[final]{IEEEtran}
\usepackage{kantlipsum} %<- For dummy text
\usepackage{mwe} %<- For dummy images
\title{The research}
\author{The researcher}
\begin{document}
\maketitle
\begin{abstract}
\kant[1]
\end{abstract}
\kant[1-4]
\begin{figure}
\centering
\raisebox{-.5\height}{%
\includegraphics[height=4cm,width=3cm]{example-image-a}%
}\qquad
\raisebox{-.5\height}{%
\includegraphics[height=2cm,width=3cm]{example-image-b}%
}
\caption{The proper caption}
\label{figab}
\end{figure}
\end{document}
I imposed height and width to the images in order to emulate your real situation, where the two pictures have different heights.
With \raisebox{-.5\height}
we shift vertically the reference point (usually at the bottom) for each picture, so they come out automatically center aligned. With \qquad
I add some separation; leave it out (changing it into a %
) if you don't want any space.
Best Answer
This old code…
…can be roughly rewritten as
Note that you have to find suitable width parameters and use additional
\centering
commands, otherwise the captions are left-aligned now.