0

I'd like to group three images and their overall caption together that span over two rows, but asymetrically - essentially like a table where the top row has two of the images and the second row has one image and the caption which are all aligned:

enter image description here

I can do this using brute force and make a manual caption, but ideally would like to include a proper caption command since this is incorporated in a document with lots of figures. Is there a way to place a caption inside a cell within the tabular environment? Or should this be done in another way? I notice that the minipage or subfigure methods might be useful, but the layout in these thread aren't exactly what I'm looking for.

Thank you!

0

Here are two ways. In the first one, I have placed 4 minipages insode of a figure environment. In the second example, I have placed the images and their caption inside of a tabularx and used the commands from the cellspace package to add a uniform white space around the images.

enter image description here

\documentclass{article}
\usepackage{graphicx}

%%%% Only used for the second example %%%%
\usepackage{tabularx}
\usepackage{cellspace}
\addparagraphcolumntypes{X}
\newcolumntype{Y}{>{\centering\arraybackslash}X}
\addparagraphcolumntypes{Y}
\setlength\cellspacetoplimit{\tabcolsep}
\setlength\cellspacebottomlimit{\cellspacetoplimit}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}
\begin{figure}
\begin{minipage}{0.475\textwidth}
    \includegraphics[width=\linewidth]{example-image}
\end{minipage}\hfill
\begin{minipage}{0.475\textwidth}
    \includegraphics[width=\linewidth]{example-image}
\end{minipage}
\bigskip

\begin{minipage}{0.475\textwidth}
    \includegraphics[width=\linewidth]{example-image}
\end{minipage}\hfill
\begin{minipage}{0.475\textwidth}
    \caption{my caption text goes here my caption text goes here}
    \label{label}
\end{minipage}
\end{figure}


\begin{figure}
\renewcommand\tabularxcolumn[1]{m{#1}}
\begin{tabularx}{\textwidth}{@{}S{Y}S{Y}@{}}
\includegraphics[width=\linewidth]{example-image} 
& \includegraphics[width=\linewidth]{example-image} \\ 
\includegraphics[width=\linewidth]{example-image} 
& \caption{my caption text goes here my caption text goes here}\label{label} \\
\end{tabularx}
\end{figure}
\end{document}
1

Here is a simple solution with the \RawCaption command from floatrow:

\documentclass[11pt]{article}
\usepackage{mwe}
\usepackage[export]{adjustbox}
\usepackage{caption}
\captionsetup{labelfont=bf}
\usepackage{floatrow}
\usepackage{eqparbox} 

\begin{document}

\begin{figure}\raggedright
\includegraphics[scale=0.5,valign = c]{example-image-a} \qquad
\includegraphics[scale=0.5,valign = c]{example-image-b}\vspace{4ex}\par

\includegraphics[scale=0.5,valign = c]{example-image-c}\qquad
\parbox{6cm}%
{\hfill\RawCaption{\caption{Three images and the caption aligned like a table}\label{3images}}}
\end{figure}

\end{document} 

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.