# beamer: How to align images in separate columns?

Here is a snippet of a beamer frame which is divided in three top-aligned columns.

Each column contains:

some top text

an image

some bottom text


The problem is:

because "some top text" in column #2 contains a "g" both the following image (which is the same in all 3 columns) and the "bottom text" are slightly more down-shifted. In fact the "little hook" of the "g" letter is not aligned with the very bottom of all previous capital letters.

So, is there any way to get all three images perfectly aligned across the three columns?

\documentclass{beamer}
\usepackage{graphics}
\begin{document}
\begin{frame}{What is SLURM?}
\begin{columns}[t]
\begin{column}{0.30\textwidth}
\begin{center}
COLUMN NUMBER 1

\vspace{1cm}
\includegraphics[scale=0.4]{image.jpg}
\bigskip

SOME TEXT1
\end{center}
\end{column}
\begin{column}{0.30\textwidth}
\begin{center}
COLUMN NUMBER 2g

\vspace{1cm}
\includegraphics[scale=0.4]{image.jpg}
\bigskip

SOME TEXT2
\end{center}
\end{column}
\begin{column}{0.30\textwidth}
\begin{center}
COLUMN NUMBER 3

\vspace{1cm}
\includegraphics[scale=0.4]{image.jpg}
\bigskip

SOME TEXT3
\end{center}
\end{column}
\end{columns}
\end{frame}
\end{document}

-
 How about multiple mini pages? – Tahnoon Pasha Nov 1 '12 at 21:26 tex.stackexchange.com/questions/69560/… – Tahnoon Pasha Nov 1 '12 at 21:27

One option to exactly align material in the three columns is to use overlayarea environments and specify the desired height:

\PassOptionsToPackage{demo}{graphicx}% just for the example
\documentclass{beamer}
\usepackage{graphics}

\begin{document}
\begin{frame}{What is SLURM?}
\begin{columns}[t]
\begin{column}{0.30\textwidth}
\begin{overlayarea}{\linewidth}{1cm}
\centering
COLUMN NUMBER 1\par
\end{overlayarea}
\begin{overlayarea}{\linewidth}{5cm}
\centering\vfill
\includegraphics[height=4cm,width=3cm]{image.jpg}
\end{overlayarea}
\begin{overlayarea}{\linewidth}{1cm}
\centering
SOME TEXT1\par
\end{overlayarea}
\end{column}
\begin{column}{0.30\textwidth}
\begin{overlayarea}{\linewidth}{1cm}
\centering
COLUMN NUMBER 2g\par
\end{overlayarea}
\begin{overlayarea}{\linewidth}{5cm}
\centering\vfill
\includegraphics[height=4cm,width=3cm]{image2.jpg}
\end{overlayarea}
\begin{overlayarea}{\linewidth}{1cm}
\centering
SOME TEXT2\par
\end{overlayarea}
\end{column}
\begin{column}{0.30\textwidth}
\begin{overlayarea}{\linewidth}{1cm}
\centering
COLUMN NUMBER 3\par
\end{overlayarea}
\begin{overlayarea}{\linewidth}{5cm}
\centering\vfill
\includegraphics[height=4cm,width=3cm]{image3.jpg}
\end{overlayarea}
\begin{overlayarea}{\linewidth}{1cm}
\centering
SOME TEXT3\par
\end{overlayarea}
\end{column}
\end{columns}
\end{frame}

\end{document}


The line \PassOptionsToPackage{demo}{graphicx} simply replaces actual figures with black rectangles; delete this line in your actual document.

-
 That's exactly what I was looking for, thanks! – user21639 Nov 6 '12 at 16:11

The use of minipages is one way, but a lot of times I prefer \phantom or\vphantom, just because it is so easy to use. (And also great for overlays)

Just add a \phantom{g} to the text above the pictures. The g wont be visible, but the spacing is just as if there was one.

\vphantom does the same, just for the vertical space only.

-
\vphantom{g} may work better, depending on the desired final effect. – lhf Nov 2 '12 at 1:55
yes, of course. – jenson_bo Nov 2 '12 at 6:42