chore: format code

This commit is contained in:
Johan Larsson 2024-01-12 20:03:52 +01:00
parent da903846ed
commit 7e50735d17
1 changed files with 75 additions and 51 deletions

View File

@ -207,7 +207,7 @@
% \begin{macro}{\moloch@font@setdefaults} % \begin{macro}{\moloch@font@setdefaults}
% Sets default values for font theme options. % Sets default values for font theme options.
% \begin{macrocode} % \begin{macrocode}
\newcommand{\moloch@font@setdefaults}{ \newcommand{\moloch@font@setdefaults}{%
\pgfkeys{/moloch/font/.cd, \pgfkeys{/moloch/font/.cd,
titleformat title=regular, titleformat title=regular,
titleformat subtitle=regular, titleformat subtitle=regular,
@ -234,62 +234,86 @@
% question}. % question}.
% %
% \begin{macrocode} % \begin{macrocode}
\patchcmd{\beamer@title}% \patchcmd{\beamer@title}{%
{\def\inserttitle{#2}}% \def\inserttitle{#2}
{\def\inserttitle{\moloch@titleformat{#2}}}% }{%
{}% \def\inserttitle{\moloch@titleformat{#2}}
{\PackageError{beamerfontthememoloch}{Patching title failed}\@ehc} }{}{%
\patchcmd{\beamer@subtitle}% \PackageError{beamerfontthememoloch}{Patching title failed}\@ehc
{\def\insertsubtitle{#2}}% }
{\def\insertsubtitle{\moloch@subtitleformat{#2}}}% \patchcmd{\beamer@subtitle}{%
{}% \def\insertsubtitle{#2}
{\PackageError{beamerfontthememoloch}{Patching subtitle failed}\@ehc} }{%
\patchcmd{\sectionentry} \def\insertsubtitle{\moloch@subtitleformat{#2}}
{\def\insertsectionhead{#2}} }{}{%
{\def\insertsectionhead{\moloch@sectiontitleformat{#2}}} \PackageError{beamerfontthememoloch}{Patching subtitle failed}\@ehc
{} }
{\PackageError{beamerfontthememoloch}{Patching section title failed}\@ehc} \patchcmd{\sectionentry}{%
\def\insertsectionhead{#2}}{%
\def\insertsectionhead{\moloch@sectiontitleformat{#2}}
}{}{%
\PackageError{beamerfontthememoloch}{Patching section title failed}\@ehc
}
\@tempswafalse \@tempswafalse
\patchcmd{\beamer@section} \patchcmd{\beamer@section}{%
{\edef\insertsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{\unexpanded{#1}}}} \edef\insertsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{\unexpanded{#1}}}
{\edef\insertsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{% }{%
\noexpand\moloch@sectiontitleformat{\unexpanded{#1}}}}} \edef\insertsectionhead{%
{\@tempswatrue} \noexpand\hyperlink{%
{} Navigation\the\c@page
\patchcmd{\beamer@section} }{%
{\def\insertsectionhead{\hyperlink{Navigation\the\c@page}{#1}}} \noexpand\moloch@sectiontitleformat{\unexpanded{#1}}
{\def\insertsectionhead{\hyperlink{Navigation\the\c@page}{% }%
\moloch@sectiontitleformat{#1}}}} }%
{\@tempswatrue} }{%
{} \@tempswatrue
\patchcmd{\beamer@section} }{}
{\protected@edef\insertsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{#1}}} \patchcmd{\beamer@section}{%
{\protected@edef\insertsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{% \def\insertsectionhead{\hyperlink{Navigation\the\c@page}{#1}}
\noexpand\moloch@sectiontitleformat{#1}}}} }{%
{\@tempswatrue} \def\insertsectionhead{%
{} \hyperlink{Navigation\the\c@page}{\moloch@sectiontitleformat{#1}}
}
}{%
\@tempswatrue
}{}
\patchcmd{\beamer@section}{%
\protected@edef\insertsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{#1}}
}{%
\protected@edef\insertsectionhead{%
\noexpand\hyperlink{Navigation\the\c@page}{\noexpand\moloch@sectiontitleformat{#1}}}
}{%
\@tempswatrue
}{}
\if@tempswa\else \if@tempswa\else
\PackageError{beamerfontthememoloch}{Patching section title failed}\@ehc \PackageError{beamerfontthememoloch}{Patching section title failed}\@ehc
\fi \fi
\@tempswafalse \@tempswafalse
\patchcmd{\beamer@subsection} \patchcmd{\beamer@subsection}{%
{\edef\insertsubsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{\unexpanded{#1}}}} \edef\insertsubsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{\unexpanded{#1}}}
{\edef\insertsubsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{% }{%
\noexpand\moloch@sectiontitleformat{\unexpanded{#1}}}}} \edef\insertsubsectionhead{%
{\@tempswatrue} \noexpand\hyperlink{Navigation\the\c@page}{\noexpand\moloch@sectiontitleformat{\unexpanded{#1}}}
{} }
\patchcmd{\beamer@subsection} }{%
{\def\insertsubsectionhead{\hyperlink{Navigation\the\c@page}{#1}}} \@tempswatrue}
{\def\insertsubsectionhead{\hyperlink{Navigation\the\c@page}{%
\moloch@sectiontitleformat{#1}}}}
{\@tempswatrue}
{}
\patchcmd{\beamer@subsection}
{\protected@edef\insertsubsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{#1}}}
{\protected@edef\insertsubsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{%
\noexpand\moloch@sectiontitleformat{#1}}}}
{\@tempswatrue}
{} {}
\patchcmd{\beamer@subsection}{%
\def\insertsubsectionhead{\hyperlink{Navigation\the\c@page}{#1}}
}{%
\def\insertsubsectionhead{\hyperlink{Navigation\the\c@page}{\moloch@sectiontitleformat{#1}}}
}{%
\@tempswatrue
}{}
\patchcmd{\beamer@subsection}{%
\protected@edef\insertsubsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{#1}}
}{%
\protected@edef\insertsubsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{\noexpand\moloch@sectiontitleformat{#1}}}
}{%
\@tempswatrue
}{}
\if@tempswa\else \if@tempswa\else
\PackageError{beamerfontthememoloch}{Patching section title failed}\@ehc \PackageError{beamerfontthememoloch}{Patching section title failed}\@ehc
\fi \fi