Beamer Application Notes: Header, Navigation symbols and Footer

This article presents how to customize the header, navigation symbols and footer in Beamer.

1. Header, Navigation symbols and Footer

beamer_header_footer
Fig. 1: Header, navigation symbols and footer in Beamer

2. Get rid of header, navigation symbols and footer

% get rid of header navigation bar
%\setbeamertemplate{headline}{}

%get rid of bottom navigation symbols
%\setbeamertemplate{navigation symbols}{}

% get rid of footer
%\setbeamertemplate{footline}{}

3. Footer

It is quite common to add text (such as the presenter’s name, the presentation’s title, university, and more) to the bottom of one or more slides. The footer in Fig. 1 is corresponding the following code.

% footer
\makeatletter
\setbeamertemplate{footline}
{
  \leavevmode%
  \hbox{%
  \begin{beamercolorbox}[wd=.15\paperwidth,ht=2.25ex,dp=1ex,center]{institute in head/foot}%
    \usebeamerfont{title in head/foot}%
    \insertshortauthor 
  \end{beamercolorbox}%
  \begin{beamercolorbox}[wd=.6\paperwidth,ht=2.25ex,dp=1ex,center]{institute in head/foot}%
    \usebeamerfont{title in head/foot}%
    \insertshorttitle
  \end{beamercolorbox}%
  \begin{beamercolorbox}[wd=.15\paperwidth,ht=2.25ex,dp=1ex,center]{institute in head/foot}%
    \usebeamerfont{title in head/foot}%
    \insertshortdate
  \end{beamercolorbox}%
  \begin{beamercolorbox}[wd=.1\paperwidth,ht=2.25ex,dp=1ex,right]{institute in head/foot}%
    \usebeamerfont{title in head/foot} 
    \insertframenumber{} / \inserttotalframenumber\hspace*{2ex} 
  \end{beamercolorbox}}%
}
\makeatother

More information about inside template inserts can be found in,

4. Header

For instance, insert a horizontal navigation bar containing all sections, with the current section highlighted.

\makeatletter
\setbeamertemplate{headline}{%
    \leavevmode%
    \hbox{%
    \begin{beamercolorbox}[wd=\paperwidth,ht=2.5ex,dp=1.125ex]{palette quaternary}%
        % Flush the bar to the left
        \insertsectionnavigationhorizontal{\paperwidth}{}{\hskip0pt plus1filll}
        % Flush the bar to the left
        %\insertsectionnavigationhorizontal{\paperwidth}{\hskip0pt plus1filll}{}
        % Flush the bar to the center
        %\insertsectionnavigationhorizontal{\paperwidth}{\hskip0pt plus1filll}{\hskip0pt plus1filll}
        \insertsectionnavigationhorizontal{\paperwidth}{left}{right}
    \end{beamercolorbox}%
  }
}
\makeatother

%% Usage
\insertsectionnavigationhorizontal{⟨width⟩}{⟨left insert⟩}{⟨right insert⟩} 
\insertsubsectionnavigationhorizontal{⟨width⟩}{⟨left insert⟩}{⟨right insert⟩}
  • left insert will be inserted to the left of the sections
  • right insert will be inserted to the right.
  • \hskip0pt plus1filll inserts a triple fill to flush the bar to the left/right/center.

More options for the navigation bars,

\insertnavigation{⟨width⟩} 
\insertverticalnavigation{⟨width⟩} 

\insertsectionnavigation{⟨width⟩}
\insertsectionnavigationhorizontal{⟨width⟩}{⟨left insert⟩}{⟨right insert⟩}

\insertsubsectionnavigation{⟨width⟩}
\insertsubsectionnavigationhorizontal{⟨width⟩}{⟨left insert⟩}{⟨right insert⟩}

PS: the source code related to this post is hosted on my GitHub, here.

发表评论

电子邮件地址不会被公开。 必填项已用*标注