[Tex/LaTex] Subfigures in subfigures in latex

subfloats

I'm trying to put two separate images in one subfigure so that it can be combined with another one to complete a figure i.e.

(img-a) (img-b)     (img-c) (img-d)
      (a)                 (b)
        Figure 1: A caption

I've tried several methods but they never seem to work. Any ideas would be great.

Best Answer

There's no limit on the number of images you can put in a subcaption environment:

\documentclass{article}
\usepackage{subcaption}
\usepackage{graphicx}

\begin{document}

\begin{figure}
\centering

\begin{subfigure}[b]{.4\textwidth}
\centering
\includegraphics[width=.4\textwidth]{example-image}\quad
\includegraphics[width=.4\textwidth]{example-image}

\caption{}
\end{subfigure}\quad
\begin{subfigure}[b]{.4\textwidth}
\centering
\includegraphics[width=.4\textwidth]{example-image}\quad
\includegraphics[width=.4\textwidth]{example-image}

\caption{}
\end{subfigure}

\caption{A caption}

\end{figure}

\end{document}

enter image description here