22

I wanted to ask you if there is a better way to adjust the spacing between two beamer blocks:

\documentclass[slidestop]{beamer}
\usetheme{Madrid}
\begin{document}

\addtobeamertemplate{block begin}{\vspace*{-3pt}}{}
\addtobeamertemplate{block end}{}{\vspace*{-3pt}}

\begin{frame}{Test}
\begin{block}{block 1}
Test
\end{block}
\begin{block}{block 2}
Test
\end{block}
\begin{block}{block 3}
Test
\end{block}
\end{frame}
\end{document}
5
  • 2
    Welcome to TeX.sx! Usually, we don't put a greeting or a "thank you" in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. Upvoting is the preferred way here to say "thank you" to users who helped you.
    – user11232
    Jan 19, 2013 at 16:35
  • What kind of way do you think of? Or what's wrong with that?
    – bloodworks
    Jan 19, 2013 at 18:39
  • I would like to change a latex beamer variable which takes care of the spacing. I also think that the spacing is done in a relative fashion and I would like to adjust the ratios. If you know how to manipulate beamer to achieve the same result, I would be happy.
    – 7asd44
    Jan 20, 2013 at 11:59
  • 2
    @7asd44 The original definition of block begin includes a \vksip\bigskipamount at the start and the of block end \vskip\smallskipamount. You could change this skips but this would probably break more than that it helps. You can re-define these templates to say \vspace*{\myverticalskip} where you can set \myverticalskip as you wish. What do you mean with ratios? You can insert manually \vfills to space these blocks out. Mar 14, 2013 at 21:24
  • 1
    @7asd44 If you want the spacing between the blocks to scale with your chosen font size, then you can use em or ex instead of pt for \vspace{...}.
    – xvtk
    Jul 19, 2013 at 15:03

3 Answers 3

4

[To get this off the unanswered list]

There is no 'better' way, as there is no hook built into beamer for adjusting the distance here. However, what is not clear is why you want to do this in this way.

4

Maybe

\addtobeamertemplate{block begin}{\vskip -\bigskipamount}{}
\addtobeamertemplate{block end}{}{\vskip -\bigskipamount}

is slightly better solution.

1
  • Maybe it should be \smallskipamount at the end (see comment to the question of @Qrrbrbirlbel).
    – dexteritas
    Sep 29, 2017 at 11:38
2

I find this better in my case

\addtobeamertemplate{block begin}{\vfill}{}

\addtobeamertemplate{block end}{}{\vfill}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .