14

I have some trouble with margins in multi-column layout beamer slides. If put the following snippet in a non-rounded theme like "Rochester", you will see that

  1. the boxes of the first row have different margins than the boxes of the 2nd row (the 1st row has an "indent", which also affects the position of the central line between the boxes)
  2. the rightmost margin differs from the leftmost margin (the left margin is smaller than the right one, which optically goes away when one uses shadows)

any ideas?

\begin{frame}[t]
\frametitle{...}
\begin{columns}[T]
  \column{.50\textwidth}
  \begin{block}{...}
     ...
  \end{block}
  \column{.50\textwidth}
    ...
\end{columns}
\vspace{3mm}
\begin{columns}[T]
  \column{.50\textwidth}
  \begin{block}{...}
    ...
  \end{block}
  \column{.50\textwidth}
  \begin{block}{...}
    ...
  \end{block}
  \end{columns}
\end{frame}
8

How should this work when you define two columns each with a width of 0.5\textwidth. You have to add the columnsep and all together is > \textwidth, the reason why beamer shifts all to the left.

\documentclass{beamer}
\usetheme{Rochester}

\begin{document}

\begin{frame}[t]
\frametitle{...}
\begin{columns}[T]
  \column{.425\textwidth}
  \begin{block}{...}
     ...
  \end{block}
  \column{.425\textwidth}
    ...
\end{columns}

\noindent
\rule{\textwidth}{5pt}

\begin{columns}[T]
  \column{.425\textwidth}
  \begin{block}{...}
    ...
  \end{block}
  \column{.425\textwidth}
  \begin{block}{...}
    ...
  \end{block}
  \end{columns}
\end{frame}

\end{document} 

Look into the documentation for the value of the columnsep; then you can define it exactly to \textwidth.

  • @Herbert: I marked your inline code with backticks. – Hendrik Vogt Dec 20 '10 at 14:20
  • 1
    thanks! I tried setting \setlength\columnsep{0pt}, but that does not affect the beamer output. Indeed, the beamer manual does not mention columnsep at all! – hannes Dec 20 '10 at 15:29
  • 2
    it is hardcoded as \end{minipage}\hfill\begin{minipage} ... not a good idea by beamer – user2478 Dec 20 '10 at 16:26
  • 7
    @Herbert, can we express the column width exactly in terms of \textwidth, \columnsep or other related length commands rather than using the "magic" number 0.425? – xport Dec 23 '10 at 12:14
  • 2
    If anyone comes across this thread, you probably want the solution posted here. Just start your columns with \begin{columns}[t,onlytextwidth] and the margins will be aligned. – Luke Davis Mar 8 '18 at 8:49

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.