How can I get a layout like the one below in my document?
With this question, I am looking for:
- An answer for the above layout
General advice on which combination of packages is recommended to build sophisticated layouts. By sophisticated layouts I mean layouts where:
- I can tile figures and subfigures with different sizes but still have them vertically or horizontally aligned.
- I can have the ability to reference subfigures from the text with links, e.g. "In Fig. 2(a) we have.."
In addressing this problem, I think Mico's answer in this thread: Vertically align subfloats at the top while having subcaptions vertically aligned below the subfloats is releveant, where he said:
According to the latest edition of the l2tabu document, both the subfigure and subfig packages should no longer be used; instead, one should use the subcaption package (from the same author of the caption package).
With this in mind, I thought a good combination of packages to build sophisticated layouts would be:
\usepackage{floatrow}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{calc}
\usepackage{graphicx}
so I used them to try building my layout below, but it didn't work as expected. Below is the code that shows my attempt:
\begin{figure}[t!]%
\begin{floatrow}[2]%
\ffigbox[\FBwidth]% Width of the subfloat:
{%
\includegraphics[width=0.20\textwidth]{1-1.png}%
\includegraphics[width=0.20\textwidth]{1-2.png}%
\includegraphics[width=0.20\textwidth]{1-3.png}%
\includegraphics[width=0.20\textwidth]{1-4.png}%
}{\caption{Foo}\label{fig:1}}%
\ffigbox[\Xhsize]%
{%
\begin{subfloatrow}%
\ffigbox[\FBwidth]% Width of the subfloat:
{%
\includegraphics[width=0.20\textwidth]{2-A.png}%
}
{%
\subcaption{}\label{fig:2-A}%
}
\ffigbox[\FBwidth]% Width of the subfloat:
{%
\includegraphics[width=0.20\textwidth]{2-B.png}%
}
{%
\subcaption{}\label{fig:2-B}%
}
\end{subfloatrow}
}%
{\caption{Results. subref{fig:2-A}: Foo. \subref{fig:1b}: Bar}}
\end{floatrow}%
\end{figure}