chore: autoformat with latexindent

This commit is contained in:
Johan Larsson 2024-01-11 09:09:54 +01:00
parent 47dcf8df1a
commit f4393f0591
1 changed files with 101 additions and 101 deletions

View File

@ -55,12 +55,12 @@
% \begin{macrocode} % \begin{macrocode}
\pgfkeys{ \pgfkeys{
/moloch/inner/sectionpage/.cd, /moloch/inner/sectionpage/.cd,
.is choice, .is choice,
none/.code=\moloch@disablesectionpage, none/.code=\moloch@disablesectionpage,
simple/.code={\moloch@enablesectionpage simple/.code={\moloch@enablesectionpage
\setbeamertemplate{section page}[simple]}, \setbeamertemplate{section page}[simple]},
progressbar/.code={\moloch@enablesectionpage progressbar/.code={\moloch@enablesectionpage
\setbeamertemplate{section page}[progressbar]}, \setbeamertemplate{section page}[progressbar]},
} }
% \end{macrocode} % \end{macrocode}
% \end{macro} % \end{macro}
@ -70,12 +70,12 @@
% \begin{macrocode} % \begin{macrocode}
\pgfkeys{ \pgfkeys{
/moloch/inner/subsectionpage/.cd, /moloch/inner/subsectionpage/.cd,
.is choice, .is choice,
none/.code=\moloch@disablesubsectionpage, none/.code=\moloch@disablesubsectionpage,
simple/.code={\moloch@enablesubsectionpage simple/.code={\moloch@enablesubsectionpage
\setbeamertemplate{section page}[simple]}, \setbeamertemplate{section page}[simple]},
progressbar/.code={\moloch@enablesubsectionpage progressbar/.code={\moloch@enablesubsectionpage
\setbeamertemplate{section page}[progressbar]}, \setbeamertemplate{section page}[progressbar]},
} }
% \end{macrocode} % \end{macrocode}
% \end{macro} % \end{macro}
@ -108,15 +108,15 @@
\ifx\inserttitle\@empty\else\usebeamertemplate*{title}\fi \ifx\inserttitle\@empty\else\usebeamertemplate*{title}\fi
\ifx\insertsubtitle\@empty\else\usebeamertemplate*{subtitle}\fi \ifx\insertsubtitle\@empty\else\usebeamertemplate*{subtitle}\fi
\usebeamertemplate*{title separator} \usebeamertemplate*{title separator}
% \end{macrocode} % \end{macrocode}
% %
% Beamer's definition of |\insertauthor| is always nonempty, so we have % Beamer's definition of |\insertauthor| is always nonempty, so we have
% to test another macro initialized by |\author{...}| to see if the user has % to test another macro initialized by |\author{...}| to see if the user has
% defined an author. This solution was suggested by Enrico Gregorio in an % defined an author. This solution was suggested by Enrico Gregorio in an
% answer to \href{https://tex.stackexchange.com/questions/241306/}{this % answer to \href{https://tex.stackexchange.com/questions/241306/}{this
% Stack Exchange question}. % Stack Exchange question}.
% %
% \begin{macrocode} % \begin{macrocode}
\ifx\beamer@shortauthor\@empty\else\usebeamertemplate*{author}\fi \ifx\beamer@shortauthor\@empty\else\usebeamertemplate*{author}\fi
\ifx\insertdate\@empty\else\usebeamertemplate*{date}\fi \ifx\insertdate\@empty\else\usebeamertemplate*{date}\fi
\ifx\insertinstitute\@empty\else\usebeamertemplate*{institute}\fi \ifx\insertinstitute\@empty\else\usebeamertemplate*{institute}\fi
@ -159,9 +159,9 @@
% \begin{macrocode} % \begin{macrocode}
\setbeamertemplate{title graphic}{ \setbeamertemplate{title graphic}{
\vbox to 0pt { \vbox to 0pt {
\vspace*{2em} \vspace*{2em}
\inserttitlegraphic% \inserttitlegraphic%
}% }%
\nointerlineskip% \nointerlineskip%
} }
% \end{macrocode} % \end{macrocode}
@ -384,8 +384,8 @@
\vphantom{ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz()}% \vphantom{ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz()}%
} }
\newcommand{\moloch@block}[1]{ \newcommand{\moloch@block}[1]{
\par\vskip\medskipamount% \par\vskip\medskipamount%
\setlength{\parskip}{0pt} \setlength{\parskip}{0pt}
% \end{macrocode} % \end{macrocode}
% %
% If a background color is defined for the block title or body, we need to % If a background color is defined for the block title or body, we need to
@ -406,11 +406,11 @@
% set a rightskip for a nice ragged-right block title. % set a rightskip for a nice ragged-right block title.
% %
% \begin{macrocode} % \begin{macrocode}
\ifbeamercolorempty[bg]{block title#1}{% \ifbeamercolorempty[bg]{block title#1}{%
\begin{beamercolorbox}[rightskip=0pt plus 4em]{block title#1}}{% \begin{beamercolorbox}[rightskip=0pt plus 4em]{block title#1}}{%
\ifbeamercolorempty[bg]{block title}{% \ifbeamercolorempty[bg]{block title}{%
\begin{beamercolorbox}[rightskip=0pt plus 4em]{block title#1}% \begin{beamercolorbox}[rightskip=0pt plus 4em]{block title#1}%
}% }%
% \end{macrocode} % \end{macrocode}
% %
% Otherwise, if the |block title| has a background, we set the padding based % Otherwise, if the |block title| has a background, we set the padding based
@ -419,56 +419,56 @@
% subtracting |\moloch@blockadjust| from the top and bottom padding. % subtracting |\moloch@blockadjust| from the top and bottom padding.
% %
% \begin{macrocode} % \begin{macrocode}
{% {%
\begin{beamercolorbox}[ \begin{beamercolorbox}[
sep=\dimexpr\moloch@blocksep-\moloch@blockadjust\relax, sep=\dimexpr\moloch@blocksep-\moloch@blockadjust\relax,
leftskip=\moloch@blockadjust, leftskip=\moloch@blockadjust,
rightskip=\dimexpr\moloch@blockadjust plus 4em\relax rightskip=\dimexpr\moloch@blockadjust plus 4em\relax
]{block title#1}% ]{block title#1}%
}}% }}%
% \end{macrocode} % \end{macrocode}
% %
% We can now set the contents of the |block title|. The zero-width but % We can now set the contents of the |block title|. The zero-width but
% positive-height box |\moloch@strut| ensures that the block title box % positive-height box |\moloch@strut| ensures that the block title box
% has a consistent height, even if it lacks punctuation, ascenders, or % has a consistent height, even if it lacks punctuation, ascenders, or
% descenders. % descenders.
% %
% \begin{macrocode} % \begin{macrocode}
\usebeamerfont*{block title#1}% \usebeamerfont*{block title#1}%
\moloch@strut% \moloch@strut%
\insertblocktitle% \insertblocktitle%
\moloch@strut% \moloch@strut%
\end{beamercolorbox}% \end{beamercolorbox}%
% \end{macrocode} % \end{macrocode}
% %
% Next, we typeset the |block body|. This the code is similar to, but simpler % Next, we typeset the |block body|. This the code is similar to, but simpler
% than, the |block title| code since we don't need to adjust for any struts. % than, the |block title| code since we don't need to adjust for any struts.
% %
% \begin{macrocode} % \begin{macrocode}
\nointerlineskip% \nointerlineskip%
\ifbeamercolorempty[bg]{block body#1}{% \ifbeamercolorempty[bg]{block body#1}{%
\begin{beamercolorbox}[vmode]{block body#1}}{ \begin{beamercolorbox}[vmode]{block body#1}}{
\ifbeamercolorempty[bg]{block body}{% \ifbeamercolorempty[bg]{block body}{%
\begin{beamercolorbox}[vmode]{block body#1}% \begin{beamercolorbox}[vmode]{block body#1}%
}{% }{%
\begin{beamercolorbox}[sep=\moloch@blocksep, vmode]{block body#1}% \begin{beamercolorbox}[sep=\moloch@blocksep, vmode]{block body#1}%
\vspace{-\moloch@parskip} \vspace{-\moloch@parskip}
}}% }}%
\usebeamerfont{block body#1}% \usebeamerfont{block body#1}%
\setlength{\parskip}{\moloch@parskip}% \setlength{\parskip}{\moloch@parskip}%
} }
% \end{macrocode} % \end{macrocode}
% %
% This concludes the auxiliary macro |\moloch@block|. Finally, % This concludes the auxiliary macro |\moloch@block|. Finally,
% we define the block beamer templates using this macro. % we define the block beamer templates using this macro.
% %
% \begin{macrocode} % \begin{macrocode}
\setbeamertemplate{block begin}{\moloch@block{}} \setbeamertemplate{block begin}{\moloch@block{}}
\setbeamertemplate{block alerted begin}{\moloch@block{ alerted}} \setbeamertemplate{block alerted begin}{\moloch@block{ alerted}}
\setbeamertemplate{block example begin}{\moloch@block{ example}} \setbeamertemplate{block example begin}{\moloch@block{ example}}
\setbeamertemplate{block end}{\end{beamercolorbox}\vspace*{0.2ex}} \setbeamertemplate{block end}{\end{beamercolorbox}\vspace*{0.2ex}}
\setbeamertemplate{block alerted end}{\end{beamercolorbox}\vspace*{0.2ex}} \setbeamertemplate{block alerted end}{\end{beamercolorbox}\vspace*{0.2ex}}
\setbeamertemplate{block example end}{\end{beamercolorbox}\vspace*{0.2ex}} \setbeamertemplate{block example end}{\end{beamercolorbox}\vspace*{0.2ex}}
% \end{macrocode} % \end{macrocode}
% \end{macro} % \end{macro}
% \end{macro} % \end{macro}
@ -543,23 +543,23 @@
\define@key{beamerframe}{standout}[true]{% \define@key{beamerframe}{standout}[true]{%
\booltrue{moloch@standout} \booltrue{moloch@standout}
\begingroup \begingroup
\setkeys{beamerframe}{c} \setkeys{beamerframe}{c}
\setkeys{beamerframe}{noframenumbering} \setkeys{beamerframe}{noframenumbering}
\ifbeamercolorempty[bg]{palette primary}{ \ifbeamercolorempty[bg]{palette primary}{
\setbeamercolor{background canvas}{ \setbeamercolor{background canvas}{
use=palette primary, use=palette primary,
bg=-palette primary.fg bg=-palette primary.fg
}
}{
\setbeamercolor{background canvas}{
use=palette primary,
bg=palette primary.bg
}
} }
\setbeamercolor{local structure}{ }{
fg=palette primary.fg \setbeamercolor{background canvas}{
use=palette primary,
bg=palette primary.bg
} }
\usebeamercolor[fg]{palette primary} }
\setbeamercolor{local structure}{
fg=palette primary.fg
}
\usebeamercolor[fg]{palette primary}
} }
% \end{macrocode} % \end{macrocode}
% %
@ -571,12 +571,12 @@
% exactly once at the end of each slide. % exactly once at the end of each slide.
% %
% \begin{macrocode} % \begin{macrocode}
\pretocmd{\beamer@reseteecodes}{% \pretocmd{\beamer@reseteecodes}{%
\ifbool{moloch@standout}{ \ifbool{moloch@standout}{
\endgroup \endgroup
\boolfalse{moloch@standout} \boolfalse{moloch@standout}
}{} }{}
}{}{} }{}{}
% \end{macrocode} % \end{macrocode}
% %
% We set the fonts and the \centering alignment on the inner content, % We set the fonts and the \centering alignment on the inner content,
@ -584,12 +584,12 @@
% formatting. % formatting.
% %
% \begin{macrocode} % \begin{macrocode}
\AtBeginEnvironment{beamer@frameslide}{ \AtBeginEnvironment{beamer@frameslide}{
\ifbool{moloch@standout}{ \ifbool{moloch@standout}{
\centering \centering
\usebeamerfont{standout} \usebeamerfont{standout}
}{} }{}
} }
% \end{macrocode} % \end{macrocode}
% \end{macro} % \end{macro}
% %