4

I want to keep blocks globally at the same position from top irrespective of their contents size. Here is my MWE. Any help will be highly appreciated. Thanks

\documentclass[compress]{beamer}
\usetheme{Warsaw}
\usepackage{multicol}

\begin{document}

\begin{frame}
\frametitle{Test1}
\begin{columns}
\column{7cm}

\begin{block}
{Block1}
\begin{description}
\item [{A:}] This is
\item [{B:}] New Item
\end{description}
\end{block}

\column{4.75cm}
\begin{block}
{Block2}
\begin{description}
\item [{A:}] This is
\item [{B:}] New Item
\end{description}
\end{block}

\end{columns}
\end{frame}


\begin{frame}
\frametitle{Test2}
\begin{columns}
\column{7cm}

\begin{block}
{Block3}
\begin{description}
\item [{A:}] This is
\item [{B:}] New Item
\item [{C:}] New Item
\end{description}
\end{block}

\column{4.75cm}
\begin{block}
{Block4}
\begin{description}
\item [{A:}] This is
\item [{B:}] New Item
\end{description}
\end{block}

\end{columns}
\end{frame}

\end{document}

enter image description here

enter image description here

6

Add a [t] option to the columns:

\documentclass[compress]{beamer}
\usetheme{Warsaw}
\begin{document}

\begin{frame}
\frametitle{Test1}
\begin{columns}
\column{7cm}

\begin{block}
{Block1}
\begin{description}
\item [{A:}] This is
\item [{B:}] New Item
\end{description}
\end{block}

\column{4.75cm}
\begin{block}
{Block2}
\begin{description}
\item [{A:}] This is
\item [{B:}] New Item
\end{description}
\end{block}

\end{columns}
\end{frame}


\begin{frame}
\frametitle{Test2}
\begin{columns}
\column[t]{7cm}     %new code

\begin{block}
{Block3}
\begin{description}
\item [{A:}] This is
\item [{B:}] New Item
\item [{C:}] New Item
\end{description}
\end{block}

\column[t]{4.75cm}     %new code
\begin{block}
{Block4}
\begin{description}
\item [{A:}] This is
\item [{B:}] New Item
\end{description}
\end{block}

\end{columns}
\end{frame}

\end{document}

enter image description here

The same result could be achieved with \begin{columns}[t] for all the columns of a specific columns environment or globally with a t class option (will affect all frame content).

Less vertical space before the blocks

This is the result with the t global option:

enter image description here

If that still is too much space, you can remove a little bit more with the T options for the columns environment, which will align the the tops of the first lines instead of the baselines of the first lines (as t does). T Can't be used as a global option.

enter image description here

If that still is too much space, you need to resort to brute force and add a

\addtobeamertemplate{frame title}{}{\vspace*{-2em}}

which will remove 2em (put whatever value you need) of vertical space after the frametitle template.

enter image description here

Use with caution :)

4
  • Thanks @dcmst for your nice answer. Can we do this globally? Also how to decrease the distance between blocks and frametitle. Thanks
    – MYaseen208
    Sep 14 '14 at 18:13
  • @MYaseen208 just use \documentclass[t,compress]{beamer} and everything will be aligned to the top (including the frames, so the distance will decrease).
    – Old Nick
    Sep 14 '14 at 18:17
  • (+1): Thanks @dcmst for your nice answer. Could also guide me how to globally decrease the distance between blocks and frametitle? Thanks
    – MYaseen208
    Sep 15 '14 at 4:08
  • @MYaseen208 please see the edited answer
    – Old Nick
    Sep 15 '14 at 7:45

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.