# Using side captions with multiple subfloats (floatrow and memoir)

In a large document (memoir class), I'd like to have side captions in the outer margin to save space for figures consisting of multiple subfigures belonging together.

After trying sidecap with subfig (not really working together due to strange layout results), I read that the floatrow package is the recommended package for doing such things.

Now I fear that floatrow is not nicely working together with memoir - or I misunderstood the manual. I tried to mix the subfloatrow environment with the beside-caption example (page 36 in the manual) but was not successful. I was not able to put the main caption into the outer margin, at all and on even page numbers, the figures stick into the outer margin.

Any help or hint is appreciated!

Here comes my minimal working example, I'm struggling with (result below):

\documentclass[11pt,a4paper,book,oldfontscommands,twoside,openright,final]{memoir}

\usepackage{blindtext}
\usepackage{graphicx}
\usepackage{subcaption}
%\usepackage[wide]{sidecap}

\let\newfloat\undefined
\usepackage{floatrow}
\floatsetup[figure]{%
margins=hangoutside, % makes the second figure stick into the outer margin
capposition=beside,
capbesideposition={bottom,outside},
floatwidth=\textwidth
}
\floatsetup[subfigure]{style=plain}

\begin{document}

\blindtext

%\begin{SCfigure} % Using SCfigure environment results in strange subfigure numbering in the main caption
\begin{figure}[h]
\RawFloats % without \RawFloats, main caption disappears
\ffigbox[\textwidth]{%
\begin{subfloatrow}
\ffigbox{
\includegraphics[width=.5\textwidth, height=3cm, draft]{foo1.png}
}{\subcaption{Foo bar 1 \dots}}
\ffigbox{
\includegraphics[width=.5\textwidth, height=3cm, draft]{foo2.png}
}{\subcaption{Foo bar 2 \dots}}
\end{subfloatrow}

\begin{subfloatrow}
\ffigbox{
\includegraphics[width=.5\textwidth, height=3cm, draft]{foo3.png}
}{\subcaption{Foo bar 3 \dots}}
\ffigbox{
\includegraphics[width=.5\textwidth, height=3cm, draft]{foo4.png}
}{\subcaption{Foo bar 4 \dots}}
\end{subfloatrow}
}

\caption{Main caption foo bar \dots}
\end{figure}
%\end{SCfigure}

\blindtext[2]

\begin{figure}[h]
\RawFloats % without \RawFloats, main caption disappears
\ffigbox[\textwidth]{%
\begin{subfloatrow}
\ffigbox{
\includegraphics[width=.5\textwidth, height=3cm, draft]{foo1.png}
}{\subcaption{Foo bar 1 \dots}}
\ffigbox{
\includegraphics[width=.5\textwidth, height=3cm, draft]{foo2.png}
}{\subcaption{Foo bar 2 \dots}}
\end{subfloatrow}

\begin{subfloatrow}
\ffigbox{
\includegraphics[width=.5\textwidth, height=3cm, draft]{foo3.png}
}{\subcaption{Foo bar 3 \dots}}
\ffigbox{
\includegraphics[width=.5\textwidth, height=3cm, draft]{foo4.png}
}{\subcaption{Foo bar 4 \dots}}
\end{subfloatrow}
}

\caption{Main caption foo bar \dots}
\end{figure}

\blindtext

\end{document}


## 1 Answer

Do you looking something like this?

For above figure I use package subfig and from memoir sidecaption:

documentclass[11pt,a4paper,twoside]{memoir}

\usepackage{blindtext}
\usepackage{graphicx}
\usepackage{subfig}

\sidecapmargin{outer}

\begin{document}
\blindtext

\begin{figure}[h]
\begin{sidecaption}{Main caption on outer side of figure}[fig:mayfig-1]\centering
\subfloat[sub figure A]{\includegraphics[width=0.48\hsize]{example-image-a}}
\hfill
\subfloat[sub figure B]{\includegraphics[width=0.48\hsize]{example-image-b}}
\end{sidecaption}
\end{figure}

\blindtext
\end{document}


I shorten your code to MWE ...

• Thank you, @Zarko for your help! I was not aware of the sidecaption environment. With that tip, I was able to solve the problem (without using floatrow at all). Thank you very much! – HenkBear Sep 16 '15 at 13:21