# How to set up a quartered layout in beamer

Back in Powerpoint days, I encountered a typical quartered layout, which was just tiling the body of the slide horizontally and vertically into equally sized pieces with arbitrary content:

-----------------------
| *bla     | texttext |
|          | texttext |
|          | texttext |
-----------------------
|          | 1. stuff |
|  IMAGE   | 2. stuff |
|          | 3. stuff |
-----------------------


I tried to reproduce this, but failed so far. My first step was to take a column environment and insert the vertical spaces:

\documentclass{beamer}
\begin{document}
\begin{frame}{foo}{bar}
\begin{columns}[t]
\begin{column}{0.5\textwidth}
\begin{minipage}[t][0.35\textheight]{\textwidth}
sdjfls\\
sdjfk\\
sd
\end{minipage}
\begin{minipage}[t][0.35\textheight]{\textwidth}
sd
\end{minipage}
\end{column}
\begin{column}{0.5\textwidth}
\begin{minipage}[t][0.35\textheight]{\textwidth}
sdjfls\\
sd
\end{minipage}
\begin{minipage}[t][0.35\textheight]{\textwidth}
sdjfls\\
sdjfk\\
sd
\end{minipage}
\end{column}
\end{columns}
\end{frame}
\end{document}


But the manual tuning 0.35\textheight is not really what I wanted, since I have to adjust the number 0.35 for every new theme. A better solution would be something like 0.5\columnheight or 0.5\beamerslidebodyheight. There might be no better solution with this ansatz, see question Why does vfill not work inside a beamer column?.

I'm open to completely different solutions.

One possibility could be to define a new length:

    \newlength{\restofpage}
\setlength{\restofpage}{\textheight}


and replace all the 0.35\textheight by 0.5\restofpage, but I don't think this works with footlines.

-
use a tabular instead of columns – Herbert Apr 7 '11 at 16:51
The tabular doesn't ensure that the space is indeed filled. To make clear what I mean, consider replacing the minipage by \block{caption}{ *MINIPAGE* }. I would want the block to use up all the available space. – Turion Apr 7 '11 at 17:00
IMO that's too much stuff on one slide. – Matthew Leingang Apr 7 '11 at 17:16
Did you try tabular* environment, or tabularx package? – Jan Hlavacek Apr 8 '11 at 3:13
@Jan: The problem is mainly how to fit the height. tabular* and tabularx fit the width, as far as I know. – Turion Apr 9 '11 at 11:22

I just looked at the code for building a frame and discovered that without some really complicated wizardry, this is not possible!

The \pageheight gets divided in to the main area plus the bits at the top and bottom. You'd need to know all those bits to define a \restofpage length. It is possible to know some of them, such as the header and footer, but one crucial one is not known until after the frame is built. That is the frame title. The frame title is not built until after the frame has been gathered and put together. This is because it is possible to specify the frame title anywhere in the slide.

If you try the code:

\begin{frame}
\message{building the frame}
\lipsum[1]
\frametitle{Quartered Layout\message{in title}}
\message{more building work going on}
\end{frame}


then you get the messages: building the frame more building work going on in title showing that the \frametitle doesn't get processed until after the frame is processed.

Of course, it might be possible to get around this, perhaps by insisting that the frame title be given as an argument to the \begin{frame} and constructing (and measuring) the frame title at the start of the frame. But I think that there may be easier ways to divide up the content than this.

To counter Seamus' point, just because you can do it in Powerpoint doesn't make it a bad thing to do. One of my earlier forays with beamer used columns to present two sides of an idea: http://www.math.ntnu.no/~stacey/Seminars/infgeom.html (source available on that page). And one of my most recent used blocks to break up a page: http://www.crcg.de/wiki/Higher_Structures_in_Topology_and_Geometry_V (look for my name; the source is not available but for the particular bit of doing the blocks there's no magic involved). If there's something particular in one of those that you like the look of but can't figure out yourself, feel free to ask here or privately.

I'm sorry that this isn't a more positive answer!

-