# Alignment troubles with tabular, pgfuseimage and multirows

I'm stuck with some alignment problems in tabular:

and in draft mode:

The point is that the bottom left one should take the whole space without overflooding the bottom (so to speak)

The original MWE that gave these images is the following:

\documentclass[9pt,draft]{beamer}
\usepackage{multirow}
\usepackage{tikz}

\pgfdeclareimage[interpolate=true,height=.15\textheight]{mousse-hexa}{img/foam2D-honeycomb.png}
\pgfdeclareimage[interpolate=true,height=.15\textheight]{mousse-grain}{img/foam2D-grain-boundaries.png}
\pgfdeclareimage[interpolate=true,height=.15\textheight]{mousse-desor}{img/foam2D-disordered.png}
\pgfdeclareimage[interpolate=true,height=.15\textheight]{murissement}{img/foam2D-coarsening.png}
\pgfdeclareimage[interpolate=true,height=.30\textheight]{graphe-mur}{img/lauriesfoam.png}

\begin{document}
\begin{frame}{title}
\begin{tabular}{c l}
\pgfuseimage{murissement}                 & \pgfuseimage{mousse-hexa}  \\
\multirow{2}{*}{\pgfuseimage{graphe-mur}} & \pgfuseimage{mousse-grain} \\
& \pgfuseimage{mousse-desor} \\
\end{tabular}
\end{frame}
\end{document}

-
You could use the second optional argument of \multirow to shift your image up: For the draft version of your slide, \multirow{2}{*}[0.1\textheight]{\pgfuseimage{graphe-mur}} works quite well. –  Jake Jun 15 '12 at 9:17
Thanks, it helps, visually. Still it was not the intended behaviour of multirow :/ And I don't know the exact shift value to make it look nice, and that feels not right... –  EEva Jun 15 '12 at 9:26
Yeah, I agree. I'd be interested to see a proper solution to this, but I have the feeling that this is going to be quite hard. –  Jake Jun 15 '12 at 9:27
As you noticed, this is a beamer presentation. Another workaround would be to use the columns environment. –  EEva Jun 15 '12 at 9:39

I think a TiKZ matrix could help you. From you question I understand that you want to place lauriesfoam horizontally aligned with south of foam2D-disordered. Next code shows how to do it with a TiKZ matrix. First a matrix with upper row a right most column is constructed and after that, a node containing lauriesfoam figure is aligned with previous ones. In left column last node is horizontally and vertically centered and right column shows previous option. With calc library help you can compute more complex alignments.

\documentclass[9pt,draft]{beamer}
\usepackage{tikz}
\usetikzlibrary{matrix}

\pgfdeclareimage[interpolate=true,height=.15\textheight]{mousse-hexa}{img/foam2D-honeycomb.png}
\pgfdeclareimage[interpolate=true,height=.15\textheight]{mousse-grain}{img/foam2D-grain-boundaries.png}
\pgfdeclareimage[interpolate=true,height=.15\textheight]{mousse-desor}{img/foam2D-disordered.png}
\pgfdeclareimage[interpolate=true,height=.15\textheight]{murissement}{img/foam2D-coarsening.png}
\pgfdeclareimage[interpolate=true,height=.30\textheight]{graphe-mur}{img/lauriesfoam.png}

\begin{document}
\begin{frame}{title}
\begin{columns}[t]
\column{.5\textwidth}
\begin{tikzpicture}[ampersand replacement=\&]
\matrix[column sep=2mm,row sep=3mm]{
\node[draw] (A11) {\pgfuseimage{murissement}};                 \& \node[draw] (A12) {\pgfuseimage{mousse-hexa}};  \\
\& \node[draw] (A22) {\pgfuseimage{mousse-grain}}; \\ \& \node[draw] (A32) {\pgfuseimage{mousse-desor}}; \\
};
\path (A22.south) -- coordinate [midway] (C) (A32.north);
\fill (C) circle (2pt);
\node[draw] (D) at (A11|-C) {\pgfuseimage{graphe-mur}};
\end{tikzpicture}
\column{.5\textwidth}
\begin{tikzpicture}[ampersand replacement=\&]
\matrix[column sep=2mm,row sep=3mm]{
\node[draw] (A11) {\pgfuseimage{murissement}};                 \& \node[draw] (A12) {\pgfuseimage{mousse-hexa}};  \\
\& \node[draw] (A22) {\pgfuseimage{mousse-grain}}; \\ \& \node[draw] (A32) {\pgfuseimage{mousse-desor}}; \\
};
\path (A22.south) -- coordinate [midway] (C) (A32.north);
\fill (C) circle (2pt);
\node[draw,anchor=south] (D) at (A11|-A32.south) {\pgfuseimage{graphe-mur}};
\end{tikzpicture}
\end{columns}
\end{frame}
\end{document}


-
Nice :) I got something acceptable using columns in beamer. It is also much shorter to write and images width are controlled with column width. –  EEva Jun 18 '12 at 10:39

A simple solution is to lower the big image, pretending it has no height and depth with \smash:

\begin{frame}{title}
\begin{tabular}{c l}
\pgfuseimage{murissement} & \pgfuseimage{mousse-hexa}  \\
\smash{\raisebox{\dimexpr-.15\textheight-2pt\relax}{\pgfuseimage{graphe-mur}}}
& \pgfuseimage{mousse-grain} \\
& \pgfuseimage{mousse-desor} \\
\end{tabular}
\end{frame}


-
Thank you for your answer. This seems too much over my head :) And I really prefer either using columns in beamer, or the accepted solution –  EEva Jun 18 '12 at 10:42