# How can I place multiple images in a table and align them nicely

I'm currently trying to place multiple images inside a table. with the Multirow package.

My current code looks like this:

\begin{figure}
\centering
\begin{tabular}{cc}
&
\multirow{2}{0.65\textwidth}{\includegraphics[width = 0.65\textwidth]{kitties}}\\
\includegraphics[width = 0.32\textwidth]{tigers}
\\
\includegraphics[width = 0.32\textwidth]{lions}&

\\
\\

\includegraphics[width = 0.32\textwidth]{tigers}&
\multirow{2}{0.65\textwidth}{\includegraphics[width =0.65\textwidth{kitties}}\\
\includegraphics[width = 0.32\textwidth]{lions}\\

\end{tabular}
\caption[XYZ]{\label{fig:xyz} 1234}
\end{figure}


As you can see, I already try two different options of /multirow. I get the following output:

How can align the kitties inside the table with theirs relatives, so that they are in one row?

Note, that I don't need separate descriptions of the figures, the one, that is currently inside the current kitti image is sufficient.

A solution with minipages:

\documentclass[12pt]{article}
\usepackage{graphicx}
\usepackage{float}
\begin{document}

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravidamauris.

\begin{figure}[H]
\centering
\begin{minipage}[outer sep=0]{\textwidth}
\begin{minipage}[m]{0.34\textwidth}
\includegraphics[width =\textwidth]{example-image-a}\\[1ex]
\includegraphics[width =\textwidth]{example-image-b}
\end{minipage}\hfill
\begin{minipage}[m]{0.64\textwidth}
\includegraphics[width =\textwidth]{example-image-a}
\end{minipage}
\end{minipage}\vspace{1ex}

\begin{minipage}[outer sep=0]{\textwidth}
\begin{minipage}[m]{0.34\textwidth}
\includegraphics[width =\textwidth]{example-image-a}\\[1ex]
\includegraphics[width =\textwidth]{example-image-b}
\end{minipage}\hfill
\begin{minipage}[m]{0.64\textwidth}
\includegraphics[width =\textwidth]{example-image-b}
\end{minipage}
\end{minipage}

\caption[XYZ]{\label{fig:xyz} 1234}
\end{figure}

\end{document}


You can use the optional argument of \multirow to adjust the placement of its content:

\documentclass{article}
\usepackage{multirow}
\usepackage[demo]{graphicx}

\begin{document}

\begin{figure}
\centering
\begin{tabular}{cc}
\includegraphics[width = 0.32\textwidth]{tigers}
& \multirow{2}{*}[18.7ex] {\includegraphics[width = 0.65\textwidth, height=0.33\textheight]{kitties}}\\
\includegraphics[width = 0.32\textwidth]{lions} \\[4ex]
%%%%%%%%%%
\includegraphics[width = 0.32\textwidth]{tigers}
& \multirow{2}{0.65\textwidth}[17ex]{\includegraphics[width =0.65\textwidth, height=0.3\textheight]{kitties}} \\
\includegraphics[width = 0.32\textwidth]{lions}
\end{tabular}
\caption[XYZ]{\label{fig:xyz} 1234}
\end{figure}

\end{document}


• This solution works for me with [12ex], but you kind of have to play around with it, until it works. Is there a more general solution for this, where you rather tell latex to "place it in the middle" than to tell it "place it 12ex higher than that weird place u used before?"? I have the feeling, that every layout change, image size change, or change in character size, will mess up the alignment again. – patrick95 Nov 2 '18 at 14:53
• Update: As expected, when using the images I actually wanted to show, the alignment was far off again. For this reason, I'm going to accept koleygrs answer. Thanks for the help! – patrick95 Nov 3 '18 at 10:20