0

In a beamer presentation, when I work with blocks in columns, LaTeX seems to add some additional vertical space before the title of the first block. How can I avoid this behaviour?

A minimal working example:

\documentclass[t]{beamer}

\begin{document}

\begin{frame}{Frame without columns}
  \begin{block}{Just a block}
  \end{block}
\end{frame}

\begin{frame}{Frame with columns}
  \begin{columns}[t, onlytextwidth]
    \begin{column}{0.45\textwidth}
      \begin{block}{A block in a columns area}
      \end{block}
    \end{column}
  \end{columns}
\end{frame}

\end{document}

enter image description here enter image description here

0

1 Answer 1

1

Beamer add this space for non-text elements (blocks, itemize, ...) at the top of columns. To undo this, you can add a negative space:

\documentclass[t]{beamer}
\usecolortheme{orchid}

\begin{document}

\begin{frame}{Frame without columns}
  \begin{block}{Just a block}
  x
  \end{block}
\end{frame}

\begin{frame}{Frame with columns}
  \begin{columns}[t, onlytextwidth]
    \begin{column}{0.45\textwidth}
        \vspace*{-\baselineskip}
      \begin{block}{A block in a columns area}
      x
      \end{block}
    \end{column}
  \end{columns}
\end{frame}

\end{document}

enter image description here

2
  • Thanks Sam, this works! Would you explain to me the reason of this behaviour, please? Is it possible to redefine the column environment so that I do not have to fix this whenever I use columns? The additional space only occurs when I use blocks, not with plain text. Mar 4, 2018 at 19:50
  • @SebastianThomas see tex.stackexchange.com/a/73522/36296 for a bit more explanation Mar 4, 2018 at 20:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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