1

I have five figures to put in the following layout:

enter image description here

So far I have managed to obtain the above layout (using the following script), except for the labels of the sub-figures (a,b,c,d,e) that I want to be added to the figures (inside the sub-figures in the down left corner).

\begin{figure}
\captionsetup[subfigure]{labelformat=empty}
\begin{minipage}{.25\textwidth}
\begin{subfigure}{\textwidth}
\subcaption{Title1}
\vspace{0.1cm}
\includegraphics[width=1\textwidth,trim=2cm 1cm 2cm 1cm]{Figure_1}
\hspace{1cm}
\end{subfigure}
\begin{subfigure}{\textwidth}
\vspace{0.3cm}
\subcaption{Title3}
\vspace{0.1cm}
\includegraphics[width=1\textwidth,trim=2cm 1cm 2cm 1cm]{Figure_3}
\hspace{1cm}
\end{subfigure}
\end{minipage}
\hfill
\begin{minipage}{.25\textwidth}
\begin{subfigure}{\textwidth}
\subcaption{Title2}
\vspace{0.1cm}
\includegraphics[width=1\textwidth,trim=2cm 1cm 2cm 1cm]{Figure_2}
\hspace{1cm}
\end{subfigure}
\begin{subfigure}{\textwidth}
\vspace{0.3cm}
\subcaption{Title4}
\vspace{0.1cm}
\includegraphics[width=1\textwidth,trim=2cm 1cm 2cm 1cm]{Figure_4}
\hspace{1cm}
\end{subfigure}
\end{minipage}
\hfill
\begin{minipage}{.45\textwidth}
\begin{subfigure}{\textwidth}
\subcaption{Title5}
\vspace{0.1cm}
\includegraphics[width=\textwidth,trim=1cm 0cm 2cm 0.5cm]{Figure_5}
\end{subfigure}
\end{minipage}
\end{figure}
{{\bf Insert Caption Here}

I would appreciate it if someone could help me to achieve this.

Thank you in advance!

1 Answer 1

1

With the help of the following MWE which contains a modified solution from here you can obtain this result:

enter image description here

\documentclass{article}
\usepackage{graphicx}
\usepackage{caption,subcaption,tikz}


\DeclareCaptionFormat{suboverlay}{\gdef\subcapoverlay{(\thesubfigure) #3\par}}
\DeclareCaptionStyle{suboverlay}{format=suboverlay}


\captionsetup[subfigure]{format=suboverlay}
\newcommand{\subcaptionOverlay}[1]{%
  \subcaption{}%
  \begin{tikzpicture}
    \node [inner sep=0,anchor=south west]at (-3ex,-2ex) (image) {#1};
    \draw node [black] {\subcapoverlay};
  \end{tikzpicture}%
}

\begin{document}

\begin{figure}%
  \begin{minipage}{.25\textwidth}
    \begin{subfigure}{\textwidth}
      \centering\textbf{Title 1}
      \subcaptionOverlay{\includegraphics[width=\textwidth]{example-image}}
    \end{subfigure}
    \begin{subfigure}{\textwidth}
      \centering\textbf{Title 3}
      \subcaptionOverlay{\includegraphics[width=\textwidth]{example-image}}
    \end{subfigure}
  \end{minipage}
  \hfill
  \begin{minipage}{.25\textwidth}
    \begin{subfigure}{\textwidth}
      \centering\textbf{Title 2}
      \subcaptionOverlay{\includegraphics[width=\textwidth]{example-image}}
    \end{subfigure}
    \begin{subfigure}{\textwidth}
      \centering\textbf{Title 4}
      \subcaptionOverlay{\includegraphics[width=\textwidth]{example-image}}
    \end{subfigure}
  \end{minipage}
  \hfill
  \begin{minipage}{.45\textwidth}
    \begin{subfigure}{\textwidth}
      \centering\textbf{Title 5}
      \subcaptionOverlay{\includegraphics[width=\textwidth]{example-image}}
    \end{subfigure}
  \end{minipage}
\end{figure}


\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .