Page Layoutbeamer | Change Spacing between Frame Title and Content

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
4ndre
Posts: 1
Joined: Thu Sep 15, 2011 12:04 pm

beamer | Change Spacing between Frame Title and Content

Post by 4ndre »

Hi,

I work quite a long time with LaTeX and the beamer class, even created my own template for work. But this problem I can't solve. It looks ridiculous, if the page is full, sometime exceeds the space, but there is about 1cm space between title and content. It's still remaining, even if I remove the frame title (of course the frame title space becomes available, but still there is a spacing between header and content). The biggest problem is, it seems to be identical for all templates. Therefore I have no clue, where to start. Can anyone tell me, where I can define the frame title (I found it in inner and outer sometimes) with the spacing after (which I never found)?

Thanks in advance!
André

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
justdeath
Posts: 69
Joined: Mon Sep 05, 2011 10:27 am

beamer | Change Spacing between Frame Title and Content

Post by justdeath »

This is theme specific. Consider this:

Code: Select all

\documentclass{beamer}
\usepackage[english]{babel}
\usepackage{blindtext}
\usetheme{Madrid}

\begin{document}
\begin{frame}
\frametitle{text}
\blindtext
\blindtext
\blindtext
\end{frame}
\end{document}
There is very small space between title and content. Now comment out the \frametitle. Everything is full again.

Now change to \usetheme{Rochester}. The space for title is bigger than Madrid. Even if you do not have title, space is still reserved for it.

Nikolay
Last edited by cgnieder on Wed May 15, 2013 9:01 pm, edited 1 time in total.
on4aa
Posts: 1
Joined: Wed May 15, 2013 8:38 pm

beamer | Change Spacing between Frame Title and Content

Post by on4aa »

I experience exactly the same problem.
I posted a crude solution over here.
I am still looking for the exact name of that space though.
jatin
Posts: 1
Joined: Tue Feb 25, 2014 7:47 am

beamer | Change Spacing between Frame Title and Content

Post by jatin »

Hi, just found this really easy fix, just add \vspace{} after \frametitle:

Code: Select all

\frametitle{Model evaluation - Temperature}
\vspace{-15.5pt}
% add whatever here, text, or figs bla bla
womullan
Posts: 1
Joined: Sat Nov 21, 2015 7:22 pm

beamer | Change Spacing between Frame Title and Content

Post by womullan »

I have added this vspace to many of my slides and looked several times now for a proper generic solution for all slides ! I finally figured it out

It seems the correct way to do this is to add this before the begin document

Code: Select all

\addtobeamertemplate{frametitle}{\vspace*{-1.4cm}}{\vspace*{0.2cm}}
the first vspace moves the Frame title the second moves the text coming after the frame title so this allows me to move the title up or down and fix the space between title and body in one go !
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

Re: beamer | Change Spacing between Frame Title and Content

Post by Stefan Kottwitz »

Hi womullan,

welcome to the forum, and thank you for telling us your solution!

Stefan
LaTeX.org admin
mkcons
Posts: 1
Joined: Mon Aug 05, 2019 6:44 pm

beamer | Change Spacing between Frame Title and Content

Post by mkcons »

Was having the same problem. In case it can help anyone, I was able to fix it by modifying the beamerouterthemedefault.sty file.

Look for the frametitle definition and change the vskip to lower the title and add a vspace at the end to move the content upwards (see comments below).

Code: Select all

\defbeamertemplate*{frametitle}{default}[1][left]
{%
  \ifbeamercolorempty[bg]{frametitle}{}{\nointerlineskip}%
  \@tempdima=\textwidth%
  \advance\@tempdima by\beamer@leftmargin%
  \advance\@tempdima by\beamer@rightmargin%
  \begin{beamercolorbox}[sep=0.3cm,#1,wd=\the\@tempdima]{frametitle}
    \usebeamerfont{frametitle}%
    \vbox{}\vskip-1ex%
    \if@tempswa\else\csname beamer@fte#1\endcsname\fi%
    \strut\insertframetitle\par%
    {%
      \ifx\insertframesubtitle\@empty%
      \else%
      {\usebeamerfont{framesubtitle}\usebeamercolor[fg]{framesubtitle}\strut\insertframesubtitle\par}%
      \fi
    }%
    \vskip-3ex% Added this to lower the title
    \if@tempswa\else\vskip-.3cm\fi%
  \end{beamercolorbox}%
  \vspace*{-3.5cm} % Added this to move the content upwards
}
Post Reply