Debian Codegraph @

texmf-dist/source/latex/moloch/beamerinnerthememoloch.dtx

raw
1 % \iffalse meta-comment -------------------------------------------------------
2 % Copyright 2015 Matthias Vogelgesang and the LaTeX community. A full list of
3 % contributors can be found at
4 %
5 % https://github.com/matze/mtheme/graphs/contributors
6 %
7 % and the original template was based on the HSRM theme by Benjamin Weiss.
8 %
9 % This work is licensed under a Creative Commons Attribution-ShareAlike 4.0
10 % International License (https://creativecommons.org/licenses/by-sa/4.0/).
11 %% ---------------------------------------------------------------------------
12 %% Copyright 2024 Johan Larsson and contributors
13 % ------------------------------------------------------------------------- \fi
14 % \iffalse
15 %<*package>
16 \NeedsTeXFormat{LaTeX2e}
17 \ProvidesPackage{beamerinnerthememoloch}[2025-12-18 v2.1.0 Moloch inner theme]
18 %</package>
19 % \fi
20 % \CheckSum{0}
21 % \StopEventually{}
22 % \iffalse
23 %<*package>
24 % ------------------------------------------------------------------------- \fi
25 %
26 % The \verb|beamer| inner theme dictates the style of the frame elements traditionally
27 % set in the ``body'' of each slide.
28 %
29 % \subsection{Package Dependencies}
30 %
31 % \begin{macrocode}
32 \RequirePackage{keyval}
33 \RequirePackage{calc}
34 \RequirePackage{pgfopts}
35 \RequirePackage{tikz}
36 % \end{macrocode}
37 %
38 % \subsection{Memoization and Tikz Externalization}
39 %
40 % See the documentation for the correspondign section under the outer theme for
41 % more information on the following lines.
42 %
43 % \begin{macrocode}
44 \providecommand{\tikzexternalenable}{}
45 \providecommand{\tikzexternaldisable}{}
46 \providecommand{\mmzUnmemoizable}{}
47 % \end{macrocode}
48 %
49 % \subsection{Options}
50 %
51 % \begin{macro}{sectionpage}
52 % Optionally add a slide marking the beginning of each section.
53 % \begin{macrocode}
54 \pgfkeys{
55 /moloch/inner/sectionpage/.cd,
56 .is choice,
57 none/.code=\moloch@disablesectionpage,
58 simple/.code={%
59 \moloch@enablesectionpage%
60 \setbeamertemplate{section page}[simple]%
61 },
62 progressbar/.code={%
63 \moloch@enablesectionpage%
64 \setbeamertemplate{section page}[progressbar]%
65 },
66 }
67 % \end{macrocode}
68 % \end{macro}
69 %
70 % \begin{macro}{subsectionpage}
71 % Optionally add a slide marking the beginning of each subsection.
72 % \begin{macrocode}
73 \pgfkeys{
74 /moloch/inner/subsectionpage/.cd,
75 .is choice,
76 none/.code=\moloch@disablesubsectionpage,
77 simple/.code={%
78 \moloch@enablesubsectionpage%
79 \setbeamertemplate{section page}[simple]%
80 },
81 progressbar/.code={%
82 \moloch@enablesubsectionpage%
83 \setbeamertemplate{section page}[progressbar]%
84 },
85 }
86 % \end{macrocode}
87 % \end{macro}
88 %
89 % \begin{macro}{standoutnumbering}
90 % Whether or not to number standout pages. Option \verb|none| means that
91 % standout pages are not numbered (do not count as frames). \verb|hide| means
92 % that they do count as frames, but that the footer with the number is
93 % not shown. Option \verb|show| means that they both count as frames and
94 % that the footer with a frame count is shown.
95 % \begin{macrocode}
96 \providebool{moloch@enableStandoutFooter}
97 \providebool{moloch@enableStandoutNumbering}
98 \pgfkeys{
99 /moloch/inner/standoutnumbering/.cd,
100 .is choice,
101 none/.code={
102 \boolfalse{moloch@enableStandoutNumbering}
103 \boolfalse{moloch@enableStandoutFooter}
104 },
105 show/.code={
106 \booltrue{moloch@enableStandoutNumbering}
107 \booltrue{moloch@enableStandoutFooter}
108 },
109 hide/.code={
110 \booltrue{moloch@enableStandoutNumbering}
111 \boolfalse{moloch@enableStandoutFooter}
112 }
113 }
114 % \end{macrocode}
115 % \end{macro}
116 %
117 % \begin{macro}{titleseparator linewidth}
118 % Set the width of the line separating the title from the author.
119 % \begin{macrocode}
120 \newlength{\moloch@titleseparator@linewidth}
121 \pgfkeys{
122 /moloch/inner/.cd,
123 titleseparatorlinewidth/.code={\setlength{\moloch@titleseparator@linewidth}{#1}},
124 }
125 % \end{macrocode}
126 % \end{macro}
127 %
128 %
129 % \begin{macro}{titleseparator aliases}
130 % Allows \verb|titleseparator linewidth| to be used in \verb|\usetheme|.
131 % \begin{macrocode}
132 \pgfkeys{
133 /moloch/inner/.cd,
134 titleseparator linewidth/.code=\pgfkeysalso{titleseparatorlinewidth=#1},
135 }
136 % \end{macrocode}
137 % \end{macro}
138 %
139 % \begin{macro}{titlepage}
140 % Select which title page template to use.
141 % \begin{macrocode}
142 \pgfkeys{
143 /moloch/inner/titlepage/.cd,
144 .is choice,
145 moloch/.code={%
146 \setbeamertemplate{title page}[moloch]%
147 \setbeamertemplate{title}[moloch]%
148 \setbeamertemplate{subtitle}[moloch]%
149 \setbeamertemplate{author}[moloch]%
150 \setbeamertemplate{institute}[moloch]%
151 \setbeamertemplate{date}[moloch]%
152 \setbeamertemplate{title graphic}[moloch]%
153 },
154 plain/.code={%
155 \setbeamertemplate{title page}[plain]%
156 \setbeamertemplate{title}[plain]%
157 \setbeamertemplate{subtitle}[plain]%
158 \setbeamertemplate{author}[plain]%
159 \setbeamertemplate{institute}[plain]%
160 \setbeamertemplate{date}[plain]%
161 \setbeamertemplate{title graphic}[plain]%
162 },
163 split/.code={%
164 \setbeamerfont{date}{size=\footnotesize}
165 \setbeamertemplate{title page}[split]%
166 \setbeamertemplate{title}[split]%
167 \setbeamertemplate{subtitle}[split]%
168 \setbeamertemplate{author}[split]%
169 \setbeamertemplate{institute}[split]%
170 \setbeamertemplate{date}[split]%
171 \setbeamertemplate{title graphic}[split]%
172 },
173 }
174 % \end{macrocode}
175 % \end{macro}
176 %
177 % \begin{macro}{\moloch@inner@setdefaults}
178 % Set default values for inner theme options.
179 % \begin{macrocode}
180 \newcommand{\moloch@inner@setdefaults}{
181 \pgfkeys{/moloch/inner/.cd,
182 sectionpage=progressbar,
183 subsectionpage=none,
184 standoutnumbering=none,
185 titleseparator linewidth=0.5pt,
186 titlepage=moloch,
187 }
188 }
189 % \end{macrocode}
190 % \end{macro}
191 %
192 %
193 %
194 % \subsection{Title Page}
195 %
196 % \begin{macro}{title page}
197 % Template for the title page. The moloch variant uses Moloch's custom layout
198 % with golden ratio spacing and a title separator. The plain variant mimics
199 % Beamer's default title page layout.
200 %
201 % \subsubsection{Moloch Variant}
202 % \begin{macrocode}
203 \defbeamertemplate*{title page}{moloch}{
204 \null%
205 \vspace{0pt plus 1.618fil}%
206 \vfil%
207 \ifx\inserttitlegraphic\@empty\else\usebeamertemplate*{title graphic}\fi
208 \ifx\inserttitle\@empty\else\usebeamertemplate*{title}\fi
209 \ifx\insertsubtitle\@empty\else\usebeamertemplate*{subtitle}\fi
210 \usebeamertemplate*{title separator}
211 \expandafter\ifblank\expandafter{\beamer@andstripped}{}{%
212 \usebeamertemplate*{author}%
213 }
214 \ifx\insertinstitute\@empty\else\usebeamertemplate*{institute}\fi
215 \ifx\insertdate\@empty\else\usebeamertemplate*{date}\fi
216 \vspace{0pt plus 1fil}%
217 \null
218 }
219 % \end{macrocode}
220 %
221 % \subsubsection{Plain (Beamer-like) Variant}
222 % \begin{macrocode}
223 \defbeamertemplate{title page}{plain}{
224 \null%
225 \vspace{0pt plus 1fil}%
226 \vfil%
227 \begingroup
228 \centering
229 \usebeamertemplate*{title}
230 \expandafter\ifblank\expandafter{\beamer@andstripped}{}{%
231 \usebeamertemplate*{author}%
232 }
233 \ifx\insertinstitute\@empty\else\usebeamertemplate*{institute}\fi
234 \ifx\insertdate\@empty\else\usebeamertemplate*{date}\fi
235 \ifx\inserttitlegraphic\@empty\else\usebeamertemplate*{title graphic}\fi
236 \endgroup
237 \vspace{0pt plus 1fil}%
238 \null
239 }
240 % \end{macrocode}
241 %
242 % \subsubsection{Split (Two-column) Variant}
243 % \begin{macrocode}
244 \defbeamertemplate{title page}{split}{
245 \null%
246 \vspace{0pt plus 3fil}%
247 \vfil%
248 \begin{columns}[c,onlytextwidth]
249 \begin{column}[t]{0.45\textwidth}
250 \raggedright
251 \ifx\inserttitle\@empty\else\usebeamertemplate*{title}\fi
252 \ifx\insertsubtitle\@empty\else
253 \usebeamertemplate*{subtitle}
254 \fi%
255 \end{column}%
256 \hfill%
257 \usebeamertemplate*{title separator vertical}%
258 \hfill%
259 \begin{column}[t]{0.45\textwidth}
260 \expandafter\ifblank\expandafter{\beamer@andstripped}{}{%
261 \usebeamertemplate*{author}%
262 }
263 \ifx\insertinstitute\@empty\else
264 \usebeamertemplate*{institute}
265 \fi
266 \ifx\insertdate\@empty\else
267 \usebeamertemplate*{date}
268 \fi
269 \ifx\inserttitlegraphic\@empty\else
270 \usebeamertemplate*{title graphic}%
271 \fi%
272 \end{column}
273 \end{columns}
274 \vfil%
275 \vspace{0pt plus 1fil}%
276 \null%
277 }
278 % \end{macrocode}
279 % \end{macro}%
280 %
281 % Normal people should use \verb|\maketitle| or \verb|\titlepage| instead of using the
282 % \verb|title page| beamer template directly. Beamer already defines these macros,
283 % but we patch them here to make the title page \verb|[plain]| by default
284 % and ensure the title frame number doesn't count.
285 %
286 % \begin{macro}{\maketitle}
287 %
288 % Inserts the title frame, or causes the current frame to use the
289 % \verb|title page| template. Since we want to remove the footnote rule
290 % from the title page, we have to store and restore it around the call to
291 % \verb|\frame|.
292 %
293 % \begin{macrocode}
294 \def\maketitle{%
295 \ifbeamer@inframe
296 \titlepage
297 \else
298 \let\beamer@saved@footnoterule\footnoterule%
299 \renewcommand\footnoterule{}%
300 \frame[plain,noframenumbering]{\titlepage}%
301 \let\footnoterule\beamer@saved@footnoterule%
302 \fi
303 }
304 % \end{macrocode}
305 % \end{macro}
306 %
307 % Also patch \verb|\titlepage| to ensure that footnotes on the title page
308 % are formatted correctly.
309 %
310 % \begin{macro}{\titlepage}
311 %
312 % Inserts the title page using the \verb|title page| beamer template.
313 %
314 % \begin{macrocode}
315 \def\titlepage{%
316 % Apply title-page specific footnote settings
317 \renewcommand{\@makefntext}[1]{%
318 {\par\usebeamercolor[fg]{thanks}\usebeamerfont{thanks}$^{\@thefnmark}$##1\medskip}%
319 }
320
321 % Process the title page
322 \usebeamertemplate{title page}\@thanks
323 }
324 % \end{macrocode}
325 % \end{macro}
326 %
327 % \begin{macro}{title graphic}
328 % Set the title graphic. Default variant for moloch titlepage.
329 % \begin{macrocode}
330 \defbeamertemplate{title graphic}{moloch}{
331 \inserttitlegraphic%
332 \par%
333 \vspace*{1em}
334 }
335 \defbeamertemplate{title graphic}{plain}{
336 \vskip0.5em%
337 {\usebeamercolor[fg]{titlegraphic}\inserttitlegraphic\par}
338 }
339 \defbeamertemplate{title graphic}{split}{
340 \vskip2em%
341 \inserttitlegraphic%
342 \par%
343 }
344 \setbeamertemplate{title graphic}[moloch]
345 % \end{macrocode}
346 % \end{macro}
347 %
348 % \begin{macro}{title}
349 % Set the title on the title page. Default variant for moloch titlepage.
350 % \begin{macrocode}
351 \defbeamertemplate{title}{moloch}{
352 \raggedright%
353 \moloch@titleformat{\inserttitle}%
354 \par%
355 }
356 \defbeamertemplate{title}{plain}{
357 \begin{beamercolorbox}[sep=8pt,center]{title}
358 \usebeamerfont{title}\inserttitle\par%
359 \ifx\insertsubtitle\@empty\else\usebeamertemplate*{subtitle}\fi%
360 \end{beamercolorbox}%
361 \vskip0.5em%
362 }
363 \defbeamertemplate{title}{split}{
364 \raggedright%
365 \moloch@titleformat{\inserttitle}%
366 \par%
367 }
368 \setbeamertemplate{title}[moloch]
369 % \end{macrocode}
370 % \end{macro}
371 %
372 % \begin{macro}{subtitle}
373 % Set the subtitle on the title page. Default variant for moloch titlepage.
374 % \begin{macrocode}
375 \defbeamertemplate{subtitle}{moloch}{
376 \vspace*{0.3em}
377 \raggedright%
378 \moloch@subtitleformat{\insertsubtitle}%
379 \par%
380 }
381 \defbeamertemplate{subtitle}{split}{
382 \vspace*{0.5em}
383 \raggedright%
384 \moloch@subtitleformat{\insertsubtitle}%
385 \par%
386 }
387 \defbeamertemplate{subtitle}{plain}{%
388 \vskip0.25em%
389 {\usebeamerfont{subtitle}\usebeamercolor[fg]{subtitle}\insertsubtitle\par}%
390 }
391 \setbeamertemplate{subtitle}[moloch]
392 % \end{macrocode}
393 % \end{macro}
394 %
395 % \begin{macro}{title separator}
396 % Template to set the title separator (horizontal).
397 % \begin{macrocode}
398 \setbeamertemplate{title separator}{
399 \tikzexternaldisable%
400 \begin{tikzpicture}[baseline=(current bounding box.north)]
401 \mmzUnmemoizable%
402 \fill[fg] (0,0) rectangle (\textwidth, \moloch@titleseparator@linewidth);
403 \useasboundingbox (0,0) rectangle (\textwidth,-\moloch@titleseparator@linewidth);
404 \end{tikzpicture}%
405 \tikzexternalenable%
406 \par%
407 \vspace*{0.8em}
408 }
409 % \end{macrocode}
410 % \end{macro}
411 %
412 % \begin{macro}{title separator vertical}
413 % Template for a vertical title separator.
414 % \begin{macrocode}
415 \setbeamertemplate{title separator vertical}{%
416 {\usebeamercolor[fg]{title separator}%
417 \vrule width \moloch@titleseparator@linewidth}%
418 }
419 % \end{macrocode}
420 % \end{macro}
421 %
422 % \begin{macro}{author}
423 % Set the author on the title page. Default variant for moloch titlepage.
424 % \begin{macrocode}
425 \defbeamertemplate{author}{moloch}{
426 \raggedright%
427 \insertauthor%
428 \par%
429 \vspace*{0.5em}
430 }
431 \defbeamertemplate{author}{plain}{
432 \begin{beamercolorbox}[sep=8pt,center]{author}
433 \usebeamerfont{author}\insertauthor
434 \end{beamercolorbox}
435 }
436 \defbeamertemplate{author}{split}{
437 \raggedright%
438 \insertauthor%
439 \par%
440 }
441 \setbeamertemplate{author}[moloch]
442 % \end{macrocode}
443 % \end{macro}
444 %
445 % \begin{macro}{institute}
446 % Set the institute on the title page. Default variant for moloch titlepage.
447 % \begin{macrocode}
448 \defbeamertemplate{institute}{moloch}{
449 \insertinstitute%
450 \par%
451 \vspace*{1em}
452 }
453 \defbeamertemplate{institute}{plain}{
454 \begin{beamercolorbox}[sep=8pt,center]{institute}
455 \usebeamerfont{institute}\insertinstitute
456 \end{beamercolorbox}
457 }
458 \defbeamertemplate{institute}{split}{
459 \vskip0.5em%
460 \raggedright%
461 \insertinstitute%
462 \par%
463 }
464 \setbeamertemplate{institute}[moloch]
465 % \end{macrocode}
466 % \end{macro}
467 %
468 %
469 % \begin{macro}{date}
470 % Set the date on the title page. Default variant for moloch titlepage.
471 % \begin{macrocode}
472 \defbeamertemplate{date}{moloch}{
473 \insertdate%
474 \par%
475 }
476 \defbeamertemplate{date}{plain}{
477 \begin{beamercolorbox}[sep=8pt,center]{date}
478 \usebeamerfont{date}\insertdate
479 \end{beamercolorbox}
480 }
481 \defbeamertemplate{date}{split}{
482 \vskip0.5em%
483 \raggedright%
484 \insertdate%
485 \par%
486 }
487 \setbeamertemplate{date}[moloch]
488 % \end{macrocode}
489 % \end{macro}
490 %
491 %
492 % \subsection{Section Pages}
493 %
494 % \begin{macro}{section Page}
495 %
496 % Template for the section title slide at the beginning of each section.
497 %
498 % \begin{macrocode}
499 \defbeamertemplate{section page}{simple}{
500 \begin{center}
501 \usebeamercolor[fg]{section title}
502 \usebeamerfont{section title}
503 \moloch@sectiontitleformat{\insertsectionhead}\par
504 \usebeamercolor[fg]{subsection title}%
505 \usebeamerfont{subsection title}%
506 \strut%
507 \ifx\insertsubsectionhead\@empty\else%
508 \insertsubsectionhead%
509 \fi
510 \end{center}
511 \vspace{\baselineskip - 1ex + \moloch@titleseparator@linewidth}
512 }
513 \defbeamertemplate{section page}{progressbar}{
514 \centering
515 \begin{minipage}{0.7875\linewidth}
516 \raggedright
517 \usebeamercolor[fg]{section title}
518 \usebeamerfont{section title}
519 \moloch@sectiontitleformat{\insertsectionhead}\\[-0.5\baselineskip]
520 \usebeamertemplate*{progress bar in section page}
521 \par
522 \usebeamercolor[fg]{subsection title}%
523 \usebeamerfont{subsection title}%
524 \strut%
525 \ifx\insertsubsectionhead\@empty\else%
526 \insertsubsectionhead%
527 \fi
528 \end{minipage}
529 \par
530 }
531 \newcommand{\moloch@disablesectionpage}{
532 \AtBeginSection{
533 % intentionally empty
534 }
535 }
536 \newcommand{\moloch@enablesectionpage}{
537 \AtBeginSection{
538 \ifbeamer@inframe
539 \sectionpage
540 \else
541 \frame[plain,c,noframenumbering]{\sectionpage}
542 \fi
543 }
544 }
545 % \end{macrocode}
546 % \end{macro}
547 %
548 % \begin{macro}{subsection page}
549 %
550 % Template for the subsection title slide that can optionally be added to
551 % at the beginning of each subsection.
552 %
553 % \begin{macrocode}
554 \setbeamertemplate{subsection page}{%
555 \usebeamertemplate*{section page}
556 }
557 \newcommand{\moloch@disablesubsectionpage}{
558 \AtBeginSubsection{
559 % intentionally empty
560 }
561 }
562 \newcommand{\moloch@enablesubsectionpage}{
563 \AtBeginSubsection{
564 \ifbeamer@inframe
565 \subsectionpage
566 \else
567 \frame[plain,c,noframenumbering]{\subsectionpage}
568 \fi
569 }
570 }
571 % \end{macrocode}
572 % \end{macro}
573 %
574 % \begin{macro}{progress bar in section page}
575 %
576 % Template for the progress bar displayed by default on the section page.
577 % This code is duplicated in large part in the outer theme's template
578 % \verb|progress bar in head/foot|.
579 %
580 % \begin{macrocode}
581 \setbeamertemplate{progress bar in section page}{
582 \pgfmathsetlength{\moloch@progressonsectionpage}{
583 \textwidth * min(1,\insertframenumber/max(1,\inserttotalframenumber))
584 }%
585 \tikzexternaldisable%
586 \begin{tikzpicture}[baseline=(current bounding box.north)]
587 \mmzUnmemoizable%
588 \fill[bg]
589 (0,0)
590 rectangle
591 (\textwidth, \moloch@progressonsectionpage@linewidth);
592 \fill[fg]
593 (0,0)
594 rectangle
595 (\moloch@progressonsectionpage,
596 \moloch@progressonsectionpage@linewidth);
597 \useasboundingbox (0,0) rectangle (\textwidth,-\moloch@progressonsectionpage@linewidth);
598 \end{tikzpicture}%
599 \tikzexternalenable%
600 }
601 % \end{macrocode}
602 %
603 % The code above assumes that \verb|\insertframenumber| is less than or equal to
604 % \verb|\inserttotalframenumber|. However, this is not true on the first compile;
605 % in the absence of an \verb|.aux| file, \verb|\inserttotalframenumber| defaults to 1.
606 % This behaviour could cause fatal errors for long presentations, as
607 % \verb|\moloch@progressonsectionpage| would exceed \TeX's maximum length
608 % (16383.99999pt, roughly 5.75 metres or 18.9 feet).
609 % To avoid this, we increase the default value for \verb|\inserttotalframenumber|;
610 % presentations with over 4000 slides will still break on first compile, but
611 % users in that situation likely have deeper problems to solve.
612 %
613 % \begin{macrocode}
614 \def\inserttotalframenumber{100}
615 % \end{macrocode}
616 % \end{macro}
617 %
618 % \subsection{Lists and Floats}
619 %
620 % Moloch uses custom symbols for the \verb|itemize| environment. The symbols
621 % are defined as below, using \verb|pgf| commands to draw the shapes.
622 % This is slightly different than what beamer does by default, which is
623 % to use font glyphs from the math font. But we want to avoid
624 % this reliance on the math font, which may have somewhat
625 % surprising side effects.
626 %
627 % By default, we use a filled circle for the first-level \verb|itemize| items,
628 % a filled square for the second level, and a filled triangle for
629 % the third level. Since the triangle tapers to a point, we add a slight
630 % overhang to it so that it visually aligns better with the other symbols.
631 % We do the same for the circle, but to a lower extent.
632 %
633 % \begin{macrocode}
634 \newcommand{\mitemover}[2]{\makebox[0pt][r]{#1}\kern-#2}
635 \newcommand{\mitem}[1]{\mitemover{#1}{0pt}}
636
637 \newcommand{\overhangSquare}{0pt}
638 \newcommand{\overhangCircle}{0.05ex}
639 \newcommand{\overhangTriangle}{0.25ex}
640
641 \newcommand{\moloch@circle}{
642 \begin{pgfpicture}
643 \pgfsetbaseline{-0.7ex}
644 \pgfpathcircle{\pgfpoint{0}{0}}{0.16em}
645 \pgfusepath{fill}
646 \end{pgfpicture}%
647 }
648 %
649 \newcommand{\moloch@square}{
650 \begin{pgfpicture}
651 \pgfsetbaseline{-0.7ex}
652 \pgfpathrectangle{\pgfpoint{-0.165em}{-0.165em}}{\pgfpoint{0.31em}{0.31em}}
653 \pgfusepath{fill}
654 \end{pgfpicture}%
655 }
656 %
657 \newcommand{\moloch@triangle}{
658 \begin{pgfpicture}
659 \pgfsetbaseline{-0.7ex}
660 \pgfpathmoveto{\pgfpoint{0.21em}{0}} % right vertex (tip)
661 \pgfpathlineto{\pgfpoint{-0.21em}{0.21em}} % top left
662 \pgfpathlineto{\pgfpoint{-0.21em}{-0.21em}} % bottom left
663 \pgfpathclose
664 \pgfusepath{fill}
665 \end{pgfpicture}%
666 }
667 % \end{macrocode}
668 %
669 % Next, we set the itemize templates to use these symbols.
670 %
671 % \begin{macrocode}
672 % \setbeamertemplate{itemize item}[circle]
673 \setbeamertemplate{itemize item}{\mitemover{\moloch@circle}{\overhangCircle}}
674 \setbeamertemplate{itemize subitem}{\mitemover{\moloch@square}{\overhangSquare}}
675 \setbeamertemplate{itemize subsubitem}{\mitemover{\moloch@triangle}{\overhangTriangle}}
676 \setbeamertemplate{caption label separator}{: }
677 \setbeamertemplate{caption}[numbered]
678 % \end{macrocode}
679 %
680 %
681 %
682 % \subsection{Footnotes}
683 % \begin{macrocode}
684 \setbeamertemplate{footnote}{%
685 \parindent 0em\noindent\raggedright \usebeamercolor{footnote}\hbox to
686 0.8em{\hfil\insertfootnotemark}\insertfootnotetext%%%
687 \par%
688 }
689 % \end{macrocode}
690 %
691 %
692 %
693 % \subsection{Text and Spacing Settings}
694 %
695 %
696 % By default, Beamer frames offer the \verb|c| option to \textit{almost} vertically
697 % center the text, but the placement is a little too high. To fix this, we
698 % redefine the \verb|c| option to equalize \verb|\beamer@frametopskip| and
699 % \verb|\beamer@framebottomskip|. This solution was suggested by Enrico Gregorio in
700 % an answer to \href{http://tex.stackexchange.com/questions/247826/}{this
701 % Stack Exchange question}.
702 %
703 % \begin{macrocode}
704 \define@key{beamerframe}{c}[true]{% centered
705 \beamer@frametopskip=0pt plus 1fil\relax%
706 \beamer@framebottomskip=0pt plus 1fil\relax%
707 \beamer@frametopskipautobreak=0pt plus .4\paperheight\relax%
708 \beamer@framebottomskipautobreak=0pt plus .6\paperheight\relax%
709 \def\beamer@initfirstlineunskip{}%
710 }
711 % \end{macrocode}
712 %
713 %
714 %
715 % \subsection{Standout Frames}
716 %
717 % Moloch offers a custom frame format with large, centered text and an
718 % inverted background. To use it, add the key \verb|standout| to the frame:
719 %
720 % \verb|\begin{frame}[standout] ... \end{frame}|.
721 %
722 % \begin{macro}{standout}
723 %
724 % Optional arguments to Beamer's frames are implemented using
725 % \verb|\define@key| from the \verb|keyval| package, which will execute code when the
726 % defined option is called. For the \verb|standout| option, we begin a group,
727 % change the colors and set frame options.
728 %
729 % \begin{macrocode}
730 \providebool{moloch@standout}
731 \define@key{beamerframe}{standout}[true]{%
732 \booltrue{moloch@standout}
733 \begingroup
734 \setkeys{beamerframe}{c}
735 \ifbool{moloch@enableStandoutNumbering}{}{%
736 \setkeys{beamerframe}{noframenumbering}}
737 \ifbeamercolorempty[bg]{standout}{
738 \setbeamercolor{background canvas}{
739 use=standout,
740 bg=-standout.fg
741 }
742 }{
743 \setbeamercolor{background canvas}{
744 use=standout,
745 bg=standout.bg
746 }
747 }
748 \setbeamercolor{local structure}{
749 fg=standout.fg
750 }
751 \usebeamercolor[fg]{standout}
752 \setbeamercolor{page number in head/foot}{
753 use=standout,
754 fg=standout.fg
755 }
756 \ifbool{moloch@enableStandoutFooter}{}{\setbeamertemplate{footline}{}}
757 }
758 % \end{macrocode}
759 %
760 % Then we just have to close the group after the standout slide is finished
761 % in order to restore the colours and fonts for the rest of the
762 % presentation. Unfortunately, we cannot use \verb|\AfterEndEnvironment{frame}| for
763 % this (see \url{http://tex.stackexchange.com/questions/226319/}).
764 % Instead, we prepend the \verb|\endgroup| to \verb|\beamer@reseteecodes|, which is run
765 % exactly once at the end of each slide.
766 %
767 % \begin{macrocode}
768 \pretocmd{\beamer@reseteecodes}{%
769 \ifbool{moloch@standout}{
770 \endgroup
771 \boolfalse{moloch@standout}
772 }{}
773 }{}{}
774 % \end{macrocode}
775 %
776 % We set the fonts and the \verb|\centering| alignment on the inner content,
777 % in such a way that the speaker's note layout isn't affected by the custom
778 % formatting.
779 %
780 % \begin{macrocode}
781 \AtBeginEnvironment{beamer@frameslide}{
782 \ifbool{moloch@standout}{
783 \centering
784 \usebeamerfont{standout}
785 }{}
786 }
787 % \end{macrocode}
788 % \end{macro}
789 %
790 % \subsection{Process Package Options}
791 %
792 % \begin{macrocode}
793 \moloch@inner@setdefaults
794 \ProcessPgfPackageOptions{/moloch/inner}
795 % \end{macrocode}
796 %
797 % \iffalse
798 %</package>
799 % \fi
800 % \Finale
801 \endinput