# Including multiple graphics in tabularx

I'm trying to add five Pictures into a document. As one of those images is vertical, i would like to put two horizontal images beneath each other, put the vertical image into the center, and then add the last two pictures, again beneath each other.

As figure environment won't work in a table i tried with subfig, but without success, so my current attempt is to use tabularx and multirow and add captiopns "manually":

\begin{table}[htbp]
\begin{tabularx}{\columnwidth}{cXc}
\includegraphics[scale=.5]{12-0247} & \multirow{3}{=}{\centering \includegraphics[scale=.5]{12-0249} \\ B4} & \includegraphics[scale=.5]{12-0248} \\
A2                                  &                                                                       & C2                                  \\
\includegraphics[scale=.5]{12-0379} &                                                                       & \includegraphics[scale=.5]{12-0381} \\
A4                                  &                                                                       & C4
\end{tabularx}
\end{table}


So my result looks like this:

The vertical graphic seems to be shifted downwards. My guess is, that those figures do not actually raise the heigt-parameter of the cells they are included in, so the \multirow-command calculates the heigt of A1, A2 and A3 as the heigt of one-line text cells. The same goes for the height of the 3 combined cells which include the vertical graphic, which results in an alignment of the top as if there were only two lines of text in the multirow part.

My quick and dirty solution is to put the whole multirow insode a raisebox, which works well enough to keep on working, but I'm still curious as to what a good solution would look like.

So, any ideas?

Thanks, Katschka

• What happens if you replace \multirow{3}{=}{\centering \includegraphics[scale=.5]{12-0249} with \multirow{3}{=}{\includegraphics[width=\hsize]{12-0249}? (Depending on the image sizes, you will likely have to adjust the first argument of \multirow.)
– Mico
Apr 17 '20 at 8:27
• Why not use three side by side minipages? Apr 17 '20 at 8:28

I suggest using minipages:

\documentclass{article}
\usepackage{graphicx}

\begin{document}

\begin{table}[htbp]
\begin{minipage}{0.3\textwidth}
\centering
\includegraphics[width=3cm]{example-image}

A2\medskip

\includegraphics[width=3cm]{example-image}

A4
\end{minipage}\hfill
\begin{minipage}{0.3\textwidth}
\centering
\includegraphics[width=3cm, height=4cm]{example-image}

B4
\end{minipage}\hfill
\begin{minipage}{0.3\textwidth}
\centering
\includegraphics[width=3cm]{example-image}

C2\medskip

\includegraphics[width=3cm]{example-image}

C4
\end{minipage}
\end{table}

\end{document}