# Where does beamer use the headline template?

I've been digging through the internals of beamer's frame creation code, trying to customize a theme I created. My goal was to suppress the display of the page number on slides where the frame option noframenumbering is given. But that's not my question. In the process of figuring out how to do it, I spent quite some time tracing through internals like \beamer@@@@frame to see where it actually used the headline template, and that's what I can't figure out.

Here is a summary of what I think I've figured out so far. (And bear in mind I'm not overly familiar with TeX so I will probably misuse terms like "calls.") In my main document, I might use the \frame command, or \begin{frame}. Either way, execution eventually winds up in the macro \beamer@framecommand. That in turn calls \beamer@frame, which calls \beamer@@@frame, which in turn calls \beamer@@@@frame.

It seems like the typical execution path through \beamer@@@@frame ends with

 % buried within conditionals
\let\beamer@howtotreatframe\beamer@doseveralframes
% ...
\beamer@howtotreatframe


So then I go to look at the definition of \beamer@doseveralframes, and that amounts to

% stuff
\def\beamer@doifinframe{%
\begin{beamer@frameslide}%
#1%
\end{beamer@frameslide}%
}
% stuff


Then I look at the environment definition for beamer@frameslide earlier in the file. I see that it creates the box \beamer@frametitlebox to store the frame title, and then uses it in

\setbox\beamer@framebox=\vbox{%
\nobreak\vbox{}\nobreak\par\nobreak\beamer@entrycode\nobreak%
\nointerlineskip\unvbox\beamer@frametitlebox%
% etc.
}
% ...
\beamer@undolabels
\beamer@framenotesend
\box\beamer@framebox


OK, so this is where the frametitle template is used (?), but I don't see anything about headline, even despite checking into the definitions of many of the macros I left out of these quick code snippets.

Approaching this from the other end, the only place I see where the headline template is used is within

\def\ps@navigation{%
% stuff
% other stuff
}%
}


But I don't see that \ps@navigation or \@oddhead get used anywhere, only defined. What's the missing link?

Tracing what beamer does is like trying to untangle overcooked spaghetti. However, grep can provide some places to start:

beamer.cls:

\RequirePackage{beamerbaserequires}


beamerbaserequires.sty:

\RequirePackage{beamerbaseframecomponents}


beamerbaseframecomponents.sty:

\def\ps@navigation{


This is defining a new page style - like plain or empty. The name of the style is navigation. Defining oddhead just is essentially telling LaTeX what to put in the header on odd-numbered pages or on all pages if the document is single-sided.

And:

\pagestyle{navigation}


Says to use this as the default page style.

EDIT: Note that I did this backwards with grep and then reversed the order of results to trace beamer's usage forwards from the class file.

• That makes sense. The key piece I was missing was the builtin meanings of \ps@navigation and \@oddhead. If that information is out there elsewhere online, it seems to be rather well hidden. – David Z Jan 18 '14 at 21:42
• @DavidZ Yes, I figured that was the piece you were missing since you had traced the stuff within beamer to that. But I thought a complete (ish) 'path' might be helpful to others. I'm not sure about an online source for that info. I think I picked it up from Kopka & Daly's A Guide to LaTeX (2nd ed.) but that was a long time ago! The section on creating a customised layout for letters covers these commands, if I remember correctly. – cfr Jan 18 '14 at 22:32