Bloerg
       

Beamer's weird column defaults

From time to time I encounter a problem with LaTeX or Beamer that costs twice as much time to solve than what I save by using LaTeX. Here is a reminder for me to fix a particularly strange behaviour with Beamer’s columns environment.

The columns environment is used to split content horizontally in (you guessed it) several columns. Intuitively, you’d write something like this

\documentclass{beamer}

\begin{document}
\frame{
  \frametitle{Slide with columns}
  \begin{columns}
     \column{.5\textwidth}
        First column

     \column{.5\textwidth}
        Second column
  \end{columns}

  Conclusive text
}
\end{document}

and expect the columns to be aligned nicely with the adjacent text. But for whatever reason, that’s not the case by default:

2013-05-05/bad-alignment.png

To fix this, you have to pass the onlytextwidth option to the environment

  \begin{columns}[onlytextwidth]

and you are good to go:

2013-05-05/good-alignment.png

I don’t know if this happens only with TeX Live 2009, but it is certainly annoying …

Discussion

Rémi
Mon, Jun 06 2016

I was crying on my slides until I found your trick. big thanks!

Post a comment

Name required

E-mail required, not published

Website optional

Comment Markdown accepted