# subfigure inside tabular multirow

I'm trying to align 3 subfigures in a 2-by-2 table, where the second column is a multirow spanning the two rows.

Here's where I am:

Usually \multirow vertically centers its contents, but that's not happening with the subfigure.

Here's the code to generate the previous image.

\documentclass[]{article}
\usepackage[margin=1in]{geometry}

\usepackage[subrefformat=parens,labelformat=parens]{subcaption} %% provides subfigure
\usepackage{tabularx} %% tabularx and multirow so that we can do nice subfigure layouts
\usepackage{multirow}

\usepackage[demo]{graphicx}

\begin{document}

\begin{figure}
\begin{tabular}{c|c}
\begin{subfigure}{0.3\linewidth}
\begin{center}
\includegraphics[width=1.9in, height=1.9in]{logo}
\caption{}
\end{center}
\end{subfigure} & \multirow{2}{.5\textwidth}{
\begin{subfigure}{0.3\linewidth}
\begin{center}
\includegraphics[width=3.9in, height=3.9in]{logo}
\caption{}
\end{center}
\end{subfigure}
} \\
\cline{1-1}
\begin{subfigure}{0.3\linewidth}
\begin{center}
\includegraphics[width=1.9in, height=1.9in]{logo}
\caption{}
\end{center}
\end{subfigure} &  \\
\end{tabular}
\end{figure}

\end{document}


That-a-way? You can reference the subfigures adding a label in the first argument of \subcaptionbox which is to contain the caption text and the label: \documentclass[]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[margin=1in, showframe]{geometry} \usepackage{caption} \usepackage[subrefformat=parens,labelformat=parens]{subcaption} %% provides subfigure \usepackage{multirow} \usepackage{cleveref} \usepackage[demo]{graphicx}

\begin{document}

\begin{figure}
\centering\setlength\tabcolsep{1.25em}
\begin{tabular}{c|c}
\subcaptionbox{\vspace*{2ex}\label{1st-fig}}{\includegraphics[width=1.9in, height=1.9in]{logo}} & %
\multirow{2}{*}[\dimexpr1.9in-\baselineskip-0.5\abovecaptionskip-0.8ex\relax]{\subcaptionbox{label{3rd-fig}}{\includegraphics[width=3.9in, height=3.9in]{logo}}}
\\
\cline{1-1}
\subcaptionbox{\label{2nd-fig}}{\includegraphics[width=1.9in, height=1.9in]{logo}}
&
\end{tabular}
\caption{Some figures}
\end{figure}
We see in \cref{1st-fig} …

\end{document}


• Thank you! Can you explain why my approach didn't work? Also, where can I place a \label so that I can reference the subfigures? I stripped that from my minimal example, but I had it after \caption{} – Gus May 9 '16 at 22:54
• @Gus: The label has to go in the first argument of \subcaptionbox (see my edit). Why your approach doesn't work is hard to say. My first idea is that multirow isn't really done for that, as multirow{2} means the cell will use 2 lines, not 2 rows. So you should use the optional argument to make a manual adjustment. – Bernard May 11 '16 at 0:02
• I don't believe you edited the code to correspond to the new figure. – Gus May 24 '16 at 1:51
• @Gus: Oh! yes. I messed up with different versions of the code. It's corrected now. Thanks for pointing it. – Bernard May 24 '16 at 9:02