3

It is trivial to modify the left and right margins in beamer.

But what about the top and bottom?

If possible, I would like to reduce a little bit that top margin, marked with the hand-drawn red arrow:

screenshot

MWE:

\documentclass[t]{beamer}

\setbeamersize{text margin left=0.5em, text margin right=0.5em}
\setbeamertemplate{frametitle}{\color{black}\bfseries\insertframetitle\par\vskip-6pt\hrulefill}

\newcommand\FourQuad[4]{
    \colorbox{yellow}{\begin{minipage}[b][.40\textheight][t]{.49\textwidth}#1\end{minipage}}\hfill
    \begin{minipage}[b][.40\textheight][t]{.49\textwidth}#2\end{minipage}\\
    \begin{minipage}[b][.40\textheight][t]{.49\textwidth}#3\end{minipage}\hfill
    \begin{minipage}[b][.40\textheight][t]{.49\textwidth}#4\end{minipage}
}

\begin{document}

\begin{frame}
\frametitle{A frame divided in four quadrants}
\FourQuad%
{First quadrant contents and some more text text text text more text text text text more text text text text more text text text text more text text text text more text text text text more text text text text}%
{
  \centering
  \rule{3cm}{2cm}
  A test figure.
}%
{\begin{align*}
  a &= b \\
  &= c \\
  & = d.
\end{align*}}%
{Fourth quadrant contents and some more text text text text more text text text text more text text text text more text text text text more text text text text more text text text text more text text text text}
\end{frame}

\end{document}
  • I found that \beamer@frametopsklip is set by the frame command, so cannot be globally reset. For \begin{frame}[t] it uses \beamer@frametopskip=.2cm plus .5\paperheight\relax%. – John Kormylo Jul 21 '15 at 14:52
2

Do you want to do this only for your "quad"-frame or globally? For only this special frame, a quick hack would be to simply insert \vspace{}

\documentclass[t]{beamer}

\setbeamersize{text margin left=0.5em, text margin right=0.5em}
\setbeamertemplate{frametitle}{\color{black}\bfseries\insertframetitle\par\vskip-6pt\hrulefill}

\newcommand\FourQuad[4]{
        \vspace*{-0.2cm}
    \colorbox{yellow}{\begin{minipage}[b][.40\textheight][t]{.49\textwidth}#1\end{minipage}}\hfill
    \begin{minipage}[b][.40\textheight][t]{.49\textwidth}#2\end{minipage}\\
    \begin{minipage}[b][.40\textheight][t]{.49\textwidth}#3\end{minipage}\hfill
    \begin{minipage}[b][.40\textheight][t]{.49\textwidth}#4\end{minipage}
}

\begin{document}

\begin{frame}
\frametitle{A frame divided in four quadrants}
\FourQuad%
{First quadrant contents and some more text text text text more text text text text more text text text text more text text text text more text text text text more text text text text more text text text text}%
{
  \centering
  \rule{3cm}{2cm}
  A test figure.
}%
{\begin{align*}
  a &= b \\
  &= c \\
  & = d.
\end{align*}}%
{Fourth quadrant contents and some more text text text text more text text text text more text text text text more text text text text more text text text text more text text text text more text text text text}
\end{frame}

\end{document}

enter image description here


EDIT:

To make this hack globally, add the \vspace{} to the frametitle template

\documentclass[t]{beamer}

\setbeamersize{text margin left=0.5em, text margin right=0.5em}
\setbeamertemplate{frametitle}{\color{black}\bfseries\insertframetitle\par\vskip-6pt\hrulefill \vspace*{-0.2cm}}

\newcommand\FourQuad[4]{
    \colorbox{yellow}{\begin{minipage}[b][.40\textheight][t]{.49\textwidth}#1\end{minipage}}\hfill
    \begin{minipage}[b][.40\textheight][t]{.49\textwidth}#2\end{minipage}\\
    \begin{minipage}[b][.40\textheight][t]{.49\textwidth}#3\end{minipage}\hfill
    \begin{minipage}[b][.40\textheight][t]{.49\textwidth}#4\end{minipage}
}

\begin{document}

\begin{frame}
\frametitle{A frame divided in four quadrants}
\FourQuad%
{First quadrant contents and some more text text text text more text text text text more text text text text more text text text text more text text text text more text text text text more text text text text}%
{
  \centering
  \rule{3cm}{2cm}
  A test figure.
}%
{\begin{align*}
  a &= b \\
  &= c \\
  & = d.
\end{align*}}%
{Fourth quadrant contents and some more text text text text more text text text text more text text text text more text text text text more text text text text more text text text text more text text text text}
\end{frame}

\end{document}
  • You could also use \makeatletter \newcommand\FourQuad[4]{\vskip-\beamer@frametopskip ... – John Kormylo Jul 21 '15 at 15:05
  • This will do it. But do you have a suggestion to make it global? – Ricardo Cruz Jul 23 '15 at 13:21
  • @RicardoCruz See the edit – user36296 Jul 23 '15 at 14:59
  • I tried out this solution. Why is the asterisk at \vspace* needed? With the asterisk the solution works, without it it doesn't work. – Viesturs Aug 6 '17 at 15:47
  • 1
    @Viesturs see tex.stackexchange.com/a/76106/36296 for an exaplanation – user36296 Aug 6 '17 at 16:09

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.