# Creating a flexible space between a few lines of text on a beamer slide

I think this is a very basic problem but somehow I don't know how to solve it. I am working with the beamer class and want to create slides where there are two columns. One of the two columns contains only a few lines of text but I want the lines be separated by a flexible amount of space. Unfortunately the \vspace{\stretch{1}} seems not to work anymore in the column environment.

A short example-code:

\documentclass{beamer}

\begin{document}
\begin{frame}
The text on this line should be nicely separated\dots

\vspace{\stretch{1}}

\dots from the text on this line. (Which is the case here.)
\end{frame}

\begin{frame}
\begin{columns}
\begin{column}{0.5\textwidth}
Imagine some graphics here.
\end{column}
\begin{column}{0.5\textwidth}
The text on this line should be nicely separated\dots

\vspace{\stretch{1}}

\dots from the text on this line. (Which is not the case here.)
\end{column}
\end{columns}
\end{frame}
\end{document}

-
Welcome to TeX.sx! Usually, we don't put a greeting or a "thank you" in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. Upvoting is the preferred way here to say "thank you" to users who helped you. –  diabonas Mar 7 '12 at 14:43
Thanks, this solved my problem! Although the question why it does not work with columns is still open. –  user12430 Mar 8 '12 at 7:04

An option could be to use minipages instead of the columns environment; using the optional arguments of minipage you can specify the height of the minipage and this allows you to use \vfill (or \vspace{\stretch{1}}):

\documentclass{beamer}

\begin{document}
\begin{frame}
The text on this line should be nicely separated\dots

\vspace{\stretch{1}}

\dots from the text on this line. (Which is the case here.)
\end{frame}

\begin{frame}
\begin{minipage}[c]{0.5\textwidth}
Imagine some graphics here.
\end{minipage}%
\begin{minipage}[c][.5\textheight][c]{0.5\textwidth}
The text on this line should be nicely separated\dots

\vfill

\dots from the text on this line. (Which is also the case here.)
\end{minipage}
\end{frame}
\end{document}

-

If you insert \tracingmacros as seen below then you will see that the column end with

\endcolumn ->\end {minipage}\hfill \end {actionenv}\@ignoretrue


which shows the column is a mininpage. Vertical boxes never stretch they are always the size specified, or the natural unstretched size of their contents. If you want stretch glue to have an effect within the column you will need to specify the vertical size of the minipage using its additional optional arguments. A couple of minutes with grep shows where this is and the appropriate definition is redefined below. this makes the column a bit too high, but the value can be changed either by eye, or by checking other parts of beamer to see what size it really uses for the vertical size of a frame.

\documentclass{beamer}
\makeatletter
\expandafter\def\csname beamerx@\string\beamer@columnenv\endcsname#1#2#3{%
\beamer@colclose
\def\beamer@colclose{}%
\begin{actionenv}#3\setkeys {beamer@col}{#1}%
\dimen@\textheight
\begin {minipage}[\beamer@colalign][\dimen@][c]{#2}%

\makeatother

\begin{document}
\begin{frame}
The text on this line should be nicely separated\dots

\vspace{\stretch{1}}

\dots from the text on this line. (Which is the case here.)
\end{frame}

\begin{frame}
\begin{columns}
\begin{column}{0.5\textwidth}
Imagine some graphics here.
\end{column}
\begin{column}{0.5\textwidth}
The text on this line should be nicely separated\dots

\vspace{\stretch{1}}

\dots from the text on this line. (Which is not the case here.)
\tracingmacros2
\end{column}
\end{columns}
\end{frame}
\end{document}

-