Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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}
share|improve this question
    
How about multiple mini pages? –  Tahnoon Pasha Nov 1 '12 at 21:26
    
add comment

2 Answers

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.

share|improve this answer
    
That's exactly what I was looking for, thanks! –  user21639 Nov 6 '12 at 16:11
add comment

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.

share|improve this answer
1  
\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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.