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.

I'm doing beamer slides in the 16:9 aspect ratio, so I want to use a more horizontal flow than I was when I had 4:3 slides. For example, I'd like to place a theorem and its proof side-to-side rather than the proof below the theorem. As in:

\documentclass[aspectratio=169]{beamer}
\usepackage{tikz}
\usetheme{Rochester}
\begin{document}

\begin{frame}{There is no largest prime number}
\begin{columns}
\begin{column}[t]{0.45\textwidth}
\begin{theorem}
 There are infinitely many primes.
\end{theorem}
\end{column}
\begin{column}[t]{0.45\textwidth}
\begin{proof}
 Suppose $p$ were the largest prime number.  
 Let $q$ be the product of the first $p$ numbers.  
 Then $q+1$ is not divisible by any of them.  
 Thus it is prime, but is bigger than $p$.  
 This is a contradiction.
\end{proof}
\end{column}
\end{columns}
\end{frame}
\end{document}

Here is the result:

sample output

As you can see, the theorem box is a lot shorter than the proof box and the effect is kind of ugly. Is there a nice way to add vertical space to the shorter one to make it the same height as the longer one?

share|improve this question
3  
Your proof is wrong ... –  Hendrik Vogt Jan 26 '11 at 13:48
    
@Hendrik: I'm just copying Till's proof from the beameruserguide. Mentally substitute lorem ipsum if you like. :-) –  Matthew Leingang Jan 26 '11 at 14:01
2  
If you're coming to tex.sx for your maths knowledge, you're doing it wrong –  Seamus Jan 26 '11 at 15:27
1  
@Jimi: I use TeXShop on the Mac. You can select a part of the PDF viewer window and copy it. Then open up Preview and Select File > New. You'll get a PDF of what you clipped. Then save it as PNG. –  Matthew Leingang Jan 26 '11 at 20:38
1  
@Jimi: Good, I can give more specific tips. Before you select and copy, make sure you click the dotted rectangle button on the right-hand side of your preview window's toolbar. That will make the mouse select regions, rather than select text or magnify the document. –  Matthew Leingang Jan 27 '11 at 1:12
show 13 more comments

2 Answers 2

I can provide only a hack ...

\begin{theorem}
 There are infinitely many primes.\rule[-5\normalbaselineskip]{0pt}{0pt}
\end{theorem}

and the complete code to visualize the meaning of the \normalbaselineskip

\documentclass[aspectratio=169]{beamer}
\usepackage{tikz}
\usetheme{Rochester}
\begin{document}

\begin{frame}{There is no largest prime number}
\begin{columns}
\begin{column}[t]{0.45\textwidth}
\begin{theorem}
 There are infinitely many primes.%
\rule[-1\normalbaselineskip]{10pt}{1pt}\kern-10pt%
\rule[-2\normalbaselineskip]{10pt}{1pt}\kern-10pt%
\rule[-3\normalbaselineskip]{10pt}{1pt}\kern-10pt%
\rule[-4\normalbaselineskip]{10pt}{1pt}\kern-10pt%
\rule[-5\normalbaselineskip]{10pt}{1pt}    
\end{theorem}
\end{column}
\begin{column}[t]{0.45\textwidth}
\begin{proof}
 Suppose $p$ were the largest prime number.  
 Let $q$ be the product of the first $p$ numbers.  
 Then $q+1$ is not divisible by any of them.  
 Thus it is prime, but is bigger than $p$.  
 This is a contradiction.
\end{proof}
\end{column}
\end{columns}
\end{frame}
\end{document}

enter image description here

share|improve this answer
    
But thanks for the hack, at least. I hadn't thought about using \normalbaselineskip as a unit of length. That can make guessing-and-checking a quicker process. –  Matthew Leingang Jan 26 '11 at 14:48
    
@Herbert Could you explain how your answer works? As I understand it, it creates a widthless, lengthless rule at a certain position, thus forcing the box to stretch to accommodate it. The rule is moved down (hence the minus sign) 5 times the \normalbaselineskip which is...? A measure of the vertical height of a line of text? Is that along the right lines? –  Seamus Jan 26 '11 at 15:52
    
@Seamus: I have no idea how much it is. It is not interesting because it is one line and in the proof we have 5 additional lines. –  Herbert Jan 26 '11 at 15:59
1  
@Herbert but it is a measure of the height of a line, right? That is what's important. –  Seamus Jan 26 '11 at 16:01
1  
@Hendrik Yes, you're right. There is a not missing. It should read "this site should not be just about providing code snippets..." –  Seamus Jan 27 '11 at 11:22
show 7 more comments

Introducing a dummy column seems to work for me

\begin{block}{blocktitle}
\begin{columns}
% dummy column
\column{0cm}
~
\setlength{\rest}{0.25\textheight}
\vskip\rest
~
% now real column 
\column{\textwidth} 
words 123 \\
more words\\
\end{columns}
share|improve this answer
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.