[Tex/LaTex] beamer: How to align images in separate columns

beamergraphicsvertical alignment

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}

Best Answer

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}

enter image description here

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