[Tex/LaTex] Slide number in beamer Berkeley header


Could someone please tell me how to get the page numbers to appear in the header line of the Berkeley theme?


Best Answer

Although beamer provides many hooks for modifying the way things look, the author couldn't think of every possible tweak, and so some things that you might think would be simple are not. This is one of those cases, since it involves hunting through the beamer source code (specifically in beamerouterthemesidebar.sty) to find the definition of the frametitle and then modifying a copy of the relevant code in the preamble of the document.


    \vbox to \beamer@headheight{%
      \advance\leftskip by0.3cm%
      \advance\rightskip by0.3cm plus1fil%
          \usebeamerfont{frametitle}\insertframetitle\hfill\insertframenumber\par}% added number
\section{A section}
\begin{frame}{A frame}

output of code