TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I customise the headline of my slides in order to have some white space above and below the title of the frame?

I guess I should change the template with the following instruction: \setbeamertemplate{headline}

but how?

Thanks in advance

share|improve this question
up vote 6 down vote accepted

From your description, it's not clear (at least to me) which template you need to modify; headline or frametile. Anyways, you can use \addtobeamertemplate to add the spacing before (using the first argument) and after (using the second argument) the headline or frametitle template; a little example (of course, instead of 1cm you can use the desired length):




\frametitle{Test Frame}


enter image description here

After the new requirement made in a comment, a redefinition of the frametitle template (as defined in beamerouterthemeshadow,sty since the theme used is Warsaw) is needed:


    \advance\beamer@leftmargin by -12bp%
    \advance\beamer@rightmargin by -12bp%
    \advance\beamer@tempdim by \beamer@leftmargin%
    \advance\beamer@tempdim by \beamer@rightmargin%
          \vbox{}\vskip.50ex% NEW: original \vskip-.75ex
          \rightskip0.3cm plus1fil\leavevmode
            \par{\usebeamerfont*{framesubtitle}{\usebeamercolor[fg]{framesubtitle}\insertframesubtitle}\strut\par\vskip2ex}% NEW: added \vskip2ex
      \advance\beamer@tempdim by 2pt%
        \usebeamercolor{frametitle right}
    \hbox to\textwidth{\hskip-\Gm@lmargin\pgfuseshading{beamer@topshade}\hskip-\Gm@rmargin}


\frametitle{Test Frame Title}
\framesubtitle{Test Frame Subtitle}


enter image description here

The lines that were changed are signaled in the code with % NEW; there you can adjust the lengths according to your needs.

share|improve this answer
thks so much...exactly what I needed!just another quick question: I'd also like to have some space in the headline around the word (e.g. Test Frame in your slide) so that the size of font is the same but the height of the headline is bigger...how can I do that? – Matteo Dec 3 '12 at 22:02
@Matteo this probably requires a redefinition of the template itself; which theme are you using? – Gonzalo Medina Dec 3 '12 at 22:05
\usetheme{Warsaw}, since I'm kind of a newbie in the beamer package, could you point me out some useful links on the redefinition of templates? – Matteo Dec 3 '12 at 22:06
@Matteo I updated my answer with the needed redefinition; regarding your question, I am not aware of a document explaining the redefinition of templates (the beamer documentation contains some explanations, but at a basic level); for more sophisticated changes you need to look at the original code of the templates and made the necessary changes. – Gonzalo Medina Dec 3 '12 at 22:19
you helped me a lot, thanks... I'll check and let you know if I have doubts... ;) – Matteo Dec 3 '12 at 22:29

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.