Document ClassesHeader/footer in Beamer frames

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
User avatar
svend_tveskaeg
Posts: 478
Joined: Sun Jul 12, 2009 5:31 am

Header/footer in Beamer frames

Post by svend_tveskaeg »

Hi all.

On the TeX Stack Exchange I just read the thread Section numbering in Beamer ('CambridgeUS' theme). After testing the solution given[*], I am puzzled about one thing: Why is there parentheses to the left in the footer and what how so I use them for something meaningfull?

[*] See below:

Code: Select all

\documentclass{beamer}

\usetheme{CambridgeUS}

\setbeamertemplate{headline}
{
  \leavevmode%
  \hbox{%
  \begin{beamercolorbox}[wd=.5\paperwidth,ht=2.25ex,dp=1ex,right]{section in head/foot}%
    \usebeamerfont{section in head/foot}\thesection.\ \insertsectionhead\hspace*{2ex}
  \end{beamercolorbox}%
  \begin{beamercolorbox}[wd=.5\paperwidth,ht=2.25ex,dp=1ex,left]{subsection in head/foot}%
    \usebeamerfont{subsection in head/foot}\hspace*{2ex}\insertsubsectionhead
  \end{beamercolorbox}}%
  \vskip0pt%
}

\begin{document}

\section{The First Section}
\subsection{The First Subsection}

\begin{frame}
Test frame one.
\end{frame}

\subsection{The Second Subsection}

\begin{frame}
Test frame two.
\end{frame}

\section{The Second Section}
\subsection{The Third Subsection}

\begin{frame}
Test frame three.
\end{frame}

\end{document}
Thank you in advance!

PS. I haven't got a user account on the TeX Stack Exchange, which is why I write here.
Last edited by svend_tveskaeg on Sun May 29, 2011 7:04 pm, edited 1 time in total.
``In the game of chess, you can never let your adversary see your pieces.''
-- Zapp Brannigan, Futurama (season 1, episode 4)

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Header/footer in Beamer frames

Post by localghost »

Add some data lines to your preamble and find out.

Code: Select all

\author{Author}
\institute{Institution}
\title{Title}
\subtitle{Sub-Title}
\date{\today}

Thorsten
User avatar
svend_tveskaeg
Posts: 478
Joined: Sun Jul 12, 2009 5:31 am

Re: Header/footer in Beamer frames

Post by svend_tveskaeg »

I see. Thank you!
``In the game of chess, you can never let your adversary see your pieces.''
-- Zapp Brannigan, Futurama (season 1, episode 4)
Post Reply