# Need pairs of side-by-side subfigures with ONE caption each

Here is what I am trying to do:

(a) Picture, Picture

(Caption for BOTH images (a) goes here)

(b) Picture, Picture

(Caption for BOTH images (b) goes here)

Etc. For the life of me I cannot figure out how to get ONE caption per pair of subfigure without LaTeX stacking the subfigures on top of each other. Each section of code typically looks like this:

\begin{subfigure}[h]{5cm}
\includegraphics[scale=0.3]{graphicA1}
\includegraphics[scale=0.3]{graphicA2}
\caption{captionA}
\end{subfigure}\\


With a simple \begin{figure} and \end{figure} around the whole thing. When I try this, graphicA1 and graphicA2 get stacked on top of each other. I do NOT want this. I want A1 and A2 in one single row, with a combined caption designed specifically for that subfigure set. How?

• Does this help: tex.stackexchange.com/questions/122314 Jun 15 '17 at 16:32
• Stacking is usually caused by a too big scale. Try scaling down a bit (so that both pictures with a small amount of space can fit in 5cm). Jun 15 '17 at 16:41

Here is an example using subfigure. You can set width dependent on \textwidth to prevent linebreak caused by to big images.

\documentclass[a4paper]{article}
\usepackage{graphicx}
\usepackage{subfigure}

\begin{document}
\begin{figure}
\centering
\subfigure[caption A B]{
\includegraphics[width=0.49\textwidth]{example-image-a}
\includegraphics[width=0.49\textwidth]{example-image-b}
}
\subfigure[caption C A]{
\includegraphics[width=0.49\textwidth]{example-image-c}
\includegraphics[width=0.49\textwidth]{example-image-a}
}
\caption{caption}
\end{figure}
\end{document}


You could try to use this sample

\begin{figure}[ht]
\begin{center}
\begin{minipage}[b]{0.4\linewidth}
\centering
\includegraphics[scale = 0.5]{image A}
\end{minipage}

• Don't use a center-environment inside of a figure-environment! It adds too much space. Instead you should use \centering as you did in your minipages. Jun 15 '17 at 16:44