Skip to content

Commit

Permalink
feat!: use beamer's own frame numbering template
Browse files Browse the repository at this point in the history
As suggested in matze#309
  • Loading branch information
jolars committed Jan 18, 2024
1 parent 6f88c49 commit 01b698c
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 63 deletions.
21 changes: 8 additions & 13 deletions demo/demo.tex
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,18 @@

\usepackage[T1]{fontenc}

\usepackage{appendixnumberbeamer}
% \usepackage{appendixnumberbeamer}

\setbeamertemplate{page number in head/foot}[appendixframenumber]

% \molochset{progressbar=foot}

\usepackage{booktabs}
\usepackage[scale=2]{ccicons}

\usepackage[medium,light]{FiraSans}
\usepackage[medium]{FiraMono}
% \usepackage[medium,light]{FiraSans}
% \usepackage[medium]{FiraMono}
\usepackage{lmodern}

\usepackage{xspace}

Expand Down Expand Up @@ -263,16 +268,6 @@ \section{Conclusion}

\appendix

\begin{frame}[fragile]{Backup Slides}
To add slides at the end of your presentation for reference during audience questions, you just need to
\begin{enumerate}
\item include the "appendixnumberbeamer" package in your preamble, and
\item call \verb+\appendix+ command before your backup slides.
\end{enumerate}

By doing this, the \themename theme will automatically disable slide numbering and progress bars for the slides in the appendix.
\end{frame}

\begin{frame}[allowframebreaks]{References}

\bibliography{demo}
Expand Down
16 changes: 0 additions & 16 deletions doc/moloch.tex
Original file line number Diff line number Diff line change
Expand Up @@ -283,12 +283,6 @@ \subsubsection{Inner theme}

\subsubsection{Outer theme}

\DescribeOption{numbering}{none, counter, fraction}{counter}{
Controls whether the frame number at the bottom right of each slide is
omitted (|none|), shown (|counter|) or displayed as a fraction of the total
number of frames (|fraction|).
}

\DescribeOption{progressbar}{none, head, frametitle, foot}{none}{
Optionally adds a progress bar to the top of each frame (|head|),
the bottom of each frame (|foot|), or directly below each frame title
Expand Down Expand Up @@ -367,16 +361,6 @@ \subsubsection{Standout frames}

\section{Tips \& Tricks}

\subsection{Backup Slides}

Speakers will often include extra slides at the end of their presentation to
refer to during audience questions. One easy way to do this is to include the
\verb|appendixnumberbeamer| package in your preamble and call \verb|\appendix| before your backup slides.

\themename will automatically turn off slide numbering and progress bars for
slides in the appendix.


\section{Known Issues}

\subsection{Title formats}
Expand Down
1 change: 0 additions & 1 deletion src/beamerfontthememoloch.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
\setbeamerfont{caption}{size=\small}
\setbeamerfont{caption name}{series=\bfseries}
\setbeamerfont{description item}{series=\bfseries}
\setbeamerfont{page number in head/foot}{size=\scriptsize}
\setbeamerfont{bibliography entry author}{size=\normalsize, series=\normalfont}
\setbeamerfont{bibliography entry title}{size=\normalsize, series=\bfseries}
\setbeamerfont{bibliography entry location}{size=\normalsize, series=\normalfont}
Expand Down
41 changes: 8 additions & 33 deletions src/beamerouterthememoloch.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,6 @@
%
% \subsubsection{Options}
%
% \begin{macro}{numbering}
% Adds slide numbers to the bottom right of each slide.
% \begin{macrocode}
\pgfkeys{
/moloch/outer/numbering/.cd,
.is choice,
none/.code=\setbeamertemplate{frame numbering}[none],
counter/.code=\setbeamertemplate{frame numbering}[counter],
fraction/.code=\setbeamertemplate{frame numbering}[fraction],
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{progressbar}
% Adds a progress bar to the top, bottom, or frametitle of each slide.
% \begin{macrocode}
Expand Down Expand Up @@ -88,7 +75,6 @@
% \begin{macrocode}
\newcommand{\moloch@outer@setdefaults}{
\pgfkeys{/moloch/outer/.cd,
numbering=counter,
progressbar=none,
}
}
Expand All @@ -106,34 +92,23 @@
\setbeamertemplate{navigation symbols}{}
% \end{macrocode}
%
% \begin{macro}{frame numbering}
% Templates for the frame number. Can be omitted, shown or displayed as a
% fraction of the total frames.
% \begin{macrocode}
\defbeamertemplate{frame footer}{none}{}
\defbeamertemplate{frame footer}{custom}[1]{ #1 }
% \end{macrocode}
%
% \begin{macrocode}
\defbeamertemplate{frame numbering}{none}{}
\defbeamertemplate{frame numbering}{counter}{\insertframenumber}
\defbeamertemplate{frame numbering}{fraction}{
\insertframenumber/\inserttotalframenumber
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{headline}
% \begin{macro}{footline}
% Templates for the head- and footline at the top and bottom of each frame.
% \begin{macrocode}
\defbeamertemplate{headline}{plain}{}
\defbeamertemplate{footline}{plain}{%
\begin{beamercolorbox}[wd=\textwidth, sep=3ex]{footline}%
\begin{beamercolorbox}[
leftskip=4pt,%
rightskip=5pt,%
wd=\textwidth,%
]{footline}%
\usebeamercolor[fg]{page number in head/foot}%
\usebeamerfont{page number in head/foot}%
\usebeamertemplate*{frame footer}
\usebeamertemplate*{frame footer}%
\hfill%
\usebeamertemplate*{frame numbering}
\usebeamertemplate*{page number in head/foot}\vskip4pt%
\end{beamercolorbox}%
}
% \end{macrocode}
Expand Down

0 comments on commit 01b698c

Please sign in to comment.