summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/beamer-contrib/themes/moloch/beamerouterthememoloch.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/beamer-contrib/themes/moloch/beamerouterthememoloch.dtx')
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/moloch/beamerouterthememoloch.dtx198
1 files changed, 198 insertions, 0 deletions
diff --git a/macros/latex/contrib/beamer-contrib/themes/moloch/beamerouterthememoloch.dtx b/macros/latex/contrib/beamer-contrib/themes/moloch/beamerouterthememoloch.dtx
new file mode 100644
index 0000000000..a684e47743
--- /dev/null
+++ b/macros/latex/contrib/beamer-contrib/themes/moloch/beamerouterthememoloch.dtx
@@ -0,0 +1,198 @@
+% \iffalse meta-comment -------------------------------------------------------
+% Copyright 2015 Matthias Vogelgesang and the LaTeX community. A full list of
+% contributors can be found at
+%
+% https://github.com/matze/mtheme/graphs/contributors
+%
+% and the original template was based on the HSRM theme by Benjamin Weiss.
+%
+% This work is licensed under a Creative Commons Attribution-ShareAlike 4.0
+% International License (https://creativecommons.org/licenses/by-sa/4.0/).
+%% ---------------------------------------------------------------------------
+%% Copyright 2024 Johan Larsson and contributors
+% ------------------------------------------------------------------------- \fi
+% \iffalse
+%<*package>
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{beamerouterthememoloch}[2024-01-15 v0.1.0 Moloch outer theme] % x-release-please-version
+%</package>
+% \fi
+% \CheckSum{0}
+% \StopEventually{}
+% \iffalse
+%<*package>
+% ------------------------------------------------------------------------- \fi
+%
+% \subsection{\themename outer theme}
+%
+% A |beamer| outer theme dictates the style of the frame elements traditionally
+% set outside the body of each slide: the head, footline, and frame title.
+%
+%
+%
+% \subsubsection{Package dependencies}
+%
+% \begin{macrocode}
+\RequirePackage{calc}
+\RequirePackage{pgfopts}
+% \end{macrocode}
+%
+%
+%
+% \subsubsection{Options}
+%
+% \begin{macro}{progressbar}
+% Adds a progress bar to the top, bottom, or frametitle of each slide.
+% \begin{macrocode}
+\pgfkeys{
+ /moloch/outer/progressbar/.cd,
+ .is choice,
+ none/.code={%
+ \setbeamertemplate{headline}[plain]
+ \setbeamertemplate{frametitle}[plain]
+ \setbeamertemplate{footline}[plain]
+ },
+ head/.code={\pgfkeys{/moloch/outer/progressbar=none}
+ \addtobeamertemplate{headline}{}{%
+ \usebeamertemplate*{progress bar in head/foot}
+ }
+ },
+ frametitle/.code={\pgfkeys{/moloch/outer/progressbar=none}
+ \addtobeamertemplate{frametitle}{}{%
+ \usebeamertemplate*{progress bar in head/foot}
+ }
+ },
+ foot/.code={\pgfkeys{/moloch/outer/progressbar=none}
+ \addtobeamertemplate{footline}{}{%
+ \usebeamertemplate*{progress bar in head/foot}%
+ }
+ },
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\moloch@outer@setdefaults}
+% Sets default values for outer theme options.
+% \begin{macrocode}
+\newcommand{\moloch@outer@setdefaults}{
+ \pgfkeys{/moloch/outer/.cd,
+ progressbar=none,
+ }
+}
+% \end{macrocode}%
+% \end{macro}
+%
+%
+%
+% \subsubsection{Head and footline}
+%
+% All good |beamer| presentations should already remove the navigation symbols,
+% but \themename removes them automatically (just in case).
+%
+% \begin{macrocode}
+\setbeamertemplate{navigation symbols}{}
+% \end{macrocode}
+%
+%
+% \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}[
+ leftskip=4pt,%
+ rightskip=5pt,%
+ wd=\textwidth,%
+ ]{footline}%
+ \usebeamercolor[fg]{page number in head/foot}%
+ \usebeamerfont{page number in head/foot}%
+ \usebeamertemplate*{frame footer}%
+ \hfill%
+ \usebeamertemplate*{page number in head/foot}\vskip4pt%
+ \end{beamercolorbox}%
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+%
+% \subsubsection{Frametitle}
+%
+% \begin{macro}{frametitle}
+% Templates for the frame title, which is optionally underlined with a
+% progress bar.
+% \begin{macrocode}
+\newlength{\moloch@frametitle@padding}
+\setlength{\moloch@frametitle@padding}{2.2ex}
+\newcommand{\moloch@frametitlestrut@start}{%
+ \rule{0pt}{\moloch@frametitle@padding + \totalheightof{X}}%
+}
+\newcommand{\moloch@frametitlestrut@end}{%
+ \rule[-\moloch@frametitle@padding]{0pt}{\moloch@frametitle@padding}
+}
+\defbeamertemplate{frametitle}{plain}{%
+ \nointerlineskip%
+ \begin{beamercolorbox}[%
+ wd=\paperwidth,%
+ sep=0pt,%
+ leftskip=\moloch@frametitle@padding,%
+ rightskip=\the\glueexpr \moloch@frametitle@padding plus 1fill\relax,%
+ ]{frametitle}%
+ \moloch@frametitlestrut@start%
+ \insertframetitle%
+ \nolinebreak%
+ \moloch@frametitlestrut@end%
+ \end{beamercolorbox}%
+}
+\setbeamertemplate{frametitle continuation}{%
+ \usebeamerfont{frametitle}
+ \romannumeral \insertcontinuationcount
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{progress bar in head/foot}
+% Template for the progress bar optionally displayed below the frame title
+% on each page. Much of this code is duplicated in the inner theme's
+% template |progress bar in section page|.
+% \begin{macrocode}
+\newlength{\moloch@progressinheadfoot}
+\newlength{\moloch@progressinheadfoot@linewidth}
+\setlength{\moloch@progressinheadfoot@linewidth}{0.4pt}
+\setbeamertemplate{progress bar in head/foot}{
+ \nointerlineskip
+ \pgfmathsetlength{\moloch@progressinheadfoot}{%
+ \paperwidth * min(1,\insertframenumber/\inserttotalframenumber)%
+ }
+ \begin{beamercolorbox}[wd=\paperwidth]{progress bar in head/foot}
+ \tikzexternaldisable
+ \begin{tikzpicture}
+ \fill[bg]
+ (0,0)
+ rectangle
+ (\paperwidth, \moloch@progressinheadfoot@linewidth);
+ \fill[fg]
+ (0,0)
+ rectangle
+ (\moloch@progressinheadfoot, \moloch@progressinheadfoot@linewidth);
+ \end{tikzpicture}
+ \tikzexternalenable
+ \end{beamercolorbox}
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Process package options}
+%
+% \begin{macrocode}
+\moloch@outer@setdefaults
+\ProcessPgfPackageOptions{/moloch/outer}
+% \end{macrocode}
+%
+% \iffalse
+%</package>
+% \fi
+% \Finale
+\endinput