Debian Codegraph @

texmf-dist/source/latex/beamertheme-gotham/gotham.dtx

raw
1 % \iffalse meta-comment
2 %
3 % Copyright (C) 2023-20** by Romain NOEL <[email protected]>
4 % -----------------------------------------------------------
5 %
6 % This file may be distributed and/or modified under the conditions of
7 % the LaTeX Project Public License, either version 1.3c of this license
8 % or (at your option) any later version. The latest version of this
9 % license is in:
10 %
11 % http://www.latex-project.org/lppl.txt
12 %
13 % and version 1.3c or later is part of all distributions of LaTeX
14 % version 2006/05/20 or later.
15 %
16 % \fi
17 %
18 % \iffalse
19 %<*driver>
20 \ProvidesFile{gotham.dtx}
21 %</driver>
22 %<*internal>
23 \input expl3-generic \relax
24 %</internal>
25 %<class>\NeedsTeXFormat{LaTeX3e}
26 %<package>\ProvidesExplPackage{beamerthemegotham}{2026-04-02}{1.2.5.a}{A modern, minimal-ish, versatile and extendable yet robust theme for Beamer}
27 %<author>Romain NOEL</author>
28 %<maintainer>Romain NOEL</maintainer>
29 %<url>https://gitlab.com/RomainNOEL/beamertheme-gotham</url>
30 %<desc>
31 % A modern, minimal-ish, versatile and extendable yet robust theme for Beamer. It uses l3build system to both build and verify (Test-Driven Development) the delivered code.
32 % </desc>
33 %
34 %<*driver>
35 \documentclass{l3doc}
36 \usepackage[T1]{fontenc}
37 \usepackage{pdfpages}
38 \usepackage{standalone}
39 % \usepackage{gotham}
40 % \usepackage{readprov}
41 % \ReadPackageInfos{beamerthemegotham}
42 \edef\GothamVersion{v1.2.5.a} %{\fileversion}
43 \edef\GothamDate{2026-04-02} %{\filedate}
44
45 \usepackage{parskip}
46 \usepackage{setspace}
47 \usepackage{xspace}
48 \onehalfspacing
49
50 \usepackage{xcolor}
51 \definecolor{tPrim}{HTML}{00707F} % Green-Blue
52 \definecolor{tSec}{HTML}{5FA4B0} % Green-Blue light
53 \definecolor{tAccent}{HTML}{F07F3C} % Orange
54 \definecolor{tGrey}{HTML}{E6E6E1} % Grey-Beige
55
56 % \usepackage{fancyvrb}
57 \usepackage{listings}
58 \lstset{%
59 language=[LaTeX]{TeX},
60 basicstyle=\ttfamily,
61 keywordstyle=\color{tPrim}\bfseries,
62 commentstyle=\color{tSec},
63 stringstyle=\color{tSec},
64 backgroundcolor=\color{white},
65 numbers=none,
66 numberstyle=\tiny\ttfamily,
67 stepnumber=2,
68 showspaces=false,
69 showstringspaces=false,
70 showtabs=false,
71 frame=none,
72 framerule=1pt,
73 tabsize=2,
74 rulesep=5em,
75 captionpos=b,
76 breaklines=true,
77 breakatwhitespace=false,
78 framexleftmargin=0em,
79 framexrightmargin=0em,
80 xleftmargin=0em,
81 xrightmargin=0em,
82 aboveskip=1em,
83 belowskip=1em,
84 morekeywords={usetheme,institute,maketitle,@gotham@titleformat,%
85 plain,gothamset,setbeamercolor,defbeamertemplate},
86 }
87 \lstMakeShortInline|
88
89 \usepackage{hyperref}
90
91 \setlength{\fboxsep}{0pt}%
92 \usepackage{subcaption} % For subfigures
93 \usepackage{cleveref} % for references
94
95 \providecommand{\defopt}[1]{\underline{#1}}%{default: #1}%{\underline{#1}}
96 \NewDocumentEnvironment{DescribeGothamOption}{ o m m m }{
97 \DescribeOption{#2} % from l3doc
98 \IfNoValueTF{#1}{
99 % true => left empty intentionally
100 }{
101 \DescribeOption{% add extra info like added or updated dates to mimic 'function' env.
102 \rule[2.5ex]{\linewidth}{0.3pt}
103 \\[-3.5ex]
104 {\scriptsize #1 \hfill\ }
105 }
106 }
107 \begin{minipage}[t]{\textwidth}
108 \textit{\textbf{\textcolor{tSec}{#3}}}\dotfill\,\defopt{#4}\par
109 \begingroup
110 \vspace{0.5em}
111 }{
112 \par
113 \endgroup
114 \end{minipage}
115 }
116
117
118 %% =====================================================================
119 \title{\textsc{Gotham}\\ A modern, minimal-ish, versatile and extendable theme for Beamer}
120 \author{Romain NOEL \\ \url{[email protected]}}
121 \date{\GothamVersion~---~\GothamDate}
122
123 \providecommand{\themename}{\textbf{\textsc{Gotham}}\xspace}
124
125 %% =====================================================================
126
127
128 %% l3doc commands
129 \EnableCrossrefs
130 \CodelineIndex
131 \RecordChanges
132 \begin{document}
133 \input{gotham-doc.tex}
134 \clearpage
135 %\section{A simple example}
136 % \includepdf[pages=-,
137 % pagecommand=\section{A simple example},
138 % width=0.7\textwidth]
139 % {gotham-exampleSimple.pdf}
140 \section{Commands description for users}
141 \EnableDocumentation
142 \DisableImplementation
143 \DocInput{\jobname.dtx}
144 \newpage
145 \section{Package implementation for developers}
146 \EnableImplementation
147 \DisableDocumentation
148 \GetFileInfo{\jobname.sty}
149 \DocInput{\jobname.dtx}
150 \PrintChanges
151 \end{document}
152 %</driver>
153 %
154 %<*devImpl>
155 \documentclass{l3doc}
156 \usepackage[T1]{fontenc}
157 \usepackage{pdfpages}
158 \usepackage{standalone}
159 %\usepackage{gotham}
160 \providecommand{\defopt}[1]{\underline{#1}}
161 % l3doc commands
162 \EnableCrossrefs
163 \CodelineIndex
164 \RecordChanges
165 \begin{document}
166 \section{Commands description for users}
167 \EnableImplementation
168 \DisableDocumentation
169 \DocInput{gotham.dtx}
170 \end{document}
171 %</devImpl>
172 %
173 %
174 %<*userCmd>
175 \documentclass{l3doc}
176 \usepackage[T1]{fontenc}
177 \usepackage{pdfpages}
178 \usepackage{standalone}
179 %\usepackage{gotham}
180 \providecommand{\defopt}[1]{\underline{#1}}
181 % l3doc commands
182 \EnableCrossrefs
183 \CodelineIndex
184 \RecordChanges
185 \begin{document}
186 \section{Package implementation for developers}
187 \EnableDocumentation
188 \DisableImplementation
189 \DocInput{gotham.dtx}
190 \end{document}
191 %</userCmd>
192 %
193 % \fi
194 %
195 %
196 %\begin{implementation}
197 % \begin{macrocode}
198 %<*font>
199 \ProvidesExplPackage{beamerfontthemegotham}{2026-04-02}{1.2.5.a}{gotham font theme}
200 \RequirePackage{expl3}
201 % \RequirePackage{xparse}
202 % \RequirePackage{etoolbox}
203 \RequirePackage{ifxetex}
204 \RequirePackage{ifluatex}
205 % \end{macrocode}
206 % \end{implementation}
207
208
209 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
210 %%%%%%%%%%%% FONT %%%%%%%%%%%%%
211 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
212
213 % \begin{implementation}
214 % \begin{variable}{font messages}
215 % Definition of the messages that are used and reused by font theme.
216 % \changes{v0.2.0}{2024-01-25}{New}
217 % \begin{macrocode}
218 \msg_new:nnn { gotham } { font-not-found }
219 {
220 Could~not~find~font~'#1'.\c_space_tl
221 }
222
223 \msg_new:nnn { gotham } { fonts-not-available }
224 {
225 No~suitable~fonts~found.~Using~fallback~fonts.
226 }
227
228 \msg_new:nnn { gotham } { compiler-xe-or-lua }
229 {
230 You~need~to~compile~with~XeLaTeX~or~LuaLaTeX~to~use~the~Fira~fonts.
231 }
232 % \end{macrocode}
233 % \end{variable}
234 % \end{implementation}
235
236 % \begin{implementation}
237 % \begin{variable}{\g_gotham_fontsnotfound_int:n}
238 % Counter for the number of font not found.
239 % \begin{macrocode}
240 \int_new:N \g_gotham_fontsnotfound_int
241 % \end{macrocode}
242 % \end{variable}
243 % \end{implementation}
244
245 % \begin{implementation}
246 % \begin{function}{\checkfont:n}
247 % \begin{arguments}
248 % \item Name of the font.
249 % \end{arguments}
250 % Command to check if one font exist.
251 % \TestFiles{gotham-test-035}
252 % \TestMissing{a isolated unit test would be nice.}
253 % \begin{macrocode}
254 \cs_new_protected:Nn \checkfont:n
255 {
256 \fontspec_font_if_exist:nF { #1 }
257 {
258 % false: check with regular postfix.
259 \fontspec_font_if_exist:nF { #1~Regular }
260 {
261 % false: raise a warning and increment the number of font not found.
262 \int_incr:N \g_gotham_fontsnotfound_int
263 \msg_warning:nnn { gotham } { font-not-found } { #1 }
264 }
265 }
266 }
267 % \end{macrocode}
268 % \end{function}
269 % \end{implementation}
270
271 % \begin{documentation}
272 % \begin{function}{\iffontsavailable}
273 % \begin{syntax}
274 % \cs{iffontsavailable} \marg{list of fonts' names} \marg{True code} \marg{False code}
275 % \end{syntax}
276 % If all fonts in \marg{list of fonts' names} are font then \marg{True code} is executed else \marg{False code}.
277 % \end{function}
278 % \end{documentation}
279 % \begin{implementation}
280 % \begin{function}{\iffontsavailable}
281 % Command to check if a list of font is available.
282 % \TestFiles{gotham-test-035}
283 % \TestMissing{a isolated unit test would be nice.}
284 % \begin{macrocode}
285 \providecommand{\iffontsavailable}[3]
286 {
287 \int_zero:N \g_gotham_fontsnotfound_int
288 \clist_map_function:nN { #1 } \checkfont:n
289 \int_compare:nTF { \g_gotham_fontsnotfound_int = 0 }
290 {
291 % True
292 #2
293 }{
294 % False
295 #3
296 }
297 }
298 % \end{macrocode}
299 % \end{function}
300 % \end{implementation}
301
302 % \begin{implementation}
303 % \begin{macro}{Load fonts if available}
304 % If fontspec is loadable (ie. if xelatex or lualatex), then load available fonts, otherwise raise a warning and go on.
305 % \UnitTested
306 % \TestFiles{gotham-test-035}
307 % \begin{macrocode}
308 \ifboolexpr{bool~{xetex}~or~bool~{luatex}}{
309 % if fontspec loaded pass option otherwise load fontspec.
310 \@ifpackageloaded{fontspec}{
311 \PassOptionsToPackage{no-math}{fontspec}
312 }{
313 \RequirePackage[no-math]{fontspec}
314 }
315 %
316 % We search for regular, italic, light, light italic, fonts under the default |Fira Sans| names.
317 \iffontsavailable{FiraSans-Light.otf,
318 FiraSans-LightItalic.otf,
319 FiraSans-Regular.otf,
320 FiraSans-Italic.otf}
321 {
322 \setsansfont[ItalicFont={FiraSans-LightItalic.otf},
323 BoldFont={FiraSans-Regular.otf},
324 BoldItalicFont={FiraSans-Italic.otf}]
325 {FiraSans-Light.otf}
326 % Latin Modern Typewriter
327 \renewcommand{\ttdefault}{lmtt}
328 }{
329 % If this fails, the suffix OT --- used by some Linux distributions --- will be tried.
330 \iffontsavailable{FiraSans~Light~OT,
331 FiraSans~LightItalic~OT,
332 FiraSans~Regular~OT,
333 FiraSans~Italic~OT}
334 {
335 \setsansfont[ItalicFont={Fira~Sans~LightItalic~OT},
336 BoldFont={Fira~Sans~Regular~OT},
337 BoldItalicFont={Fira~Sans~Italic~OT}]
338 {Fira~Sans~Light~OT}
339 % Latin Modern Typewriter
340 \renewcommand{\ttdefault}{lmtt}
341 }{
342 % If this also fails, a warning will be displayed and the standard fonts will be used.
343 \msg_warning:nn { gotham } { fonts-not-available }
344 }
345 }
346 %
347 % We search for regular, mono, and mono bold fonts under the default |Fira Mono| names.
348 \iffontsavailable{FiraMono-Medium.otf, FiraMono-Bold.otf}{
349 \setmonofont[BoldFont={FiraMono-Medium.otf}]{FiraMono-Bold.otf}
350 }{
351 % If this fails, the suffix OT --- used by some Linux distributions --- will be tried.
352 \iffontsavailable{Fira~Mono~Medium~OT, Fira~Mono~Bold~OT}{
353 \setmonofont[BoldFont={Fira~Mono~Medium~OT}]{Fira~Mono~Bold~OT}
354 \renewcommand{\ttdefault}{lmtt} % Latin Modern Typewriter
355 }{
356 % If this also fails, a warning will be displayed and the standard fonts will be used.
357 \msg_warning:nn { gotham } { fonts-not-available }
358 }
359 }
360 %
361 % Add a feature for numbers in tables.
362 \AtBeginEnvironment{tabular}{
363 \addfontfeature{Numbers={Monospaced}}
364 }
365 }{
366 % If compiled with pdf\LaTeX{}, then apply a dirty patch (that will not do the job but suppress warnings) and raise a warning.
367 \msg_warning:nn { gotham } { compiler-xe-or-lua }
368 \DeclareFontShape{OT1}{cmss}{bx}{sc}{<-> cmbcsc10}{}
369 \DeclareFontShape{OT1}{cmss}{bx}{it}{<->sub*cmss/m/sl}{}
370 }
371 % \end{macrocode}
372 % \end{macro}
373 % \end{implementation}
374
375 % \begin{implementation}
376 % \begin{macro}{\setbeamerfont{title}, general font definitions}
377 % Set all needed font environment variables:shape, size, series.
378 % Remark: Case is missing.
379 % \UnitTested
380 % \TestFiles{gotham-test-035, gotham-test-036}
381 % \TestMissing{block, caption, description, bibio}
382 % \begin{macrocode}
383 \setbeamerfont{title}{size=\Large, series=\bfseries}
384 \setbeamerfont*{subtitle}{size=\large}
385 \setbeamerfont{author}{size=\small}
386 \setbeamerfont{date}{size=\small}
387
388 \setbeamerfont{section~title}{size=\Large, series=\bfseries}
389 \setbeamerfont{subsection~title}{size=\large, series=\bfseries}
390 \setbeamerfont{subsubsection~title}{size=\normalsize, series=\bfseries}
391
392 \setbeamerfont{frametitle}{size=\large, series=\bfseries}
393 \setbeamerfont{frametitleToc}{size=\LARGE, series=\bfseries}
394 \setbeamerfont{frametitleSection}{size*={60}{1}, series=\bfseries}
395
396 \setbeamerfont{page~number~in~head/foot}{size=\footnotesize}
397 \setbeamerfont{footline}{size=\scriptsize}
398
399 \setbeamerfont{block~title}{size=\normalsize, series=\bfseries}
400 \setbeamerfont{block~title~alerted}{size=\normalsize, series=\bfseries}
401 \setbeamerfont{caption}{size=\small}
402 \setbeamerfont{caption~name}{series=\bfseries}
403 \setbeamerfont{description~item}{series=\bfseries}
404
405 \setbeamerfont{bibliography~entry~author}{size=\normalsize, series=\normalfont}
406 \setbeamerfont{bibliography~entry~title}{size=\normalsize, series=\bfseries}
407 \setbeamerfont{bibliography~entry~location}{size=\normalsize, series=\normalfont}
408 \setbeamerfont{bibliography~entry~note}{size=\small, series=\normalfont}
409 \setbeamerfont{standout}{size=\Large, series=\bfseries}
410 % \end{macrocode}
411 % \end{macro}
412 % \end{implementation}
413
414 % \begin{implementation}
415 % \begin{function}{\__gotham_title_format:n, titles formats}
416 % Pre-hooks that will be inserted to control case format of titles in addition with the fonts set.
417 % \TestFiles{gotham-test-035, gotham-test-036, gotham-test-036b, gotham-test-1045}
418 % \TestMissing{format of framesubtitle, part and subsection are not tested (and not working) yet.}
419 % \begin{macrocode}
420 \def\gotham@titleformat#1{#1}
421 \def\gotham@subtitleformat#1{#1}
422 \def\gotham@parttitleformat#1{#1}
423 \def\gotham@sectiontitleformat#1{#1}
424 \def\gotham@subsectiontitleformat#1{#1}
425 \def\gotham@subsubsectiontitleformat#1{#1}
426 \def\gotham@frametitleformat#1{#1}
427 \def\gotham@framesubtitleformat#1{#1}
428 % IF ONE DAY: I can patch beamer with expl3, I will use the following commands instead.
429 % %% \cs_new:Npn \__gotham_unchanged:n #1 {#1}
430 % %% \cs_new:Npn \__gotham_title_format:n #1 {#1}
431 % %% \cs_new:Npn \__gotham_subtitle_format:n #1 {#1}
432 % %% \cs_new:Npn \__gotham_part_title_format:n #1 {#1}
433 % %% \cs_new:Npn \__gotham_section_title_format:n #1 {#1}
434 % %% \cs_new:Npn \__gotham_subsection_title_format:n #1 {#1}
435 % %% \cs_new:Npn \__gotham_frametitle_format:n #1 {#1}
436 % %% \cs_new:Npn \__gotham_framesubtitle_format:n #1 {#1}
437 % \end{macrocode}
438 % \end{function}
439 % \end{implementation}
440
441 % \begin{implementation}
442 % \begin{macro}{\beamer@title,\beamer@subtitle,\sectionentry}
443 % Since, case feature is not available in |setbeamerfont|; to make the uppercase, lowercase and title-case macros work in the title, subtitle, etc., we have to patch the appropriate |beamer| commands that set their values.
444 % This solution was suggested by Enrico Gregorio in an answer to \href{http://tex.stackexchange.com/questions/112526/}{this StackExchange question}.
445 % Remark: patchcmd from etoolbox (or other), is not compatible with expl3.
446 % \UnitTested
447 % \TestFiles{gotham-test-035, gotham-test-036, gotham-test-036b, gotham-test-1042}
448 % \TestMissing{format of framesubtitle, part and subsection are not tested (and not working) yet.}
449 % \changes{v1.2.4}{2025-12-04}{change or add patches for parts,section, sub, subsubsec and all their 'section*'intoc}
450 % \begin{macrocode}
451 \ExplSyntaxOff
452 \patchcmd{\beamer@title}
453 {\def\inserttitle{#2}}
454 {\def\inserttitle{\gotham@titleformat{#2}}}
455 % {\def\inserttitle{ \__gotham_title_format:n{#2} }}
456 {}
457 {\PackageError{beamerfontthemegotham}{Patching~title~failed}\@ehc}
458 \patchcmd{\beamer@subtitle}
459 {\def\insertsubtitle{#2}}
460 {\def\insertsubtitle{{\gotham@subtitleformat{#2}}}}
461 % {\def\insertsubtitle{ \__gotham_subtitle_format:n{#2} }}
462 {}
463 {\PackageError{beamerfontthemegotham}{Patching~subtitle~failed}\@ehc}
464
465
466 % %%%% PART %%%%%
467
468 % Missing command for part in toc from https://tex.stackexchange.com/questions/5285/tableofcontents-from-part-commands-in-beamer
469 %% number, partname, page.
470 \providecommand\beamer@partintoc[3]{%
471 \ifnum\c@tocdepth=-1\relax
472 % requesting onlyparts.
473 \makebox[6em]{PART #1:} #2
474 \par
475 \fi
476 }
477 \define@key{beamertoc}{onlyparts}[]{%
478 \c@tocdepth=-1\relax
479 }
480 \patchcmd{\beamer@part} % beamerbasenavigation.sty l.195
481 {\def\beamer@partname{#2}}
482 {\def\beamer@partname{\gotham@parttitleformat{#2}}}
483 {}
484 {\PackageError{beamerfontthemegotham}{Patching~part~title~failed}\@ehc}%
485 \patchcmd{\beamer@part} % beamerbasenavigation.sty l.195
486 {\def\beamer@partnameshort{#1}}
487 {\def\beamer@partnameshort{\gotham@parttitleformat{#1}}}
488 {}
489 {\PackageError{beamerfontthemegotham}{Patching~part~title~failed}\@ehc}%
490 \patchcmd{\beamer@part} % beamerbasenavigation.sty l.195
491 {\protect\partentry{#2}{\the\c@part}}
492 {\protect\partentry{\gotham@parttitleformat{#2}}{\the\c@part}}
493 {}
494 {\PackageError{beamerfontthemegotham}{Patching~part~title~failed}\@ehc}%
495 \patchcmd{\beamer@part} % beamerbasenavigation.sty l.195
496 {\Hy@writebookmark{\the\c@part}{#1}{Outline\the\c@part}{1}{toc}}
497 {\Hy@writebookmark{\the\c@part}{\gotham@parttitleformat{#1}}{Outline\the\c@part}{1}{toc}}
498 {}
499 {\PackageError{beamerfontthemegotham}{Patching~part~title~failed}\@ehc}%
500
501
502 %%%%% SECTION %%%%%
503 %
504 % \patchcmd{\sectionentry} % beamerbasenavigation.sty l.335
505 % {\def\insertsectionhead{#2}}
506 % {\def\insertsectionhead{\gotham@sectiontitleformat{#2}}}
507 % {}
508 % {\PackageError{beamerfontthemegotham}{Patching~section~title~failed}\@ehc}%
509 \patchcmd{\beamer@section} % beamerbasenavigation.sty l.195
510 {\protect\beamer@sectionintoc{\the\c@section}{#2}}
511 {\protect\beamer@sectionintoc{\the\c@section}{\gotham@sectiontitleformat{#2}}}
512 {}
513 {\PackageError{beamerfontthemegotham}{Patching~section~title~failed}\@ehc}%
514 \patchcmd{\beamer@section} % beamerbasenavigation.sty l.195
515 {\long\def\secname{#2}}
516 {\long\def\secname{\gotham@sectiontitleformat{#2}}}
517 {}
518 {\PackageError{beamerfontthemegotham}{Patching~section~title~failed}\@ehc}%
519
520 \@tempswafalse
521 \patchcmd{\beamer@section} % beamerbasesection.sty l. 209
522 {\def\insertsectionhead{\hyperlink{Navigation\the\c@page}{#1}}}
523 {\def\insertsectionhead{\hyperlink{Navigation\the\c@page}{\gotham@sectiontitleformat{#1}}}}
524 % \__gotham_section_title_format:n{#2}
525 {\@tempswatrue}
526 {}
527 \patchcmd{\beamer@section} % beamerbasesection.sty l. 209
528 {\edef\insertsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{\unexpanded{#1}}}}
529 {\edef\insertsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{\noexpand\gotham@sectiontitleformat{\unexpanded{#1}}}}}
530 % \exp_not:N \__gotham_section_title_format:n {#1}
531 {\@tempswatrue}
532 {}
533 \if@tempswa\else
534 {\PackageError{beamerfontthemegotham}{Patching~section~title~failed}\@ehc}
535 \fi
536 \@tempswafalse
537
538
539 % %%%% SUBSECTION %%%%%
540
541 \patchcmd{\beamer@subsection} % beamerbasenavigation.sty l.195
542 {\protect\beamer@subsectionintoc{\the\c@section}{\the\c@subsection}{#2}}
543 {\protect\beamer@subsectionintoc{\the\c@section}{\the\c@subsection}{\gotham@subsectiontitleformat{#2}}}
544 {}
545 {\PackageError{beamerfontthemegotham}{Patching~subsection~title~failed}\@ehc}%
546 \patchcmd{\beamer@subsection} % beamerbasenavigation.sty l.195
547 {\long\def\subsecname{#2}}
548 {\long\def\subsecname{\gotham@subsectiontitleformat{#2}}}
549 {}
550 {\PackageError{beamerfontthemegotham}{Patching~subsection~title~failed}\@ehc}%
551
552 \@tempswafalse
553 \patchcmd{\beamer@subsection} % beamerbasesubsection.sty l. 209
554 {\def\insertsubsectionhead{\hyperlink{Navigation\the\c@page}{#1}}}
555 {\def\insertsubsectionhead{\hyperlink{Navigation\the\c@page}{\gotham@subsectiontitleformat{#1}}}}
556 % \__gotham_subsection_title_format:n{#2}
557 {\@tempswatrue}
558 {}
559 \patchcmd{\beamer@subsection} % beamerbasesubsection.sty l. 209
560 {\edef\insertsubsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{\unexpanded{#1}}}}
561 {\edef\insertsubsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{\noexpand\gotham@subsectiontitleformat{\unexpanded{#1}}}}}
562 % \exp_not:N \__gotham_subsection_title_format:n {#1}
563 {\@tempswatrue}
564 {}
565 \if@tempswa\else
566 {\PackageError{beamerfontthemegotham}{Patching~subsection~title~failed}\@ehc}
567 \fi
568 \@tempswafalse
569
570
571 % %%% SUBSUBSECTION %%%%%
572
573 \patchcmd{\beamer@subsubsection} % beamerbasenavigation.sty l.195
574 {\long\def\subsubsecname{#2}}
575 {\long\def\subsubsecname{\gotham@subsubsectiontitleformat{#2}}}
576 {}
577 {\PackageError{beamerfontthemegotham}{Patching~subsubsection~title~failed}\@ehc}%
578 \patchcmd{\beamer@subsubsection} %\protect\beamer@subsubsectionintoc
579 {{\the\c@section}{\the\c@subsection}{\the\c@subsubsection}{#2}}
580 {{\the\c@section}{\the\c@subsection}{\the\c@subsubsection}{\gotham@subsubsectiontitleformat{#2}}}
581 {}
582 {\PackageError{beamerfontthemegotham}{Patching~subsubsection~title~failed}\@ehc}%
583
584 \@tempswafalse
585
586 \patchcmd{\beamer@subsubsection} % beamerbasesubsubsection.sty l. 209
587 {\edef\insertsubsubsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{\unexpanded{#1}}}}
588 {\edef\insertsubsubsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{\noexpand\gotham@subsubsectiontitleformat{\unexpanded{#1}}}}}
589 % \exp_not:N \__gotham_subsubsection_title_format:n {#1}
590 {\@tempswatrue}
591 {}
592 \if@tempswa\else
593 {\PackageError{beamerfontthemegotham}{Patching~subsubsection~title~failed}\@ehc}
594 \fi
595 \@tempswafalse
596
597 %
598 % Similarly, to make the |\MakeLowercase| and |\MakeUppercase| macros work in the frame title we have to patch |\beamer@@frametitle|.
599 \providecommand{\beamer@insertframetitlecontinuation}{
600 \usebeamertemplate*{frametitle~continuation}
601 }
602 \patchcmd{\beamer@@frametitle} % beamerbaselocalstructure.sty l. 32
603 {\gdef\insertframetitle{{%
604 #2%
605 \ifnum\beamer@autobreakcount>0
606 \relax{}\space%
607 \beamer@insertframetitlecontinuation%
608 \fi%
609 }}%
610 }
611 {\gdef\insertframetitle{{%
612 \gotham@frametitleformat{#2}%
613 % \__gotham_frametitle_format:n {#2}
614 \ifnum\beamer@autobreakcount>0
615 \relax{}\space%
616 \beamer@insertframetitlecontinuation%
617 \fi%
618 }}%
619 }
620 {}
621 {\PackageWarning{beamerfontthemegotham}{Patching~frametitle~failed}\@ehc}
622 %
623 %% NOT WORKING YET !
624 %% \patchcmd{\framesubtitle} % beamerbaselocalstructure.sty l.55
625 %% {\only#2{\ifblank{#1}{}{\gdef\insertframesubtitle{{#1}}\beamer@aftersubtitle}}}
626 %% {\only{#2}{\ifblank{#1}{}{\gdef\insertframesubtitle{{#1}}\beamer@aftersubtitle}}}
627 %% {}
628 %% {\PackageWarning{beamerfontthemegotham}{Patching~framesubtitle~failed}\@ehc}
629 %
630 \ExplSyntaxOn
631 % \end{macrocode}
632 % \end{macro}
633 % \end{implementation}
634
635 % \begin{documentation}
636 % \begin{function}{\usefonttheme}
637 % \begin{syntax}
638 % \cs{usefonttheme}\oarg{option1=value1, ...}\marg{gotham}
639 % \textrm{where the options are (default marked as} \defopt{default}\textrm{):}
640 % \meta{title format} = \oarg{\defopt{textregular} \textbar lower \textbar upper \textbar titlecase}
641 % \meta{title shape} = \oarg{\defopt{textregular} \textbar smallcaps \textbar italic}
642 % \meta{subtitle format} = \oarg{\defopt{textregular} \textbar lower \textbar upper \textbar titlecase}
643 % \meta{subtitle shape} = \oarg{\defopt{textregular} \textbar smallcaps \textbar italic}
644 % \meta{frametitle format} = \oarg{\defopt{textregular} \textbar lower \textbar upper \textbar titlecase}
645 % \meta{frametitle shape} = \oarg{\defopt{textregular} \textbar smallcaps \textbar italic}
646 % \meta{framesubtitle format} = \oarg{\defopt{textregular} \textbar lower \textbar upper \textbar titlecase}
647 % \meta{framesubtitle shape} = \oarg{\defopt{textregular} \textbar smallcaps \textbar italic}
648 % \meta{part format} = \oarg{\defopt{textregular} \textbar lower \textbar upper \textbar titlecase}
649 % \meta{part shape} = \oarg{\defopt{textregular} \textbar smallcaps \textbar italic}
650 % \meta{section format} = \oarg{\defopt{textregular} \textbar lower \textbar upper \textbar titlecase}
651 % \meta{section shape} = \oarg{\defopt{textregular} \textbar smallcaps \textbar italic}
652 % \meta{subsection format} = \oarg{\defopt{textregular} \textbar lower \textbar upper \textbar titlecase}
653 % \meta{subsection shape} = \oarg{\defopt{textregular} \textbar smallcaps \textbar italic}
654 % \meta{subsubsection format} = \oarg{\defopt{textregular} \textbar lower \textbar upper \textbar titlecase}
655 % \meta{subsubsection shape} = \oarg{\defopt{textregular} \textbar smallcaps \textbar italic}
656 % \end{syntax}
657 % The 'package' (usefonttheme) options can control both shape and format of title (of the presentation), subtitle, part title, section title, subsection title, subsubsection title, frametitle and framesubtitle.
658 % \end{function}
659 % \end{documentation}
660 %%%%
661 % \begin{implementation}
662 % \begin{macro}{font key -- interface}
663 % Controls the format and shape of the title (of the presentation), subtitle, part title, section title, subsection title, frametitle and framesubtitle.
664 % \UnitTested
665 % \TestFiles{gotham-test-035, gotham-test-036, gotham-test-036b}
666 % \TestMissing{format of framesubtitle are not tested (and not working) yet.}
667 % \changes{v1.2.4}{2025-12-04}{add subsubsection format and shape options}
668 % \begin{macrocode}
669 \keys_define:nn { gotham / font }
670 {
671 % format title
672 format~title .choice:,
673 format~title .usage:n = { general },
674 format~title .default:n = { regular },
675 format~title / regular .code:n =
676 {
677 \let\gotham@titleformat\@empty
678 % \cs_set_eq:NN \__gotham_title_format:n \__gotham_unchanged:n
679 },
680 format~title / lower .code:n =
681 {
682 \let\gotham@titleformat \text_lowercase:n %\lowercase
683 % \cs_set_eq:NN \__gotham_title_format:n \text_lowercase:n
684 \PackageWarning{ gotham } { Be~aware~that~format~title=lower~can~lead~to~problems. }
685 },
686 format~title / upper .code:n =
687 {
688 \let\gotham@titleformat \text_uppercase:n %\uppercase
689 % \cs_set_eq:NN \__gotham_title_format:n \text_uppercase:n
690 \PackageWarning{ gotham } { Be~aware~that~format~title=upper~can~lead~to~problems. }
691 },
692 format~title / titlecase .code:n =
693 {
694 \let\gotham@titleformat \text_titlecase_all:n %\MakeTitlecase
695 % \cs_set_eq:NN \__gotham_title_format:n \text_titlecase_all:n
696 \PackageWarning{ gotham } { Be~aware~that~format~title=titlecase~can~lead~to~problems. }
697 },
698 format~title / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'\l_keys_value_tl'~is~unknown~for~the~(known)~option~'\l_keys_key_tl',~so~being~ignored. }{helping~message: format~title / unknown } },
699 }
700 \keys_define:nn { gotham / font }
701 {
702 % shape title
703 shape~title .choice:,
704 shape~title .usage:n = { general },
705 shape~title .default:n = { regular },
706 shape~title / regular .code:n =
707 {
708 \setbeamerfont{title}{shape=\normalfont}
709 },
710 shape~title / smallcaps .code:n =
711 {
712 \setbeamerfont{title}{shape=\scshape}
713 },
714 shape~title / italic .code:n =
715 {
716 \setbeamerfont{title}{shape=\itshape}
717 },
718 shape~title / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'\l_keys_value_tl'~is~unknown~for~the~(known)~option~'\l_keys_key_tl',~so~being~ignored. }{helping~message: shape~title / unknown} },
719 }
720
721 \keys_define:nn { gotham / font }
722 {
723 % format subtitle
724 format~subtitle .choice:,
725 format~subtitle .usage:n = { general },
726 format~subtitle .default:n = { regular },
727 format~subtitle / regular .code:n =
728 {
729 \let\gotham@subtitleformat\@empty
730 % \cs_set_eq:NN \__gotham_subtitle_format:n \__gotham_unchanged:n
731 },
732 format~subtitle / lower .code:n =
733 {
734 \let\gotham@subtitleformat \text_lowercase:n %\lowercase
735 % \cs_set_eq:NN \__gotham_subtitle_format:n \text_lowercase:n
736 \PackageWarning{ gotham } { Be~aware~that~format~subtitle=lower~can~lead~to~problems. }
737 },
738 format~subtitle / upper .code:n =
739 {
740 \let\gotham@subtitleformat \text_uppercase:n %\uppercase
741 \cs_set_eq:NN \__gotham_subtitle_format:n \text_uppercase:n
742 \PackageWarning{ gotham } { Be~aware~that~format~subtitle=upper~can~lead~to~problems. }
743 },
744 format~subtitle / titlecase .code:n =
745 {
746 \let\gotham@subtitleformat \text_titlecase_all:n %\MakeTitlecase
747 % \cs_set_eq:NN \__gotham_subtitle_format:n \text_titlecase_all:n %\MakeTitlecase
748 \PackageWarning{ gotham } { Be~aware~that~format~subtitle=titlecase~can~lead~to~problems. }
749 },
750 format~subtitle / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'\l_keys_value_tl'~is~unknown~for~the~(known)~option~'\l_keys_key_tl',~so~being~ignored. }{helping~message: format~subtitle / unknown} },
751 }
752 \keys_define:nn { gotham / font }
753 {
754 % shape subtitle
755 shape~subtitle .choice:,
756 shape~subtitle .usage:n = { general },
757 shape~subtitle .default:n = { regular },
758 shape~subtitle / regular .code:n =
759 {
760 \setbeamerfont{subtitle}{shape=\normalfont}
761 },
762 shape~subtitle / smallcaps .code:n =
763 {
764 \setbeamerfont{subtitle}{shape=\scshape}
765 },
766 shape~subtitle / italic .code:n =
767 {
768 \setbeamerfont{subtitle}{shape=\itshape}
769 },
770 shape~subtitle / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'\l_keys_value_tl'~is~unknown~for~the~(known)~option~'\l_keys_key_tl',~so~being~ignored. }{helping~message: shape~subtitle / unknown} },
771 }
772
773 \keys_define:nn { gotham / font }
774 {
775 % format frametitle
776 format~frametitle .choice:,
777 format~frametitle .usage:n = { general },
778 format~frametitle .default:n = { regular },
779 format~frametitle / regular .code:n =
780 {
781 \let\gotham@frametitleformat\@empty
782 % \cs_set_eq:NN \__gotham_frametitle_format:n \__gotham_unchanged:n
783 },
784 format~frametitle / lower .code:n =
785 {
786 \let\gotham@frametitleformat \text_lowercase:n %\lowercase
787 % \cs_set_eq:NN \__gotham_frametitle_format:n \text_lowercase:n
788 \PackageWarning{ gotham } { Be~aware~that~format~frametitle=lower~can~lead~to~problems. }
789 },
790 format~frametitle / upper .code:n =
791 {
792 \let\gotham@frametitleformat \text_uppercase:n %\uppercase
793 % \cs_set_eq:NN \__gotham_frametitle_format:n \text_uppercase:n
794 \PackageWarning{ gotham } { Be~aware~that~format~frametitle=upper~can~lead~to~problems. }
795 },
796 format~frametitle / titlecase .code:n =
797 {
798 \let\gotham@frametitleformat \text_titlecase_all:n %\Maketitlecase
799 % \cs_set_eq:NN \__gotham_frametitle_format:n \text_titlecase_all:n %\MakeTitlecase
800 \PackageWarning{ gotham } { Be~aware~that~format~frametitle=titlecase~can~lead~to~problems. }
801 },
802 format~frametitle / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'\l_keys_value_tl'~is~unknown~for~the~(known)~option~'\l_keys_key_tl',~so~being~ignored. }{helping~message: format~frametitle / unknown} },
803 }
804 \keys_define:nn { gotham / font }
805 {
806 % shape frametitle
807 shape~frametitle .choice:,
808 shape~frametitle .usage:n = { general },
809 shape~frametitle .default:n = { regular },
810 shape~frametitle / regular .code:n =
811 {
812 \setbeamerfont{frametitle}{shape=\normalfont}
813 },
814 shape~frametitle / smallcaps .code:n =
815 {
816 \setbeamerfont{frametitle}{shape=\scshape}
817 },
818 shape~frametitle / italic .code:n =
819 {
820 \setbeamerfont{frametitle}{shape=\itshape}
821 },
822 shape~frametitle / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'\l_keys_value_tl'~is~unknown~for~the~(known)~option~'\l_keys_key_tl',~so~being~ignored. }{helping~message: shape~frametitle / unknown} },
823 }
824
825 \keys_define:nn { gotham / font }
826 {
827 % format framesubtitle
828 format~framesubtitle .choice:,
829 format~framesubtitle .usage:n = { general },
830 format~framesubtitle .default:n = { regular },
831 format~framesubtitle / regular .code:n =
832 {
833 \let\gotham@framesubtitleformat\@empty
834 % \cs_set_eq:NN \__gotham_framesubtitle_format:n \__gotham_unchanged:n
835 },
836 format~framesubtitle / lower .code:n =
837 {
838 \let\gotham@framesubtitleformat \text_lowercase:n %\lowercase
839 % \cs_set_eq:NN \__gotham_framesubtitle_format:n \text_lowercase:n
840 \PackageWarning{ gotham } { Be~aware~that~format~framesubtitle=lower~can~lead~to~problems. }
841 },
842 format~framesubtitle / upper .code:n =
843 {
844 \let\gotham@framesubtitleformat \text_uppercase:n %\uppercase
845 % \cs_set_eq:NN \__gotham_framesubtitle_format:n \text_uppercase:n
846 \PackageWarning{ gotham } { Be~aware~that~format~framesubtitle=upper~can~lead~to~problems. }
847 },
848 format~framesubtitle / titlecase .code:n =
849 {
850 \let\gotham@framesubtitleformat \text_titlecase_all:n %\Maketitlecase
851 % \cs_set_eq:NN \__gotham_framesubtitle_format:n \text_titlecase_all:n %\Maketitlecase
852 \PackageWarning{ gotham } { Be~aware~that~format~framesubtitle=titlecase~can~lead~to~problems. }
853 },
854 format~framesubtitle / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'\l_keys_value_tl'~is~unknown~for~the~(known)~option~'\l_keys_key_tl',~so~being~ignored. }{helping~message: format~framesubtitle / unknown} },
855 }
856 \keys_define:nn { gotham / font }
857 {
858 % shape framesubtitle
859 shape~framesubtitle .choice:,
860 shape~framesubtitle .usage:n = { general },
861 shape~framesubtitle .default:n = { regular },
862 shape~framesubtitle / regular .code:n =
863 {
864 \setbeamerfont{framesubtitle}{shape=\normalfont}
865 },
866 shape~framesubtitle / smallcaps .code:n =
867 {
868 \setbeamerfont{framesubtitle}{shape=\scshape}
869 },
870 shape~framesubtitle / italic .code:n =
871 {
872 \setbeamerfont{framesubtitle}{shape=\itshape}
873 },
874 shape~framesubtitle / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'\l_keys_value_tl'~is~unknown~for~the~(known)~option~'\l_keys_key_tl',~so~being~ignored. }{helping~message: shape~framesubtitle / unknown} },
875 }
876
877 \keys_define:nn { gotham / font }
878 {
879 % format part
880 format~part .choice:,
881 format~part .usage:n = { general },
882 format~part .default:n = { regular },
883 format~part / regular .code:n =
884 {
885 \let\gotham@parttitleformat\@empty
886 % \cs_set_eq:NN \__gotham_part_title_format:n \text_titlecase:n
887 },
888 format~part / lower .code:n =
889 {
890 \let\gotham@parttitleformat \text_lowercase:n %\lowercase
891 % \cs_set_eq:NN \__gotham_part_title_format:n \text_lowercase:n
892 \PackageWarning{ gotham } { Be~aware~that~format~part=lower~can~lead~to~problems. }
893 },
894 format~part / upper .code:n =
895 {
896 \let\gotham@parttitleformat \text_uppercase:n %\uppercase
897 % \cs_set_eq:NN \__gotham_part_title_format:n \text_uppercase:n
898 \PackageWarning{ gotham } { Be~aware~that~format~part=upper~can~lead~to~problems. }
899 },
900 format~part / titlecase .code:n =
901 {
902 \let\gotham@parttitleformat\text_titlecase_all:n %\Maketitlecase
903 % \cs_set_eq:NN \__gotham_part_title_format:n \text_titlecase:n
904 \PackageWarning{ gotham } { Be~aware~that~format~part=titlecase~can~lead~to~problems. }
905 },
906 format~part / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'\l_keys_value_tl'~is~unknown~for~the~(known)~option~'\l_keys_key_tl',~so~being~ignored. }{helping~message: format~part / unknown} },
907 }
908 \keys_define:nn { gotham / font }
909 {
910 % shape part
911 shape~part .choice:,
912 shape~part .usage:n = { general },
913 shape~part .default:n = { regular },
914 shape~part / regular .code:n =
915 {
916 \setbeamerfont{part~title}{shape=\normalfont}
917 },
918 shape~part / smallcaps .code:n =
919 {
920 \setbeamerfont{part~title}{shape=\scshape}
921 },
922 shape~part / italic .code:n =
923 {
924 \setbeamerfont{part~title}{shape=\itshape}
925 },
926 shape~part / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'\l_keys_value_tl'~is~unknown~for~the~(known)~option~'\l_keys_key_tl',~so~being~ignored. }{helping~message: shape~part / unknown} },
927 }
928
929 \keys_define:nn { gotham / font }
930 {
931 % format section
932 format~section .choice:,
933 format~section .usage:n = { general },
934 format~section .default:n = { regular },
935 format~section / regular .code:n =
936 {
937 \let\gotham@sectiontitleformat\@empty
938 % \cs_set_eq:NN \__gotham_section_title_format:n \__gotham_unchanged:n
939 },
940 format~section / lower .code:n =
941 {
942 \let\gotham@sectiontitleformat \text_lowercase:n %\lowercase
943 % \cs_set_eq:NN \__gotham_section_title_format:n \text_lowercase:n
944 \PackageWarning{ gotham } { Be~aware~that~format~section=lower~can~lead~to~problems. }
945 },
946 format~section / upper .code:n =
947 {
948 \let\gotham@sectiontitleformat \text_uppercase:n %\uppercase
949 % \cs_set_eq:NN \__gotham_section_title_format:n \text_uppercase:n
950 \PackageWarning{ gotham } { Be~aware~that~format~section=upper~can~lead~to~problems. }
951 },
952 format~section / titlecase .code:n =
953 {
954 \let\gotham@sectiontitleformat \text_titlecase_all:n %\Maketitlecase
955 % \cs_set_eq:NN \__gotham_section_title_format:n \text_titlecase_all:n
956 \PackageWarning{ gotham } { Be~aware~that~format~section=titlecase~can~lead~to~problems. }
957 },
958 format~section / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'\l_keys_value_tl'~is~unknown~for~the~(known)~option~'\l_keys_key_tl',~so~being~ignored. }{helping~message: format~section / unknown} },
959 }
960 \keys_define:nn { gotham / font }
961 {
962 % shape section
963 shape~section .choice:,
964 shape~section .usage:n = { general },
965 shape~section .default:n = { regular },
966 shape~section / regular .code:n =
967 {
968 \setbeamerfont{section~title}{shape=\normalfont}
969 },
970 shape~section / smallcaps .code:n =
971 {
972 \setbeamerfont{section~title}{shape=\scshape}
973 },
974 shape~section / italic .code:n =
975 {
976 \setbeamerfont{section~title}{shape=\itshape}
977 },
978 shape~section / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'\l_keys_value_tl'~is~unknown~for~the~(known)~option~'\l_keys_key_tl',~so~being~ignored. }{helping~message: shape~section / unknown} },
979 }
980
981 \keys_define:nn { gotham / font }
982 {
983 % format subsection
984 format~subsection .choice:,
985 format~subsection .usage:n = { general },
986 format~subsection .default:n = { regular },
987 format~subsection / regular .code:n =
988 {
989 \let\gotham@subsectiontitleformat\@empty
990 % \cs_set_eq:NN \__gotham_subsection_title_format:n \__gotham_unchanged:n
991 },
992 format~subsection / lower .code:n =
993 {
994 \let\gotham@subsectiontitleformat \text_lowercase:n %\lowercase
995 % \cs_set_eq:NN \__gotham_subsection_title_format:n \text_lowercase:n
996 \PackageWarning{ gotham } { Be~aware~that~format~subsection=lower~can~lead~to~problems. }
997 },
998 format~subsection / upper .code:n =
999 {
1000 \let\gotham@subsectiontitleformat \text_uppercase:n %\uppercase
1001 % \cs_set_eq:NN \__gotham_subsection_title_format:n \text_uppercase:n
1002 \PackageWarning{ gotham } { Be~aware~that~format~subsection=upper~can~lead~to~problems. }
1003 },
1004 format~subsection / titlecase .code:n =
1005 {
1006 \let\gotham@subsectiontitleformat\text_titlecase_all:n %\Maketitlecase
1007 % \cs_set_eq:NN \__gotham_subsection_title_format:n \text_titlecase_all:n
1008 \PackageWarning{ gotham } { Be~aware~that~format~subsection=titlecase~can~lead~to~problems. }
1009 },
1010 format~subsection / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'\l_keys_value_tl'~is~unknown~for~the~(known)~option~'\l_keys_key_tl',~so~being~ignored. }{helping~message: format~subsection / unknown} },
1011 }
1012 \keys_define:nn { gotham / font }
1013 {
1014 % shape subsection
1015 shape~subsection .choice:,
1016 shape~subsection .usage:n = { general },
1017 shape~subsection .default:n = { regular },
1018 shape~subsection / regular .code:n =
1019 {
1020 \setbeamerfont{subsection~title}{shape=\normalfont}
1021 },
1022 shape~subsection / smallcaps .code:n =
1023 {
1024 \setbeamerfont{subsection~title}{shape=\scshape}
1025 },
1026 shape~subsection / italic .code:n =
1027 {
1028 \setbeamerfont{subsection~title}{shape=\itshape}
1029 },
1030 shape~subsection / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'\l_keys_value_tl'~is~unknown~for~the~(known)~option~'\l_keys_key_tl',~so~being~ignored. }{helping~message: shape~subsection / unknown} },
1031 }
1032
1033 \keys_define:nn { gotham / font }
1034 {
1035 % format subsubsection
1036 format~subsubsection .choice:,
1037 format~subsubsection .usage:n = { general },
1038 format~subsubsection .default:n = { regular },
1039 format~subsubsection / regular .code:n =
1040 {
1041 \let\gotham@subsubsectiontitleformat\@empty
1042 % \cs_set_eq:NN \__gotham_subsubsection_title_format:n \__gotham_unchanged:n
1043 },
1044 format~subsubsection / lower .code:n =
1045 {
1046 \let\gotham@subsubsectiontitleformat \text_lowercase:n %\lowercase
1047 % \cs_set_eq:NN \__gotham_subsubsection_title_format:n \text_lowercase:n
1048 \PackageWarning{ gotham } { Be~aware~that~format~subsubsection=lower~can~lead~to~problems. }
1049 },
1050 format~subsubsection / upper .code:n =
1051 {
1052 \let\gotham@subsubsectiontitleformat \text_uppercase:n %\uppercase
1053 % \cs_set_eq:NN \__gotham_subsubsection_title_format:n \text_uppercase:n
1054 \PackageWarning{ gotham } { Be~aware~that~format~subsubsection=upper~can~lead~to~problems. }
1055 },
1056 format~subsubsection / titlecase .code:n =
1057 {
1058 \let\gotham@subsubsectiontitleformat\text_titlecase_all:n %\Maketitlecase
1059 % \cs_set_eq:NN \__gotham_subsubsection_title_format:n \text_titlecase_all:n
1060 \PackageWarning{ gotham } { Be~aware~that~format~subsubsection=titlecase~can~lead~to~problems. }
1061 },
1062 format~subsubsection / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'\l_keys_value_tl'~is~unknown~for~the~(known)~option~'\l_keys_key_tl',~so~being~ignored. }{helping~message: format~subsubsection / unknown} },
1063 }
1064 \keys_define:nn { gotham / font }
1065 {
1066 % shape subsubsection
1067 shape~subsubsection .choice:,
1068 shape~subsubsection .usage:n = { general },
1069 shape~subsubsection .default:n = { regular },
1070 shape~subsubsection / regular .code:n =
1071 {
1072 \setbeamerfont{subsubsection~title}{shape=\normalfont}
1073 },
1074 shape~subsubsection / smallcaps .code:n =
1075 {
1076 \setbeamerfont{subsubsection~title}{shape=\scshape}
1077 },
1078 shape~subsubsection / italic .code:n =
1079 {
1080 \setbeamerfont{subsubsection~title}{shape=\itshape}
1081 },
1082 shape~subsubsection / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'\l_keys_value_tl'~is~unknown~for~the~(known)~option~'\l_keys_key_tl',~so~being~ignored. }{helping~message: shape~subsubsection / unknown} },
1083 }
1084 % \end{macrocode}
1085 % \end{macro}
1086 % \end{implementation}
1087
1088 % \begin{implementation}
1089 % \begin{macro}{Default font keys}
1090 % Apply default key options.
1091 % \UnitTested
1092 % \TestFiles{gotham-test-035}
1093 % \begin{macrocode}
1094 % when no value is given, default is called.
1095 \keys_set:nn { gotham / font } {
1096 format~title, shape~title,
1097 format~subtitle, shape~subtitle,
1098 format~frametitle, shape~frametitle,
1099 format~framesubtitle, shape~framesubtitle,
1100 format~part, shape~part,
1101 format~section, shape~section,
1102 format~subsection, shape~subsection,
1103 format~subsubsection, shape~subsubsection,
1104 }
1105 % \end{macrocode}
1106 % \end{macro}
1107 % \end{implementation}
1108
1109 % \begin{implementation}
1110 % \begin{macro}{Process font keys}
1111 % Process package options.
1112 % \UnitTested
1113 % \TestFiles{gotham-test-035}
1114 % \begin{macrocode}
1115 \ProcessKeyOptions[ gotham / font ]
1116 % \end{macrocode}
1117 % \end{macro}
1118 % \end{implementation}
1119 %
1120 % \begin{implementation}
1121 % \begin{macrocode}
1122 %\endinput
1123 %</font>
1124 % \end{macrocode}
1125 % \end{implementation}
1126 %
1127 %
1128 % ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1129 %
1130 %\begin{implementation}
1131 % \begin{macrocode}
1132 %<*color>
1133 \ProvidesExplPackage{beamercolorthemegotham}{2026-04-02}{1.2.5.a}{Gotham color theme}
1134 \RequirePackage{expl3}
1135 % \RequirePackage{xparse}
1136 \RequirePackage{xcolor}
1137 % \end{macrocode}
1138 % \end{implementation}
1139 %
1140 %
1141 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1142 %%%%%%%%%%%% COLOR %%%%%%%%%%%%%
1143 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1144 %
1145 % \begin{implementation}
1146 % \begin{variable}{\definecolor[named]{gAnthracite}, colors definition}
1147 % Definition of the Gotham colors.
1148 % \begin{macrocode}
1149 \definecolor[named]{gLightOrange}{HTML}{EB811B}
1150 \definecolor[named]{gLightGreen}{HTML}{14B03D}
1151 \definecolor[named]{gDeepBlue}{RGB}{42, 42, 255}
1152 \definecolor[named]{gDeepYellOr}{RGB}{255, 204, 0}
1153 \definecolor[named]{gAnthracite}{HTML}{2d3e50}
1154 \definecolor[named]{gLightTeal}{RGB}{172, 195, 210}
1155 \definecolor[named]{gPaleYell}{RGB}{255, 255, 240}
1156 \definecolor[named]{gDarkBlack}{gray}{0.1}
1157 \definecolor[named]{gDarkGrey}{gray}{0.25}
1158 \definecolor[named]{gMidGrey}{gray}{0.5}
1159 \definecolor[named]{gLightGrey}{gray}{0.9}
1160 % \end{macrocode}
1161 % \end{variable}
1162 % \end{implementation}
1163
1164 % \begin{documentation}
1165 % \begin{variable}{\colorlet{colorPale}, set gotham palette colors}
1166 % \begin{syntax}
1167 % \cs{colorlet} \marg{colorPale} \marg{gPaleYell}
1168 % \cs{colorlet} \marg{colorDark} \marg{gDarkBlack}
1169 % \cs{colorlet} \marg{colorA} \marg{gAnthracite}
1170 % \cs{colorlet} \marg{colorAreversed} \marg{gLightTeal}
1171 % \cs{colorlet} \marg{colorB} \marg{gMidGrey}
1172 % \cs{colorlet} \marg{colorC} \marg{gDeepYellOr}
1173 % \cs{colorlet} \marg{colorD} \marg{gLightOrange}
1174 % \cs{colorlet} \marg{colorE} \marg{gLightGreen}
1175 % \end{syntax}
1176 % Setup the colors use for presentations:
1177 % \begin{itemize}
1178 % \item |colorPale| is used for BG in light mode
1179 % \item |colorDark| is used for FG in light mode
1180 % \item |colorA| is used for frametitle and standout BG in light mode
1181 % \item |colorAreversed| is used for frametitle and standout BG in dark mode
1182 % \item |colorB| is used for progress bar and blocks BG
1183 % \item |colorC| is used for progress bar FG
1184 % \item |colorD| is used for alert FG/BG depending on the block mode
1185 % \item |colorE| is used for example FG/BG depending on the block mode
1186 % \end{itemize}
1187 % \end{variable}
1188 % \end{documentation}
1189 %%%%%%
1190 % \begin{implementation}
1191 % \begin{variable}{\colorlet{colorPale}, set gotham palette colors}
1192 % A set Gotham palette: a list of color variables easily adapted.
1193 % \begin{macrocode}
1194 % Define the color palette
1195 \@ifundefined{\string\color@colorAreversed}{
1196 % default colorset.
1197 \colorlet{colorPale}{gPaleYell} % BG in light/normal mode
1198 \colorlet{colorDark}{gDarkBlack} % FG in light/normal mode
1199 \colorlet{colorA}{gAnthracite} % frametitle, standin.out,
1200 \colorlet{colorAreversed}{gLightTeal} % frametitle, standin.in,
1201 \colorlet{colorB}{gMidGrey} % gray BG : progress bar, blocks
1202 \colorlet{colorC}{gDeepYellOr} % progress bar
1203 \colorlet{colorD}{gLightOrange} % alert
1204 \colorlet{colorE}{gLightGreen} % example
1205 }{
1206 % else nothing to do, colors are already defined.
1207 }
1208 \providecommand{\gothamHookPostColorBGSet}{}
1209 % \end{macrocode}
1210 % \end{variable}
1211 % \end{implementation}
1212
1213 % \begin{documentation}
1214 % \begin{variable}{\colorlet{colorBG}{colorPale}, set functional colors}
1215 % \begin{syntax}
1216 % \cs{colorlet} \marg{colorBG} \marg{colorPale}
1217 % \cs{colorlet} \marg{colorFG} \marg{colorDark}
1218 % \cs{colorlet} \marg{colorFrametitle} \marg{colorA}
1219 % \cs{colorlet} \marg{colorStandout} \marg{colorA}
1220 % \cs{colorlet} \marg{colorStandin} \marg{colorA}
1221 % \cs{colorlet} \marg{colorTitlepage} \marg{colorA}
1222 % \cs{colorlet} \marg{colorFiligrane} \marg{colorB}
1223 % \cs{colorlet} \marg{colorBackElement} \marg{colorB}
1224 % \cs{colorlet} \marg{colorProgBar} \marg{colorC}
1225 % \cs{colorlet} \marg{colorAlert} \marg{colorD}
1226 % \cs{colorlet} \marg{colorExample} \marg{colorE}
1227 % \end{syntax}
1228 % Setup the default color aliases used in the presentation theme definitions.
1229 % These aliases are partly redefined by dark/light/transparent modes.
1230 % \end{variable}
1231 % \end{documentation}
1232 %%%%%%
1233 % \begin{implementation}
1234 % \begin{variable}{\colorlet{colorBG}{colorPale}, set functional colors}
1235 % A set of variable easily adapted.
1236 % \begin{macrocode}
1237 % Define the color palette
1238 \colorlet{colorFG}{colorDark}
1239 \colorlet{colorBG}{colorPale}
1240 \colorlet{colorStandin}{colorPale}
1241 \colorlet{colorStandout}{colorA}
1242 \colorlet{colorFrametitle}{colorA}
1243 \colorlet{colorTitlepage}{colorA}
1244 \colorlet{colorFiligrane}{colorB}
1245 \colorlet{colorBackElement}{colorB}
1246 \colorlet{colorProgBar}{colorC}
1247 \colorlet{colorAlert}{colorD}
1248 \colorlet{colorExample}{colorE}
1249 % \end{macrocode}
1250 % \end{variable}
1251 % \end{implementation}
1252
1253 % \begin{implementation}
1254 % \begin{variable}{\l__gotham_color_assignation_prop:}
1255 % Define a map of color names used internally to the color set elements.
1256 % \changes{v1.2.3}{2025-11-04}{New}
1257 % \begin{macrocode}
1258 \prop_if_exist:NTF \l__gotham_color_assignation_prop
1259 {}{
1260 % if not defined than define it.
1261 \prop_new:N \l__gotham_color_assignation_prop
1262
1263 % Key value (by default)
1264 \prop_put:Nnn \l__gotham_color_assignation_prop {colorFG} {colorDark}
1265 \prop_put:Nnn \l__gotham_color_assignation_prop {colorBG} {colorPale}
1266 \prop_put:Nnn \l__gotham_color_assignation_prop {colorStandin} {colorPale}
1267 \prop_put:Nnn \l__gotham_color_assignation_prop {colorStandout} {colorA}
1268 \prop_put:Nnn \l__gotham_color_assignation_prop {colorFrametitle} {colorA}
1269 \prop_put:Nnn \l__gotham_color_assignation_prop {colorTitlepage} {colorA}
1270 \prop_put:Nnn \l__gotham_color_assignation_prop {colorFiligrane} {colorB}
1271 \prop_put:Nnn \l__gotham_color_assignation_prop {colorBackElement} {colorB}
1272 \prop_put:Nnn \l__gotham_color_assignation_prop {colorProgBar} {colorC}
1273 \prop_put:Nnn \l__gotham_color_assignation_prop {colorAlert} {colorD}
1274 \prop_put:Nnn \l__gotham_color_assignation_prop {colorExample} {colorE}
1275 }
1276 % \end{macrocode}
1277 % \end{variable}
1278 % \end{implementation}
1279
1280
1281 % \begin{implementation}
1282 % \begin{function}{\__gotham_reload_color:}
1283 % Command to reassign a color names used internally to its corresponding color element of the set.
1284 % This reassignation is done through the dedicated map.
1285 % \changes{v1.2.3}{2025-11-04}{New}
1286 % \TestFiles{gotham-test-1040}
1287 % \begin{macrocode}
1288 \cs_new_protected:Nn \__gotham_reload_color:{
1289 \colorlet{colorFG}{\prop_item:Nn \l__gotham_color_assignation_prop {colorFG}}
1290 \colorlet{colorBG}{\prop_item:Nn \l__gotham_color_assignation_prop {colorBG}}
1291 \colorlet{colorStandin}{\prop_item:Nn \l__gotham_color_assignation_prop {colorStandin}}
1292 \colorlet{colorStandout}{\prop_item:Nn \l__gotham_color_assignation_prop {colorStandout}}
1293 \colorlet{colorFrametitle}{\prop_item:Nn \l__gotham_color_assignation_prop {colorFrametitle}}
1294 \colorlet{colorTitlepage}{\prop_item:Nn \l__gotham_color_assignation_prop {colorTitlepage}}
1295 \colorlet{colorFiligrane}{\prop_item:Nn \l__gotham_color_assignation_prop {colorFiligrane}}
1296 \colorlet{colorBackElement}{\prop_item:Nn \l__gotham_color_assignation_prop {colorBackElement}}
1297 \colorlet{colorProgBar}{\prop_item:Nn \l__gotham_color_assignation_prop {colorProgBar}}
1298 \colorlet{colorAlert}{\prop_item:Nn \l__gotham_color_assignation_prop {colorAlert}}
1299 \colorlet{colorExample}{\prop_item:Nn \l__gotham_color_assignation_prop {colorExample}}
1300 }
1301 % \end{macrocode}
1302 % \end{function}
1303 % \end{implementation}
1304
1305 % \begin{documentation}
1306 % \begin{function}{\gothamReloadColors}
1307 % \begin{syntax}
1308 % \cs{gothamReloadColors}
1309 % \end{syntax}
1310 % Command to reassign a color names used internally to its corresponding color element of the set.
1311 % \end{function}
1312 % \end{documentation}
1313 %%%%%%
1314 % \begin{implementation}
1315 % \begin{function}{\gothamReloadColors}
1316 % Command accessible to users to call the reassignation of color names used internally.
1317 % \changes{v1.2.3}{2025-11-04}{New}
1318 % \TestFiles{gotham-test-1040}
1319 % \begin{macrocode}
1320 \providecommand{\gothamReloadColors}{
1321 \__gotham_reload_color:
1322 }
1323 % \end{macrocode}
1324 % \end{function}
1325 % \end{implementation}
1326
1327 % \begin{implementation}
1328 % \begin{function}{\__gotham_color_set_style_anthracite:}
1329 % Command to activate anthracite colorset.
1330 % \changes{v1.2.3}{2025-11-04}{reload all colors from function}
1331 % \TestFiles{gotham-test-1037}
1332 % \begin{macrocode}
1333 \cs_new_protected:Nn \__gotham_color_set_style_anthracite:{
1334 \colorlet{colorPale}{gPaleYell} % BG in light/normal mode
1335 \colorlet{colorDark}{gDarkBlack} % FG in light/normal mode
1336 \colorlet{colorA}{gAnthracite} % frametitle, standin.out,
1337 \colorlet{colorAreversed}{gLightTeal} % frametitle, standin.in,
1338 \colorlet{colorB}{gMidGrey} % gray BG : progress bar, blocks
1339 \colorlet{colorC}{gDeepYellOr} % progress bar
1340 \colorlet{colorD}{gLightOrange} % alert
1341 \colorlet{colorE}{gLightGreen} % example
1342 \__gotham_reload_color:
1343 }
1344 % \end{macrocode}
1345 % \end{function}
1346 % \end{implementation}
1347
1348 % \begin{implementation}
1349 % \begin{function}{\__gotham_color_set_style_red:}
1350 % Command to activate red colorset.
1351 % \changes{v1.2.3}{2025-11-04}{reload all colors from function}
1352 % \TestFiles{gotham-test-1037, gotham-test-1040}
1353 % \begin{macrocode}
1354 \cs_new_protected:Nn \__gotham_color_set_style_red:{
1355 \colorlet{colorPale}{gPaleYell} % BG in light/normal mode
1356 \colorlet{colorDark}{gDarkBlack} % FG in light/normal mode
1357 \colorlet{colorA}{red} % frametitle, standin.out,
1358 \colorlet{colorAreversed}{gLightTeal} % frametitle, standin.in,
1359 \colorlet{colorB}{gMidGrey} % gray BG : progress bar, blocks
1360 \colorlet{colorC}{gDeepYellOr} % progress bar
1361 \colorlet{colorD}{gLightOrange} % alert
1362 \colorlet{colorE}{gLightGreen} % example
1363 \__gotham_reload_color:
1364 }
1365 % \end{macrocode}
1366 % \end{function}
1367 % \end{implementation}
1368
1369
1370 % \begin{implementation}
1371 % \begin{variable}{\providebool{darkBG}, \providebool{transparentBG}}
1372 % Variable to track color setup.
1373 % \begin{macrocode}
1374 % \providebool{reversedColor}
1375 % \boolfalse{reversedColor}
1376 \providebool{darkBG}
1377 \boolfalse{darkBG}
1378 \providebool{transparentBG}
1379 \booltrue{transparentBG}
1380 % \end{macrocode}
1381 % \end{variable}
1382 % \end{implementation}
1383
1384 % \begin{implementation}
1385 % \begin{function}{\__gotham_color_set_darkBG:}
1386 % Command to activate dark mode
1387 % \changes{v1.2.0}{2024-11-11}{add hook after colorset}
1388 % \changes{v1.2.2}{2025-07-02}{reload all colors to apply changes from users}
1389 % \changes{v1.2.3}{2025-11-04}{change map and reload all colors from function}
1390 % \TestFiles{gotham-test-037, gotham-test-1037, gotham-test-055}
1391 % \begin{macrocode}
1392 \cs_new_protected:Nn \__gotham_color_set_darkBG:{
1393 \booltrue{darkBG}
1394 \boolfalse{transparentBG}
1395 \prop_put:Nnn \l__gotham_color_assignation_prop {colorStandin} {colorFG}
1396 \prop_put:Nnn \l__gotham_color_assignation_prop {colorStandout} {colorAreversed}
1397 \prop_put:Nnn \l__gotham_color_assignation_prop {colorFrametitle} {colorAreversed}
1398 \prop_put:Nnn \l__gotham_color_assignation_prop {colorTitlepage} {colorAreversed}
1399
1400 %%% adapt and reload
1401 \__gotham_reload_color:
1402
1403 %%% dark
1404 \setbeamercolor{normal~text}{
1405 fg=colorBG,
1406 bg=colorFG,
1407 }
1408 \usebeamercolor[fg]{normal~text}
1409 \setbeamercolor{primary~palette}{
1410 % reversed color compared to normal text
1411 use=normal~text,
1412 fg=normal~text.bg,
1413 bg=normal~text.fg
1414 }
1415 \gothamHookPostColorBGSet{}
1416 }
1417 % \end{macrocode}
1418 % \end{function}
1419 % \end{implementation}
1420
1421 % \begin{implementation}
1422 % \begin{function}{\__gotham_color_set_lightBG:}
1423 % Command to activate light background.
1424 % \changes{v1.2.0}{2024-11-11}{add hook after colorset}
1425 % \changes{v1.2.2}{2025-07-02}{reload all colors to apply changes from users}
1426 % \changes{v1.2.3}{2025-11-04}{change map and reload all colors from function}
1427 % \TestFiles{gotham-test-037, gotham-test-1037, gotham-test-055}% \begin{macrocode}
1428 \cs_new_protected:Nn \__gotham_color_set_lightBG:{
1429 \boolfalse{darkBG}
1430 \boolfalse{transparentBG}
1431 \prop_put:Nnn \l__gotham_color_assignation_prop {colorStandin} {colorBG}
1432 \prop_put:Nnn \l__gotham_color_assignation_prop {colorStandout} {colorA}
1433 \prop_put:Nnn \l__gotham_color_assignation_prop {colorFrametitle} {colorA}
1434 \prop_put:Nnn \l__gotham_color_assignation_prop {colorTitlepage} {colorA}
1435
1436 %%% adapt and reload
1437 \__gotham_reload_color:
1438
1439 %%% light
1440 \setbeamercolor{normal~text}{
1441 fg=colorFG,
1442 bg=colorBG
1443 }
1444 \usebeamercolor[fg]{normal~text}
1445 \setbeamercolor{primary~palette}{
1446 % reversed color compared to normal text
1447 use=normal~text,
1448 fg=normal~text.bg,
1449 bg=normal~text.fg
1450 }
1451 \gothamHookPostColorBGSet{}
1452 }
1453 % \end{macrocode}
1454 % \end{function}
1455 % \end{implementation}
1456
1457 % \begin{implementation}
1458 % \begin{function}{\__gotham_color_set_transparentBG:}
1459 % Command to activate transparent background.
1460 % \changes{v1.2.0}{2024-11-11}{add hook after colorset}
1461 % \changes{v1.2.2}{2025-07-02}{reload all colors to apply changes from users}
1462 % \changes{v1.2.3}{2025-11-04}{change map and reload all colors from function}
1463 % \TestFiles{gotham-test-037, gotham-test-1037, gotham-test-055}% \begin{macrocode}
1464 % \providecommand{\gotham@colors@transparent}{
1465 \cs_new_protected:Nn \__gotham_color_set_transparentBG:{
1466 \boolfalse{darkBG}
1467 \booltrue{transparentBG}
1468 {\usebeamercolor[bg]{normal~text}\colorlet{colorStandin}{bg}}% this is not working because the colorlet is not kept outside of the {} environment...
1469 % \usebeamercolor{normal~text} % reset % NOT working neither
1470 \prop_put:Nnn \l__gotham_color_assignation_prop {colorStandin} {colorBG} % since the two previous lines are not working, let define it like light-bg
1471 \prop_put:Nnn \l__gotham_color_assignation_prop {colorStandout} {colorA}
1472 \prop_put:Nnn \l__gotham_color_assignation_prop {colorFrametitle} {colorA}
1473 \prop_put:Nnn \l__gotham_color_assignation_prop {colorTitlepage} {colorA}
1474
1475 %%% adapt and reload
1476 \__gotham_reload_color:
1477
1478 %%% transparent like light background.
1479 \setbeamercolor{normal~text}{
1480 fg=colorFG,
1481 bg=,
1482 }
1483 \usebeamercolor[fg]{normal~text}
1484 \setbeamercolor{primary~palette}{
1485 % reversed color compared to normal text
1486 use=normal~text,
1487 fg=colorBG,
1488 bg=normal~text.fg
1489 }
1490 \gothamHookPostColorBGSet{}
1491 }
1492 % \end{macrocode}
1493 % \end{function}
1494 % \end{implementation}
1495
1496 % \begin{implementation}
1497 % \begin{function}{\__gotham_color_set_transparent_block:}
1498 % Command to activate transparent block.
1499 % \TestFiles{gotham-test-037}
1500 % \begin{macrocode}
1501 \cs_new_protected:Nn \__gotham_color_set_transparent_block:{
1502 \setbeamercolor{block~title}{
1503 use=normal~text,
1504 fg=normal~text.fg,
1505 bg=
1506 }
1507 \setbeamercolor{block~body}{
1508 bg=
1509 }
1510 \setbeamercolor{alerted~text}{
1511 fg=colorAlert
1512 }
1513 \setbeamercolor{example~text}{
1514 fg=colorExample
1515 }
1516 \setbeamercolor{block~title~example}{
1517 use={block~title, example~text},
1518 bg=block~title.bg,
1519 fg=example~text.fg
1520 }
1521 \setbeamercolor{block~title~alerted}{
1522 use={block~title, alerted~text},
1523 bg=block~title.bg,
1524 fg=alerted~text.fg
1525 }
1526 }
1527 % \end{macrocode}
1528 % \end{function}
1529 % \end{implementation}
1530
1531 % \begin{implementation}
1532 % \begin{function}{\__gotham_color_set_fill_block:}
1533 % Command to activate fill block.
1534 % \TestFiles{gotham-test-037}
1535 % \begin{macrocode}
1536 \cs_new_protected:Nn \__gotham_color_set_fill_block:{
1537 \setbeamercolor{block~title}{
1538 fg=colorBackElement!10!normal~text.fg,
1539 bg=colorBackElement!135!fg
1540 }
1541 \setbeamercolor{block~body}{
1542 use={block~title, normal~text},
1543 bg=block~title.bg!50!normal~text.bg
1544 }
1545 \setbeamercolor{alerted~text}{
1546 fg=colorAlert
1547 }
1548 \setbeamercolor{example~text}{
1549 fg=colorExample
1550 }
1551 \setbeamercolor{block~title~example}{
1552 use={block~title, example~text},
1553 bg=block~title.bg,
1554 fg=example~text.fg
1555 }
1556 \setbeamercolor{block~title~alerted}{
1557 use={block~title, alerted~text},
1558 bg=block~title.bg,
1559 fg=alerted~text.fg
1560 }
1561 }% \end{macrocode}
1562 % \end{function}
1563 % \end{implementation}
1564
1565 % \begin{implementation}
1566 % \begin{function}{\__gotham_color_set_native_block:}
1567 % Command to activate native block.
1568 % \TestFiles{gotham-test-037}
1569 % \begin{macrocode}
1570 \cs_new_protected:Nn \__gotham_color_set_native_block:{
1571 \setbeamercolor{block~title}{
1572 fg=colorPale,
1573 bg=colorBackElement!90!fg
1574 }
1575 \setbeamercolor{block~body}{
1576 use={block~title, normal~text},
1577 bg=block~title.bg!50!normal~text.bg
1578 }
1579 \setbeamercolor{alerted~text}{
1580 fg=colorAlert
1581 }
1582 % With native block, we have to let alerted text with a visible color (not pale) to keep alert visible (cf test-1005).
1583 % So, we have to create an extra color: alertedBlock~text.
1584 \setbeamercolor{alertedBlock~text}{
1585 fg=colorPale
1586 }
1587 \setbeamercolor{example~text}{
1588 fg=colorPale
1589 }
1590 \setbeamercolor{block~title~alerted}{
1591 use={block~title, alertedBlock~text},
1592 bg=colorAlert,
1593 fg=alertedBlock~text.fg
1594 }
1595 \setbeamercolor{block~title~example}{
1596 use={block~title, example~text},
1597 bg=colorExample,
1598 fg=example~text.fg
1599 }
1600 }
1601 % \end{macrocode}
1602 % \end{function}
1603 % \end{implementation}
1604
1605 % \begin{implementation}
1606 % \begin{macro}{Gotham color adaptation}
1607 % Set colors variable from Gotham color setup that needs specific adaptation, i.e. |structure| as mentioned in Beamer documentation and |progress bar| since it is a new feature.
1608 % \UnitTested
1609 % \TestFiles{gotham-test-037}
1610 % \begin{macrocode}
1611 \setbeamercolor{structure}{use=normal~text, fg=normal~text.fg}
1612 \setbeamercolor{progress~bar}{
1613 use=alerted~text,
1614 fg=colorProgBar,
1615 bg=alerted~text.fg!50!black!30
1616 }
1617 % \end{macrocode}
1618 % \end{macro}
1619 % \end{implementation}
1620
1621 % \begin{implementation}
1622 % \begin{macro}{Usual color env}
1623 % Set colors variable from Gotham color setup.
1624 % The titles and structural elements (e.g. |itemize| bullets) are set in the same color as |normal text|.
1625 % This would ideally done by setting |normal text| as a parent style, which we do to set |titlelike|, but this doesn't work for |structure| as its foreground is set explicitly in |beamercolorthemedefault.sty|.
1626 % \UnitTested
1627 % \TestFiles{gotham-test-037}
1628 % \begin{macrocode}
1629 \setbeamercolor{titlelike}{use=normal~text, parent=normal~text}
1630 \setbeamercolor{author}{use=normal~text, parent=normal~text}
1631 \setbeamercolor{date}{use=normal~text, parent=normal~text}
1632 \setbeamercolor{institute}{use=normal~text, parent=normal~text}
1633 \setbeamercolor{frametitle}{
1634 use=primary~palette,
1635 parent=primary~palette,
1636 bg=colorFrametitle
1637 }
1638 % The Gotham inner or outer themes optionally display progress bars in various locations.
1639 % Their color is set by |progress bar| but the two different kinds can be customized separately.
1640 % The horizontal rule on the title page is also set based on the progress bar color and can be customized with |title separator|.
1641 \setbeamercolor{title~separator}{
1642 use=progress~bar,
1643 parent=progress~bar
1644 }
1645 \setbeamercolor{progress~bar~in~head/foot}{%
1646 use=progress~bar,
1647 parent=progress~bar
1648 }
1649 \setbeamercolor{progress~bar~in~part~page}{
1650 use=progress~bar,
1651 parent=progress~bar
1652 }
1653 \setbeamercolor{progress~bar~in~section~page}{
1654 use=progress~bar,
1655 parent=progress~bar
1656 }
1657 \setbeamercolor{progress~bar~in~splitvert}{
1658 use=progress~bar,
1659 parent=progress~bar
1660 }
1661 % \setbeamercolor{progress~bar~in~subsection~page}{
1662 % use=progress~bar,
1663 % parent=progress~bar
1664 % }
1665 % \setbeamercolor{progress~bar~in~subsubsection~page}{
1666 % use=progress~bar,
1667 % parent=progress~bar
1668 % }
1669 %
1670 % Blocks
1671 \setbeamercolor{block~body~alerted}{use=block~body, parent=block~body}
1672 \setbeamercolor{block~body~example}{use=block~body, parent=block~body}
1673 %
1674 % Footnote
1675 \setbeamercolor{footnote}{fg=normal~text.fg!90}
1676 \setbeamercolor{footnote~mark}{fg=.}
1677 %
1678 % Bibliography
1679 %
1680 % We also reset the bibliography colors in order to pick up the surrounding colors at the time of use.
1681 % This prevents us having to set the correct color in normal and standout mode.
1682 % \setbeamercolor{bibliography entry author}{fg=, bg=}
1683 % \setbeamercolor{bibliography entry title}{fg=, bg=}
1684 % \setbeamercolor{bibliography entry location}{fg=, bg=}
1685 % \setbeamercolor{bibliography entry note}{fg=, bg=}
1686 % \end{macrocode}
1687 % \end{macro}
1688 % \end{implementation}
1689
1690 % \begin{implementation}
1691 % \begin{macro}{new color environments}
1692 % Set up colors for the the new beamer environment used by the theme.
1693 % \UnitTested
1694 % \TestFiles{gotham-test-037}
1695 % \begin{macrocode}
1696 % \setbeamercolor{frametitleSection}{use=primary~palette, bg=, fg=primary~palette.bg}
1697 \setbeamercolor{frametitleSection}{use=structure,fg=structure.bg}
1698
1699 \setbeamercolor{standout}{use=primary~palette, bg=colorStandout, fg=primary~palette.bg}
1700 \setbeamercolor{standin}{use=normal~text, bg=colorStandin, fg=normal~text.fg}
1701
1702 \setbeamercolor{section~in~toc}{use=normal~text, parent=normal~text,}
1703 \setbeamercolor{subsection~in~toc}{use=normal~text, parent=normal~text,}
1704 \setbeamercolor{subsubsection~in~toc}{use=normal~text, parent=normal~text,}
1705 \setbeamercolor{footlineRule}{use=normal~text, parent=normal~text,}
1706 % \end{macrocode}
1707 % \end{macro}
1708 % \end{implementation}
1709
1710 % \begin{documentation}
1711 % \begin{function}{\usecolortheme}
1712 % \begin{syntax}
1713 % \cs{usecolortheme}\oarg{option1=value1, ...}\marg{gotham}
1714 % \textrm{where the options are (default marked as} \defopt{default}\textrm{):}
1715 % \meta{background} = \oarg{\defopt{transparent} \textbar light \textbar dark}
1716 % \meta{block} = \oarg{\defopt{native} \textbar fill \textbar transparent}
1717 % \meta{colorset} = \oarg{\defopt{anthracite} \textbar red }
1718 % \end{syntax}
1719 % The 'package' (usecolortheme) options can control color mode (dark, ligh or transparent background) and the block (native or fill or transparent).
1720 % Block environments such as |theorem| and |example| have no background color by default.
1721 % The option |block=fill| sets a background color based on the background and foreground of |normal text|.
1722 % The option |block=transparent| reverts the block environments to an empty background, which can be useful if changing colors mid-presentation.
1723 % The option |colorset=red| changes the colorset used to define a color theme.
1724 % \end{function}
1725 % \end{documentation}
1726 %%%%
1727 % \begin{implementation}
1728 % \begin{macro}{color key -- interface}
1729 % Controls the background mode (dark, ligh or transparent background) and the block (fill or transparent) and colorset (anthracite, red, blue, green, etc).
1730 % \UnitTested
1731 % \TestFiles{gotham-test-037}
1732 % \begin{macrocode}
1733 \keys_define:nn { gotham / color }
1734 {
1735 % block
1736 block .choice:,
1737 block .usage:n = { general },
1738 block .default:n = { native },
1739 block / native .code:n = { \__gotham_color_set_native_block: },
1740 block / transparent .code:n = { \__gotham_color_set_transparent_block: },
1741 block / fill .code:n = { \__gotham_color_set_fill_block: },
1742 block / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'\l_keys_value_tl'~is~unknown~for~the~(known)~option~'\l_keys_key_tl',~so~being~ignored. }{helping~message: block / unknown} },
1743 }
1744
1745 \keys_define:nn { gotham / color }
1746 {
1747 % background
1748 background .choice:,
1749 background .usage:n = { general },
1750 background .default:n = { transparent },
1751 background / transparent .code:n = { \__gotham_color_set_transparentBG: },
1752 background / light .code:n = { \__gotham_color_set_lightBG: },
1753 background / dark .code:n = { \__gotham_color_set_darkBG: },
1754 background / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'\l_keys_value_tl'~is~unknown~for~the~(known)~option~'\l_keys_key_tl',~so~being~ignored. }{helping~message: background / unknown} },
1755 }
1756
1757 \keys_define:nn { gotham / color }
1758 {
1759 % colorset
1760 colorset .choice:,
1761 colorset .usage:n = { general },
1762 colorset .default:n = { anthracite },
1763 colorset / anthracite .code:n = { \__gotham_color_set_style_anthracite: },
1764 colorset / red .code:n = { \__gotham_color_set_style_red: },
1765 % colorset / blue .code:n = { },
1766 % colorset / green .code:n = { },
1767 % colorset / orange .code:n = { },
1768 % colorset / teal .code:n = { },
1769 colorset / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'\l_keys_value_tl'~is~unknown~for~the~(known)~option~'\l_keys_key_tl',~so~being~ignored. }{helping~message: colorset / unknown} },
1770 }
1771 % \end{macrocode}
1772 % \end{macro}
1773 % \end{implementation}
1774
1775 % \begin{implementation}
1776 % \begin{macro}{Default color keys}
1777 % Apply default key options.
1778 % \UnitTested
1779 % \TestFiles{gotham-test-037}
1780 % \begin{macrocode}
1781 % when no value is given, default is called.
1782 \keys_set:nn { gotham / color } { background, block, colorset }
1783 % \end{macrocode}
1784 % \end{macro}
1785 % \end{implementation}
1786
1787 % \begin{implementation}
1788 % \begin{macro}{Process color keys}
1789 % Process package options.
1790 % \UnitTested
1791 % \TestFiles{gotham-test-037}
1792 % \begin{macrocode}
1793 \ProcessKeyOptions[ gotham / color ]
1794 \mode<all>
1795 % \end{macrocode}
1796 % \end{macro}
1797 % \end{implementation}
1798 %
1799 %
1800 % \begin{implementation}
1801 % \begin{macrocode}
1802 %\endinput
1803 %</color>
1804 % \end{macrocode}
1805 % \end{implementation}
1806 %
1807 % ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1808 %
1809 %
1810 %\begin{implementation}
1811 % \begin{macrocode}
1812 %<*inner>
1813 \ProvidesExplPackage{beamerinnerthemegotham}{2026-04-02}{1.2.5.a}{gotham inner theme}
1814 \RequirePackage{expl3}
1815 % \RequirePackage{xparse}
1816 \RequirePackage{calc}
1817 % \RequirePackage{xfp}
1818 \RequirePackage{tikz}
1819 % \end{macrocode}
1820 % \end{implementation}
1821 %
1822 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1823 %%%%%%%%%%%% INNER %%%%%%%%%%%%%
1824 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1825 %
1826 % \begin{implementation}
1827 % A |beamer| inner theme dictates the style of the frame elements traditionally set in the ``body'' of each slide. These include:
1828 % \begin{itemize}
1829 % \item title page;
1830 % \item backgrounds;
1831 % \item standin/out;
1832 % \item part, section etc, pages;
1833 % \item table of content pages (including for sections...);
1834 % \item environement elements: \begin{itemize}
1835 % \item itemize, enumerate, and description environments;
1836 % \item block environments including theorems and proofs;
1837 % \item figures and tables; and
1838 % \item footnotes and plain text.
1839 % \end{itemize}
1840 % \end{itemize}
1841 % \end{implementation}
1842 %
1843 %
1844
1845 %%% Titlepage %%%
1846 %%%%%%%%%%%%%%%%%%%
1847 %
1848 % \begin{implementation}
1849 % \begin{macro}{Compitibility mode for colors}
1850 % FROM COLOR THEME: useful to provide this recall when the inner theme is loaded without the color theme.
1851 % \begin{macrocode}
1852 \@ifundefined{\string\color@colorProgBar}{
1853 \providebool{darkBG} \boolfalse{darkBG}
1854 \providebool{transparentBG} \booltrue{transparentBG}
1855 \colorlet{colorBG}{white}
1856 \colorlet{colorFG}{black}
1857 \colorlet{colorFrametitle}{purple}
1858 \colorlet{colorStandout}{purple}
1859 \colorlet{colorStandin}{purple}
1860 \colorlet{colorTitlepage}{purple}
1861 \colorlet{colorFiligrane}{gray}
1862 \colorlet{colorBackElement}{gray}
1863 \colorlet{colorProgBar}{orange}
1864 \colorlet{colorAlert}{red}
1865 \colorlet{colorExample}{green}
1866 \setbeamercolor{progress~bar}{
1867 use=alerted~text,
1868 fg=colorProgBar,
1869 bg=alerted~text.fg!50!black!30
1870 }
1871 \setbeamercolor{progress~bar~in~head/foot}{%
1872 use=progress~bar,
1873 parent=progress~bar
1874 }
1875 \setbeamercolor{progress~bar~in~part~page}{
1876 use=progress~bar,
1877 parent=progress~bar
1878 }
1879 \setbeamercolor{progress~bar~in~section~page}{
1880 use=progress~bar,
1881 parent=progress~bar
1882 }
1883 \setbeamercolor{progress~bar~in~splitvert}{
1884 use=progress~bar,
1885 parent=progress~bar
1886 }
1887 \setbeamercolor{frametitleSection}{use=primary~palette, bg=, fg=primary~palette.bg}
1888 \setbeamercolor{standout}{use=primary~palette, bg=colorStandout, fg=primary~palette.bg}
1889 \setbeamercolor{standin}{use=normal~text, bg=colorStandin, fg=normal~text.fg}
1890 \setbeamercolor{section~in~toc}{use=normal~text, parent=normal~text,}
1891 \setbeamercolor{subsection~in~toc}{use=normal~text, parent=normal~text,}
1892 \setbeamercolor{subsubsection~in~toc}{use=normal~text, parent=normal~text,}
1893 }{
1894 % else the colors are defined: this is fine.
1895 }
1896 % \end{macrocode}
1897 % \end{macro}
1898 % \end{implementation}
1899
1900 % \begin{implementation}
1901 % \begin{macro}{\maketitle,\titlepage}
1902 % Normal people should use |\maketitle| or |\titlepage| instead of using the |title page| beamer template directly.
1903 % Beamer already defines these macros, but we patch them here to make the title page |[plain]| by default, remove |\@thanks|, and ensure the title frame number doesn't count.
1904 % Inserts the title frame, or causes the current frame to use the |title page| template.
1905 % \changes{v1.2.0}{2024-11-11}{add vertically centered}
1906 % \UnitTested
1907 % \TestFiles{gotham-test-038}
1908 % \begin{macrocode}
1909 \def\maketitle{
1910 \ifbeamer@inframe
1911 \titlepage
1912 \else
1913 \frame[plain, c, noframenumbering]{\titlepage}
1914 \fi
1915 }
1916 \def\titlepage{
1917 % \setkeys{beamerframe}{c} % no effect
1918 % \setkeys{beamerframe}{plain} % no effect
1919 % \setbeamertemplate{footline}[empty] % no effect
1920 % \setkeys{beamerframe}{nofootline} % create error of unclosed env
1921 \usebeamertemplate{title~page}
1922 }
1923 % \end{macrocode}
1924 % \end{macro}
1925 % \end{implementation}
1926
1927 % \begin{implementation}
1928 % \begin{macro}{\defbeamertemplate{title~graphic}{gotham}}
1929 % Definition of elements templates that will be used in titlepage.
1930 % \UnitTested
1931 % \TestFiles{gotham-test-038}
1932 % \begin{macrocode}
1933 \defbeamertemplate*{title~graphic}{gotham}{
1934 % \vbox to 0pt {% %%%%% MODIFIED !
1935 \vbox{
1936 % \vspace*{2em} %%%%% COMMENT ADDED !
1937 \inserttitlegraphic
1938 }
1939 \nointerlineskip
1940 }
1941 \defbeamertemplate*{title}{gotham}{
1942 %\raggedright% %%%%% COMMENT ADDED !
1943 \linespread{1.0}
1944 \inserttitle
1945 \par
1946 \vspace*{0.5em}
1947 }
1948 \defbeamertemplate*{subtitle}{gotham}{
1949 %\raggedright% %%%%% COMMENT ADDED !
1950 \insertsubtitle
1951 \par
1952 \vspace*{0.5em}
1953 }
1954 \defbeamertemplate*{author}{gotham}{
1955 \vspace*{1.em}
1956 \insertauthor
1957 \par
1958 \vspace*{0.25em}
1959 }
1960 \defbeamertemplate*{date}{gotham}{
1961 \insertdate
1962 \par
1963 }
1964 \defbeamertemplate*{institute}{gotham}{
1965 \vspace*{3mm}
1966 \insertinstitute
1967 \par
1968 }
1969 % \end{macrocode}
1970 % \end{macro}
1971 % \end{implementation}
1972
1973 % \begin{implementation}
1974 % \begin{variable}{\l__gotham_titleseparator_width_dim, \l__gotham_titleseparator_height_dim, \l__gotham_title_width_dim, \l__gotham_subtitle_width_dim, \l__gotham_title_max_width_dim}
1975 % Define the new lengths that will be used for titlepage templates.
1976 % \begin{macrocode}
1977 \dim_new:N \l__gotham_titleseparator_width_dim
1978 \dim_set:Nn \l__gotham_titleseparator_width_dim {\textwidth}
1979 \dim_new:N \l__gotham_titleseparator_height_dim
1980 \dim_set:Nn \l__gotham_titleseparator_height_dim {2pt}
1981 % \newlength{\titlewidth}
1982 % \newlength{\subtitlewidth}
1983 % \newlength{\maxwidth}
1984 \dim_new:N \l__gotham_title_width_dim
1985 \dim_new:N \l__gotham_subtitle_width_dim
1986 \dim_new:N \l__gotham_title_max_width_dim
1987 % \end{macrocode}
1988 % \end{variable}
1989 % \end{implementation}
1990
1991 % \begin{implementation}
1992 % \begin{variable}{\defbeamertemplate*{title~separator}{gotham}}
1993 % Define a new template for ``line'' displayed on some titlepage templates.
1994 % \begin{macrocode}
1995 \defbeamertemplate*{title~separator}{gotham}{
1996 \begin{tikzpicture}
1997 % \fill[fg] (0,0) rectangle (\gotham@titleseparator@linewidth, \gotham@titleseparator@lineheight);
1998 \fill[fg] (0,0) rectangle
1999 (\dim_use:N \l__gotham_titleseparator_width_dim,
2000 \dim_use:N \l__gotham_titleseparator_height_dim);
2001 \end{tikzpicture}
2002 \par
2003 }
2004 % \end{macrocode}
2005 % \end{variable}
2006 % \end{implementation}
2007
2008 % \begin{documentation}
2009 % \begin{variable}{\gothamtitlepagelogo}
2010 % The command to insert the institute logo on title page.
2011 % This command is left empty by default, to be redefined by users
2012 % \end{variable}
2013 % \end{documentation}
2014 %%%%
2015 % \begin{implementation}
2016 % \begin{variable}{\gothamtitlepagelogo}
2017 % \UnitTested
2018 % \TestFiles{gotham-test-038}
2019 % \begin{macrocode}
2020 \providecommand{\gothamtitlepagelogo}{}
2021 % \end{macrocode}
2022 % \end{variable}
2023 % \end{implementation}
2024
2025 % \begin{documentation}
2026 % \begin{variable}{\gothamtitlepagebg}
2027 % The command to insert the background title page
2028 % This command is left empty by default, to be redefined by users
2029 % \end{variable}
2030 % \end{documentation}
2031 %%%%%
2032 % \begin{implementation}
2033 % \begin{variable}{\gothamtitlepagebg}
2034 % \UnitTested
2035 % \TestFiles{gotham-test-038}
2036 % \begin{macrocode}
2037 \providecommand{\gothamtitlepagebg}{}
2038 % \end{macrocode}
2039 % \end{variable}
2040 % \end{implementation}
2041
2042 % \begin{implementation}
2043 % \begin{macro}{\defbeamertemplate{title~page}{gotham~normal}}
2044 % Template for the normal gotham title page.
2045 % Each element is only typeset if it is defined by the user.
2046 % If |\subtitle| is empty, for example, it won't leave a blank space on the title slide.
2047 % \changes{v1.2.0}{2024-11-11}{length of subtitle}
2048 % \changes{v1.2.3}{2025-07-27}{adapt margins}
2049 % \UnitTested
2050 % \TestFiles{gotham-test-038, gotham-test-056, gotham-test-1027}
2051 % \begin{macrocode}
2052
2053 % Beamer's definition of |\insertauthor| is always nonempty, so we have to test another macro initialized by |\author{...}| to see if the user has defined an author.
2054 % This solution was suggested by Sam Carter in an answer to \href{https://tex.stackexchange.com/questions/241306/}{this Stack Exchange question}.
2055
2056 \defbeamertemplate{title~page}{gotham~normal}{
2057 \ifx\insertframetitle\@empty\else\vspace*{-3em}\fi
2058 \begin{picture}(0,0)
2059 % the background covering the whole page
2060 \put(-30,-125){\noindent
2061 \fcolorbox{normal~text.bg}{normal~text.bg}{
2062 \begin{minipage}[b][\paperheight]{\paperwidth}
2063 \hfil
2064 \end{minipage}
2065 }
2066 }
2067
2068 % The text: title, author, institute, etc.
2069 \put(-3.4,-125){\noindent
2070 \fcolorbox{normal~text.bg}{normal~text.bg}{
2071 \begin{minipage}[b][\paperheight]{\textwidth}
2072 \parbox[c][0pt][c]{0pt}{\gothamtitlepagebg}
2073 \centering
2074 \vfill
2075 \ifx\inserttitle\@empty\else
2076 \parbox{0.99\textwidth}{\centering
2077 \usebeamertemplate*{title}
2078 }\\[1.ex]
2079 \fi
2080 \ifx\insertsubtitle\@empty\else
2081 \parbox{0.99\textwidth}{\centering
2082 \usebeamertemplate*{subtitle}
2083 }\\[2.ex]
2084 \fi
2085 % \hspace*{-0pt}
2086 \usebeamertemplate*{title~separator}
2087 % from above patch
2088 \expandafter\ifblank\expandafter{\beamer@andstripped}{
2089 % empty author
2090 \vspace*{1.em}
2091 }{
2092 \usebeamertemplate*{author}
2093 }
2094 \ifx\insertdate\@empty\else\usebeamertemplate*{date}\fi
2095 \ifx\insertinstitute\@empty\else{\parbox{0.95\textwidth}{\raggedright\usebeamertemplate*{institute}} }\fi
2096 \vfill
2097 \vbox{}
2098 \end{minipage}
2099 }
2100 % end third argument of fcolorobx
2101 }
2102
2103 % the institute logo on title page
2104 \put(234,-120){
2105 \gothamtitlepagelogo
2106 }
2107
2108 % the extra logos on title page (\inserttitlegraphic)
2109 \put(0,-123){
2110 \noindent\vbox{
2111 \begin{minipage}[b][0.96\paperheight]{\paperwidth}
2112 \ifx\inserttitlegraphic\@empty\else\usebeamertemplate*{title~graphic}\fi
2113 \end{minipage}
2114 }
2115 }
2116 \end{picture}
2117 }
2118 % \end{macrocode}
2119 % \end{macro}
2120 % \end{implementation}
2121
2122 % \begin{implementation}
2123 % \begin{macro}{\defbeamertemplate{title~page}{gotham~reversed}}
2124 % With a similarly layout to gotham normal, but this template inverses the background and foreground colors compared to the color mode chose (dark, light or transparent).
2125 % \UnitTested
2126 % \TestFiles{gotham-test-038}
2127 % \begin{macrocode}
2128 \defbeamertemplate{title~page}{gotham~reversed}{
2129 \begin{picture}(0,0)
2130 % The background picture
2131 \put(-28,-128){\gothamtitlepagebg}
2132
2133 % The text: title, author, institute, etc.
2134 \put(-3.4,-125){\noindent
2135 % \fcolorbox{declared-color-frame}{declared-color-background}{text}
2136 \ifbool{darkBG}{
2137 % Dark true
2138 \setbeamercolor{normal~text}{fg=colorFG, }
2139 \fcolorbox{colorPale}{colorPale}% reversed
2140 }{
2141 % Light
2142 \setbeamercolor{normal~text}{fg=colorBG, }
2143 \fcolorbox{colorTitlepage}{colorTitlepage}% reversed
2144 }% end if
2145 {
2146 % begin third argument of fcolorobx
2147 %\fcolorbox{normal~text.fg}{normal~text.fg}{
2148 \begin{minipage}[b][\paperheight]{\textwidth}
2149 \centering
2150 \vfill
2151 \ifx\inserttitle\@empty\else\usebeamertemplate*{title}\fi
2152 \ifx\insertsubtitle\@empty\else\usebeamertemplate*{subtitle}\fi
2153 \usebeamertemplate*{title~separator}
2154 \expandafter\ifblank\expandafter{\beamer@andstripped}{
2155 % empty author
2156 \vspace*{1.em}
2157 }{
2158 \usebeamertemplate*{author}
2159 }
2160 \ifx\insertdate\@empty\else\usebeamertemplate*{date}\fi
2161 \ifx\insertinstitute\@empty\else{\parbox{0.9\textwidth}{\raggedright\usebeamertemplate*{institute}} }\fi
2162 \vfill
2163 \vbox{}
2164 \end{minipage}
2165 }
2166 % end third argument of fcolorobx
2167 }
2168
2169 % the institute logo on title page
2170 \put(234,-120){
2171 \gothamtitlepagelogo
2172 }
2173
2174 % the extra logos on title page (\inserttitlegraphic)
2175 \put(-27,-123){
2176 \noindent\vbox{
2177 \begin{minipage}[b][0.96\paperheight]{0.899\textwidth}
2178 \ifx\inserttitlegraphic\@empty\else\usebeamertemplate*{title~graphic}\fi
2179 \end{minipage}
2180 }
2181 }
2182 \end{picture}
2183 }
2184 % \end{macrocode}
2185 % \end{macro}
2186 % \end{implementation}
2187
2188 % \begin{documentation}
2189 % \begin{variable}{\gothamDividedPicTop, \gothamDividedPicBottomIncr, \gothamDividedPicTextWidth}
2190 % variables controlling the dimensions of the splitting trapezoid on the title page for the gotham divided style.
2191 % |\gothamDividedPicTop| controls the distance between the top right corner and the top splitting point.
2192 % |\gothamDividedPicBottomIncr| controls the increment toward the left direction for the bottom splitting point.
2193 % |\gothamDividedPicTextWidth| controls the width of the text on the titlepage (for the divided style).
2194 % \end{variable}
2195 % \end{documentation}
2196 %%%%%%
2197 % \begin{implementation}
2198 % \begin{variable}{\gothamDividedPicTop, \gothamDividedPicBottomIncr, \gothamDividedPicTextWidth}
2199 % variables controlling the dimensions of the trapezoid splitting the title page for the gotham divided style.
2200 % \begin{macrocode}
2201 \newlength{\gothamDividedPicTop}
2202 \newlength{\gothamDividedPicBottomIncr}
2203 \setlength{\gothamDividedPicTop}{0.275\paperwidth}
2204 \setlength{\gothamDividedPicBottomIncr}{0.275\paperwidth}
2205 \newlength{\gothamDividedPicTextWidth}
2206 \setlength{\gothamDividedPicTextWidth}{.55\textwidth}
2207 % \end{macrocode}
2208 % \end{variable}
2209 % \end{implementation}
2210
2211 % \begin{implementation}
2212 % \begin{macro}{defbeamertemplate{title~page}{gotham~dividedpic}}
2213 % This title page template is inspired from \url{https://github.com/LukasPietzschmann/awesome-beamer}
2214 % \changes{v1.2.4}{2025-12-25}{adapt the background image evaluation (|ifx gothamtitlepagebg empty|) and duplicated authors/shortauthor from issue n13.}
2215 % \UnitTested
2216 % \TestFiles{gotham-test-038, gotham-test-1044}
2217 % \begin{macrocode}
2218 \defbeamertemplate{title~page}{gotham~dividedpic}{
2219 \def\titlecontent{\usebeamerfont{title}\usebeamercolor[fg]{title}\inserttitle}
2220 \def\subtitlecontent{\usebeamerfont{subtitle}\usebeamercolor[fg]{subtitle}\insertsubtitle}
2221 \settowidth\l__gotham_title_width_dim\titlecontent
2222 \settowidth\l__gotham_subtitle_width_dim\subtitlecontent
2223 \setlength\l__gotham_title_max_width_dim{\ifdim\l__gotham_title_width_dim>\l__gotham_subtitle_width_dim\l__gotham_title_width_dim\else\l__gotham_subtitle_width_dim\fi}
2224 % \thispagestyle{navigation@titlepage}
2225 \begin{minipage}{\gothamDividedPicTextWidth}
2226 \raggedright
2227 \titlecontent\\
2228 \subtitlecontent\\
2229
2230 \textcolor{colorProgBar}{\rule{\ifdim\l__gotham_title_max_width_dim<\gothamDividedPicTextWidth\l__gotham_title_max_width_dim\else\gothamDividedPicTextWidth\fi}{\dim_use:N \l__gotham_titleseparator_height_dim}}\\[0.75em]
2231
2232 \expandafter\ifblank\expandafter{\beamer@andstripped}{
2233 % empty author
2234 \vspace*{2.em}
2235 }{%
2236 \usebeamerfont{author}\usebeamercolor[fg]{author}
2237 \insertauthor\\
2238 }
2239 \ifx\beamer@shortauthor\@empty{
2240 % empty short author
2241 }\else{
2242 \ifx\beamer@shortauthor\beamer@andstripped{
2243 % if the short author is equal to the author skip it.
2244 }\else{
2245 \usebeamerfont{author}\usebeamercolor[fg]{author}
2246 {\insertshortauthor} \par
2247 \vspace{0.5em}
2248 }\fi
2249 }
2250 \fi
2251 \ifx\insertinstitute\@empty\else{
2252 \usebeamertemplate*{institute}\vspace{1.5em}
2253 }\fi
2254 \insertdate
2255 \end{minipage}
2256
2257 % \ifdefined\@background
2258 \begin{tikzpicture}[remember~picture, overlay]
2259 \clip (current~page.south~east)
2260 -- (current~page.north~east)
2261 -- ++(-\gothamDividedPicTop, 0)
2262 -- ++(-\gothamDividedPicBottomIncr, -\paperheight)
2263 -- cycle;
2264
2265 \ifx\gothamtitlepagebg\@empty
2266 \fill[
2267 right~color=colorTitlepage!100,
2268 ]
2269 (current~page.south~east)
2270 rectangle
2271 ++(\dimexpr-\gothamDividedPicTop-\gothamDividedPicBottomIncr, \dimexpr\paperheight);
2272 \else
2273 \node[
2274 anchor=south~east,
2275 inner~sep=0,
2276 outer~sep=0
2277 ] at (current~page.south~east) {
2278 % \includegraphics[height=\paperheight]{\@background}
2279 \gothamtitlepagebg
2280 };
2281 \fi
2282 \end{tikzpicture}
2283 }
2284 % \end{macrocode}
2285 % \end{macro}
2286 % \end{implementation}
2287
2288
2289 % \begin{implementation}
2290 % \begin{macro}{defbeamertemplate{title~page}{gotham~splitvert}}
2291 % This title page template is inspired from \url{https://github.com/pcafrica/focus-beamertheme}
2292 % \UnitTested
2293 % \changes{v1.2.0}{2024-11-11}{length of subtitle}
2294 % \TestFiles{gotham-test-038}
2295 % \begin{macrocode}
2296 \defbeamertemplate{title~page}{gotham~splitvert}{
2297 % \IfEmpty{\insertframetitle}{
2298 \ifx\beamer@frametitle\@empty
2299 \vspace*{-0.5\paperheight}
2300 \else %}{
2301 \vspace*{-0.63\paperheight}
2302 \fi %}
2303 {
2304 \usebeamercolor{frametitle}\colorlet{gotham@@tempColor}{bg}%
2305 \begin{tikzpicture}[overlay, remember~picture]
2306 \fill[color=gotham@@tempColor] (current~page.north~west) rectangle ([shift = {(0, -0.45\paperheight)}] current~page.north~east);
2307 \end{tikzpicture}
2308 }
2309
2310 % \vspace{1.65\baselineskip}
2311 \begin{minipage}[b][0.5\paperheight]{\textwidth}
2312 % \vspace{\baselineskip}
2313 \vbox{}
2314 \vfill
2315 {
2316 \usebeamerfont{title}
2317 \usebeamercolor[fg]{frametitle}
2318 \inserttitle
2319 }
2320 \ifx\insertsubtitle\@empty\else
2321 \\[1ex]
2322 {
2323 \usebeamerfont{subtitle}
2324 \usebeamercolor[fg]{frametitle}
2325 \insertsubtitle
2326 }
2327 \fi
2328 \vspace{1.\baselineskip}
2329 \end{minipage}
2330
2331
2332 % Set the title graphic in a zero-height box, so that
2333 % the position of other elements is not affected.
2334 \ifx\inserttitlegraphic\@empty\else
2335 \newline
2336 \vspace*{-1.65\baselineskip}
2337 % {\vfuzz=9999pt\vbox~to~0pt {
2338 {\parbox[c][0pt][c]{\textwidth}{
2339 \raggedleft
2340 \inserttitlegraphic
2341 % \usebeamertemplate*{title~graphic}
2342 }}
2343 \fi
2344
2345 % \ifx\insertauthor\empty\else
2346 \expandafter\ifblank\expandafter{\beamer@andstripped}{
2347 % empty author
2348 \vspace*{1.em}
2349 }{
2350 \newline
2351 \begin{minipage}[t]{\textwidth}
2352 % \usebeamercolor{normal~text}
2353 % \usebeamerfont{author}
2354 % \insertauthor
2355 \vspace*{-0.65\baselineskip}
2356 \usebeamertemplate*{author}
2357 \end{minipage}
2358 }
2359 % \fi
2360
2361 \ifx\insertinstitute\@empty\else
2362 \newline
2363 \vspace*{-1.65\baselineskip}
2364 \begin{minipage}[t]{\textwidth}
2365 % \usebeamerfont{institute}
2366 % \insertinstitute
2367 \usebeamertemplate*{institute}
2368 \end{minipage}
2369 \fi
2370
2371 \ifx\insertdate\@empty\else
2372 \newline
2373 \begin{minipage}[t]{\textwidth}
2374 \vspace*{2.65\baselineskip}
2375 % \usebeamerfont{date}
2376 % \insertdate
2377 \usebeamertemplate*{date}
2378 \end{minipage}
2379 \vspace*{-3.15\baselineskip}
2380 \fi
2381 }
2382 % \end{macrocode}
2383 % \end{macro}
2384 % \end{implementation}
2385
2386
2387 % \begin{documentation}
2388 % \begin{function}{\__gotham_set_template:nn}
2389 % \begin{syntax}
2390 % \cs{__gotham_set_template:nn} \marg{element} \marg{option}
2391 % \end{syntax}
2392 % Function that test if a beamertemplate with the given element and option name exists. If it exists then it is set (applied), otherwise an error is raised.
2393 % \end{function}
2394 % \end{documentation}
2395 %%%%%%
2396 % \begin{implementation}
2397 % \begin{function}{\__gotham_set_template:nn}
2398 % \begin{arguments}
2399 % \item element name (from beamer doc) in other word, the name the template category
2400 % \item prefined option (from beamer doc)
2401 % \end{arguments}
2402 % Function to set a beamertemplate with an option if it exists, otherwise an error is raised.
2403 % Unfortunatly, (as far as I know) it not possible to test if the element name exists independtly from the prefined option.
2404 % \TestFiles{gotham-test-038}
2405 % \begin{macrocode}
2406 \cs_if_exist:NTF \__gotham_set_template:nn {}{
2407 % If it doesn't exist, then create it.
2408
2409 % Define the command to set template if it exists.
2410 \cs_new_protected:Nn \__gotham_set_template:nn
2411 {
2412 \cs_if_exist:cTF {beamer@@tmpop@#1@#2} {
2413 \setbeamertemplate{#1}[#2]
2414 }{
2415 \PackageError{beamerinnerthemegotham}
2416 {The~beamer~template~named~'#1'~with~the~option~'#2'~does~not~exist}
2417 {helping~message unknown setbeamertemplate option}
2418 }
2419 }
2420 }
2421 % \end{macrocode}
2422 % \end{function}
2423 % \end{implementation}
2424
2425 % \begin{documentation}
2426 % \begin{function}{\useinnertheme}
2427 % \begin{syntax}
2428 % \cs{useinnertheme}\oarg{option1=value1, ...}\marg{gotham}
2429 % \textrm{where the options are (default marked as} \defopt{default}\textrm{):}
2430 % \meta{title page} = \oarg{\defopt{gotham normal} \textbar gotham splitvert \textbar gotham dividedpic \textbar gotham reversed}
2431 % \end{syntax}
2432 % The 'package' (useinnertheme) options can set different title page templates.
2433 % \end{function}
2434 % \end{documentation}
2435 %%%%
2436 % \begin{implementation}
2437 % \begin{macro}{inner key -- interface}
2438 % Controls for the title page templates.
2439 % \UnitTested
2440 % \TestFiles{gotham-test-038}
2441 % \begin{macrocode}
2442 \keys_define:nn { gotham / inner }
2443 {
2444 % title~page
2445 title~page .usage:n = { general },
2446 title~page .default:n = { gotham~normal },
2447 title~page .code:n = { \__gotham_set_template:nn{title~page}{#1} },
2448 }
2449 % \end{macrocode}
2450 % \end{macro}
2451 % \end{implementation}
2452
2453
2454
2455 %% Backgrounds %%%
2456 %%%%%%%%%%%%%%%%%%
2457
2458 % \begin{implementation}
2459 % \begin{macrocode}
2460 % Background lengths
2461 % \newlength{\imageBGoffset}
2462 % \setlength{\imageBGoffset}{\paperwidth}
2463 % \addtolength{\imageBGoffset}{-8.5mm}
2464 % \end{macrocode}
2465 % \end{implementation}
2466
2467 % \begin{documentation}
2468 % \begin{variable}{\l__gotham_template_name_prop}
2469 % Dictionary/map of template elements and predefined option according to the context.
2470 % Naming convention: template/What/Who, i.e. Name: key=background~canvas/watermark, value = gotham~draft
2471 % \end{variable}
2472 % \end{documentation}
2473 %%%%%%
2474 % \begin{implementation}
2475 % \begin{variable}{\l__gotham_template_name_prop}
2476 % Dictionary/map of template elements and predefined option according to the context.
2477 % Naming convention: template/What/Who, i.e. Name: key=background~canvas/watermark, value = gotham~draft
2478 % \begin{macrocode}
2479 \prop_if_exist:NTF \l__gotham_template_name_prop
2480 {}{
2481 % if not defined than define it.
2482 \prop_new:N \l__gotham_template_name_prop
2483 }
2484 % \end{macrocode}
2485 % \end{variable}
2486 % \end{implementation}
2487
2488
2489 % \begin{documentation}
2490 % \begin{function}{\defbeamertemplate{background}{name}{def}}
2491 % \begin{syntax}
2492 % \cs{defbeamertemplate} \marg{background canvas} \marg{chosen name} \marg{definition}
2493 % \end{syntax}
2494 % The |background canvas| and the |background| beamer templates can be redifined by users if wanted/needed.
2495 % By default these templates are empty (except the color in background canvas when it not transparent).
2496 % \end{function}
2497 % \end{documentation}
2498 %%%%%%
2499 % \begin{implementation}
2500 % \begin{macro}{\defbeamertemplate{background~canvas}{empty}{def}}
2501 % empty background canvas that contains color, that can be used to reset background.
2502 % \UnitTested
2503 % \TestFiles{gotham-test-038}
2504 % \begin{macrocode}
2505 \defbeamertemplate{background~canvas}{empty}{% empty background style has a color.
2506 % \ifbeamercolorempty[bg]{background}{}{\color{bg}\vrule width\paperwidth height\paperheight}% copied beamer default here
2507 \hspace*{28pt}
2508 \begin{beamercolorbox}[wd=\paperwidth,
2509 ht=\paperheight,
2510 ]{background}
2511 % nothing to write, only a background color
2512 \end{beamercolorbox}
2513 }%
2514 \defbeamertemplate{background}{empty}{}%
2515 % \end{macrocode}
2516 % \end{macro}
2517 % \end{implementation}
2518
2519
2520 % \begin{implementation}
2521 % \begin{macro}{\defbeamertemplate{background}{watermark/gotham~draft}{def}}
2522 % Background that contains a watermakr stamp with the word: DRAFT.
2523 % \UnitTested
2524 % \TestFiles{gotham-test-038}
2525 % \begin{macrocode}
2526 \defbeamertemplate{background}{watermark/gotham~draft}{
2527 \begin{tikzpicture}[overlay,remember~picture]
2528 \node[color=red, opacity=0.3, scale=5, rotate=45] at ([shift={(0,0)}]current~page.center) {DRAFT};
2529 \end{tikzpicture}
2530 }
2531 % Add the template to the prop (dictionary)
2532 \prop_put:Nnn \l__gotham_template_name_prop {background/watermark} {gotham~draft}
2533 % \end{macrocode}
2534 % \end{macro}
2535 % \end{implementation}
2536
2537 % \begin{implementation}
2538 % \begin{function}{\__gotham_add_beamerframe_key:n}
2539 % \begin{arguments}
2540 % \item Name of the option to add, this name should also correspond to the name of the environment followed by the suffix 'env'.
2541 % \end{arguments}
2542 % Function to add an option of a frame using an environment.
2543 % For example, if the name 'optionA' is the argument given to the function, an frame option named 'optionA' will be added, and this option will surround the frame with the environment named 'optionAenv'.
2544 % So, the environment 'optionA' must have been declared before.
2545 % \TestFiles{gotham-test-038}
2546 % \begin{macrocode}
2547 \seq_if_exist:NTF \l__gotham_frameoption_tmp_seq {}{
2548 % Define the sequence of frameoptions environments to close
2549 \seq_new:N \l__gotham_frameoption_tmp_seq
2550 }
2551
2552 \cs_if_exist:NTF \__gotham_add_beamerframe_key:n {}{
2553 % if it doesn't exist, then create it.
2554
2555 % Define the command to add frameoptions
2556 \cs_new_protected:Nn \__gotham_add_beamerframe_key:n {
2557 \define@key{beamerframe}{ #1 }[true]{
2558 \begin{#1env}
2559 \seq_put_left:Nn \l__gotham_frameoption_tmp_seq { \end{#1env} }
2560 }
2561 }
2562
2563 % At the end of frames close the opened environments.
2564 \apptocmd{\beamer@reseteecodes}{
2565 % Join elements in the queue without separator then output the result
2566 \seq_use:Nn \l__gotham_frameoption_tmp_seq {}
2567 % clear working queue
2568 \seq_clear:N \l__gotham_frameoption_tmp_seq
2569 }{}{}
2570 }
2571 % \end{macrocode}
2572 % \end{function}
2573 % \end{implementation}
2574
2575 % \begin{documentation}
2576 % \begin{function}{\begin{frame}[noBGC]}
2577 % Add a frame option |noBGC| to display an empty background canvas.
2578 % \end{function}
2579 % \end{documentation}
2580 %%%%%%
2581 % \begin{implementation}
2582 % \begin{macro}{\begin{frame}[noBCG]}
2583 % Add a frame option |noBGC| to display an empty background canvas.
2584 % To do it, we must add a global boolean variable, capture the option at the begin of the frame and patch the end of the frame.
2585 % \UnitTested
2586 % \TestFiles{gotham-test-038}
2587 % \begin{macrocode}
2588
2589 \newenvironment{noBGCenv}{
2590 \setbeamertemplate{background~canvas}[empty]
2591 }{}
2592 \__gotham_add_beamerframe_key:n {noBGC}
2593 % \end{macrocode}
2594 % \end{macro}
2595 % \end{implementation}
2596
2597 % \begin{documentation}
2598 % \begin{variable}{\l_gotham_defaultWatermark}
2599 % Boolean to triggering if watermark should be displayed by default (without giving the frame option).
2600 % The variable is |false| by default.
2601 % \end{variable}
2602 % \end{documentation}
2603 %%%%%%
2604 % \begin{implementation}
2605 % \begin{macro}{\l_gotham_defaultWatermark}
2606 % Boolean variable to display the watermark by default (or not).
2607 % \UnitTested
2608 % \TestFiles{gotham-test-038}
2609 % \begin{macrocode}
2610 \bool_new:N \l_gotham_defaultWatermark
2611 \bool_set_false:N \l_gotham_defaultWatermark
2612 % At every new frame, reset the options to default (unless some options/keys are given)
2613 \BeforeBeginEnvironment{frame}{
2614 \bool_if:NTF \l_gotham_defaultWatermark {
2615 \setbeamertemplate{background}[watermark/\prop_item:Nn \l__gotham_template_name_prop {background/watermark}]
2616 }{% false
2617 \setbeamertemplate{background}[empty]
2618 }
2619 }
2620 % \end{macrocode}
2621 % \end{macro}
2622 % \end{implementation}
2623
2624 % \begin{documentation}
2625 % \begin{function}{\begin{frame}[watermark]}
2626 % Add a frame option |watermark| to display watermark in background.
2627 % \end{function}
2628 % \end{documentation}
2629 %%%%%%
2630 % \begin{implementation}
2631 % \begin{macro}{\begin{frame}[watermark]}
2632 % Add a frame option |watermark| to display an empty background canvas.
2633 % To do it, we must add a global boolean variable, capture the option at the begin of the frame and patch the end of the frame.
2634 % \UnitTested
2635 % \TestFiles{gotham-test-038}
2636 % \begin{macrocode}
2637 % bool to trigger the add of watermark in background
2638 \newenvironment{watermarkenv}{
2639 \setbeamertemplate{background}[
2640 watermark/\prop_item:Nn \l__gotham_template_name_prop {background/watermark}
2641 ]
2642 }{}
2643 \__gotham_add_beamerframe_key:n {watermark}
2644 % \end{macrocode}
2645 % \end{macro}
2646 % \end{implementation}
2647
2648 % \begin{documentation}
2649 % \begin{function}{\begin{frame}[nowatermark]}
2650 % Add a frame option |nowatermark| to do not display nowatermark in background.
2651 % \end{function}
2652 % \end{documentation}
2653 %%%%%%
2654 % \begin{implementation}
2655 % \begin{macro}{\begin{frame}[nowatermark]}
2656 % Add a frame option |nowatermark| to do not display an empty background canvas.
2657 % To do it, we must add a global boolean variable, capture the option at the begin of the frame and patch the end of the frame.
2658 % \UnitTested
2659 % \TestFiles{gotham-test-038}
2660 % \begin{macrocode}
2661 % bool to trigger the add of nowatermark in background
2662 \newenvironment{nowatermarkenv}{
2663 \setbeamertemplate{background}[empty]
2664 }{}
2665 \__gotham_add_beamerframe_key:n {nowatermark}
2666 % \end{macrocode}
2667 % \end{macro}
2668 % \end{implementation}
2669
2670 % \begin{implementation}
2671 % \begin{variable}{\l__gotham_tmpa_seq, \l__gotham_tmpa_tl, \l__gotham_tmpb_tl}
2672 % tmp variables
2673 % \begin{macrocode}
2674 \seq_if_exist:NTF \l__gotham_tmpa_seq
2675 {}{
2676 % sequence
2677 \seq_new:N \l__gotham_tmpa_seq
2678 }
2679 \tl_if_exist:NTF \l__gotham_tmpa_tl
2680 {}{
2681 % token list A
2682 \tl_new:N \l__gotham_tmpa_tl
2683 }
2684 \tl_if_exist:NTF \l__gotham_tmpb_tl
2685 {}{
2686 % token list B
2687 \tl_new:N \l__gotham_tmpb_tl
2688 }
2689 % \end{macrocode}
2690 % \end{variable}
2691 % \end{implementation}
2692
2693 % \begin{implementation}
2694 % \begin{function}{\__gotham_set_prop_template:nn}
2695 % \begin{arguments}
2696 % \item element name (from beamer doc) in other word, the name the template category
2697 % \item prefined option (from beamer doc)
2698 % \end{arguments}
2699 % Function that store in a map the name a template use later.
2700 % The following naming convention is used: Template/What/Who~Name: watermark/gotham~draft.
2701 % The means for example that if a beamer template is defined using
2702 % |\defbeamertemplate{background}{watermark/gotham~draft}{...}|,
2703 % then the function has to be call using
2704 % |\__gotham_set_prop_template{background/watermark}{gotham~draft}|,
2705 % that will filled internally the map using the l3 command
2706 % |\prop_put:Nnn \l__gotham_template_name_prop {background/watermark}{gotham~draft}|.
2707 % If the template name given as input does not exist, an error is raised.
2708 % \TestFiles{gotham-test-039}
2709 % \begin{macrocode}
2710 \cs_if_exist:NTF \__gotham_set_prop_template:nn {}{
2711 % if it doesn't exist, then create it.
2712 \cs_new_protected:Nn \__gotham_set_prop_template:nn
2713 {
2714 % Check if the first argument contains a /
2715 \tl_if_in:nnTF { #1 } { / }
2716 {
2717 % Split the first around the /
2718 \seq_set_split:Nnn \l__gotham_tmpa_seq { / } { #1 }
2719 \tl_set:Nn \l__gotham_tmpa_tl { \seq_item:Nn \l__gotham_tmpa_seq { 1 } }
2720 \tl_set:Nn \l__gotham_tmpb_tl { \seq_item:Nn \l__gotham_tmpa_seq { 2 } }
2721 % Check if template exist
2722 \cs_if_exist:cTF {beamer@@tmpop@\exp_not:V \l__gotham_tmpa_tl @\exp_not:V \l__gotham_tmpb_tl /#2} {
2723 % set the value in the map, so it can be called later.
2724 \prop_put:Nnn \l__gotham_template_name_prop {#1} {#2}
2725 % \setbeamertemplate{#1}[#2]
2726 }{
2727 \PackageError{beamerthemegotham}
2728 {The~beamer~template~named~'\l__gotham_tmpa_tl'~with~the~option~'\l__gotham_tmpb_tl/#2'~does~not~exist}
2729 {helping~message}
2730 }
2731 }{% false -> error
2732 \PackageError{beamerthemegotham}
2733 {%
2734 When~using~'\c_backslash_str\cs_to_str:N \__gotham_set_prop_template'~the~first~argument~should~contain~a~'/'~to~respect~the~naming~convention~used~(Template/what/Who~name),~but~you~gave~'#1'.~
2735 As~example:~if~'\c_backslash_str defbeamertemplate{background}{watermark/gotham~draft}'...,~then~use~'\c_backslash_str\cs_to_str:N \__gotham_set_prop_template{background/watermark}{gotham~draft}'
2736 }{helping~message}
2737 }
2738 }
2739 }
2740 % \end{macrocode}
2741 % \end{function}
2742 % \end{implementation}
2743
2744 % \begin{documentation}
2745 % \begin{function}{\useinnertheme}
2746 % \begin{syntax}
2747 % \cs{useinnertheme}\oarg{option1=value1, ...}\marg{gotham}
2748 % \textrm{where the options are (default marked as} \defopt{default}\textrm{):}
2749 % \meta{watermark default} = \oarg{\defopt{off} \textbar on }
2750 % \meta{watermark template} = \oarg{\defopt{gotham draft} \textbar ...}
2751 % \end{syntax}
2752 % The 'package' (useinnertheme) options can control |background| (and |background canvas|) templates according to situations.
2753 % Block environments such as |theorem| and |example| have no background color by default.
2754 % The option |watermark default=on| can enable the |watermark template| on every frame; but it can still be turned off for specific frames when using the frame option |nowatermark|.
2755 % \end{function}
2756 % \end{documentation}
2757 %%%%
2758 % \begin{implementation}
2759 % \begin{macro}{inner key -- interface}
2760 % Controls the inner settings for background and watermark).
2761 % \UnitTested
2762 % \TestFiles{gotham-test-037}
2763 % \begin{macrocode}
2764 \keys_define:nn { gotham / inner }{
2765 % watermark template
2766 watermark~template .usage:n = { general },
2767 watermark~template .default:n = { gotham~draft },
2768 watermark~template .code:n = { \__gotham_set_prop_template:nn{background/watermark}{#1} },
2769 }
2770 \keys_define:nn { gotham / inner }{
2771 % watermark default
2772 watermark~default .choice:,
2773 watermark~default .usage:n = { general },
2774 watermark~default .default:n = { false },
2775
2776 watermark~default / true .code:n = { \bool_set_true:N \l_gotham_defaultWatermark },
2777 watermark~default / on .code:n = { \bool_set_true:N \l_gotham_defaultWatermark },
2778 watermark~default / enable .code:n = { \bool_set_true:N \l_gotham_defaultWatermark },
2779
2780 watermark~default / false .code:n = { \bool_set_false:N \l_gotham_defaultWatermark },
2781 watermark~default / off .code:n = { \bool_set_false:N \l_gotham_defaultWatermark },
2782 watermark~default / disable .code:n = { \bool_set_false:N \l_gotham_defaultWatermark },
2783
2784 watermark~default / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'#1'~is~unknown~for~the~(known)~option~'watermark~default',~so~being~ignored. }{helping~message: watermark~default / unknown} },
2785 }
2786 % \end{macrocode}
2787 % \end{macro}
2788 % \end{implementation}
2789
2790
2791 %%%% Stand IN/OUT %%%%
2792 %%%%%%%%%%%%%%%%%%%%%%%%
2793
2794 % \begin{documentation}
2795 % \begin{function}{\begin{frame}[c]}
2796 % Add a frame option |c| for enhanced vertically centered text in the frame.
2797 % \end{function}
2798 % \end{documentation}
2799 %%%%%%
2800 % \begin{implementation}
2801 % \begin{macro}{\begin{frame}[c]}
2802 % Add a frame option |c| for improved vertically centered text in the frame.
2803 % By default, Beamer frames offer the |c| option to \textit{almost} vertically center the text, but the placement is a little too high.
2804 % To fix this, we redefine the |c| option to equalize |\beamer@frametopskip| and |\beamer@framebottomskip|.
2805 % This solution was suggested by Enrico Gregorio in an answer to \href{http://tex.stackexchange.com/questions/247826/}{this Stack Exchange question}.
2806 % \UnitTested
2807 % \TestFiles{gotham-test-039}
2808 % \begin{macrocode}
2809 \define@key{beamerframe}{c}[true]{
2810 \beamer@frametopskip=0pt~plus~1fill\relax
2811 \beamer@framebottomskip=0pt~plus~1fill\relax
2812 \beamer@frametopskipautobreak=0pt~plus~.4\paperheight\relax
2813 \beamer@framebottomskipautobreak=0pt~plus~.6\paperheight\relax
2814 \def\beamer@initfirstlineunskip{}
2815 }
2816 % \end{macrocode}
2817 % \end{macro}
2818 % \end{implementation}
2819
2820 % \begin{implementation}
2821 % \begin{macro}{\defbeamertemplate{background~canvas}{standout/gotham}}
2822 % Definition of the background canvas template used by the standout frame of gotham theme.
2823 % \UnitTested
2824 % \TestFiles{gotham-test-040}
2825 % \begin{macrocode}
2826 \defbeamertemplate{background~canvas}{standout/gotham}{
2827 % copied from beamer default
2828 \ifbeamercolorempty[bg]{standout}{
2829 % if the background standout color is transparent, do nothing.
2830 }{
2831 \usebeamercolor[bg]{standout}\color{bg}
2832 \vrule~width\paperwidth~height\paperheight
2833 }
2834 }
2835 % Add the template to the prop (dictionary) of background template to use according to the situation
2836 \prop_put:Nnn \l__gotham_template_name_prop {background~canvas/standout} {gotham}
2837 % \end{macrocode}
2838 % \end{macro}
2839 % \end{implementation}
2840
2841 % \begin{implementation}
2842 % \begin{macro}{\defbeamertemplate{standout}{gotham}}
2843 % Definition of the standout template used by the standout frame of gotham theme.
2844 % This includes background canvas template, fonts and colors.
2845 % \UnitTested
2846 % \TestFiles{gotham-test-040}
2847 % \begin{macrocode}
2848 \defbeamertemplate*{standout}{gotham}{
2849 % \setkeys{beamerframe}{c}
2850 % \setkeys{beamerframe}{noframenumbering}
2851 % \centering
2852
2853 \setbeamertemplate{background~canvas}[standout/\prop_item:Nn \l__gotham_template_name_prop {background~canvas/standout}]
2854 % \usebeamertemplate{background~canvas}%[standout/gotham]
2855 \usebeamerfont{standout}
2856 % if the background color is switched, then change foreground (font) color.
2857 \ifbeamercolorempty[bg]{primary~palette}{
2858 %true : empty background (transparent)
2859 \setbeamercolor{background~canvas}{
2860 use=primary~palette,
2861 bg=primary~palette.fg
2862 }
2863 }{
2864 %false : background not empty (dark or light)
2865 \setbeamercolor{background~canvas}{
2866 use=primary~palette,
2867 bg=primary~palette.bg
2868 }
2869 }
2870 \setbeamercolor{local~structure}{fg=primary~palette.bg}
2871 \usebeamercolor[fg]{primary~palette}
2872 }
2873 % \end{macrocode}
2874 % \end{macro}
2875 % \end{implementation}
2876
2877 % \begin{documentation}
2878 % \begin{function}{\begin{frame}[standout]}
2879 % Add a frame option |standout| to display the standout frame template.
2880 % \end{function}
2881 % \end{documentation}
2882 %%%%%%
2883 % \begin{implementation}
2884 % \begin{macro}{\begin{frame}[standout]}
2885 % Add a frame option |standout| to display the standout frame template.
2886 % To do it, we must add a global boolean variable, capture the option at the begin of the frame and patch the end of the frame.
2887 % \UnitTested
2888 % \TestFiles{gotham-test-040}
2889 % \begin{macrocode}
2890 \newenvironment{standoutenv}{
2891 \usebeamertemplate{standout}
2892 }{}
2893 \__gotham_add_beamerframe_key:n {standout}
2894 % \end{macrocode}
2895 % \end{macro}
2896 % \end{implementation}
2897
2898 % \begin{implementation}
2899 % \begin{macro}{\defbeamertemplate{background~canvas}{standin/gotham}}
2900 % Definition of the background canvas template used by the standin frame of gotham theme.
2901 % \UnitTested
2902 % \TestFiles{gotham-test-040}
2903 % \begin{macrocode}
2904 \defbeamertemplate{background~canvas}{standin/gotham}{
2905 \ifbeamercolorempty[bg]{standin}{
2906 % if the background standin color is transparent, do nothing.
2907 }{
2908 % Uncomment this if-condition to have a 'light' background in 'transparent' color-mode.
2909 \ifbool{transparentBG}{
2910 % \color{} is not possible so, it is better to do nothing for transparent bg than creating a transparent vrule.
2911 }{
2912 \usebeamercolor[bg]{standin}\color{bg}
2913 \vrule~width\paperwidth~height\paperheight
2914 }
2915 }
2916 }
2917 % Add the template to the prop (dictionary) of background template to use according to the situation
2918 \prop_put:Nnn \l__gotham_template_name_prop {background~canvas/standin} {gotham}
2919 % \end{macrocode}
2920 % \end{macro}
2921 % \end{implementation}
2922
2923 % \begin{implementation}
2924 % \begin{macro}{\defbeamertemplate{standout}{gotham}}
2925 % Definition of the standout template used by the standout frame of gotham theme.
2926 % This includes background canvas template, fonts and colors.
2927 % \UnitTested
2928 % \TestFiles{gotham-test-040}
2929 % \begin{macrocode}
2930 \defbeamertemplate*{standin}{gotham}{
2931 %
2932 % \setkeys{beamerframe}{c}
2933 % \setkeys{beamerframe}{noframenumbering}
2934 % \centering
2935 \setbeamertemplate{background~canvas}[standin/\prop_item:Nn \l__gotham_template_name_prop {background~canvas/standin}]
2936 % \usebeamertemplate{background~canvas}%[standin/gotham]
2937 \usebeamerfont{standin}
2938 %
2939 % Uncomment this if-condition to have a 'light' frametitle in 'transparent' color-mode.
2940 % \ifbeamercolorempty[bg]{normal~text}{
2941 % %true : empty background (transparent)
2942 % \setbeamercolor{frametitle}{
2943 % use=normal~text,
2944 % bg=colorBG,
2945 % fg=normal~text.fg
2946 % }
2947 % }{
2948 % false
2949 \setbeamercolor{frametitle}{
2950 use=normal~text,
2951 bg=normal~text.bg,
2952 fg=normal~text.fg
2953 }
2954 % }
2955 % \setbeamercolor{frametitle}{
2956 % use=normal~text,
2957 % bg=normal~text.bg,
2958 % fg=normal~text.fg
2959 % }
2960 }
2961 % \end{macrocode}
2962 % \end{macro}
2963 % \end{implementation}
2964
2965 % \begin{documentation}
2966 % \begin{function}{\begin{frame}[standin]}
2967 % Add a frame option |standin| to display the standin frame template.
2968 % \end{function}
2969 % \end{documentation}
2970 %%%%%%
2971 % \begin{implementation}
2972 % \begin{macro}{\begin{frame}[standin]}
2973 % Add a frame option |standin| to display the standin frame template.
2974 % To do it, we must add a global boolean variable, capture the option at the begin of the frame and patch the end of the frame.
2975 % \UnitTested
2976 % \TestFiles{gotham-test-040}
2977 % \begin{macrocode}
2978 \newenvironment{standinenv}{
2979 \usebeamertemplate{standin}
2980 }{}
2981 \__gotham_add_beamerframe_key:n {standin}
2982 % \end{macrocode}
2983 % \end{macro}
2984 % \end{implementation}
2985
2986 % \begin{documentation}
2987 % \begin{function}{\useinnertheme}
2988 % \begin{syntax}
2989 % \cs{useinnertheme}\oarg{option1=value1, ...}\marg{gotham}
2990 % \textrm{where the options are (default marked as} \defopt{default}\textrm{):}
2991 % \meta{standin template} = \oarg{\defopt{gotham} \textbar ...}
2992 % \meta{standout template} = \oarg{\defopt{gotham} \textbar ...}
2993 % \meta{standin BG template} = \oarg{\defopt{gotham} \textbar ...}
2994 % \meta{standout BG template} = \oarg{\defopt{gotham} \textbar ...}
2995 % \end{syntax}
2996 % The 'package' (useinnertheme) options can control |standout| (and |standin|) templates.
2997 % These templates are activated when giving the frame option |\begin{frame}[standin]| and |standout|.
2998 % \end{function}
2999 % \end{documentation}
3000 %%%%
3001 % \begin{implementation}
3002 % \begin{macro}{inner key -- interface}
3003 % Controls the inner settings for standout and standin.
3004 % \UnitTested
3005 % \TestFiles{gotham-test-037}
3006 % \begin{macrocode}
3007 \keys_define:nn { gotham / inner }
3008 {
3009 % standout BG template
3010 standout~BG~template .usage:n = { general },
3011 standout~BG~template .default:n = { gotham },
3012 standout~BG~template .code:n = {
3013 \__gotham_set_prop_template:nn{background~canvas/standout}{#1}
3014 },
3015 }
3016 \keys_define:nn { gotham / inner }
3017 {
3018 % standin BG template
3019 standin~BG~template .usage:n = { general },
3020 standin~BG~template .default:n = { gotham },
3021 standin~BG~template .code:n = {
3022 \__gotham_set_prop_template:nn{background~canvas/standin}{#1}
3023 },
3024 }
3025 \keys_define:nn { gotham / inner }
3026 {
3027 % standout template
3028 standout~template .usage:n = { general },
3029 standout~template .default:n = { gotham },
3030 standout~template .code:n = {
3031 \__gotham_set_template:nn{standout}{#1}
3032 },
3033 }
3034 \keys_define:nn { gotham / inner }
3035 {
3036 % standin template
3037 standin~template .usage:n = { general },
3038 standin~template .default:n = { gotham },
3039 standin~template .code:n = {
3040 \__gotham_set_template:nn{standin}{#1}
3041 },
3042 }
3043 % \end{macrocode}
3044 % \end{macro}
3045 % \end{implementation}
3046
3047
3048 %%%% Sections %%%%
3049 %%%%%%%%%%%%%%%%%%%%%%%
3050
3051 % \begin{documentation}
3052 % \begin{function}{\begin{frame}[part]}
3053 % Add a frame option |part| to display the part frame template.
3054 % \end{function}
3055 % \end{documentation}
3056 %%%%%%
3057 % \begin{implementation}
3058 % \begin{macro}{\begin{frame}[part]}
3059 % Add a frame option |part| to display the part frame template.
3060 % To do it, we must add a global boolean variable, capture the option at the begin of the frame and patch the end of the frame.
3061 % \UnitTested
3062 % \TestFiles{gotham-test-041}
3063 % \begin{macrocode}
3064 \bool_new:N \l_gotham_partframe
3065 \bool_set_false:N \l_gotham_partframe
3066 \define@key{beamerframe}{part}[true]{
3067 \bool_set_true:N \l_gotham_partframe
3068 \begingroup
3069 \usebeamertemplate{part~frame}
3070 }
3071 \apptocmd{\beamer@reseteecodes}{
3072 \bool_if:NTF \l_gotham_partframe {
3073 \endgroup
3074 \bool_set_false:N \l_gotham_partframe
3075 }{}
3076 }{}{}
3077 % \define@key{beamerframe}{part}[true]{
3078 % \thispagestyle{navigation@part}
3079 % }
3080 % \def\ps@navigation@part{
3081 % \usebeamertemplate{part~frame}
3082 % \@nameuse{ps@navigation}
3083 % }
3084 % \end{macrocode}
3085 % \end{macro}
3086 % \end{implementation}
3087
3088 % \begin{documentation}
3089 % \begin{function}{\begin{frame}[section]}
3090 % Add a frame option |section| to display the section frame template.
3091 % \end{function}
3092 % \end{documentation}
3093 %%%%%%
3094 % \begin{implementation}
3095 % \begin{macro}{\begin{frame}[section]}
3096 % Add a frame option |section| to display the section frame template.
3097 % To do it, we must add a global boolean variable, capture the option at the begin of the frame and patch the end of the frame.
3098 % \UnitTested
3099 % \TestFiles{gotham-test-041}
3100 % \begin{macrocode}
3101 \bool_new:N \l_gotham_sectionframe
3102 \bool_set_false:N \l_gotham_sectionframe
3103 \define@key{beamerframe}{section}[true]{
3104 \bool_set_true:N \l_gotham_sectionframe
3105 \begingroup
3106 \usebeamertemplate{section~frame}
3107 }
3108 \apptocmd{\beamer@reseteecodes}{
3109 \bool_if:NTF \l_gotham_sectionframe {
3110 \endgroup
3111 \bool_set_false:N \l_gotham_sectionframe
3112 }{}
3113 }{}{}
3114 % \define@key{beamerframe}{section}[true]{
3115 % \thispagestyle{navigation@section}
3116 % }
3117 % \def\ps@navigation@section{
3118 % \usebeamertemplate{section~frame}
3119 % \@nameuse{ps@navigation}
3120 % }
3121 % \end{macrocode}
3122 % \end{macro}
3123 % \end{implementation}
3124
3125 % \begin{documentation}
3126 % \begin{function}{\begin{frame}[subsection]}
3127 % Add a frame option |subsection| to display the subsection frame template.
3128 % \end{function}
3129 % \end{documentation}
3130 %%%%%%
3131 % \begin{implementation}
3132 % \begin{macro}{\begin{frame}[subsection]}
3133 % Add a frame option |subsection| to display the subsection frame template.
3134 % To do it, we must add a global boolean variable, capture the option at the begin of the frame and patch the end of the frame.
3135 % \UnitTested
3136 % \TestFiles{gotham-test-041}
3137 % \begin{macrocode}
3138 \bool_new:N \l_gotham_subsectionframe
3139 \bool_set_false:N \l_gotham_subsectionframe
3140 \define@key{beamerframe}{subsec}[true]{
3141 \bool_set_true:N \l_gotham_subsectionframe
3142 \begingroup
3143 \usebeamertemplate{subsection~frame}
3144 }
3145 \apptocmd{\beamer@reseteecodes}{
3146 \bool_if:NTF \l_gotham_subsectionframe {
3147 \endgroup
3148 \bool_set_false:N \l_gotham_subsectionframe
3149 }{}
3150 }{}{}
3151 % \define@key{beamerframe}{subsec}[true]{
3152 % \thispagestyle{navigation@subsec}
3153 % }
3154 % \def\ps@navigation@subsec{
3155 % \usebeamertemplate{subsection~frame}
3156 % \@nameuse{ps@navigation}
3157 % }
3158 % \end{macrocode}
3159 % \end{macro}
3160 % \end{implementation}
3161
3162 % \begin{documentation}
3163 % \begin{function}{\begin{frame}[subsubsection]}
3164 % Add a frame option |subsubsection| to display the subsubsection frame template.
3165 % \end{function}
3166 % \end{documentation}
3167 %%%%%%
3168 % \begin{implementation}
3169 % \begin{macro}{\begin{frame}[subsubsection]}
3170 % Add a frame option |subsubsection| to display the subsubsection frame template.
3171 % To do it, we must add a global boolean variable, capture the option at the begin of the frame and patch the end of the frame.
3172 % \UnitTested
3173 % \TestFiles{gotham-test-041}
3174 % \begin{macrocode}
3175 \bool_new:N \l_gotham_subsubsectionframe
3176 \bool_set_false:N \l_gotham_subsubsectionframe
3177 \define@key{beamerframe}{subsubsec}[true]{
3178 \bool_set_true:N \l_gotham_subsubsectionframe
3179 \begingroup
3180 \usebeamertemplate{subsubsection~frame}
3181 }
3182 \apptocmd{\beamer@reseteecodes}{
3183 \bool_if:NTF \l_gotham_subsubsectionframe {
3184 \endgroup
3185 \bool_set_false:N \l_gotham_subsubsectionframe
3186 }{}
3187 }{}{}
3188 % \define@key{beamerframe}{subsubsec}[true]{
3189 % \thispagestyle{navigation@subsubsec}
3190 % }
3191 % \def\ps@navigation@subsubsec{
3192 % \usebeamertemplate{subsubsection~frame}
3193 % \@nameuse{ps@navigation}
3194 % }
3195 % \end{macrocode}
3196 % \end{macro}
3197 % \end{implementation}
3198
3199 % \begin{documentation}
3200 % \begin{variable}{\partContentName, \secContentName, \subsecContentName}
3201 % Commands containing the 'part content' title for part, section and subection (if theses ToC frames are enabled).
3202 % An option for subsubsection is not useful (at least up to understanding of the moment) because we do not display frame with the content of a subsubsection since it is the small unity we are working with.
3203 % \end{variable}
3204 % \end{documentation}
3205 %%%%%%
3206 % \begin{implementation}
3207 % \begin{variable}{\providebool{partContent}, \partContentName}
3208 % Boolean variable to enable the table of contents of the part, and the command containing the 'Part contents' title.
3209 % \begin{macrocode}
3210 % repeated from BeamerExtra
3211 \providebool{partContent}
3212 \booltrue{partContent}
3213 \providecommand{\partContentName}{Part~content}
3214 % \end{macrocode}
3215 % \end{variable}
3216 % \end{implementation}
3217 % \begin{implementation}
3218 % \begin{variable}{\providebool{secContent}, \secContentName}
3219 % Boolean variable to enable the table of contents of the section, and the command containing the 'Section contents' title.
3220 % \begin{macrocode}
3221 \providebool{sectionContent}
3222 \booltrue{sectionContent}
3223 \providecommand{\secContentName}{Section~content}
3224 % \end{macrocode}
3225 % \end{variable}
3226 % \end{implementation}
3227 % \begin{implementation}
3228 % \begin{variable}{\providebool{subsectionContent}, \subsecContentName}
3229 % Boolean variable to enable the table of contents of the subsection, and the command containing the 'Subsection contents' title.
3230 % \begin{macrocode}
3231 \providebool{subsectionContent}
3232 \booltrue{subsectionContent}
3233 \providecommand{\subsecContentName}{Subsection~content}
3234 % \end{macrocode}
3235 % \end{variable}
3236 % \end{implementation}
3237 % \begin{implementation}
3238 % \begin{variable}{\providebool{subsubsectionContent}, \subsubsecContentName}
3239 % Boolean variable to enable the table of contents of the subsubsection, and the command containing the 'Subsubsection contents' title.
3240 % \begin{macrocode}
3241 % Subsubsection is not useful (at least up to understanding of the moment) because we do not display frame with the content of a subsubsection since it is the small unity we are working with.
3242 \providebool{subsubsectionContent}
3243 \booltrue{subsubsectionContent}
3244 \providecommand{\subsubsecContentName}{Subsubsection~content}
3245 % \end{macrocode}
3246 % \end{variable}
3247 % \end{implementation}
3248
3249 % \begin{implementation}
3250 % \begin{macro}{\defbeamertemplate{part~title}{gotham}, \defbeamertemplate{section~title}{gotham}, \defbeamertemplate{subsection~title}{gotham}, \defbeamertemplate{subsection~title}{gotham}}
3251 % Definitions of templates controling how will appear the name/title of the parts, sections, subsections and subsubsections.
3252 % \UnitTested
3253 % \TestFiles{gotham-test-041}
3254 % \begin{macrocode}
3255 \def\partname{\translate{Part}}
3256 \defbeamertemplate*{part~title}{gotham}{
3257 \usebeamercolor[fg]{part~title}
3258 \usebeamerfont{part~title}
3259 \partname \ \insertromanpartnumber
3260 \\[1.75ex]
3261 \insertpart
3262 }
3263 \defbeamertemplate*{section~title}{gotham}{
3264 \usebeamercolor[fg]{section~title}
3265 \usebeamerfont{section~title}
3266 \insertsectionnumber.~
3267 \insertsectionhead
3268 }
3269 \defbeamertemplate*{subsection~title}{gotham}{
3270 \usebeamercolor[fg]{subsection~title}
3271 \usebeamerfont{subsection~title}
3272 \insertsectionnumber.\insertsubsectionnumber.~
3273 \insertsubsectionhead
3274 }
3275 \def\subsubsectionname{\translate{Subsubsection}}
3276 \def\insertsubsubsectionnumber{\arabic{subsubsection}}
3277 \def\subsubsectionpage{\usebeamertemplate*{subsubsection~page}}
3278 \defbeamertemplate*{subsubsection~title}{gotham}{
3279 \usebeamercolor[fg]{subsubsection~title}
3280 \usebeamerfont{subsubsection~title}
3281 \insertsectionnumber.\insertsubsectionnumber.\insertsubsubsectionnumber.~
3282 \insertsubsubsectionhead
3283 }
3284 % \end{macrocode}
3285 % \end{macro}
3286 % \end{implementation}
3287
3288 % \begin{documentation}
3289 % \begin{variable}[added=2025-01-06]{\partpageOptions, \sectionpageOptions, \subsectionpageOptions, \subsubsectionpageOptions}
3290 % Variable commands that contain the coma-separated list of options which are given to the partpage (respectively to the section, subsection and subsubsection).
3291 % \end{variable}
3292 % \end{documentation}
3293 %%%%
3294 % \begin{implementation}
3295 % \begin{variable}[added=2025-01-06]{\partpageOptions, \sectionpageOptions, \subsectionpageOptions, \subsubsectionpageOptions}
3296 % Options used in |\begin{frame}[\partpageOptions,part]{\partpage}...| .
3297 % TESTED in gotham-test-1039
3298 % \changes{v1.2.1}{2025-01-06}{newly introduced}
3299 % \begin{macrocode}
3300 \providecommand{\partpageOptions}{noframenumbering}
3301 \providecommand{\sectionpageOptions}{noframenumbering}
3302 \providecommand{\subsectionpageOptions}{noframenumbering}
3303 \providecommand{\subsubsectionpageOptions}{noframenumbering}
3304 % \end{macrocode}
3305 % \end{variable}
3306 % \end{implementation}
3307
3308 % \begin{documentation}
3309 % \begin{variable}[added=2025-01-06]{\partpageTocOptions, \sectionpageTocOptions, \subsectionpageTocOptions, \subsubsectionpageTocOptions}
3310 % Variable commands that contain the coma-separated list of options which are given to the toc page's frame at the begin of a part (respectively to the section, subsection and subsubsection).
3311 % \end{variable}
3312 % \end{documentation}
3313 %%%%
3314 % \begin{implementation}
3315 % \begin{variable}[added=2025-01-06]{\partpageTocOptions, \sectionpageTocOptions, \subsectionpageTocOptions, \subsubsectionpageTocOptions}
3316 % Options used in |\begin{frame}[\partpageTocOptions,tocpart]{toc part page...}| .
3317 % TESTED in gotham-test-1039
3318 % \changes{v1.2.1}{2025-01-06}{newly introduced}
3319 % \begin{macrocode}
3320 \providecommand{\partpageTocOptions}{noframenumbering}
3321 \providecommand{\sectionpageTocOptions}{noframenumbering}
3322 \providecommand{\subsectionpageTocOptions}{noframenumbering}
3323 % \providecommand{\subsubsectionpageTocOptions}{noframenumbering}
3324 % \end{macrocode}
3325 % \end{variable}
3326 % \end{implementation}
3327
3328 % \begin{documentation}
3329 % \begin{variable}[added=2025-01-06]{\partTocOptions, \sectionTocOptions, \subsectionTocOptions, \subsubsectionTocOptions}
3330 % Variable commands that contain the coma-separated list of options which are given to the |\tableofcontents| at the beginning of a part (respectively to the section, subsection and subsubsection).
3331 % \end{variable}
3332 % \end{documentation}
3333 %%%%
3334 % \begin{implementation}
3335 % \begin{variable}[added=2025-01-06]{\partTocOptions, \sectionTocOptions, \subsectionTocOptions, \subsubsectionTocOptions}
3336 % Options used in |\tableofcontents[\partTocOptions]| .
3337 % TESTED in gotham-test-1039
3338 % \changes{v1.2.1}{2025-01-06}{newly introduced}
3339 % \begin{macrocode}
3340 \providecommand{\partTocOptions}{}
3341 \providecommand{\sectionTocOptions}{
3342 currentsection, currentsubsection,
3343 hideothersubsections,
3344 sectionstyle=show/shaded,
3345 }
3346 \providecommand{\subsectionTocOptions}{
3347 currentsection, currentsubsection,
3348 % currentsubsubsection,
3349 hideothersubsections,
3350 sectionstyle=show/shaded,
3351 subsectionstyle=show/shaded/hide,
3352 subsubsectionstyle=show/show/hide,
3353 }
3354 % \providecommand{\subsubsectionTocOptions}{}
3355 % \end{macrocode}
3356 % \end{variable}
3357 % \end{implementation}
3358
3359 % \begin{implementation}
3360 % \begin{function}[updated=2025-07-02]{\__gotham_inner_disable_partpage:, \__gotham_inner_enable_partpage:}
3361 % Commands to disable or enable the display of a 'part page' frame at the beginning of every new part.
3362 % \changes{v1.2.1}{2025-01-06}{includes new variables}
3363 % \changes{v1.2.2}{2025-07-02}{fix when multiple options given}
3364 % \changes{v1.2.4}{2025-12-25}{add partintoc}
3365 % \TestFiles{gotham-test-041}
3366 % \begin{macrocode}
3367
3368 % Missing command for part in toc from https://tex.stackexchange.com/questions/5285/tableofcontents-from-part-commands-in-beamer
3369 %% number, partname, page.
3370 \@ifundefined{beamer@partintoc}{
3371 \providecommand\beamer@partintoc[3]{
3372 \ifnum\c@tocdepth=-1\relax
3373 % requesting onlyparts.
3374 \makebox[6em]{PART #1:} #2
3375 \par
3376 \fi
3377 }
3378 \define@key{beamertoc}{onlyparts}[]{
3379 \c@tocdepth=-1\relax
3380 }
3381 }{
3382 %\providecommand\beamer@partintoc is defined, so I guess that \define@key{beamertoc}{onlyparts} also.
3383 % they are probably both coming from gotham fonts.
3384 }
3385
3386 \cs_new_protected:Nn \__gotham_inner_disable_partpage:
3387 {
3388 \AtBeginPart{
3389 % intentionally empty except adding part name in toc.
3390 \addtocontents{toc}{\protect\beamer@partintoc{\the\c@part}{\beamer@partname}{\the\c@page}}%
3391 }
3392 }
3393
3394 \cs_new_protected:Nn \__gotham_inner_enable_partpage:
3395 {
3396 \AtBeginPart{
3397 % add part name in toc
3398 \addtocontents{toc}{\protect\beamer@partintoc{\the\c@part}{\beamer@partname}{\the\c@page}}%
3399
3400 \ifbeamer@inframe
3401 \partpage
3402 \else
3403 \ifdefempty{\partpageOptions}{
3404 % empty partpageOptions command
3405 \frame[c, part]{\partpage}
3406 }{
3407 % non-empty partpageOptions command
3408 % so store the options in an intermediate variable to expand
3409 \edef\l__gotham_partpageOptions_tmp{c, \partpageOptions, part}
3410 % Give these options expanded to the frame command
3411 \expandafter\frame\expandafter[\l__gotham_partpageOptions_tmp]{\partpage}
3412 }
3413 \fi
3414
3415 \ifbool{partContent}{
3416 % true
3417 \ifdefempty{\partpageTocOptions}{
3418 % empty partpageTocOptions command so let's create a frame with simply tocpart option
3419 \frame[tocpart]{
3420 \ifdefempty{\partContentName}{}{\frametitle{\partContentName}}
3421 {
3422 \expandafter\tableofcontents\expandafter[\partTocOptions]
3423 }
3424 }
3425 }{
3426 % non-empty partpageTocOptions command so store the options in an intermediate variable to expand
3427 \edef\l__gotham_partpageTocOptions_tmp{\partpageTocOptions , tocpart}
3428 % Give these options expanded to the frame command
3429 \expandafter\frame\expandafter[\l__gotham_partpageTocOptions_tmp]{
3430 \ifdefempty{\partContentName}{}{\frametitle{\partContentName}}
3431 {
3432 \expandafter\tableofcontents\expandafter[\partTocOptions]
3433 }
3434 }
3435 }
3436 }{
3437 % else empty
3438 }
3439 }
3440 }
3441 % \end{macrocode}
3442 % \end{function}
3443 % \end{implementation}
3444
3445 % \begin{implementation}
3446 % \begin{function}[updated=2025-07-02]{\__gotham_inner_disable_sectionpage:, \__gotham_inner_enable_sectionpage:}
3447 % Commands to disable or enable the display of a 'section page' frame at the beginning of every new section.
3448 % \changes{v1.2.2}{2025-07-02}{fix when multiple options given}
3449 % \changes{v1.2.1}{2025-01-06}{includes new variables}
3450 % \TestFiles{gotham-test-041}
3451 % \begin{macrocode}
3452 \cs_new_protected:Nn \__gotham_inner_disable_sectionpage:
3453 {
3454 \AtBeginSection{
3455 % intentionally empty
3456 }
3457 }
3458
3459 \cs_new_protected:Nn \__gotham_inner_enable_sectionpage:
3460 {
3461 \AtBeginSection{
3462 \ifbeamer@inframe
3463 \sectionpage
3464 \else
3465 \ifdefempty{\sectionpageOptions}{
3466 % empty sectionpageOptions command
3467 \frame[c, section]{\sectionpage}
3468 }{
3469 % non-empty sectionpageOptions command
3470 % so store the options in an intermediate variable to expand
3471 \edef\l__gotham_sectionpageOptions_tmp{c, \sectionpageOptions, section}
3472 % Give these options expanded to the frame command
3473 \expandafter\frame\expandafter[\l__gotham_sectionpageOptions_tmp]{\sectionpage}
3474 }
3475 \fi
3476
3477 \ifbool{sectionContent}{
3478 % true
3479 \ifdefempty{\sectionpageTocOptions}{
3480 % empty sectionpageTocOptions command so let's create a frame with simply tocsec option
3481 \frame[tocsec]{
3482 \ifdefempty{\secContentName}{}{\frametitle{\secContentName}}
3483 {
3484 \expandafter\tableofcontents\expandafter[\sectionTocOptions]
3485 }
3486 }
3487 }{
3488 % non-empty sectionpageTocOptions command so store the options in an intermediate variable to expand
3489 \edef\l__gotham_sectionpageTocOptions_tmp{\sectionpageTocOptions , tocsec}
3490 % Give these options expanded to the frame command
3491 \expandafter\frame\expandafter[\l__gotham_sectionpageTocOptions_tmp]{
3492 \ifdefempty{\secContentName}{}{\frametitle{\secContentName}}
3493 {
3494 \expandafter\tableofcontents\expandafter[\sectionTocOptions]
3495 }
3496 }
3497 }
3498 }{
3499 % else empty
3500 }
3501 }
3502 }
3503 % \end{macrocode}
3504 % \end{function}
3505 % \end{implementation}
3506
3507 % \begin{implementation}
3508 % \begin{function}[updated=2025-07-02]{\__gotham_inner_disable_subsectionpage:, \__gotham_inner_enable_subsectionpage:}
3509 % Commands to disable or enable the display of a 'subsection page' frame at the beginning of every new subsection.
3510 % \changes{v1.2.1}{2025-01-06}{includes new variables}
3511 % \changes{v1.2.2}{2025-07-02}{fix when multiple options given}
3512 % \TestFiles{gotham-test-041}
3513 % \begin{macrocode}
3514 \cs_new_protected:Nn \__gotham_inner_disable_subsectionpage:
3515 {
3516 \AtBeginSubsection{
3517 % intentionally empty
3518 }
3519 }
3520
3521 \cs_new_protected:Nn \__gotham_inner_enable_subsectionpage:
3522 {
3523 \AtBeginSubsection{
3524 \ifbeamer@inframe
3525 \subsectionpage
3526 \else
3527 \ifdefempty{\subsectionpageOptions}{
3528 % empty subsectionpageOptions command
3529 \frame[c, subsec]{\subsectionpage}
3530 }{
3531 % non-empty subsectionpageOptions command
3532 % so store the options in an intermediate variable to expand
3533 \edef\l__gotham_subsectionpageOptions_tmp{c, \subsectionpageOptions, subsec}
3534 % Give these options expanded to the frame command
3535 \expandafter\frame\expandafter[\l__gotham_subsectionpageOptions_tmp]{\subsectionpage}
3536 }
3537 \fi
3538
3539 \ifbool{subsectionContent}{
3540 % true
3541 \ifdefempty{\subsectionpageTocOptions}{
3542 % empty subsectionpageTocOptions command so let's create a frame with simply tocsubsec option
3543 \frame[tocsubsec]{
3544 \ifdefempty{\subsecContentName}{}{\frametitle{\subsecContentName}}
3545 {
3546 \expandafter\tableofcontents\expandafter[\subsectionTocOptions]
3547 }
3548 }
3549 }{
3550 % non-empty subsectionpageTocOptions command so store the options in an intermediate variable to expand
3551 \edef\l__gotham_subsectionpageTocOptions_tmp{\subsectionpageTocOptions , tocsubsec}
3552 % Give these options expanded to the frame command
3553 \expandafter\frame\expandafter[\l__gotham_subsectionpageTocOptions_tmp]{
3554 \ifdefempty{\subsecContentName}{}{\frametitle{\subsecContentName}}
3555 {
3556 \expandafter\tableofcontents\expandafter[\subsectionTocOptions]
3557 }
3558 }
3559 }
3560 }{
3561 % else empty
3562 }
3563 }
3564 }
3565 % \end{macrocode}
3566 % \end{function}
3567 % \end{implementation}
3568
3569 % \begin{implementation}
3570 % \begin{function}[updated=2025-07-02]{\__gotham_inner_disable_subsubsectionpage:, \__gotham_inner_enable_subsubsectionpage:}
3571 % Commands to disable or enable the display of a 'subsubsection page' frame at the beginning of every new subsubsection.
3572 % \changes{v1.2.1}{2025-01-06}{includes new variables}
3573 % \changes{v1.2.2}{2025-07-02}{fix when multiple options given}
3574 % \TestFiles{gotham-test-041}
3575 % \begin{macrocode}
3576 \cs_new_protected:Nn \__gotham_inner_disable_subsubsectionpage:
3577 {
3578 \AtBeginSubsubsection{
3579 % intentionally empty
3580 }
3581 }
3582
3583 \cs_new_protected:Nn \__gotham_inner_enable_subsubsectionpage:
3584 {
3585 \AtBeginSubsubsection{
3586 \ifbeamer@inframe
3587 \subsubsectionpage
3588 \else
3589 \ifdefempty{\subsubsectionpageOptions}{
3590 %% empty command
3591 \frame[c, subsubsec]{\subsubsectionpage}
3592 }{
3593 %% non-empty command :
3594 % store temporary the options
3595 \edef\l__gotham_subsubsectionpageOptions_tmp{c,\subsubsectionpageOptions,subsubsec}%{c,subsubsec,\subsubsectionpageOptions}%
3596 % Give these options expanded to the frame command
3597 \expandafter\frame\expandafter[\l__gotham_subsubsectionpageOptions_tmp]{\subsubsectionpage}
3598 }
3599 \fi
3600
3601 % I don't think anyone will use this for now. But, just in case I keep it commented.
3602 % \ifbool{subsubsectionContent}{
3603 % % true
3604 % \ifdefempty{\subsubsectionpageTocOptions}{
3605 % % empty command
3606 % \begin{frame}[tocsubsubsec]
3607 % }{
3608 % % non-empty command
3609 % \begin{frame}[\expandafter\subsubsectionpageTocOptions, tocsubsubsec]
3610 % }
3611 % \ifdefempty{\subsubsecContentName}{}{\frametitle{\subsubsecContentName}}
3612 % {
3613 % \expandafter\tableofcontents\expandafter[\subsubsectionTocOptions]
3614 % }
3615 % \end{frame}
3616 % }{
3617 % % else empty
3618 % }
3619 }
3620 }
3621 % \end{macrocode}
3622 % \end{function}
3623 % \end{implementation}
3624
3625 % \begin{documentation}
3626 % \begin{variable}{\gothamProgressSectionHeight}
3627 % Variables used to defined the progress bar in section pages.
3628 % If the vertical size of the bar want to be changed, the command |\setlength{\gothamProgressSectionHeight}{<0.4pt>}| can be used.
3629 % \end{variable}
3630 % \end{documentation}
3631 %%%%%%
3632 % \begin{implementation}
3633 % \begin{variable}{\gothamProgressSectionHeight}
3634 % Variables used to defined the progress bar in section pages.
3635 % \begin{macrocode}
3636 % horizontal size of the bar (used internally and set to |\textwidth|.
3637 \newlength{\gotham@progressonsectionpage}
3638 % vertical size of the bar
3639 \newlength{\gothamProgressSectionHeight}
3640 \setlength{\gothamProgressSectionHeight}{3pt}
3641 % \end{macrocode}
3642 % \end{variable}
3643 % \end{implementation}
3644
3645 % \begin{implementation}
3646 % \begin{macro}{\defbeamertemplate{progress~bar~in~section~page}{empty}, \defbeamertemplate{progress~bar~in~section~page}{display}}
3647 % Templates to disable or enable the display of the progress bar in section pages.
3648 % \UnitTested
3649 % \TestFiles{gotham-test-041}
3650 % \begin{macrocode}
3651 \defbeamertemplate{progress~bar~in~section~page}{empty}{
3652 \vspace{\gothamProgressSectionHeight+1ex}
3653 }
3654
3655 \def\inserttotalframenumber{100}
3656 \defbeamertemplate{progress~bar~in~section~page}{display}{
3657 \setlength{\gotham@progressonsectionpage}{
3658 \textwidth * \ratio{\insertframenumber~pt}{\inserttotalframenumber~pt}
3659 }
3660 \begin{tikzpicture}
3661 \fill[bg] (0,0) rectangle (\textwidth, \gothamProgressSectionHeight);
3662 \fill[fg] (0,0) rectangle (\gotham@progressonsectionpage, \gothamProgressSectionHeight);
3663 \end{tikzpicture}
3664 }
3665 % \end{macrocode}
3666 % \end{macro}
3667 % \end{implementation}
3668
3669 % \begin{documentation}
3670 % \begin{variable}{\sectionhoffset}
3671 % length controlling the horizontal offset of the (section title + progress bar) block.
3672 % Can be useful when extra stuff want to be display on sides of the block.
3673 % The default value is 0.
3674 % \end{variable}
3675 % \end{documentation}
3676 %%%%%%
3677 % \begin{implementation}
3678 % \begin{variable}{\sectionhoffset}
3679 % length controlling the horizontal offset of the (section title + progress bar) block.
3680 % \begin{macrocode}
3681 \newlength{\sectionhoffset}
3682 \setlength{\sectionhoffset}{0pt}
3683 % \end{macrocode}
3684 % \end{variable}
3685 % \end{implementation}
3686
3687 % \begin{implementation}
3688 % \begin{macro}{\defbeamertemplate*{part|section|subsection|subsubsection~page}{progressbar/simple}}
3689 % Template of part \textbar section \textbar subsection \textbar subsubsection pages shared by 'progressbar' and 'simple' style.
3690 % These pages contain what is inside the part \textbar section \textbar subsection \textbar subsubsection frame (without background and frametitle).
3691 % \UnitTested
3692 % \TestFiles{gotham-test-041}
3693 % \begin{macrocode}
3694 \defbeamertemplate{part~page}{progressbar/simple}{
3695 %\frametitle{toto section}
3696 \centering
3697 \hspace*{\sectionhoffset}
3698 \begin{minipage}{22em}
3699 % \raggedright
3700 \centering
3701 \usebeamertemplate*{part~title}\\[-1ex]
3702 \usebeamertemplate*{progress~bar~in~section~page}
3703 \par
3704 \end{minipage}
3705 \par
3706 \vspace{\baselineskip}
3707 }
3708 \defbeamertemplate{section~page}{progressbar/simple}{
3709 %\frametitle{toto section}
3710 \centering
3711 \hspace*{\sectionhoffset}
3712 \begin{minipage}{22em}
3713 \raggedright
3714 \usebeamertemplate*{section~title}\\[-1ex]
3715 \usebeamertemplate*{progress~bar~in~section~page}
3716 \par
3717 \end{minipage}
3718 \par
3719 \vspace{\baselineskip}
3720 }
3721 \defbeamertemplate{subsection~page}{progressbar/simple}{
3722 %\frametitle{toto section}
3723 \centering
3724 \hspace*{\sectionhoffset}
3725 \begin{minipage}{22em}
3726 \raggedright
3727 \usebeamertemplate*{section~title}\\[-1ex]
3728 \usebeamertemplate*{progress~bar~in~section~page}
3729 \par
3730 \usebeamertemplate*{subsection~title}
3731 \end{minipage}
3732 \par
3733 \vspace{\baselineskip}
3734 }
3735 \defbeamertemplate{subsubsection~page}{progressbar/simple}{
3736 % \frametitle{toto section}
3737 \centering
3738 \hspace*{\sectionhoffset}
3739 \begin{minipage}{22em}
3740 \raggedright
3741 \usebeamertemplate*{section~title}\\[-1ex]
3742 \usebeamertemplate*{progress~bar~in~section~page}
3743 \par
3744 \usebeamertemplate*{subsection~title}
3745 \par
3746 \usebeamertemplate*{subsubsection~title}
3747 \end{minipage}
3748 \par
3749 \vspace{\baselineskip}
3750 }
3751 % \end{macrocode}
3752 % \end{macro}
3753 % \end{implementation}
3754
3755 % \begin{implementation}
3756 % \begin{macro}{\defbeamertemplate{background~canvas}{part|section|subsection|subsubsection/gotham}}
3757 % Background canvas template of part \textbar section \textbar subsection \textbar subsubsection pages.
3758 % \UnitTested
3759 % \TestFiles{gotham-test-041}
3760 % \begin{macrocode}
3761 \defbeamertemplate{background~canvas}{part/gotham}{
3762 \ifbeamercolorempty[bg]{normal~text}{}{\color{bg}\vrule width\paperwidth height\paperheight}
3763 }
3764 \defbeamertemplate{background~canvas}{section/gotham}{
3765 \setbeamertemplate{background~canvas}[part/gotham]
3766 \usebeamertemplate{background~canvas}
3767 }
3768 \defbeamertemplate{background~canvas}{subsection/gotham}{
3769 \setbeamertemplate{background~canvas}[part/gotham]
3770 \usebeamertemplate{background~canvas}
3771 }
3772 \defbeamertemplate{background~canvas}{subsubsection/gotham}{
3773 \setbeamertemplate{background~canvas}[part/gotham]
3774 \usebeamertemplate{background~canvas}
3775 }
3776 % \end{macrocode}
3777 % \end{macro}
3778 % \end{implementation}
3779
3780 % \begin{implementation}
3781 % \begin{macro}{\defbeamertemplate{part|section|subsection|subsubsection~frame}{gotham~simple}}
3782 % Template for part \textbar section \textbar subsection \textbar subsubsection frames with 'gotham simple' style.
3783 % \UnitTested
3784 % \TestFiles{gotham-test-041}
3785 % \begin{macrocode}
3786 \defbeamertemplate{part~frame}{gotham~simple}{
3787 \setbeamertemplate{background~canvas}[part/gotham]
3788 \setbeamercolor{frametitle}{
3789 use={frametitleSection, normal~text},
3790 bg=frametitleSection.fg,
3791 fg=normal~text.fg
3792 }
3793 \setbeamertemplate{progress~bar~in~section~page}[empty]
3794 \setbeamertemplate{part~page}[progressbar/simple]
3795 % \usebeamertemplate*{part~page}% activated automatically
3796 }
3797
3798 \defbeamertemplate{section~frame}{gotham~simple}{
3799 \setbeamertemplate{background~canvas}[section/gotham]
3800 \setbeamercolor{frametitle}{
3801 use={frametitleSection, normal~text},
3802 bg=frametitleSection.fg,
3803 fg=normal~text.fg
3804 }
3805 \setbeamertemplate{progress~bar~in~section~page}[empty]
3806 \setbeamertemplate{section~page}[progressbar/simple]
3807 % \usebeamertemplate*{section~page}% activated automatically
3808 }
3809
3810 \defbeamertemplate{subsection~frame}{gotham~simple}{
3811 \setbeamertemplate{background~canvas}[subsection/gotham]
3812 \setbeamercolor{frametitle}{
3813 use={frametitleSection, normal~text},
3814 bg=frametitleSection.fg,
3815 fg=normal~text.fg
3816 }
3817 \setbeamertemplate{progress~bar~in~section~page}[empty]
3818 \setbeamertemplate{subsection~page}[progressbar/simple]
3819 % \usebeamertemplate*{subsection~page}% activated automatically
3820 }
3821
3822 \defbeamertemplate{subsubsection~frame}{gotham~simple}{
3823 \setbeamertemplate{background~canvas}[subsubsection/gotham]
3824 \setbeamercolor{frametitle}{
3825 use={frametitleSection, normal~text},
3826 bg=frametitleSection.fg,
3827 fg=normal~text.fg
3828 }
3829 \setbeamertemplate{progress~bar~in~section~page}[empty]
3830 \setbeamertemplate{subsubsection~page}[progressbar/simple]
3831 % \usebeamertemplate*{subsubsection~page}% activated automatically
3832 }
3833 % \end{macrocode}
3834 % \end{macro}
3835 % \end{implementation}
3836
3837 % \begin{implementation}
3838 % \begin{macro}{\defbeamertemplate{part|section|subsection|subsubsection~frame}{gotham~progressbar}}
3839 % Template for part \textbar section \textbar subsection \textbar subsubsection frames with 'gotham progressbar' style.
3840 % \UnitTested
3841 % \TestFiles{gotham-test-041}
3842 % \begin{macrocode}
3843 \defbeamertemplate{part~frame}{gotham~progressbar}{
3844 \setbeamertemplate{background~canvas}[part/gotham]
3845 \setbeamercolor{frametitle}{
3846 use={frametitleSection, normal~text},
3847 bg=frametitleSection.fg,
3848 fg=normal~text.fg
3849 }
3850 \setbeamertemplate{progress~bar~in~section~page}[display]
3851 \setbeamertemplate{part~page}[progressbar/simple]
3852 % \usebeamertemplate*{part~page}% activated automatically
3853 }
3854
3855 \defbeamertemplate{section~frame}{gotham~progressbar}{
3856 \setbeamertemplate{background~canvas}[section/gotham]
3857 \setbeamercolor{frametitle}{
3858 use={frametitleSection, normal~text},
3859 bg=frametitleSection.fg,
3860 fg=normal~text.fg
3861 }
3862 \setbeamertemplate{progress~bar~in~section~page}[display]
3863 \setbeamertemplate{section~page}[progressbar/simple]
3864 % \usebeamertemplate*{section~page}% activated automatically
3865 }
3866
3867 \defbeamertemplate{subsection~frame}{gotham~progressbar}{
3868 \setbeamertemplate{background~canvas}[subsection/gotham]
3869 \setbeamercolor{frametitle}{
3870 use={frametitleSection, normal~text},
3871 bg=frametitleSection.fg,
3872 fg=normal~text.fg
3873 }
3874 \setbeamertemplate{progress~bar~in~section~page}[display]
3875 \setbeamertemplate{subsection~page}[progressbar/simple]
3876 % \usebeamertemplate*{subsection~page}% activated automatically
3877 }
3878
3879 \defbeamertemplate{subsubsection~frame}{gotham~progressbar}{
3880 \setbeamertemplate{background~canvas}[subsubsection/gotham]
3881 \setbeamercolor{frametitle}{
3882 use={frametitleSection, normal~text},
3883 bg=frametitleSection.fg,
3884 fg=normal~text.fg
3885 }
3886 \setbeamertemplate{progress~bar~in~section~page}[display]
3887 \setbeamertemplate{subsubsection~page}[progressbar/simple]
3888 % \usebeamertemplate*{subsubsection~page}% activated automatically
3889 }
3890 % \end{macrocode}
3891 % \end{macro}
3892 % \end{implementation}
3893
3894 % \begin{implementation}
3895 % \begin{macro}{\defbeamertemplate*{progress~bar~in~splitvert}{empty|dispay}}
3896 % Internal template to display or disable (empty) the progressbar used in 'splitvert' (split vertically) style.
3897 % \UnitTested
3898 % \TestFiles{gotham-test-041}
3899 % \begin{macrocode}
3900 \defbeamertemplate{progress~bar~in~splitvert}{empty}{
3901 \vspace{-0.5ex}
3902 }
3903
3904 \defbeamertemplate*{progress~bar~in~splitvert}{display}{
3905 % \nointerlineskip
3906 \setlength{\gotham@progressonsectionpage}{
3907 \paperwidth * \ratio{\insertframenumber pt}{\inserttotalframenumber pt}
3908 }
3909 \begin{tikzpicture}
3910 \fill[bg] (0,0) rectangle (\paperwidth, \gothamProgressSectionHeight);
3911 \fill[fg] (0,0) rectangle (\gotham@progressonsectionpage, \gothamProgressSectionHeight);
3912 \end{tikzpicture}
3913 }
3914 % \end{macrocode}
3915 % \end{macro}
3916 % \end{implementation}
3917
3918 % \begin{implementation}
3919 % \begin{macro}{\defbeamertemplate{part|section|subsection|subsubsection page}{gotham splitvert progressbar/simple}, \defbeamertemplate{part|section|subsection|subsubsection frame}{gotham splitvert progressbar}, \defbeamertemplate{part|section|subsection|subsubsection frame}{gotham splitvert simple}}
3920 % Templates for part \textbar section \textbar subsection \textbar subsubsection pages that are common for 'gotham splitvert progressbar' and 'gotham splitvert simple' styles (which implies part \textbar section \textbar subsection \textbar subsubsection frames).
3921 % \UnitTested
3922 % \TestFiles{gotham-test-041}
3923 % \begin{macrocode}
3924 % Part page splitvert.
3925 \defbeamertemplate{part~page}{gotham~splitvert~progressbar/simple}{
3926 % \frametitle{part!}
3927 % \IfEmpty{\insertframetitle}{
3928 \ifx\beamer@frametitle\@empty
3929 \vspace*{-0.05\paperheight}
3930 \else %}{
3931 \vspace*{-0.165\paperheight}
3932 \fi %}
3933 {
3934 \usebeamercolor{frametitle}\colorlet{gotham@@tempColor}{bg}
3935 \begin{tikzpicture}[overlay, remember~picture]
3936 \fill[color=gotham@@tempColor] (current~page.north~west) rectangle ([shift = {(0, -0.45\paperheight)}] current~page.north~east);
3937 \end{tikzpicture}
3938 }
3939
3940 % \hspace*{\sectionhoffset}
3941 \begin{minipage}[b][0.45\paperheight]{\textwidth}
3942 \centering
3943 \usebeamertemplate*{part~title}
3944 \end{minipage}
3945 \\[-0.1\baselineskip]
3946 \hspace*{-1.0cm}\noindent
3947 \usebeamertemplate*{progress~bar~in~splitvert}
3948
3949 \newline
3950 \begin{minipage}[t][0.5\paperheight]{\textwidth}
3951 % \vspace{0.5\baselineskip}
3952 % \usebeamerfont{subsection~ttitle}
3953 % \usebeamercolor[bg]{frametitle}
3954 % empty
3955 \end{minipage}
3956 }
3957 \defbeamertemplate{part~frame}{gotham~splitvert~progressbar}{
3958 \setbeamertemplate{background~canvas}[part/gotham]
3959 % \setbeamercolor{frametitle}{}
3960 % \setlength{\sectionhoffset}{1cm}
3961 \setbeamercolor{part~title}{use=frametitle, fg=frametitle.fg}
3962 \setbeamertemplate{progress~bar~in~splitvert}[display]
3963 \setbeamertemplate{part~page}[gotham~splitvert~progressbar/simple]
3964 % \usebeamertemplate*{part~page}% activated automatically
3965 }
3966 \defbeamertemplate{part~frame}{gotham~splitvert~simple}{
3967 \setbeamertemplate{background~canvas}[part/gotham]
3968 % \setbeamercolor{frametitle}{}
3969 % \setlength{\sectionhoffset}{1cm}
3970 \setbeamercolor{part~title}{use=frametitle, fg=frametitle.fg}
3971 \setbeamertemplate{progress~bar~in~splitvert}[empty]
3972 \setbeamertemplate{part~page}[gotham~splitvert~progressbar/simple]
3973 % \usebeamertemplate*{part~page}% activated automatically
3974 }
3975
3976 % Section page splitvert.
3977 \defbeamertemplate{section~page}{gotham~splitvert~progressbar/simple}{
3978 % \frametitle{section!}
3979 % \IfEmpty{\insertframetitle}{
3980 \ifx\beamer@frametitle\@empty
3981 \vspace*{-0.05\paperheight}
3982 \else %}{
3983 \vspace*{-0.165\paperheight}
3984 \fi %}
3985 {
3986 \usebeamercolor{frametitle}\colorlet{gotham@@tempColor}{bg}
3987 \begin{tikzpicture}[overlay, remember~picture]
3988 \fill[color=gotham@@tempColor] (current~page.north~west) rectangle ([shift = {(0, -0.45\paperheight)}] current~page.north~east);
3989 \end{tikzpicture}
3990 }
3991
3992 \hspace*{\sectionhoffset}
3993 \begin{minipage}[b][0.45\paperheight]{\textwidth}
3994 \usebeamertemplate*{section~title}
3995 \end{minipage}
3996 \\[-0.1\baselineskip]
3997 \hspace*{-1.0cm}\noindent
3998 \usebeamertemplate*{progress~bar~in~splitvert}
3999
4000 \newline
4001 \hspace*{\sectionhoffset}
4002 \begin{minipage}[t][0.5\paperheight]{\textwidth}
4003 % \vspace{0.5\baselineskip}
4004 \usebeamerfont{subsection~title}
4005 \usebeamercolor[bg]{frametitle}
4006 % empty
4007 \end{minipage}
4008 }
4009 \defbeamertemplate{section~frame}{gotham~splitvert~progressbar}{
4010 \setbeamertemplate{background~canvas}[section/gotham]
4011 % \setbeamercolor{frametitle}{}
4012 \setlength{\sectionhoffset}{1cm}
4013 \setbeamercolor{section~title}{use=frametitle, fg=frametitle.fg}
4014 \setbeamertemplate{progress~bar~in~splitvert}[display]
4015 \setbeamertemplate{section~page}[gotham~splitvert~progressbar/simple]
4016 % \usebeamertemplate*{section~page}% activated automatically
4017 }
4018 \defbeamertemplate{section~frame}{gotham~splitvert~simple}{
4019 \setbeamertemplate{background~canvas}[section/gotham]
4020 % \setbeamercolor{frametitle}{}
4021 \setlength{\sectionhoffset}{1cm}
4022 \setbeamercolor{section~title}{use=frametitle, fg=frametitle.fg}
4023 \setbeamertemplate{progress~bar~in~splitvert}[empty]
4024 \setbeamertemplate{section~page}[gotham~splitvert~progressbar/simple]
4025 % \usebeamertemplate*{section~page}% activated automatically
4026 }
4027
4028 % Subsection page splitvert.
4029 \defbeamertemplate{subsection~page}{gotham~splitvert~progressbar/simple}{
4030 % \frametitle{subsection!}
4031 % \IfEmpty{\insertframetitle}{
4032 \ifx\beamer@frametitle\@empty
4033 \vspace*{-0.05\paperheight}
4034 \else %}{
4035 \vspace*{-0.165\paperheight}
4036 \fi %}
4037 {
4038 \usebeamercolor{frametitle}\colorlet{gotham@@tempColor}{bg}
4039 \begin{tikzpicture}[overlay, remember~picture]
4040 \fill[color=gotham@@tempColor] (current~page.north~west) rectangle ([shift = {(0, -0.45\paperheight)}] current~page.north~east);
4041 \end{tikzpicture}
4042 }
4043
4044 \hspace*{\sectionhoffset}
4045 \begin{minipage}[b][0.45\paperheight]{\textwidth}
4046 \usebeamertemplate*{section~title}
4047 \end{minipage}
4048 \\[-0.1\baselineskip]
4049 \hspace*{-1.0cm}\noindent
4050 \usebeamertemplate*{progress~bar~in~splitvert}
4051
4052 \newline
4053 \hspace*{\sectionhoffset}
4054 \begin{minipage}[t][0.5\paperheight]{\textwidth}
4055 % \vspace{0.5\baselineskip}
4056 \usebeamerfont{subsection~title}
4057 \usebeamercolor[bg]{frametitle}
4058 \usebeamertemplate*{subsection~title}
4059 % \par
4060 % \vspace{1em}%phantom subsection
4061 \end{minipage}
4062 }
4063 \defbeamertemplate{subsection~frame}{gotham~splitvert~progressbar}{
4064 \setbeamertemplate{background~canvas}[subsection/gotham]
4065 % \setbeamercolor{frametitle}{}
4066 \setlength{\sectionhoffset}{1cm}
4067 \setbeamercolor{section~title}{use=frametitle, fg=frametitle.fg}
4068 \setbeamercolor{subsection~title}{use=frametitle, fg=frametitle.bg}
4069 \setbeamertemplate{progress~bar~in~splitvert}[display]
4070 \setbeamertemplate{subsection~page}[gotham~splitvert~progressbar/simple]
4071 % \usebeamertemplate*{subsection~page}% activated automatically
4072 }
4073 \defbeamertemplate{subsection~frame}{gotham~splitvert~simple}{
4074 \setbeamertemplate{background~canvas}[subsection/gotham]
4075 % \setbeamercolor{frametitle}{}
4076 \setlength{\sectionhoffset}{1cm}
4077 \setbeamercolor{section~title}{use=frametitle, fg=frametitle.fg}
4078 \setbeamercolor{subsection~title}{use=frametitle, fg=frametitle.bg}
4079 \setbeamertemplate{progress~bar~in~splitvert}[empty]
4080 \setbeamertemplate{subsection~page}[gotham~splitvert~progressbar/simple]
4081 % \usebeamertemplate*{subsection~page}% activated automatically
4082 }
4083
4084 % Subsubection page splitvert.
4085 \defbeamertemplate{subsubsection~page}{gotham~splitvert~progressbar/simple}{
4086 % \frametitle{subsubsection!}
4087 % \IfEmpty{\insertframetitle}{
4088 \ifx\beamer@frametitle\@empty
4089 \vspace*{-0.05\paperheight}
4090 \else %}{
4091 \vspace*{-0.165\paperheight}
4092 \fi %}
4093 {
4094 \usebeamercolor{frametitle}\colorlet{gotham@@tempColor}{bg}
4095 \begin{tikzpicture}[overlay, remember~picture]
4096 \fill[color=gotham@@tempColor] (current~page.north~west) rectangle ([shift = {(0, -0.45\paperheight)}] current~page.north~east);
4097 \end{tikzpicture}
4098 }
4099
4100 \hspace*{\sectionhoffset}
4101 \begin{minipage}[b][0.45\paperheight]{\textwidth}
4102 \usebeamertemplate*{section~title}
4103 \end{minipage}
4104 \\[-0.1\baselineskip]
4105 \hspace*{-1.0cm}\noindent
4106 \usebeamertemplate*{progress~bar~in~splitvert}
4107
4108 \newline
4109 \hspace*{\sectionhoffset}
4110 \begin{minipage}[t][0.5\paperheight]{\textwidth}
4111 % \vspace{0.5\baselineskip}
4112 \usebeamerfont{subsubsection~title}
4113 \usebeamercolor[bg]{frametitle}
4114 \usebeamertemplate*{subsection~title}
4115 \par
4116 \usebeamertemplate*{subsubsection~title}
4117 \end{minipage}
4118 }
4119 \defbeamertemplate{subsubsection~frame}{gotham~splitvert~progressbar}{
4120 \setbeamertemplate{background~canvas}[subsubsection/gotham]
4121 % \setbeamercolor{frametitle}{}
4122 \setlength{\sectionhoffset}{1cm}
4123 \setbeamercolor{section~title}{use=frametitle, fg=frametitle.fg}
4124 \setbeamercolor{subsection~title}{use=frametitle, fg=frametitle.bg}
4125 \setbeamercolor{subsubsection~title}{use=frametitle, fg=frametitle.bg}
4126 \setbeamertemplate{progress~bar~in~splitvert}[display]
4127 \setbeamertemplate{subsubsection~page}[gotham~splitvert~progressbar/simple]
4128 % \usebeamertemplate*{subsubsection~page}% activated automatically
4129 }
4130 \defbeamertemplate{subsubsection~frame}{gotham~splitvert~simple}{
4131 \setbeamertemplate{background~canvas}[subsubsection/gotham]
4132 % \setbeamercolor{frametitle}{}
4133 \setlength{\sectionhoffset}{1cm}
4134 \setbeamercolor{section~title}{use=frametitle, fg=frametitle.fg}
4135 \setbeamercolor{subsection~title}{use=frametitle, fg=frametitle.bg}
4136 \setbeamercolor{subsubsection~title}{use=frametitle, fg=frametitle.bg}
4137 \setbeamertemplate{progress~bar~in~splitvert}[empty]
4138 \setbeamertemplate{subsubsection~page}[gotham~splitvert~progressbar/simple]
4139 % \usebeamertemplate*{subsubsection~page}% activated automatically
4140 }
4141 % \end{macrocode}
4142 % \end{macro}
4143 % \end{implementation}
4144
4145
4146 % \begin{implementation}
4147 % \begin{macro}{\defbeamertemplate{part|section|subsection|subsubsection page}{gotham progressvert}, \defbeamertemplate{part|section|subsection|subsubsection frame}{gotham progressvert}}
4148 % Templates for part \textbar section \textbar subsection \textbar subsubsection pages for 'gotham progressvert'.
4149 % \UnitTested
4150 % \TestFiles{gotham-test-041}
4151 % \begin{macrocode}
4152
4153 % Part page progressvert.
4154 \defbeamertemplate{part~page}{gotham~progressvert}{
4155 % \frametitle{part!}
4156 % \IfEmpty{\insertframetitle}{
4157 \ifx\beamer@frametitle\@empty
4158 \vspace*{-0.05\paperheight}
4159 \else %}{
4160 \vspace*{-0.165\paperheight}
4161 \fi %}
4162 \setlength{\gotham@progressonsectionpage}{
4163 \paperheight * \ratio{\insertframenumber pt}{\inserttotalframenumber pt}
4164 }
4165 {
4166 \usebeamercolor{frametitle}\colorlet{gotham@@tempColor}{bg}
4167 \colorlet{gotham@@tempColorB}{fg}
4168 \begin{tikzpicture}[overlay, remember~picture]
4169 \fill[color=gotham@@tempColor]
4170 ([shift={(0,0)}] current~page.north~west) --
4171 ([shift={(0,-\gotham@progressonsectionpage)}] current~page.north~west) --
4172 ([shift={(0,-\gotham@progressonsectionpage)}] current~page.north~east) --
4173 ([shift={(0,0)}] current~page.north~east)
4174 --cycle;
4175 \node[color=gotham@@tempColorB, align=left, text~width=0.8\textwidth] at ([shift={(\sectionhoffset,0)}] current~page.center) {
4176 {\usebeamerfont{part~title}
4177 \partname \ \insertromanpartnumber
4178 \\[1.75ex]
4179 \insertpart
4180 }
4181 };
4182
4183 \clip
4184 ([shift={(0,0)}] current~page.south~west) --
4185 ([shift={(0,\paperheight-\gotham@progressonsectionpage)}] current~page.south~west) --
4186 ([shift={(0,\paperheight-\gotham@progressonsectionpage)}] current~page.south~east) --
4187 ([shift={(0,0)}] current~page.south~east)
4188 --cycle;
4189
4190 \fill[color=gotham@@tempColorB]
4191 ([shift={(0,0)}]current~page.south~west) --
4192 ([shift={(0,\paperheight-\gotham@progressonsectionpage)}] current~page.south~west) --
4193 ([shift={(0,\paperheight-\gotham@progressonsectionpage)}] current~page.south~east) --
4194 ([shift={(0,0)}] current~page.south~east)
4195 --cycle;
4196 \node[color=gotham@@tempColor, align=left, text~width=0.8\textwidth] at ([shift={(\sectionhoffset,0)}] current~page.center) {
4197 {\usebeamerfont{part~title}
4198 \partname \ \insertromanpartnumber
4199 \\
4200 \insertpart
4201 }
4202 };
4203 \end{tikzpicture}
4204 }
4205 }
4206 \defbeamertemplate{part~frame}{gotham~progressvert}{
4207 \setbeamertemplate{background~canvas}[part/gotham]
4208 % \setbeamercolor{frametitle}{}
4209 \setlength{\sectionhoffset}{1cm}
4210 % \setbeamercolor{section~title}{use=frametitle, fg=frametitle.bg}
4211 % \setbeamercolor{subsection~title}{use=frametitle, fg=frametitle.bg}
4212 % \setbeamercolor{part~title}{use=frametitle, fg=frametitle.bg}
4213 % \setbeamertemplate{progress~bar~in~splitvert}[display]
4214 \setbeamertemplate{part~page}[gotham~progressvert]
4215 % \usebeamertemplate*{section~page}% activated automatically
4216 }
4217
4218 % Section page progressvert.
4219 \defbeamertemplate{section~page}{gotham~progressvert}{
4220 % \frametitle{section!}
4221 % \IfEmpty{\insertframetitle}{
4222 \ifx\beamer@frametitle\@empty
4223 \vspace*{-0.05\paperheight}
4224 \else %}{
4225 \vspace*{-0.165\paperheight}
4226 \fi %}
4227 \setlength{\gotham@progressonsectionpage}{
4228 \paperheight * \ratio{\insertframenumber pt}{\inserttotalframenumber pt}
4229 }
4230 {
4231 \usebeamercolor{frametitle}\colorlet{gotham@@tempColor}{bg}
4232 \colorlet{gotham@@tempColorB}{fg}
4233 \begin{tikzpicture}[overlay, remember~picture]
4234 \fill[color=gotham@@tempColor]
4235 ([shift={(0,0)}] current~page.north~west) --
4236 ([shift={(0,-\gotham@progressonsectionpage)}] current~page.north~west) --
4237 ([shift={(0,-\gotham@progressonsectionpage)}] current~page.north~east) --
4238 ([shift={(0,0)}] current~page.north~east)
4239 --cycle;
4240 \node[color=gotham@@tempColorB, align=left, text~width=0.8\textwidth] at ([shift={(\sectionhoffset,0)}] current~page.center) {
4241 {\usebeamerfont{section~title}
4242 \insertsectionnumber.~
4243 \insertsectionhead}
4244 };
4245
4246 \clip
4247 ([shift={(0,0)}] current~page.south~west) --
4248 ([shift={(0,\paperheight-\gotham@progressonsectionpage)}] current~page.south~west) --
4249 ([shift={(0,\paperheight-\gotham@progressonsectionpage)}] current~page.south~east) --
4250 ([shift={(0,0)}] current~page.south~east)
4251 --cycle;
4252
4253 \fill[color=gotham@@tempColorB]
4254 ([shift={(0,0)}]current~page.south~west) --
4255 ([shift={(0,\paperheight-\gotham@progressonsectionpage)}] current~page.south~west) --
4256 ([shift={(0,\paperheight-\gotham@progressonsectionpage)}] current~page.south~east) --
4257 ([shift={(0,0)}] current~page.south~east)
4258 --cycle;
4259 \node[color=gotham@@tempColor, align=left, text~width=0.8\textwidth] at ([shift={(\sectionhoffset,0)}] current~page.center) {
4260 {\usebeamerfont{section~title}
4261 \insertsectionnumber.~
4262 \insertsectionhead}
4263 };
4264 \end{tikzpicture}
4265 }
4266 }
4267 \defbeamertemplate{section~frame}{gotham~progressvert}{
4268 \setbeamertemplate{background~canvas}[section/gotham]
4269 % \setbeamercolor{frametitle}{}
4270 \setlength{\sectionhoffset}{1cm}
4271 % \setbeamercolor{section~title}{use=frametitle, fg=frametitle.bg}
4272 % \setbeamercolor{subsection~title}{use=frametitle, fg=frametitle.bg}
4273 % \setbeamercolor{section~title}{use=frametitle, fg=frametitle.bg}
4274 % \setbeamertemplate{progress~bar~in~splitvert}[display]
4275 \setbeamertemplate{section~page}[gotham~progressvert]
4276 % \usebeamertemplate*{section~page}% activated automatically
4277 }
4278
4279 % Subection page progressvert.
4280 \defbeamertemplate{subsection~page}{gotham~progressvert}{
4281 % \frametitle{subsection!}
4282 % \IfEmpty{\insertframetitle}{
4283 \ifx\beamer@frametitle\@empty
4284 \vspace*{-0.05\paperheight}
4285 \else %}{
4286 \vspace*{-0.165\paperheight}
4287 \fi %}
4288 \setlength{\gotham@progressonsectionpage}{
4289 \paperheight * \ratio{\insertframenumber pt}{\inserttotalframenumber pt}
4290 }
4291 {
4292 \usebeamercolor{frametitle}\colorlet{gotham@@tempColor}{bg}
4293 \colorlet{gotham@@tempColorB}{fg}
4294 \begin{tikzpicture}[overlay, remember~picture]
4295 \fill[color=gotham@@tempColor]
4296 ([shift={(0,0)}] current~page.north~west) --
4297 ([shift={(0,-\gotham@progressonsectionpage)}] current~page.north~west) --
4298 ([shift={(0,-\gotham@progressonsectionpage)}] current~page.north~east) --
4299 ([shift={(0,0)}] current~page.north~east)
4300 --cycle;
4301 \node[color=gotham@@tempColorB, align=left, text~width=0.8\textwidth] at ([shift={(\sectionhoffset,0)}] current~page.center) {
4302 {\usebeamerfont{section~title}
4303 \insertsectionnumber.~
4304 \insertsectionhead}
4305 \\
4306 {\usebeamerfont{subsection~title}
4307 \insertsectionnumber.\insertsubsectionnumber.~
4308 \insertsubsectionhead}
4309 };
4310
4311 \clip
4312 ([shift={(0,0)}] current~page.south~west) --
4313 ([shift={(0,\paperheight-\gotham@progressonsectionpage)}] current~page.south~west) --
4314 ([shift={(0,\paperheight-\gotham@progressonsectionpage)}] current~page.south~east) --
4315 ([shift={(0,0)}] current~page.south~east)
4316 --cycle;
4317
4318 \fill[color=gotham@@tempColorB]
4319 ([shift={(0,0)}]current~page.south~west) --
4320 ([shift={(0,\paperheight-\gotham@progressonsectionpage)}] current~page.south~west) --
4321 ([shift={(0,\paperheight-\gotham@progressonsectionpage)}] current~page.south~east) --
4322 ([shift={(0,0)}] current~page.south~east)
4323 --cycle;
4324 \node[color=gotham@@tempColor, align=left, text~width=0.8\textwidth] at ([shift={(\sectionhoffset,0)}] current~page.center) {
4325 {\usebeamerfont{section~title}
4326 \insertsectionnumber.~
4327 \insertsectionhead}
4328 \\
4329 {\usebeamerfont{subsection~title}
4330 \insertsectionnumber.\insertsubsectionnumber.~
4331 \insertsubsectionhead}
4332 };
4333 \end{tikzpicture}
4334 }
4335 }
4336 \defbeamertemplate{subsection~frame}{gotham~progressvert}{
4337 \setbeamertemplate{background~canvas}[subsection/gotham]
4338 % \setbeamercolor{frametitle}{}
4339 \setlength{\sectionhoffset}{1cm}
4340 % \setbeamercolor{section~title}{use=frametitle, fg=frametitle.bg}
4341 % \setbeamercolor{subsection~title}{use=frametitle, fg=frametitle.bg}
4342 % \setbeamercolor{subsection~title}{use=frametitle, fg=frametitle.bg}
4343 % \setbeamertemplate{progress~bar~in~splitvert}[display]
4344 \setbeamertemplate{subsection~page}[gotham~progressvert]
4345 % \usebeamertemplate*{subsection~page}% activated automatically
4346 }
4347
4348 % Subsubection page progressvert.
4349 \defbeamertemplate{subsubsection~page}{gotham~progressvert}{
4350 % \frametitle{subsubsection!}
4351 % \IfEmpty{\insertframetitle}{
4352 \ifx\beamer@frametitle\@empty
4353 \vspace*{-0.05\paperheight}
4354 \else %}{
4355 \vspace*{-0.165\paperheight}
4356 \fi %}
4357 \setlength{\gotham@progressonsectionpage}{
4358 \paperheight * \ratio{\insertframenumber pt}{\inserttotalframenumber pt}
4359 }
4360 {
4361 \usebeamercolor{frametitle}\colorlet{gotham@@tempColor}{bg}
4362 \colorlet{gotham@@tempColorB}{fg}
4363 \begin{tikzpicture}[overlay, remember~picture]
4364 \fill[color=gotham@@tempColor]
4365 ([shift={(0,0)}] current~page.north~west) --
4366 ([shift={(0,-\gotham@progressonsectionpage)}] current~page.north~west) --
4367 ([shift={(0,-\gotham@progressonsectionpage)}] current~page.north~east) --
4368 ([shift={(0,0)}] current~page.north~east)
4369 --cycle;
4370 \node[color=gotham@@tempColorB, align=left, text~width=0.8\textwidth] at ([shift={(\sectionhoffset,0)}] current~page.center) {
4371 {\usebeamerfont{section~title}
4372 \insertsectionnumber.~
4373 \insertsectionhead}
4374 \\
4375 {\usebeamerfont{subsection~title}
4376 \insertsectionnumber.\insertsubsectionnumber.~
4377 \insertsubsectionhead}
4378 \\
4379 {\usebeamerfont{subsubsection~title}
4380 \insertsectionnumber.\insertsubsectionnumber.\insertsubsubsectionnumber.~
4381 \insertsubsubsectionhead}
4382 };
4383
4384 \clip
4385 ([shift={(0,0)}] current~page.south~west) --
4386 ([shift={(0,\paperheight-\gotham@progressonsectionpage)}] current~page.south~west) --
4387 ([shift={(0,\paperheight-\gotham@progressonsectionpage)}] current~page.south~east) --
4388 ([shift={(0,0)}] current~page.south~east)
4389 --cycle;
4390
4391 \fill[color=gotham@@tempColorB]
4392 ([shift={(0,0)}]current~page.south~west) --
4393 ([shift={(0,\paperheight-\gotham@progressonsectionpage)}] current~page.south~west) --
4394 ([shift={(0,\paperheight-\gotham@progressonsectionpage)}] current~page.south~east) --
4395 ([shift={(0,0)}] current~page.south~east)
4396 --cycle;
4397 \node[color=gotham@@tempColor, align=left, text~width=0.8\textwidth] at ([shift={(\sectionhoffset,0)}] current~page.center) {
4398 {\usebeamerfont{section~title}
4399 \insertsectionnumber.~
4400 \insertsectionhead}
4401 \\
4402 {\usebeamerfont{subsection~title}
4403 \insertsectionnumber.\insertsubsectionnumber.~
4404 \insertsubsectionhead}
4405 \\
4406 {\usebeamerfont{subsubsection~title}
4407 \insertsectionnumber.\insertsubsectionnumber.\insertsubsubsectionnumber.~
4408 \insertsubsubsectionhead}
4409 };
4410 \end{tikzpicture}
4411 }
4412 }
4413 \defbeamertemplate{subsubsection~frame}{gotham~progressvert}{
4414 \setbeamertemplate{background~canvas}[subsubsection/gotham]
4415 % \setbeamercolor{frametitle}{}
4416 \setlength{\sectionhoffset}{1cm}
4417 % \setbeamercolor{section~title}{use=frametitle, fg=frametitle.bg}
4418 % \setbeamercolor{subsection~title}{use=frametitle, fg=frametitle.bg}
4419 % \setbeamercolor{subsubsection~title}{use=frametitle, fg=frametitle.bg}
4420 % \setbeamertemplate{progress~bar~in~splitvert}[display]
4421 \setbeamertemplate{subsubsection~page}[gotham~progressvert]
4422 % \usebeamertemplate*{subsubsection~page}% activated automatically
4423 }
4424 % \end{macrocode}
4425 % \end{macro}
4426 % \end{implementation}
4427
4428
4429 % \begin{documentation}
4430 % \begin{function}{\useinnertheme}
4431 % \begin{syntax}
4432 % \cs{useinnertheme}\oarg{option1=value1, ...}\marg{gotham}
4433 % \textrm{where the options are (default marked as} \defopt{default}\textrm{):}
4434 % \meta{partframe template} = \oarg{\defopt{gotham progressbar} \textbar gotham simple \textbar gotham splitvert progressbar \textbar gotham splitvert simple \textbar gotham progressvert \textbar ...}
4435 % \meta{partframe default} = \oarg{\defopt{on} \textbar off}
4436 % \meta{sectionframe template} = \oarg{\defopt{gotham progressbar} \textbar gotham simple \textbar gotham splitvert progressbar \textbar gotham splitvert simple \textbar gotham progressvert \textbar ...}
4437 % \meta{sectionframe default} = \oarg{\defopt{on} \textbar off}
4438 % \meta{subsectionframe template} = \oarg{\defopt{gotham progressbar} \textbar gotham simple \textbar gotham splitvert progressbar \textbar gotham splitvert simple \textbar gotham progressvert \textbar ...}
4439 % \meta{subsectionframe default} = \oarg{\defopt{on} \textbar off}
4440 % \meta{subsubframe template} = \oarg{\defopt{gotham progressbar} \textbar gotham simple \textbar gotham splitvert progressbar \textbar gotham splitvert simple \textbar gotham progressvert \textbar ...}
4441 % \meta{subsubframe default} = \oarg{\defopt{on} \textbar off}
4442 % \end{syntax}
4443 % The 'package' (useinnertheme) options can control |partframe templates| (or |sectionframe|, |subsectionframe| and |subsubsectionframe| respectively), which define the style of the partframe (or |sectionframe|, |subsectionframe| and |subsubsectionframe| respectively) displayed at every new beginning of sectioning.
4444 % These templates can be disabled (or re-enabled) by default using the option |partframe default| (or |sectionframe|, |subsectionframe| and |subsubsectionframe| respectively).
4445 % \end{function}
4446 % \end{documentation}
4447 %%%%
4448 % \begin{implementation}
4449 % \begin{macro}{inner key -- interface}
4450 % Controls the inner settings for partframe (or |sectionframe|, |subsectionframe| and |subsubsectionframe| respectively) and standin.
4451 % \UnitTested
4452 % \TestFiles{gotham-test-041}
4453 % \begin{macrocode}
4454 \keys_define:nn { gotham / inner }{
4455 % partframe template
4456 partframe~template .usage:n = { general },
4457 partframe~template .default:n = { gotham~progressbar },
4458 partframe~template .code:n = { \__gotham_set_template:nn{part~frame}{#1} }
4459 }
4460 \keys_define:nn { gotham / inner }
4461 {
4462 % partframe default
4463 partframe~default .choice:,
4464 partframe~default .usage:n = { general },
4465 partframe~default .default:n = { true },
4466
4467 partframe~default / true .code:n = { \__gotham_inner_enable_partpage: },
4468 partframe~default / on .code:n = { \__gotham_inner_enable_partpage: },
4469 partframe~default / enable .code:n = { \__gotham_inner_enable_partpage: },
4470
4471 partframe~default / false .code:n = { \__gotham_inner_disable_partpage: },
4472 partframe~default / off .code:n = { \__gotham_inner_disable_partpage: },
4473 partframe~default / disable .code:n = { \__gotham_inner_disable_partpage: },
4474
4475 partframe~default / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'#1'~is~unknown~for~the~(known)~option~'partframe~default',~so~being~ignored. }{helping~message: partframe~default / unknown} },
4476 }
4477
4478 \keys_define:nn { gotham / inner }{
4479 % sectionframe template
4480 sectionframe~template .usage:n = { general },
4481 sectionframe~template .default:n = { gotham~progressbar },
4482 sectionframe~template .code:n = { \__gotham_set_template:nn{section~frame}{#1} }
4483 }
4484 \keys_define:nn { gotham / inner }
4485 {
4486 % sectionframe default
4487 sectionframe~default .choice:,
4488 sectionframe~default .usage:n = { general },
4489 sectionframe~default .default:n = { true },
4490
4491 sectionframe~default / true .code:n = { \__gotham_inner_enable_sectionpage: },
4492 sectionframe~default / on .code:n = { \__gotham_inner_enable_sectionpage: },
4493 sectionframe~default / enable .code:n = { \__gotham_inner_enable_sectionpage: },
4494
4495 sectionframe~default / false .code:n = { \__gotham_inner_disable_sectionpage: },
4496 sectionframe~default / off .code:n = { \__gotham_inner_disable_sectionpage: },
4497 sectionframe~default / disable .code:n = { \__gotham_inner_disable_sectionpage: },
4498
4499 sectionframe~default / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'#1'~is~unknown~for~the~(known)~option~'sectionframe~default',~so~being~ignored. }{helping~message: sectionframe~default / unknown} },
4500 }
4501
4502 \keys_define:nn { gotham / inner }{
4503 % subsectionframe template
4504 subsectionframe~template .usage:n = { general },
4505 subsectionframe~template .default:n = { gotham~progressbar },
4506 subsectionframe~template .code:n = { \__gotham_set_template:nn{subsection~frame}{#1} }
4507 }
4508 \keys_define:nn { gotham / inner }
4509 {
4510 % subsectionframe default
4511 subsectionframe~default .choice:,
4512 subsectionframe~default .usage:n = { general },
4513 subsectionframe~default .default:n = { true },
4514
4515 subsectionframe~default / true .code:n = { \__gotham_inner_enable_subsectionpage: },
4516 subsectionframe~default / on .code:n = { \__gotham_inner_enable_subsectionpage: },
4517 subsectionframe~default / enable .code:n = { \__gotham_inner_enable_subsectionpage: },
4518
4519 subsectionframe~default / false .code:n = { \__gotham_inner_disable_subsectionpage: },
4520 subsectionframe~default / off .code:n = { \__gotham_inner_disable_subsectionpage: },
4521 subsectionframe~default / disable .code:n = { \__gotham_inner_disable_subsectionpage: },
4522
4523 subsectionframe~default / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'#1'~is~unknown~for~the~(known)~option~'subsectionframe~default',~so~being~ignored. }{helping~message: subsectionframe~default / unknown} },
4524 }
4525
4526 \keys_define:nn { gotham / inner }{
4527 % subsubsectionframe template
4528 subsubsectionframe~template .usage:n = { general },
4529 subsubsectionframe~template .default:n = { gotham~progressbar },
4530 subsubsectionframe~template .code:n = { \__gotham_set_template:nn{subsubsection~frame}{#1} }
4531 }
4532 \keys_define:nn { gotham / inner }
4533 {
4534 % subsubsectionframe default
4535 subsubsectionframe~default .choice:,
4536 subsubsectionframe~default .usage:n = { general },
4537 subsubsectionframe~default .default:n = { true },
4538
4539 subsubsectionframe~default / true .code:n = { \__gotham_inner_enable_subsubsectionpage: },
4540 subsubsectionframe~default / on .code:n = { \__gotham_inner_enable_subsubsectionpage: },
4541 subsubsectionframe~default / enable .code:n = { \__gotham_inner_enable_subsubsectionpage: },
4542
4543 subsubsectionframe~default / false .code:n = { \__gotham_inner_disable_subsubsectionpage: },
4544 subsubsectionframe~default / off .code:n = { \__gotham_inner_disable_subsubsectionpage: },
4545 subsubsectionframe~default / disable .code:n = { \__gotham_inner_disable_subsubsectionpage: },
4546
4547 subsubsectionframe~default / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'#1'~is~unknown~for~the~(known)~option~'subsubsectionframe~default',~so~being~ignored. }{helping~message: subsubsectionframe~default / unknown} },
4548 }
4549 % \end{macrocode}
4550 % \end{macro}
4551 % \end{implementation}
4552
4553
4554 %%%% Table of Content %%%%
4555 %%%%%%%%%%%%%%%%%%%%%%%%%%
4556
4557 % \begin{implementation}
4558 % \begin{macro}{\tikzset{section~number/.style={}} }
4559 % Definition of how sections, subsections and subsubsections' numbers will appear in 'gotham bullet' style for tables of contents.
4560 % \UnitTested
4561 % \TestFiles{gotham-test-042}
4562 % \begin{macrocode}
4563 \tikzset{section~number/.style={
4564 circle,
4565 fill=colorAlert,
4566 minimum~size=0.4em,
4567 text=colorAlert!10,
4568 inner~sep=1.5pt,
4569 },
4570 section/.style={
4571 draw=none,
4572 rectangle,
4573 minimum~height=1em,
4574 minimum~width=0.8\textwidth,
4575 text~width=0.8\textwidth,
4576 text=fg,
4577 align=left
4578 },
4579 subsection~number/.style={
4580 circle,
4581 fill=colorBackElement!50,
4582 inner~sep=0pt,
4583 minimum~size=0.15cm,
4584 },
4585 subsection/.style={
4586 draw=none,
4587 rectangle,
4588 minimum~height=1em,
4589 minimum~width=0.8\textwidth,
4590 text~width=0.8\textwidth,
4591 text=fg!80,
4592 align=left
4593 },
4594 subsubsection~number/.style={
4595 circle,
4596 fill=colorBackElement!50,
4597 inner~sep=0pt,
4598 minimum~size=0.06cm,
4599 },
4600 subsubsection/.style={
4601 draw=none,
4602 rectangle,
4603 minimum~height=1em,
4604 minimum~width=0.8\textwidth,
4605 text~width=0.8\textwidth,
4606 text=fg!80,
4607 align=left
4608 },
4609 }
4610 % \end{macrocode}
4611 % \end{macro}
4612 % \end{implementation}
4613
4614 % \begin{implementation}
4615 % \begin{macro}{\defbeamertemplate{section~in~toc}{gotham~bullet}}
4616 % Template definitions for |gotham bullet| style of ToC that appear in section \textbar subsection \textbar subsubsection frame.
4617 % \changes{v1.2.1}{2025-02-10}{adapt shaded subsection in toc}
4618 % \changes{v1.2.3}{2025-07-27}{protect from interaction with minted}
4619 % \changes{v1.2.5}{2026-03-25}{improve section bullet hline to linewidth}
4620 % \UnitTested
4621 % \TestFiles{gotham-test-042, gotham-test-057, gotham-test-1046}
4622 % \begin{macrocode}
4623 \defbeamertemplate{part~in~toc}{gotham~bullet}{
4624 \leavevmode
4625 {{\inserttocpartnumber}.}~\inserttocpart
4626 % \\
4627 \par \vspace{-0.2cm}
4628 }
4629 \defbeamertemplate{section~in~toc}{gotham~bullet}{
4630 \hspace*{0.4cm}\tikz[baseline=-0.5ex]\node[section~number]{\textbf{\inserttocsectionnumber}};
4631 \ \tikz[baseline=-0.5ex]\node[section]{\usebeamerfont*{toc~title}\inserttocsection};\\[-0.35cm]
4632 \hspace*{1.13cm}{\usebeamercolor*[fg]{footer} \rule{0.69\linewidth}{0.2pt}{\par\vskip-0.35\baselineskip}\nointerlineskip}
4633 }
4634 \defbeamertemplate{subsection~in~toc}{gotham~bullet}{
4635 \leavevmode
4636 \hspace*{0.53cm}\tikz[baseline=-0.5ex]\node[subsection~number]{};
4637 \hspace*{0.5cm}\tikz[baseline=-0.5ex]\node[subsection]{\usebeamerfont*{toc~subtitle}\inserttocsubsection \gotham@strut};
4638 % \\[-0.2cm]
4639 \par \vspace{-0.38cm}
4640 }
4641 \defbeamertemplate{subsubsection~in~toc}{gotham~bullet}{
4642 \leavevmode
4643 \hspace*{0.58cm}\tikz[baseline=-0.5ex]\node[subsubsection~number]{};
4644 \hspace*{0.69cm}\tikz[baseline=-0.5ex]\node[subsubsection]{\usebeamerfont*{toc~subtitle}\inserttocsubsubsection \gotham@strut};
4645 % \\[-0.2cm]
4646 \par \vspace{-0.38cm}
4647 }
4648 % Shaded for sections already done in the presentation.
4649 \defbeamertemplate{section~in~toc~shaded}{gotham~bullet}{
4650 \hspace*{0.4cm}\tikz[baseline=-0.5ex]\node[section~number, fill=colorBackElement!40]{\usebeamerfont*{toc~subtitle}\textbf{\inserttocsectionnumber}};
4651 \ \tikz[baseline=-0.5ex]\node[section, text=colorBackElement!20]{\usebeamerfont*{toc~title}\inserttocsection};\\[-0.35cm]
4652 \hspace*{1.13cm}{\usebeamercolor*[fg]{footer} \rule{0.69\linewidth}{0.2pt}{\par\vskip-0.35\baselineskip}\nointerlineskip}
4653 }
4654 \defbeamertemplate{subsection~in~toc~shaded}{gotham~bullet}{
4655 \leavevmode
4656 \hspace*{0.53cm}\tikz[baseline=-0.5ex]\node[subsection~number,fill=colorBackElement!20]{};
4657 \hspace*{0.5cm}\tikz[baseline=-0.5ex]\node[subsection, text=colorBackElement!20]{\usebeamerfont*{toc~subtitle}\inserttocsubsection \gotham@strut};
4658 % \\[-0.2cm]
4659 \par \vspace{-0.38cm}
4660 }
4661 \defbeamertemplate{subsubsection~in~toc~shaded}{gotham~bullet}{
4662 \leavevmode
4663 \hspace*{0.58cm}\tikz[baseline=-0.5ex]\node[subsubsection~number,fill=colorBackElement!20]{};
4664 \hspace*{0.69cm}\tikz[baseline=-0.5ex]\node[subsubsection,text=colorBackElement!20]{\usebeamerfont*{toc~subtitle}\inserttocsubsubsection \gotham@strut};
4665 % \\[-0.2cm]
4666 \par \vspace{-0.38cm}
4667 }
4668 % \end{macrocode}
4669 % \end{macro}
4670 % \end{implementation}
4671
4672 % \begin{implementation}
4673 % \begin{macro}{\defbeamertemplate{section~in~toc}{gotham~bullet}}
4674 % Template definitions for |gotham simple| style of ToC that appear in section \textbar subsection \textbar subsubsection frame.
4675 % \changes{v1.2.1}{2025-01-06}{adapt shaded subsection in toc}
4676 % \UnitTested
4677 % \TestFiles{gotham-test-042}
4678 % \begin{macrocode}
4679 \defbeamertemplate{part~in~toc}{gotham~simple}{
4680 \leavevmode
4681 {{\inserttocpartnumber}.}~\inserttocpart
4682 % \\
4683 \par \vspace{-0.2cm}
4684 }
4685 \defbeamertemplate{section~in~toc}{gotham~simple}{
4686 {{\inserttocsectionnumber}.}~\inserttocsection
4687 % \\
4688 \par \vspace{-0.2cm}
4689 }
4690 \defbeamertemplate{subsection~in~toc}{gotham~simple}{
4691 \leavevmode
4692 \quad{{\inserttocsectionnumber}.\inserttocsubsectionnumber.}~\inserttocsubsection
4693 % \\
4694 \par \vspace{-0.2cm}
4695 }
4696 \defbeamertemplate{subsubsection~in~toc}{gotham~simple}{
4697 \leavevmode
4698 \qquad{{\inserttocsectionnumber}.\inserttocsubsectionnumber.\inserttocsubsubsectionnumber.}~\inserttocsubsubsection
4699 % \\
4700 \par \vspace{-0.2cm}
4701 }
4702 \defbeamertemplate{section~in~toc~shaded}{gotham~simple}{
4703 \leavevmode
4704 \begin{colormixin}{20!parent.bg}
4705 {{\inserttocsectionnumber}.}~\inserttocsection
4706 \end{colormixin}
4707 % \\
4708 \par \vspace{-0.2cm}
4709 }
4710 \defbeamertemplate{subsection~in~toc~shaded}{gotham~simple}{
4711 \leavevmode
4712 \begin{colormixin}{20!parent.bg}
4713 \quad{{\inserttocsectionnumber}.\inserttocsubsectionnumber.}~\inserttocsubsection
4714 \end{colormixin}
4715 % \\
4716 \par \vspace{-0.2cm}
4717 }
4718 \defbeamertemplate{subsubsection~in~toc~shaded}{gotham~simple}{
4719 \leavevmode
4720 \begin{colormixin}{20!parent.bg}
4721 \qquad{{\inserttocsectionnumber}.\inserttocsubsectionnumber.\inserttocsubsubsectionnumber.}~\inserttocsubsubsection
4722 \end{colormixin}
4723 % \\
4724 \par \vspace{-0.2cm}
4725 }
4726 % \end{macrocode}
4727 % \end{macro}
4728 % \end{implementation}
4729
4730 % \begin{implementation}
4731 % \begin{macro}{\defbeamertemplate{background~canvas}{toc/gotham~simple}, \defbeamertemplate{toc~page}{gotham~simple|bullet}}
4732 % Definition of toc page style named gotham simple and gotham bullet, used for table of content pages.
4733 % Both are using a dedicated background canvas.
4734 % \changes{v1.2.1}{2025-01-05}{add shaded subsection in toc setup}
4735 % \UnitTested
4736 % \TestFiles{gotham-test-042}
4737 % \begin{macrocode}
4738 \defbeamertemplate{background~canvas}{toc/gotham~simple}{
4739 \ifbeamercolorempty[bg]{standin}{}{
4740 \color{bg}\vrule width\paperwidth height\paperheight
4741 }
4742 }
4743 \defbeamertemplate{toc~page}{gotham~simple}{
4744 \setbeamertemplate{part~in~toc}[gotham~simple]
4745 \setbeamertemplate{section~in~toc}[gotham~simple]
4746 \setbeamertemplate{section~in~toc~shaded}[gotham~simple]
4747 \setbeamertemplate{subsection~in~toc}[gotham~simple]
4748 \setbeamertemplate{subsection~in~toc~shaded}[gotham~simple]
4749 \setbeamertemplate{subsubsection~in~toc}[gotham~simple]
4750 \setbeamertemplate{subsubsection~in~toc~shaded}[gotham~simple]
4751 \setbeamertemplate{background~canvas}[toc/gotham~simple]
4752 }
4753 \defbeamertemplate{toc~page}{gotham~bullet}{
4754 \setbeamertemplate{part~in~toc}[gotham~bullet]
4755 \setbeamertemplate{section~in~toc}[gotham~bullet]
4756 \setbeamertemplate{section~in~toc~shaded}[gotham~bullet]
4757 \setbeamertemplate{subsection~in~toc}[gotham~bullet]
4758 \setbeamertemplate{subsection~in~toc~shaded}[gotham~bullet]
4759 \setbeamertemplate{subsubsection~in~toc}[gotham~bullet]
4760 \setbeamertemplate{subsubsection~in~toc~shaded}[gotham~bullet]
4761 \setbeamertemplate{background~canvas}[toc/gotham~simple]
4762 }
4763 % \end{macrocode}
4764 % \end{macro}
4765 % \end{implementation}
4766
4767 % \begin{documentation}
4768 % \begin{function}{\begin{frame}[toc]}
4769 % Add a frame option |toc| to display the toc frame template.
4770 % \end{function}
4771 % \end{documentation}
4772 %%%%%%
4773 % \begin{implementation}
4774 % \begin{macro}{\begin{frame}[toc]}
4775 % Add a frame option |toc| to display the toc frame template.
4776 % To do it, we must add a global boolean variable, capture the option at the begin of the frame and patch the end of the frame.
4777 % \UnitTested
4778 % \TestFiles{gotham-test-042}
4779 % \begin{macrocode}
4780 \newenvironment{tocenv}{
4781 \usebeamertemplate{toc~page}
4782 }{}
4783 \__gotham_add_beamerframe_key:n {toc}
4784 % \end{macrocode}
4785 % \end{macro}
4786 % \end{implementation}
4787
4788 % \begin{implementation}
4789 % \begin{macro}{\defbeamertemplate{background~canvas}{toc~part|section|subsection~gotham}}
4790 % Defintion of the background canvas used by the toc in part\,\textbar\,section\,\textbar\,subsection.
4791 % \UnitTested
4792 % \TestFiles{gotham-test-042}
4793 % \begin{macrocode}
4794 \defbeamertemplate{background~canvas}{toc~part~gotham}{
4795 \ifbeamercolorempty[bg]{normal~text}{}{\color{bg}\vrule width\paperwidth height\paperheight}
4796 }
4797 \defbeamertemplate{background~canvas}{toc~section~gotham}{
4798 \ifbeamercolorempty[bg]{normal~text}{}{\color{bg}\vrule width\paperwidth height\paperheight}
4799 }
4800 \defbeamertemplate{background~canvas}{toc~subsection~gotham}{
4801 \ifbeamercolorempty[bg]{normal~text}{}{\color{bg}\vrule width\paperwidth height\paperheight}
4802 }
4803 % \end{macrocode}
4804 % \end{macro}
4805 % \end{implementation}
4806
4807 % \begin{implementation}
4808 % \begin{macro}{\defbeamertemplate{toc~part~frame}{gotham~simple}}
4809 % Definition of the toc in part\,\textbar\,section\,\textbar\,subsection templates for gotham simple style.
4810 % \UnitTested
4811 % \TestFiles{gotham-test-042}
4812 % \begin{macrocode}
4813 \defbeamertemplate{toc~part~frame}{gotham~simple}{
4814 \setbeamertemplate{part~in~toc}[gotham~simple]
4815 \setbeamertemplate{section~in~toc}[gotham~simple]
4816 \setbeamertemplate{section~in~toc~shaded}[gotham~simple]
4817 \setbeamertemplate{subsection~in~toc}[gotham~simple]
4818 \setbeamertemplate{subsection~in~toc~shaded}[gotham~simple]
4819 \setbeamertemplate{subsubsection~in~toc}[gotham~simple]
4820 \setbeamertemplate{subsubsection~in~toc~shaded}[gotham~simple]
4821 \setbeamertemplate{background~canvas}[toc~part~gotham]
4822 \setbeamertemplate{frametitle}[toc~gotham]
4823 % \usebeamertemplate*{part~page}% already included
4824 }
4825 \defbeamertemplate{toc~section~frame}{gotham~simple}{
4826 \setbeamertemplate{part~in~toc}[gotham~simple]
4827 \setbeamertemplate{section~in~toc}[gotham~simple]
4828 \setbeamertemplate{section~in~toc~shaded}[gotham~simple]
4829 \setbeamertemplate{subsection~in~toc}[gotham~simple]
4830 \setbeamertemplate{subsection~in~toc~shaded}[gotham~simple]
4831 \setbeamertemplate{subsubsection~in~toc}[gotham~simple]
4832 \setbeamertemplate{subsubsection~in~toc~shaded}[gotham~simple]
4833 \setbeamertemplate{background~canvas}[toc~section~gotham]
4834 \setbeamertemplate{frametitle}[toc~gotham]%
4835 % \usebeamertemplate*{section~page}% already included
4836 }
4837 \defbeamertemplate{toc~subsection~frame}{gotham~simple}{
4838 \setbeamertemplate{part~in~toc}[gotham~simple]
4839 \setbeamertemplate{section~in~toc}[gotham~simple]
4840 \setbeamertemplate{section~in~toc~shaded}[gotham~simple]
4841 \setbeamertemplate{subsection~in~toc}[gotham~simple]
4842 \setbeamertemplate{subsection~in~toc~shaded}[gotham~simple]
4843 \setbeamertemplate{subsubsection~in~toc}[gotham~simple]
4844 \setbeamertemplate{subsubsection~in~toc~shaded}[gotham~simple]
4845 \setbeamertemplate{background~canvas}[toc~subsection~gotham]
4846 \setbeamertemplate{frametitle}[toc~gotham]
4847 % \usebeamertemplate*{subsection~page}% already included
4848 }
4849 % \end{macrocode}
4850 % \end{macro}
4851 % \end{implementation}
4852
4853 % \begin{implementation}
4854 % \begin{macro}{\defbeamertemplate{toc~part~frame}{gotham~bullet}}
4855 % Definition of the toc in part\,\textbar\,section\,\textbar\,subsection templates for gotham bullet style.
4856 % \UnitTested
4857 % \TestFiles{gotham-test-042}
4858 % \begin{macrocode}
4859 \defbeamertemplate{toc~part~frame}{gotham~bullet}{
4860 \setbeamertemplate{part~in~toc}[gotham~bullet]
4861 \setbeamertemplate{section~in~toc}[gotham~bullet]
4862 \setbeamertemplate{section~in~toc~shaded}[gotham~bullet]
4863 \setbeamertemplate{subsection~in~toc}[gotham~bullet]
4864 \setbeamertemplate{subsection~in~toc~shaded}[gotham~bullet]
4865 \setbeamertemplate{subsubsection~in~toc}[gotham~bullet]
4866 \setbeamertemplate{subsubsection~in~toc~shaded}[gotham~bullet]
4867 \setbeamertemplate{background~canvas}[toc~part~gotham]
4868 \setbeamertemplate{frametitle}[toc~gotham]
4869 % \usebeamertemplate*{part~page}% already included
4870 }
4871 \defbeamertemplate{toc~section~frame}{gotham~bullet}{
4872 \setbeamertemplate{part~in~toc}[gotham~bullet]
4873 \setbeamertemplate{section~in~toc}[gotham~bullet]
4874 \setbeamertemplate{section~in~toc~shaded}[gotham~bullet]
4875 \setbeamertemplate{subsection~in~toc}[gotham~bullet]
4876 \setbeamertemplate{subsection~in~toc~shaded}[gotham~bullet]
4877 \setbeamertemplate{subsubsection~in~toc}[gotham~bullet]
4878 \setbeamertemplate{subsubsection~in~toc~shaded}[gotham~bullet]
4879 \setbeamertemplate{background~canvas}[toc~section~gotham]
4880 \setbeamertemplate{frametitle}[toc~gotham]%
4881 % \usebeamertemplate*{section~page}% already included
4882 }
4883 \defbeamertemplate{toc~subsection~frame}{gotham~bullet}{
4884 \setbeamertemplate{part~in~toc}[gotham~bullet]
4885 \setbeamertemplate{section~in~toc}[gotham~bullet]
4886 \setbeamertemplate{section~in~toc~shaded}[gotham~bullet]
4887 \setbeamertemplate{subsection~in~toc}[gotham~bullet]
4888 \setbeamertemplate{subsection~in~toc~shaded}[gotham~bullet]
4889 \setbeamertemplate{subsubsection~in~toc}[gotham~bullet]
4890 \setbeamertemplate{subsubsection~in~toc~shaded}[gotham~bullet]
4891 \setbeamertemplate{background~canvas}[toc~subsection~gotham]
4892 \setbeamertemplate{frametitle}[toc~gotham]
4893 % \usebeamertemplate*{subsection~page}% already included
4894 }
4895 % \end{macrocode}
4896 % \end{macro}
4897 % \end{implementation}
4898
4899 % \begin{documentation}
4900 % \begin{function}{\begin{frame}[tocpart]}
4901 % Add a frame option |tocpart| to display the tocpart frame template.
4902 % \end{function}
4903 % \end{documentation}
4904 %%%%%%
4905 % \begin{implementation}
4906 % \begin{macro}{\begin{frame}[tocpart]}
4907 % Add a frame option |tocpart| to display the tocpart frame template.
4908 % To do it, we must add a global boolean variable, capture the option at the begin of the frame and patch the end of the frame.
4909 % \UnitTested
4910 % \TestFiles{gotham-test-042}
4911 % \begin{macrocode}
4912 \bool_new:N \l_gotham_tocpartframe
4913 \bool_set_false:N \l_gotham_tocpartframe
4914 \define@key{beamerframe}{tocpart}[true]{
4915 \bool_set_true:N \l_gotham_tocpartframe
4916 \begingroup
4917 \usebeamertemplate{toc~part~frame}
4918 }
4919 \apptocmd{\beamer@reseteecodes}{
4920 \bool_if:NTF \l_gotham_tocpartframe {
4921 \endgroup
4922 \bool_set_false:N \l_gotham_tocpartframe
4923 }{}
4924 }{}{}
4925 % \define@key{beamerframe}{tocpart}[true]{
4926 % \thispagestyle{navigation@tocpart}
4927 % }
4928 % \def\ps@navigation@tocpart{
4929 % \usebeamertemplate{toc~part~frame}
4930 % \@nameuse{ps@navigation}
4931 % }
4932 % \end{macrocode}
4933 % \end{macro}
4934 % \end{implementation}
4935
4936 % \begin{documentation}
4937 % \begin{function}{\begin{frame}[tocsec]}
4938 % Add a frame option |tocsec| to display the tocsec frame template.
4939 % \end{function}
4940 % \end{documentation}
4941 %%%%%%
4942 % \begin{implementation}
4943 % \begin{macro}{\begin{frame}[tocsec]}
4944 % Add a frame option |tocsec| to display the tocsec frame template.
4945 % To do it, we must add a global boolean variable, capture the option at the begin of the frame and patch the end of the frame.
4946 % \UnitTested
4947 % \TestFiles{gotham-test-042}
4948 % \begin{macrocode}
4949 \bool_new:N \l_gotham_tocsectionframe
4950 \bool_set_false:N \l_gotham_tocsectionframe
4951 \define@key{beamerframe}{tocsec}[true]{
4952 \bool_set_true:N \l_gotham_tocsectionframe
4953 \begingroup
4954 \usebeamertemplate{toc~section~frame}
4955 }
4956 \apptocmd{\beamer@reseteecodes}{
4957 \bool_if:NTF \l_gotham_tocsectionframe {
4958 \endgroup
4959 \bool_set_false:N \l_gotham_tocsectionframe
4960 }{}
4961 }{}{}
4962 % \define@key{beamerframe}{tocsec}[true]{
4963 % \thispagestyle{navigation@tocsec}
4964 % }
4965 % \def\ps@navigation@tocsec{
4966 % \usebeamertemplate{toc~section~frame}
4967 % \@nameuse{ps@navigation}
4968 % }
4969 % \end{macrocode}
4970 % \end{macro}
4971 % \end{implementation}
4972
4973 % \begin{documentation}
4974 % \begin{function}{\begin{frame}[tocsubsec]}
4975 % Add a frame option |tocsubsec| to display the tocsubsec frame template.
4976 % \end{function}
4977 % \end{documentation}
4978 %%%%%%
4979 % \begin{implementation}
4980 % \begin{macro}{\begin{frame}[tocsubsec]}
4981 % Add a frame option |tocsubsec| to display the tocsubsec frame template.
4982 % To do it, we must add a global boolean variable, capture the option at the begin of the frame and patch the end of the frame.
4983 % \UnitTested
4984 % \TestFiles{gotham-test-042}
4985 % \begin{macrocode}
4986 \bool_new:N \l_gotham_tocsubsectionframe
4987 \bool_set_false:N \l_gotham_tocsubsectionframe
4988 \define@key{beamerframe}{tocsubsec}[true]{
4989 \bool_set_true:N \l_gotham_tocsubsectionframe
4990 \begingroup
4991 \usebeamertemplate{toc~subsection~frame}
4992 }
4993 \apptocmd{\beamer@reseteecodes}{
4994 \bool_if:NTF \l_gotham_tocsubsectionframe {
4995 \endgroup
4996 \bool_set_false:N \l_gotham_tocsubsectionframe
4997 }{}
4998 }{}{}
4999 % \define@key{beamerframe}{tocsubsec}[true]{
5000 % \thispagestyle{navigation@tocsubsec}
5001 % }
5002 % \def\ps@navigation@tocsubsec{
5003 % \usebeamertemplate{toc~subsection~frame}
5004 % \@nameuse{ps@navigation}
5005 % }
5006 % \end{macrocode}
5007 % \end{macro}
5008 % \end{implementation}
5009
5010 % \begin{documentation}
5011 % \begin{function}{\begin{frame}[tocsubsubsec]}
5012 % Add a frame option |tocsubsubsec| to display the tocsubsubsec frame template.
5013 % \end{function}
5014 % \end{documentation}
5015 %%%%%%
5016 % \begin{implementation}
5017 % \begin{macro}{\begin{frame}[tocsubsubsec]}
5018 % Add a frame option |tocsubsubsec| to display the tocsubsubsec frame template.
5019 % To do it, we must add a global boolean variable, capture the option at the begin of the frame and patch the end of the frame.
5020 % \UnitTested
5021 % \TestFiles{gotham-test-042}
5022 % \begin{macrocode}
5023 \bool_new:N \l_gotham_tocsubsubsectionframe
5024 \bool_set_false:N \l_gotham_tocsubsubsectionframe
5025 \define@key{beamerframe}{tocsubsubsec}[true]{
5026 \bool_set_true:N \l_gotham_tocsubsubsectionframe
5027 \begingroup
5028 \usebeamertemplate{toc~subsubsection~frame}
5029 }
5030 \apptocmd{\beamer@reseteecodes}{
5031 \bool_if:NTF \l_gotham_tocsubsubsectionframe {
5032 \endgroup
5033 \bool_set_false:N \l_gotham_tocsubsubsectionframe
5034 }{}
5035 }{}{}
5036 % \define@key{beamerframe}{tocsubsubsec}[true]{
5037 % \thispagestyle{navigation@tocsubsubsec}
5038 % }
5039 % \def\ps@navigation@tocsubsubsec{
5040 % \usebeamertemplate{toc~subsubsection~frame}
5041 % \@nameuse{ps@navigation}
5042 % }
5043 % \end{macrocode}
5044 % \end{macro}
5045 % \end{implementation}
5046
5047 % \begin{documentation}
5048 % \begin{function}{\useinnertheme}
5049 % \begin{syntax}
5050 % \cs{useinnertheme}\oarg{option1=value1, ...}\marg{gotham}
5051 % \textrm{where the options are (default marked as} \defopt{default}\textrm{):}
5052 % \meta{tocframe template} = \oarg{\defopt{gotham bullet} \textbar gotham simple \textbar ...}
5053 % \meta{parttocframe template default} = \oarg{\defopt{gotham simple} \textbar gotham bullet}
5054 % \meta{parttocframe default} = \oarg{\defopt{on} \textbar off}
5055 % \meta{sectocframe template default} = \oarg{\defopt{gotham simple} \textbar gotham bullet}
5056 % \meta{sectocframe default} = \oarg{\defopt{on} \textbar off}
5057 % \meta{subsectocframe template default} = \oarg{\defopt{gotham simple} \textbar gotham bullet}
5058 % \meta{subsectocframe default} = \oarg{\defopt{on} \textbar off}
5059 % \end{syntax}
5060 % The 'package' (useinnertheme) options can control |parttocframe templates| (or |sectocframe| and |subsectocframe| respectively), which define the style of the table of content for partframe (or |sectionframe|, and |subsectionframe| respectively) displayed at every new beginning of sectioning.
5061 % These templates can be disabled (or re-enabled) by default using the option |parttocframe default| (or |sectocframe| and |subssectocframe| respectively).
5062 % \end{function}
5063 % \end{documentation}
5064 %%%%
5065 % \begin{implementation}
5066 % \begin{macro}{inner key -- interface}
5067 % Controls the inner settings for |parttocframe| (or |sectocframe|, |subsectocframe| respectively).
5068 % \UnitTested
5069 % \TestFiles{gotham-test-041}
5070 % \begin{macrocode}
5071 \keys_define:nn { gotham / inner }
5072 {
5073 % TOC style
5074 tocframe~template .usage:n = { general },
5075 tocframe~template .default:n = { gotham~bullet },
5076 tocframe~template .code:n = { \__gotham_set_template:nn{toc~page}{#1} }
5077 }
5078
5079 \keys_define:nn { gotham / inner }{
5080 % parttocframe template
5081 parttocframe~template .usage:n = { general },
5082 parttocframe~template .default:n = { gotham~simple },
5083 parttocframe~template .code:n = { \__gotham_set_template:nn{toc~part~frame}{#1} }
5084 }
5085 \keys_define:nn { gotham / inner }
5086 {
5087 % parttocframe default
5088 parttocframe~default .choice:,
5089 parttocframe~default .usage:n = { general },
5090 parttocframe~default .default:n = { true },
5091
5092 parttocframe~default / true .code:n = { \booltrue{partContent} },
5093 parttocframe~default / on .code:n = { \booltrue{partContent} },
5094 parttocframe~default / enable .code:n = { \booltrue{partContent} },
5095
5096 parttocframe~default / false .code:n = { \boolfalse{partContent} },
5097 parttocframe~default / off .code:n = { \boolfalse{partContent} },
5098 parttocframe~default / disable .code:n = { \boolfalse{partContent} },
5099
5100 parttocframe~default / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'#1'~is~unknown~for~the~(known)~option~'parttocframe~default',~so~being~ignored. }{helping~message: parttocframe~default / unknown} },
5101 }
5102
5103 \keys_define:nn { gotham / inner }{
5104 % sectiontocframe template
5105 sectiontocframe~template .usage:n = { general },
5106 sectiontocframe~template .default:n = { gotham~simple },
5107 sectiontocframe~template .code:n = { \__gotham_set_template:nn{toc~section~frame}{#1} }
5108 }
5109 \keys_define:nn { gotham / inner }
5110 {
5111 % sectiontocframe default
5112 sectiontocframe~default .choice:,
5113 sectiontocframe~default .usage:n = { general },
5114 sectiontocframe~default .default:n = { true },
5115
5116 sectiontocframe~default / true .code:n = { \booltrue{sectionContent} },
5117 sectiontocframe~default / on .code:n = { \booltrue{sectionContent} },
5118 sectiontocframe~default / enable .code:n = { \booltrue{sectionContent} },
5119
5120 sectiontocframe~default / false .code:n = { \boolfalse{sectionContent} },
5121 sectiontocframe~default / off .code:n = { \boolfalse{sectionContent} },
5122 sectiontocframe~default / disable .code:n = { \boolfalse{sectionContent} },
5123
5124 sectiontocframe~default / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'#1'~is~unknown~for~the~(known)~option~'sectiontocframe~default',~so~being~ignored. }{helping~message: sectiontocframe~default / unknown} },
5125 }
5126
5127 \keys_define:nn { gotham / inner }{
5128 % subsectiontocframe template
5129 subsectiontocframe~template .usage:n = { general },
5130 subsectiontocframe~template .default:n = { gotham~simple },
5131 subsectiontocframe~template .code:n = { \__gotham_set_template:nn{toc~subsection~frame}{#1} }
5132 }
5133 \keys_define:nn { gotham / inner }
5134 {
5135 % subsectiontocframe default
5136 subsectiontocframe~default .choice:,
5137 subsectiontocframe~default .usage:n = { general },
5138 subsectiontocframe~default .default:n = { true },
5139
5140 subsectiontocframe~default / true .code:n = { \booltrue{subsectionContent} },
5141 subsectiontocframe~default / on .code:n = { \booltrue{subsectionContent} },
5142 subsectiontocframe~default / enable .code:n = { \booltrue{subsectionContent} },
5143
5144 subsectiontocframe~default / false .code:n = { \boolfalse{subsectionContent} },
5145 subsectiontocframe~default / off .code:n = { \boolfalse{subsectionContent} },
5146 subsectiontocframe~default / disable .code:n = { \boolfalse{subsectionContent} },
5147
5148 subsectiontocframe~default / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'#1'~is~unknown~for~the~(known)~option~'subsectiontocframe~default',~so~being~ignored. }{helping~message: subsectiontocframe~default / unknown} },
5149 }
5150 % \end{macrocode}
5151 % \end{macro}
5152 % \end{implementation}
5153
5154
5155 %% Environments styles %%%
5156 %%%%%%%%%%%%%%%%%%%%%%%%%%
5157
5158 % \begin{implementation}
5159 % \begin{variable}{\gotham@blocksep, \gotham@blockadjust}
5160 % |blocksep| and |blockadjust| lengths used in |\gotham@block| definition.
5161 % While |gotham@strut| is a command to ensure verticale spacing equivalent to a line.
5162 % \begin{macrocode}
5163 \newlength{\gotham@blocksep}
5164 \newlength{\gotham@blockadjust}
5165 \setlength{\gotham@blocksep}{0.75ex}
5166 \setlength{\gotham@blockadjust}{0.25ex}
5167 \providecommand{\gotham@strut}{
5168 \vphantom{ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz (/)}
5169 }
5170 % \end{macrocode}
5171 % \end{variable}
5172 % \end{implementation}
5173
5174 % \begin{implementation}
5175 % \begin{variable}{\gotham@parskip, \linespread}
5176 % length parskip defined by gotham and the linespread are adjusted.
5177 % \begin{macrocode}
5178 \newlength{\gotham@parskip}
5179 \setlength{\gotham@parskip}{0.5em}
5180 \setlength{\parskip}{\gotham@parskip}
5181 \linespread{1.15}
5182 % \end{macrocode}
5183 % \end{variable}
5184 % \end{implementation}
5185
5186 % \begin{implementation}
5187 % \begin{macro}{\newcommand{\gotham@block}[1]}
5188 % The three different block environments differ only in their colours.
5189 % Rather than repeat the essentially the same template three times, we use the auxiliary macro |\gotham@block| to define all three templates.
5190 % \UnitTested
5191 % \TestFiles{gotham-test-043}
5192 % \begin{macrocode}
5193 \providecommand{\gotham@block}[1]{
5194 \par\vskip\medskipamount
5195 \setlength{\parskip}{0pt}
5196
5197 % If a background color is defined for the block title or body, we need to add a little bit of padding to the corresponding box.
5198 % Ideally, this would be accomplished by setting |colsep=0.75ex|, which is intended to add ``color separation space'' only when the box has a colored background.
5199 % Unfortunately, |colsep| also adds this separation if the background color is inherited, even if the inherited color is actually empty.
5200 % (The technical reason for this boils down to the fact that the |\ifx| directive does not expand macros.)
5201 %
5202 % To achieve the correct spacing for |alertblock|s and |exampleblock|s as well as for normal blocks, we have to begin the |beamercolorbox| differently based on whether |block title| has an empty background.
5203 %
5204 % If the |block title| background is empty, or the user has explicitly removed the background from (e.g.) |block title alerted|, we just need to set a rightskip for a nice ragged-right block title.
5205 \ifbeamercolorempty[bg]{block~title#1}{%
5206 \begin{beamercolorbox}[rightskip=0pt~plus~4em]{block~title#1}
5207 }{
5208 \ifbeamercolorempty[bg]{block~title}{
5209 \begin{beamercolorbox}[rightskip=0pt~plus~4em]{block~title#1}
5210 }
5211 % Otherwise, if the |block title| has a background, we set the padding based on |\gotham@blockskip|.
5212 % However, we have to visually compensate for the |\gotham@strut| added to the block title (see below) by subtracting |\gotham@blockadjust| from the top and bottom padding.
5213 %
5214 {
5215 \begin{beamercolorbox}[
5216 sep=\dimexpr\gotham@blocksep-\gotham@blockadjust\relax,
5217 leftskip=\gotham@blockadjust,
5218 rightskip=\dimexpr\gotham@blockadjust~plus~4em\relax,
5219 ]{block~title#1}
5220 }
5221 }
5222 % We can now set the contents of the |block title|.
5223 % The zero-width but positive-height box |\gotham@strut| ensures that the block title box has a consistent height, even if it lacks punctuation, ascenders, or descenders.
5224 %
5225 \usebeamerfont*{block~title#1}
5226 \gotham@strut
5227 \insertblocktitle
5228 \gotham@strut
5229 \end{beamercolorbox}
5230 % Next, we typeset the |block body|.
5231 % This the code is similar to, but simpler than, the |block title| code since we don't need to adjust for any struts.
5232 \nointerlineskip
5233 \ifbeamercolorempty[bg]{block~body#1}{
5234 \begin{beamercolorbox}[vmode]{block~body#1}
5235 }{
5236 \ifbeamercolorempty[bg]{block~body}{
5237 \begin{beamercolorbox}[vmode]{block~body#1}
5238 }{
5239 \begin{beamercolorbox}[sep=\gotham@blocksep, vmode]{block~body#1}
5240 \vspace{-\gotham@parskip}
5241 }
5242 }
5243 \usebeamerfont{block~body#1}
5244 \setlength{\parskip}{\gotham@parskip}
5245 }
5246 % This concludes the auxiliary macro |\gotham@block|.
5247 % \end{macrocode}
5248 % \end{macro}
5249 % \end{implementation}
5250
5251 % \begin{documentation}
5252 % \begin{function}{\begin{block}, \begin{alertblock}, \begin{exampleblock}}
5253 % Three boxed environment are defined by default: |block|, |alertblock| and |exampleblock|.
5254 % The style of blocks can be changed using |\setbeamertemplate{blocks}[rounded][shadow=true]|.
5255 % \end{function}
5256 % \end{documentation}
5257 %%%%
5258 % \begin{implementation}
5259 % \begin{macro}{\defbeamertemplate{block~begin}{gotham}}
5260 % We could define the block beamer templates using the auxiliary macro |\gotham@block|....
5261 % Yet, following the precious advice from Sam Carter \url{https://github.com/jolars/moloch/issues/6}, we should keep beamer blocks.
5262 % But of course, one can go back to metropolis style using the commented lines here.
5263 % \UnitTested
5264 % \TestFiles{gotham-test-043}
5265 % \begin{macrocode}
5266 % \defbeamertemplate*{block~begin}{gotham}{\gotham@block{}}
5267 % \defbeamertemplate*{block~alerted~begin}{gotham}{\gotham@block{~alerted}}
5268 % \defbeamertemplate*{block~example~begin}{gotham}{\gotham@block{~example}}
5269 % \defbeamertemplate*{block~end}{gotham}{\end{beamercolorbox}\vspace*{0.2ex}}
5270 % \defbeamertemplate*{block~alerted~end}{gotham}{\end{beamercolorbox}\vspace*{0.2ex}}
5271 % \defbeamertemplate*{block~example~end}{gotham}{\end{beamercolorbox}\vspace*{0.2ex}}
5272 % \end{macrocode}
5273 % \end{macro}
5274 % \end{implementation}
5275
5276 % \begin{documentation}
5277 % \begin{function}{\begin{itemize}}
5278 % Three level of itemize environment are defined by default with decreasing size: |circle|, |triangle| and |square|.
5279 % \end{function}
5280 % \end{documentation}
5281 %%%%
5282 % \begin{implementation}
5283 % \begin{macro}{\defbeamertemplate{block~begin}{gotham}}
5284 % We define the block beamer templates using the auxiliary macro |\gotham@block|.
5285 % \UnitTested
5286 % \TestFiles{gotham-test-043}
5287 % \begin{macrocode}
5288 \defbeamertemplate*{itemize~item}{gotham}{%\textbullet}
5289 \large
5290 \setbeamertemplate{itemize~item}[circle]
5291 \usebeamertemplate{itemize~item}
5292 }
5293 \defbeamertemplate*{itemize~subitem}{gotham}{%$\blacktriangleright$
5294 \scriptsize
5295 \setbeamertemplate{itemize~subitem}[triangle]
5296 \usebeamertemplate{itemize~subitem}
5297 }
5298 \defbeamertemplate*{itemize~subsubitem}{gotham}{%square or -
5299 \Tiny
5300 $\blacksquare$ % \textbf{-}
5301 % \setbeamertemplate{itemize~subsubitem}[square]
5302 % \usebeamertemplate{itemize~subsubitem} % not working because the size of the square is hardcoded.
5303 }
5304
5305 %% TRY: enumitem package, enumitem and beamer are incompatible.
5306 % \setitemize{label=\usebeamerfont*{itemize~item}
5307 % \usebeamercolor[fg]{itemize~item}
5308 % \usebeamertemplate{itemize~item}}
5309 %% I tried to redefine everything to make them compatible, but it breaks the [alert] environment... So, I gave up.
5310
5311 % \end{macrocode}
5312 % \end{macro}
5313 % \end{implementation}
5314
5315 % \begin{documentation}
5316 % \begin{function}{\defbeamertemplate{caption}, \defbeamertemplate{footnote}}
5317 % Gotham defines float captions with a numbered style and footnotes with traditional style (color can be tuned with |\setbeamercolor{footnote}|).
5318 % \end{function}
5319 % \end{documentation}
5320 %%%%%%
5321 % \begin{implementation}
5322 % \begin{macro}{\defbeamertemplate{caption}, \defbeamertemplate{footnote}}
5323 % Templates definitions for caption and footnote.
5324 % \TestMissing{explanation}
5325 % \UnitTested
5326 % \TestFiles{gotham-test-043}
5327 % \begin{macrocode}
5328 \defbeamertemplate*{caption~label~separator}{gotham}{:~}
5329 \setbeamertemplate{caption}[numbered]
5330 \defbeamertemplate*{footnote}{gotham}{
5331 \parindent~0em\noindent
5332 \raggedright
5333 \usebeamercolor{footnote}\hbox~to~0.8em{\hfil\insertfootnotemark}\insertfootnotetext\par
5334 }
5335 % \end{macrocode}
5336 % \end{macro}
5337 % \end{implementation}
5338
5339 % \begin{implementation}
5340 % \begin{macro}{Default inner keys}
5341 % Apply default key options.
5342 % \UnitTested
5343 % \TestFiles{gotham-test-043}
5344 % \begin{macrocode}
5345 % when no value is given, default is called.
5346 \keys_set:nn { gotham / inner } {
5347 title~page,
5348 watermark~template, watermark~default,
5349 standout~template, standin~template,
5350 partframe~template, partframe~default,
5351 sectionframe~template, sectionframe~default,
5352 subsectionframe~template, subsectionframe~default,
5353 subsubsectionframe~template, subsubsectionframe~default,
5354 tocframe~template,
5355 parttocframe~template, parttocframe~default,
5356 sectiontocframe~template, sectiontocframe~default,
5357 subsectiontocframe~template, subsectiontocframe~default,
5358 % subsubsectiontocframe~template, subsubsectiontocframe~default,
5359 }
5360 % \end{macrocode}
5361 % \end{macro}
5362 % \end{implementation}
5363
5364 % \begin{implementation}
5365 % \begin{macro}{Process inner keys}
5366 % Process package options.
5367 % \UnitTested
5368 % \TestFiles{gotham-test-043}
5369 % \begin{macrocode}
5370 \ProcessKeyOptions[ gotham / inner ]
5371 % \mode<all>
5372 % \end{macrocode}
5373 % \end{macro}
5374 % \end{implementation}
5375
5376
5377 % \begin{implementation}
5378 % \begin{macrocode}
5379 %\endinput
5380 %</inner>
5381 % \end{macrocode}
5382 % \end{implementation}
5383 %
5384 %
5385 % ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5386 %
5387 %
5388 %\begin{implementation}
5389 % \begin{macrocode}
5390 %<*outer>
5391 \ProvidesExplPackage{beamerouterthemegotham}{2026-04-02}{1.2.5.a}{gotham outer theme}
5392 \RequirePackage{expl3}
5393 \RequirePackage{xfp}
5394 \RequirePackage{calc}
5395 \RequirePackage{tikz}
5396 % \end{macrocode}
5397 % \end{implementation}
5398 %
5399 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5400 %%%%%%%%%%%% OUTER %%%%%%%%%%%%%
5401 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5402 %
5403 %
5404 % \begin{implementation}
5405 % \begin{macro}{Compitibility mode for colors}
5406 % FROM COLOR THEME: useful to provide this recall when the inner theme is loaded without the color theme.
5407 % \begin{macrocode}
5408 \@ifundefined{\string\color@colorProgBar}{
5409 \providebool{darkBG} \boolfalse{darkBG}
5410 \providebool{transparentBG} \booltrue{transparentBG}
5411 \colorlet{colorBG}{white}
5412 \colorlet{colorFG}{black}
5413 \colorlet{colorFrametitle}{purple}
5414 \colorlet{colorStandout}{purple}
5415 \colorlet{colorStandin}{purple}
5416 \colorlet{colorTitlepage}{purple}
5417 \colorlet{colorFiligrane}{gray}
5418 \colorlet{colorBackElement}{gray}
5419 \colorlet{colorProgBar}{orange}
5420 \colorlet{colorAlert}{red}
5421 \colorlet{colorExample}{green}
5422 \setbeamercolor{progress~bar}{
5423 use=alerted~text,
5424 fg=colorProgBar,
5425 bg=alerted~text.fg!50!black!30
5426 }
5427 \setbeamercolor{progress~bar~in~head/foot}{%
5428 use=progress~bar,
5429 parent=progress~bar
5430 }
5431 \setbeamercolor{progress~bar~in~part~page}{
5432 use=progress~bar,
5433 parent=progress~bar
5434 }
5435 \setbeamercolor{progress~bar~in~section~page}{
5436 use=progress~bar,
5437 parent=progress~bar
5438 }
5439 \setbeamercolor{progress~bar~in~splitvert}{
5440 use=progress~bar,
5441 parent=progress~bar
5442 }
5443 \setbeamercolor{frametitleSection}{use=primary~palette, bg=, fg=primary~palette.bg}
5444 \setbeamercolor{standout}{use=primary~palette, bg=colorStandout, fg=primary~palette.bg}
5445 \setbeamercolor{standin}{use=normal~text, bg=colorStandin, fg=normal~text.fg}
5446 \setbeamercolor{section~in~toc}{use=normal~text, parent=normal~text,}
5447 \setbeamercolor{subsection~in~toc}{use=normal~text, parent=normal~text,}
5448 \setbeamercolor{subsubsection~in~toc}{use=normal~text, parent=normal~text,}
5449 }{
5450 % else the colors are defined: this is fine.
5451 }
5452 % \end{macrocode}
5453 % \end{macro}
5454 % \end{implementation}
5455
5456 % \begin{documentation}
5457 % \begin{variable}{\l__gotham_template_name_prop}
5458 % Dictionary/map of template elements and predefined option according to the context.
5459 % Naming convention: template/What/Who, i.e. Name: key=background~canvas/watermark, value = gotham~draft
5460 % \end{variable}
5461 % \end{documentation}
5462 %%%%%%
5463 % \begin{implementation}
5464 % \begin{variable}{\l__gotham_template_name_prop}
5465 % Dictionary/map of template elements and predefined option according to the context.
5466 % Naming convention: template/What/Who, i.e. Name: key=background~canvas/watermark, value = gotham~draft
5467 % \begin{macrocode}
5468 \prop_if_exist:NTF \l__gotham_template_name_prop
5469 {}{
5470 % if not defined than define it.
5471 \prop_new:N \l__gotham_template_name_prop
5472 }
5473 % \end{macrocode}
5474 % \end{variable}
5475 % \end{implementation}
5476
5477 % \begin{implementation}
5478 % \begin{variable}{\l__gotham_tmpa_seq, \l__gotham_tmpa_tl, \l__gotham_tmpb_tl}
5479 % tmp variables
5480 % \begin{macrocode}
5481 \seq_if_exist:NTF \l__gotham_tmpa_seq
5482 {}{
5483 % sequence
5484 \seq_new:N \l__gotham_tmpa_seq
5485 }
5486 \tl_if_exist:NTF \l__gotham_tmpa_tl
5487 {}{
5488 % token list A
5489 \tl_new:N \l__gotham_tmpa_tl
5490 }
5491 \tl_if_exist:NTF \l__gotham_tmpb_tl
5492 {}{
5493 % token list B
5494 \tl_new:N \l__gotham_tmpb_tl
5495 }
5496 % \end{macrocode}
5497 % \end{variable}
5498 % \end{implementation}
5499
5500 % \begin{implementation}
5501 % \begin{function}{\__gotham_set_prop_template:nn}
5502 % \begin{arguments}
5503 % \item element name (from beamer doc) in other word, the name the template category
5504 % \item prefined option (from beamer doc)
5505 % \end{arguments}
5506 % Function that store in a map the name a template use later.
5507 % The following naming convention is used: Template/What/Who~Name: watermark/gotham~draft.
5508 % The means for example that if a beamer template is defined using
5509 % |\defbeamertemplate{background}{watermark/gotham~draft}{...}|,
5510 % then the function has to be call using
5511 % |\__gotham_set_prop_template{background/watermark}{gotham~draft}|,
5512 % that will filled internally the map using the l3 command
5513 % |\prop_put:Nnn \l__gotham_template_name_prop {background/watermark}{gotham~draft}|.
5514 % If the template name given as input does not exist, an error is raised.
5515 % \TestFiles{gotham-test-044}
5516 % \begin{macrocode}
5517 \cs_if_exist:NTF \__gotham_set_prop_template:nn {}{
5518 % if it doesn't exist, then create it.
5519 \cs_new_protected:Nn \__gotham_set_prop_template:nn
5520 {
5521 % Check if the first argument contains a /
5522 \tl_if_in:nnTF { #1 } { / }
5523 {
5524 % Split the first around the /
5525 \seq_set_split:Nnn \l__gotham_tmpa_seq { / } { #1 }
5526 \tl_set:Nn \l__gotham_tmpa_tl { \seq_item:Nn \l__gotham_tmpa_seq { 1 } }
5527 \tl_set:Nn \l__gotham_tmpb_tl { \seq_item:Nn \l__gotham_tmpa_seq { 2 } }
5528 % Check if template exist
5529 \cs_if_exist:cTF {beamer@@tmpop@\exp_not:V \l__gotham_tmpa_tl @\exp_not:V \l__gotham_tmpb_tl /#2} {
5530 % set the value in the map, so it can be called later.
5531 \prop_put:Nnn \l__gotham_template_name_prop {#1} {#2}
5532 % \setbeamertemplate{#1}[#2]
5533 }{
5534 \PackageError{beamerthemegotham}
5535 {The~beamer~template~named~'\l__gotham_tmpa_tl'~with~the~option~'\l__gotham_tmpb_tl/#2'~does~not~exist}
5536 {helping~message}
5537 }
5538 }{% false -> error
5539 \PackageError{beamerthemegotham}
5540 {
5541 When~using~'\c_backslash_str\cs_to_str:N \__gotham_set_prop_template'~the~first~argument~should~contain~a~'/'~to~respect~the~naming~convention~used~(Template/what/Who~name),~but~you~gave~'#1'.~
5542 As~example:~if~'\c_backslash_str defbeamertemplate{background}{watermark/gotham~draft}'...,~then~use~'\c_backslash_str\cs_to_str:N \__gotham_set_prop_template{background/watermark}{gotham~draft}'
5543 }{helping~message}
5544 }
5545 }
5546 }
5547 % \end{macrocode}
5548 % \end{function}
5549 % \end{implementation}
5550
5551 % \begin{implementation}
5552 % \begin{function}{\__gotham_add_beamerframe_key:n}
5553 % \begin{arguments}
5554 % \item Name of the option to add, this name should also correspond to the name of the environment followed by the suffix 'env'.
5555 % \end{arguments}
5556 % Function to add an option of a frame using an environment.
5557 % For example, if the name 'optionA' is the argument given to the function, an frame option named 'optionA' will be added, and this option will surround the frame with the environment named 'optionAenv'.
5558 % So, the environment 'optionA' must have been declared before.
5559 % \TestFiles{gotham-test-038}
5560 % \begin{macrocode}
5561 \seq_if_exist:NTF \l__gotham_frameoption_tmp_seq {}{
5562 % Define the sequence of frameoptions environments to close
5563 \seq_new:N \l__gotham_frameoption_tmp_seq
5564 }
5565
5566 \cs_if_exist:NTF \__gotham_add_beamerframe_key:n {}{
5567 % if it doesn't exist, then create it.
5568
5569 % Define the command to add frameoptions
5570 \cs_new_protected:Nn \__gotham_add_beamerframe_key:n {
5571 \define@key{beamerframe}{ #1 }[true]{
5572 \begin{#1env}
5573 \seq_put_left:Nn \l__gotham_frameoption_tmp_seq { \end{#1env} }
5574 }
5575 }
5576
5577 % At the end of frames close the opened environments.
5578 \apptocmd{\beamer@reseteecodes}{
5579 % Join elements in the queue without separator then output the result
5580 \seq_use:Nn \l__gotham_frameoption_tmp_seq {}
5581 % clear working queue
5582 \seq_clear:N \l__gotham_frameoption_tmp_seq
5583 }{}{}
5584 }
5585 % \end{macrocode}
5586 % \end{function}
5587 % \end{implementation}
5588
5589 % \begin{documentation}
5590 % \begin{function}{\__gotham_set_template:nn}
5591 % \begin{syntax}
5592 % \cs{__gotham_set_template:nn} \marg{element} \marg{option}
5593 % \end{syntax}
5594 % Function that test if a beamertemplate with the given element and option name exists. If it exists then it is set (applied), otherwise an error is raised.
5595 % \end{function}
5596 % \end{documentation}
5597 %%%%%%
5598 % \begin{implementation}
5599 % \begin{function}{\__gotham_set_template:nn}
5600 % \begin{arguments}
5601 % \item element name (from beamer doc) in other word, the name the template category
5602 % \item prefined option (from beamer doc)
5603 % \end{arguments}
5604 % Function to set a beamertemplate with an option if it exists, otherwise an error is raised.
5605 % Unfortunatly, (as far as I know) it not possible to test if the element name exists independtly from the prefined option.
5606 % \TestFiles{gotham-test-038}
5607 % \begin{macrocode}
5608 \cs_if_exist:NTF \__gotham_set_template:nn {}{
5609 % If it doesn't exist, then create it.
5610
5611 % Define the command to set template if it exists.
5612 \cs_new_protected:Nn \__gotham_set_template:nn
5613 {
5614 \cs_if_exist:cTF {beamer@@tmpop@#1@#2} {
5615 \setbeamertemplate{#1}[#2]
5616 }{
5617 \PackageError{beamerinnerthemegotham}
5618 {The~beamer~template~named~'#1'~with~the~option~'#2'~does~not~exist}
5619 {helping~message unknown setbeamertemplate option}
5620 }
5621 }
5622 }
5623 % \end{macrocode}
5624 % \end{function}
5625 % \end{implementation}
5626
5627
5628 %%% Sidebars %%%
5629 %%%%%%%%%%%%%%%%
5630
5631 % \begin{documentation}
5632 % \begin{variable}{\sidebarRightHOffset, \sidebarLeftHOffset}
5633 % Length controling the horizontal offset in order to position |\gothamRightFiligrane| (respectively |\gothamLeftFiligrane|) when using the default sidebar canvas (right and left) from gotham.
5634 % \end{variable}
5635 % \end{documentation}
5636 %%%%%%
5637 % \begin{implementation}
5638 % \begin{variable}{\sidebarRightHOffset, \sidebarLeftHOffset}
5639 % lengths between borders (right and left) and the commands (|\gothamRightFiligrane| and |\gothamleftFiligrane|) used inside |\setbeamertemplate{sidebar~canvas~right}[default/gotham~filigrane]| (left respectively).
5640 % \UnitTested
5641 % \TestFiles{gotham-test-044}
5642 % \begin{macrocode}
5643 % sidebar lengths
5644 \newlength{\sidebarRightHOffset}
5645 \newlength{\sidebarLeftHOffset}
5646 \setlength{\sidebarRightHOffset}{-2.5ex}
5647 \setlength{\sidebarLeftHOffset}{+0.5ex}
5648 % \end{macrocode}
5649 % \end{variable}
5650 % \end{implementation}
5651
5652 % \begin{documentation}
5653 % \begin{function}{\gothamRightFiligrane, \gothamLeftFiligrane}
5654 % Commands used internally by |\setbeamertemplate{sidebar~canvas~right}[default/gotham~filigrane]| (left respectively), that are empty by default.
5655 % But these commands can be simply redefined to custom watermarks (filigrane) in sidebars.
5656 % \end{function}
5657 % \end{documentation}
5658 %%%%%%
5659 % \begin{implementation}
5660 % \begin{macro}{\gothamRightFiligrane, \gothamLeftFiligrane}
5661 % Commands used internally by |\setbeamertemplate{sidebar~canvas~right}[default/gotham~filigrane]| (left respectively), that are empty by default.
5662 % But these commands can be simply redefined to custom watermarks (filigrane) in sidebars.
5663 % \UnitTested
5664 % \TestFiles{gotham-test-044}
5665 % \begin{macrocode}
5666 % Command to add filigrane/edging in sidebar
5667 \providecommand{\gothamRightFiligrane}{
5668 % left empty intentionally
5669 % \rotatebox{90}{gotham right filigrane pattern}
5670 }
5671 \providecommand{\gothamLeftFiligrane}{
5672 % left empty intentionally
5673 % \rotatebox{-90}{\hspace*{5em} gotham left filigrane pattern}
5674 }
5675 % \end{macrocode}
5676 % \end{macro}
5677 % \end{implementation}
5678
5679 % \begin{implementation}
5680 % \begin{macro}{\defbeamertemplate{sidebar~canvas~right}{}, \defbeamertemplate{sidebar~canvas~left}{}}
5681 % Definitions of |\defbeamertemplate{sidebar~canvas~right}| (respectively |\defbeamertemplate{sidebar~canvas~left}|) that are used by gotham by default.
5682 % \UnitTested
5683 % \TestFiles{gotham-test-044}
5684 % \begin{macrocode}
5685 \defbeamertemplate{sidebar~right}{default/beamer}{
5686 \vfill
5687 \llap{\insertlogo\hskip0.1cm}
5688 \vskip2pt
5689 \llap{\usebeamertemplate***{navigation~symbols}\hskip0.1cm}
5690 \vskip2pt
5691 }
5692 \defbeamertemplate{sidebar~right}{default/empty}{}
5693 \defbeamertemplate{sidebar~canvas~right}{default/empty}{}
5694 \defbeamertemplate{sidebar~canvas~right}{default/gotham~filigrane}{
5695 % pull to the left otherwise, the filigrane is outside of the frame.
5696 \hspace*{\sidebarRightHOffset}
5697 \gothamRightFiligrane
5698 }
5699 \defbeamertemplate{sidebar~left}{default/empty}{}
5700 \defbeamertemplate{sidebar~canvas~left}{default/empty}{}
5701 \defbeamertemplate{sidebar~canvas~left}{default/gotham~filigrane}{
5702 \hspace*{\sidebarLeftHOffset}
5703 \gothamLeftFiligrane
5704 }
5705 % Add the template to the prop (dictionary) of background template to use according to the situation
5706 \prop_put:Nnn \l__gotham_template_name_prop {sidebar~canvas~left/default} {gotham~filigrane}
5707 \prop_put:Nnn \l__gotham_template_name_prop {sidebar~canvas~right/default} {gotham~filigrane}
5708 \prop_put:Nnn \l__gotham_template_name_prop {sidebar~left/default} {empty}
5709 \prop_put:Nnn \l__gotham_template_name_prop {sidebar~right/default} {beamer}
5710 % \end{macrocode}
5711 % \end{macro}
5712 % \end{implementation}
5713
5714 % \begin{documentation}
5715 % \begin{variable}{\l_gotham_defaultEdging}
5716 % Boolean to triggering if edging should be displayed by default (without giving the frame option).
5717 % The variable is |false| by default.
5718 % \end{variable}
5719 % \end{documentation}
5720 %%%%%%
5721 % \begin{implementation}
5722 % \begin{macro}{\l_gotham_defaultEdging}
5723 % Boolean variable to display the edging by default (or not).
5724 % \UnitTested
5725 % \TestFiles{gotham-test-044}
5726 % \begin{macrocode}
5727 \bool_new:N \l_gotham_defaultEdging
5728 \bool_set_false:N \l_gotham_defaultEdging
5729 % At every new frame, reset the options to default (unless some options/keys are given)
5730 \BeforeBeginEnvironment{frame}{
5731 \bool_if:NTF \l_gotham_defaultEdging {
5732 \setbeamertemplate{sidebar~canvas~left}[default/\prop_item:Nn \l__gotham_template_name_prop {sidebar~canvas~left/default}]
5733 \setbeamertemplate{sidebar~canvas~right}[default/\prop_item:Nn \l__gotham_template_name_prop {sidebar~canvas~right/default}]
5734 }{
5735 % false
5736 \setbeamertemplate{sidebar~canvas~left}[default/empty]
5737 \setbeamertemplate{sidebar~canvas~right}[default/empty]
5738 }
5739 }
5740 % \end{macrocode}
5741 % \end{macro}
5742 % \end{implementation}
5743
5744 % \begin{documentation}
5745 % \begin{function}{\begin{frame}[edging]}
5746 % Add a frame option |edging| to display edging in sidebar canvas.
5747 % \end{function}
5748 % \end{documentation}
5749 %%%%%%
5750 % \begin{implementation}
5751 % \begin{macro}{\begin{frame}[edging]}
5752 % Add a frame option |edging| to display an empty sidebar canvas canvas.
5753 % To do it, we must add a global boolean variable, capture the option at the begin of the frame and patch the end of the frame.
5754 % \UnitTested
5755 % \TestFiles{gotham-test-044}
5756 % \begin{macrocode}
5757 % bool to trigger the add of edging in sidebar canvas
5758 \newenvironment{edgingenv}{
5759 \setbeamertemplate{sidebar~canvas~left}[
5760 default/\prop_item:Nn \l__gotham_template_name_prop {sidebar~canvas~left/default}
5761 ]
5762 \setbeamertemplate{sidebar~canvas~right}[
5763 default/\prop_item:Nn \l__gotham_template_name_prop {sidebar~canvas~right/default}
5764 ]
5765 }{}
5766 \__gotham_add_beamerframe_key:n {edging}
5767 % \end{macrocode}
5768 % \end{macro}
5769 % \end{implementation}
5770
5771 % \begin{documentation}
5772 % \begin{function}{\begin{frame}[noedging]}
5773 % Add a frame option |noedging| to do not display noedging in sidebar canvas.
5774 % \end{function}
5775 % \end{documentation}
5776 %%%%%%
5777 % \begin{implementation}
5778 % \begin{macro}{\begin{frame}[noedging]}
5779 % Add a frame option |noedging| to do not display an empty sidebar canvas canvas.
5780 % To do it, we must add a global boolean variable, capture the option at the begin of the frame and patch the end of the frame.
5781 % \UnitTested
5782 % \TestFiles{gotham-test-044}
5783 % \begin{macrocode}
5784 % bool to trigger the add of noedging in sidebar canvas
5785 \newenvironment{noedgingenv}{
5786 \setbeamertemplate{sidebar~canvas~left}[default/empty]
5787 \setbeamertemplate{sidebar~canvas~right}[default/empty]
5788 }{}
5789 \__gotham_add_beamerframe_key:n {noedging}
5790 % \end{macrocode}
5791 % \end{macro}
5792 % \end{implementation}
5793
5794 % \begin{documentation}
5795 % \begin{function}{\useoutertheme}
5796 % \begin{syntax}
5797 % \cs{useoutertheme}\oarg{option1=value1, ...}\marg{gotham}
5798 % \textrm{where the options are (default marked as} \defopt{default}\textrm{):}
5799 % \meta{edging default} = \oarg{\defopt{off} \textbar on }
5800 % \meta{sidebar canvas left template} = \oarg{\defopt{gotham} \textbar ...}
5801 % \meta{sidebar canvas right template} = \oarg{\defopt{gotham filigrane} \textbar empty \textbar ...}
5802 % \end{syntax}
5803 % The 'package' (useoutertheme) options can control |sidebar canvas right| (and |sidebar canvas left|) templates.
5804 % These templates are activated when giving the frame option |\begin{frame}[edging]|.
5805 % The option |edging default=on| can enable the |sidebar canvas right| (and |sidebar canvas left|) templates on every frame; but it can still be turned off for specific frames when using the frame option |noedging|.
5806 % \end{function}
5807 % \end{documentation}
5808 %%%%
5809 % \begin{implementation}
5810 % \begin{macro}{outer key -- interface}
5811 % Controls the outer settings for sidebar canvas right and sidebar canvas left.
5812 % \UnitTested
5813 % \TestFiles{gotham-test-044}
5814 % \begin{macrocode}
5815 \keys_define:nn { gotham / outer }
5816 {
5817 % sidebar~canvas~right template
5818 sidebar~canvas~right~template .usage:n = { general },
5819 sidebar~canvas~right~template .default:n = { gotham~filigrane },
5820 sidebar~canvas~right~template .code:n = { \__gotham_set_prop_template:nn{sidebar~canvas~right/default}{#1} },
5821 }
5822 \keys_define:nn { gotham / outer }
5823 {
5824 % sidebar~canvas~left template
5825 sidebar~canvas~left~template .usage:n = { general },
5826 sidebar~canvas~left~template .default:n = { gotham~filigrane },
5827 sidebar~canvas~left~template .code:n = { \__gotham_set_prop_template:nn{sidebar~canvas~left/default}{#1} },
5828 }
5829 \keys_define:nn { gotham / outer }{
5830 % edging default
5831 edging~default .choice:,
5832 edging~default .usage:n = { general },
5833 edging~default .default:n = { false },
5834
5835 edging~default / true .code:n = { \bool_set_true:N \l_gotham_defaultEdging },
5836 edging~default / on .code:n = { \bool_set_true:N \l_gotham_defaultEdging },
5837 edging~default / enable .code:n = { \bool_set_true:N \l_gotham_defaultEdging },
5838
5839 edging~default / false .code:n = { \bool_set_false:N \l_gotham_defaultEdging },
5840 edging~default / off .code:n = { \bool_set_false:N \l_gotham_defaultEdging },
5841 edging~default / disable .code:n = { \bool_set_false:N \l_gotham_defaultEdging },
5842
5843 edging~default / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'#1'~is~unknown~for~the~(known)~option~'edging~default',~so~being~ignored. }{helping~message: edging~default / unknown} },
5844 }
5845 % \end{macrocode}
5846 % \end{macro}
5847 % \end{implementation}
5848
5849
5850 %%% Navigation \& Logo %%%
5851 %%%%%%%%%%%%%%%%%%%%%%%%%%
5852
5853 % \begin{documentation}
5854 % \begin{function}{\defbeamertemplate{navigation~symbols}{empty} }
5855 % By default the navigation symbols are disable.
5856 % \end{function}
5857 % \end{documentation}
5858 %%%%%%
5859 % \begin{implementation}
5860 % \begin{macro}{\defbeamertemplate*{navigation~symbols}{empty} }
5861 % Apply the empty navigation symbol template by default.
5862 % \UnitTested
5863 % \TestFiles{gotham-test-045}
5864 % \begin{macrocode}
5865 \defbeamertemplate*{navigation~symbols}{empty}{}
5866 % \end{macrocode}
5867 % \end{macro}
5868 % \end{implementation}
5869
5870 % \begin{documentation}
5871 % \begin{function}{\defbeamertemplate{navigation~symbols}{default} }
5872 % Navigation symbols can be turned on using |\setbeamertemplate{navigation symbols}[default]|.
5873 % \end{function}
5874 % \end{documentation}
5875 %%%%%%
5876 % \begin{implementation}
5877 % \begin{macro}{\defbeamertemplate{navigation~symbols}{horizontal} }
5878 % From Beamer default theme.
5879 % \UnitTested
5880 % \TestFiles{gotham-test-045}
5881 % \begin{macrocode}
5882 % \setbeamertemplate{navigation~symbols}[vertical]
5883 % \setbeamertemplate{navigation~symbols}[only~frame~symbol]
5884 % \setbeamertemplate{navigation~symbols}[default]% = horizontal
5885 % \defbeamertemplate{navigation~symbols}{horizontal}{
5886 % \usebeamercolor[fg]{navigation~symbols}
5887 % \insertslidenavigationsymbol
5888 % \insertframenavigationsymbol
5889 % \insertsubsectionnavigationsymbol
5890 % \insertsectionnavigationsymbol
5891 % \insertdocnavigationsymbol
5892 % \insertbackfindforwardnavigationsymbol
5893 % }
5894 % \end{macrocode}
5895 % \end{macro}
5896 % \end{implementation}
5897
5898 % \begin{implementation}
5899 % \begin{macro}{\defbeamertemplate{logo}{empty}}
5900 % Template used sometimes to have no logo on specific frames.
5901 % \UnitTested
5902 % \TestFiles{gotham-test-045}
5903 % \begin{macrocode}
5904 \defbeamertemplate{logo}{empty}{}
5905 % \end{macrocode}
5906 % \end{macro}
5907 % \end{implementation}
5908
5909 % \begin{documentation}
5910 % \begin{function}{\begin{frame}[nologo]}
5911 % Add a frame option |nologo|, if you do not want your logo to be displayed.
5912 % \end{function}
5913 % \end{documentation}
5914 %%%%%%
5915 % \begin{implementation}
5916 % \begin{macro}{\begin{frame}[nologo]}
5917 % Add a frame option |nologo|, if you do not want your logo to be displayed.
5918 % To do it, we must add a global boolean variable, capture the option at the begin of the frame and patch the end of the frame.
5919 % \UnitTested
5920 % \TestFiles{gotham-test-045}
5921 % \begin{macrocode}
5922 % bool to trigger the add of nologo action on frame.
5923 \newenvironment{nologoenv}{
5924 \setbeamertemplate{logo}[empty]
5925 }{}
5926 \__gotham_add_beamerframe_key:n {nologo}
5927 % \end{macrocode}
5928 % \end{macro}
5929 % \end{implementation}
5930
5931
5932 %%% Headline \& Frametitle %%%
5933 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5934
5935 %%% Headline %%%
5936
5937 % \begin{implementation}
5938 % \begin{macro}{\defbeamertemplate{headline}{default/gotham}}
5939 % The headline template is empty by default by can be changed when using progress bar or the current section.
5940 % \UnitTested
5941 % \TestFiles{gotham-test-046, gotham-test-046b, gotham-test-047}
5942 % \begin{macrocode}
5943 \defbeamertemplate{headline}{default/gotham}{}
5944 \prop_put:Nnn \l__gotham_template_name_prop {headline/default} {gotham}
5945 % \end{macrocode}
5946 % \end{macro}
5947 % \end{implementation}
5948
5949 % \begin{implementation}
5950 % \begin{macro}{\defbeamertemplate{headline}{default/gotham~section}}
5951 % The headline template used to print the current section name and subection.
5952 % This template is used with |circlehead| progress bar
5953 % \UnitTested
5954 % \TestFiles{gotham-test-046, gotham-test-046b, gotham-test-047}
5955 % \begin{macrocode}
5956 \defbeamertemplate{headline}{default/gotham~section}{
5957 \begin{beamercolorbox}[wd=1.0\paperwidth, ht=2.5ex, dp=1.4ex, left]{headfoot}
5958 \usebeamerfont{section~in~head/foot}\hspace*{3.5ex}
5959 \usebeamertemplate{section~in~head/foot}
5960 \end{beamercolorbox}
5961 }
5962 % \end{macrocode}
5963 % \end{macro}
5964 % \end{implementation}
5965
5966
5967 %%% Frametitle %%%
5968
5969 % \begin{documentation}
5970 % \begin{variable}{\gothamFrametitleToppading, \gothamFrametitleBottompading, \gothamFrametitleLeftpading, \gothamFrametitleRightpading}
5971 % Dimensions controlling the top, bottom, left and right padding in the frametitle.
5972 % \end{variable}
5973 % \end{documentation}
5974 %%%%%%
5975 % \begin{implementation}
5976 % \begin{variable}{\gothamFrametitleToppading, \gothamFrametitleBottompading, \gothamFrametitleLeftpading, \gothamFrametitleRightpading}
5977 % Dimensions of lengths used in the frametitle: top, bottom, left and right padding.
5978 % All of them are equal to 2.2ex by default.
5979 % \begin{macrocode}
5980 \newlength{\gothamFrametitleToppading}
5981 \newlength{\gothamFrametitleBottompading}
5982 \newlength{\gothamFrametitleLeftpading}
5983 \newlength{\gothamFrametitleRightpading}
5984 \setlength{\gothamFrametitleToppading}{2.2ex}
5985 \setlength{\gothamFrametitleBottompading}{2.2ex}
5986 \setlength{\gothamFrametitleLeftpading}{2.2ex}
5987 \setlength{\gothamFrametitleRightpading}{2.2ex}
5988 % \gotham@strut from inner
5989 \providecommand{\gotham@strut}{
5990 \vphantom{ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz (/)}
5991 }
5992 % \end{macrocode}
5993 % \end{variable}
5994 % \end{implementation}
5995
5996 % \begin{implementation}
5997 % \begin{macro}{\gotham@frametitlestrut@start, \gotham@frametitlestrut@end}
5998 % Commands used to control the space over and under the title in frametitle.
5999 % \UnitTested
6000 % \TestFiles{gotham-test-046, gotham-test-046b, gotham-test-047}
6001 % \begin{macrocode}
6002 \providecommand{\gotham@frametitlestrut@start}{
6003 \rule{0pt}{\gothamFrametitleToppading +
6004 \totalheightof{
6005 \ifcsdef{gotham@frametitleformat}{\gotham@frametitleformat{X}}{X}
6006 }
6007 }
6008 }
6009 \providecommand{\gotham@frametitlestrut@end}{
6010 \rule[-\gothamFrametitleBottompading]{0pt}{\gothamFrametitleBottompading}
6011 }
6012 % \end{macrocode}
6013 % \end{macro}
6014 % \end{implementation}
6015
6016 % \begin{documentation}
6017 % \begin{function}{\gothamInstituteLogoSquare[height]}
6018 % \begin{syntax}
6019 % \cs{height} \oarg{height of the logo use in inclugraphics (4ex by default)}
6020 % \end{syntax}
6021 % Command to set the image logo to include.
6022 % \end{function}
6023 % \end{documentation}
6024 %%%%%%
6025 % \begin{implementation}
6026 % \begin{function}{\gothamInstituteLogoSquare[height] \defbeamertemplate{includeLogo}{default/gotham~square}}
6027 % \begin{syntax}
6028 % \cs{gothamInstituteLogoSquare} \oarg{height}
6029 % \end{syntax}
6030 % Command to include the desired logo and a template used to add it to the frametitle.
6031 % For example your can do |\renewcommand{\gothamInstituteLogoSquare}[1][4ex]{\includegraphics[height=#1]{gotham-logo.pdf}}|.
6032 % \TestFiles{gotham-test-046, gotham-test-047}
6033 % \begin{macrocode}
6034 \providecommand{\gothamInstituteLogoSquare}[1][4ex]{
6035 %\includegraphics[height=#1]{gotham-logo.pdf}
6036 }
6037 \defbeamertemplate{includeLogo}{default/gotham~square}{
6038 \gothamInstituteLogoSquare
6039 }
6040 \prop_put:Nnn \l__gotham_template_name_prop {includeLogo/default} {gotham~square}
6041 % \end{macrocode}
6042 % \end{function}
6043 % \end{implementation}
6044
6045 % \begin{implementation}
6046 % \begin{macro}{\defbeamertemplate{includeLogo}{default/gotham~circle}}
6047 % Template used in frametitle when the option |progress bar= circlehead| is activated.
6048 % \UnitTested
6049 % \TestFiles{gotham-test-046b}
6050 % \begin{macrocode}
6051 \defbeamertemplate{includeLogo}{default/gotham~circle}{
6052 \gothamProgressCircle
6053 }
6054 % \end{macrocode}
6055 % \end{macro}
6056 % \end{implementation}
6057
6058 % \begin{implementation}
6059 % \begin{macro}{\defbeamertemplate{includeLogo}{default/gotham~circle}}
6060 % Template to make sure the logo will remain centered and to do not change the height of the line when included.
6061 % This template is used to include logo in frametitle.
6062 % \UnitTested
6063 % \TestFiles{gotham-test-046b}
6064 % \begin{macrocode}
6065 \defbeamertemplate{instituteLogo}{default/gotham}{
6066 % \raisebox{lift}[height][depth]{text}
6067 \raisebox{0pt}[0pt][0pt]{
6068 \raisebox{.5\fontcharht\font`E-0.5\height}{
6069 % \setbeamertemplate{}[]
6070 \setbeamertemplate{includeLogo}[default/\prop_item:Nn \l__gotham_template_name_prop {includeLogo/default}]
6071 \usebeamertemplate{includeLogo}
6072 }
6073 }
6074 }
6075 \prop_put:Nnn \l__gotham_template_name_prop {instituteLogo/default} {gotham}
6076 % \end{macrocode}
6077 % \end{macro}
6078 % \end{implementation}
6079
6080 % \begin{documentation}
6081 % \begin{function}{\gothamFrameSubtitleSep}
6082 % Command that can be redefined to control the separator between the title of the frame and its subtitle.
6083 % For example if a default Beamer style is desired, one can use |\renewcommand{\gothamFrameSubtitleSep}{\\[-.42em]}|.
6084 % By default it is a hyphen.
6085 % \end{function}
6086 % \end{documentation}
6087 %%%%%%
6088 % \begin{implementation}
6089 % \begin{function}{\gothamFrameSubtitleSep}
6090 % Hyphen used as separator between title of the frame and its subtitle (within frametitle template).
6091 % \TestFiles{ gotham-test-047}
6092 % \begin{macrocode}
6093 \providecommand{\gothamFrameSubtitleSep}{
6094 % \\[-.42em] % if newline (as default Beamer)
6095 % or if same line with a -- separator.
6096 \ ---~
6097 }
6098 % \end{macrocode}
6099 % \end{function}
6100 % \end{implementation}
6101
6102 % \begin{documentation}
6103 % \begin{variable}{\gothamFramesubtitleStrutend}
6104 % Variable vertical length used to adapte the bottom padding when a subtitle is given.
6105 % \end{variable}
6106 % \end{documentation}
6107 %%%%%%
6108 % \begin{implementation}
6109 % \begin{variable}{\gothamFramesubtitleStrutend}
6110 % Length used in |vspace| at the end of framesubtitle.
6111 % \begin{macrocode}
6112 \newlength{\gothamFramesubtitleStrutend}
6113 \setlength{\gothamFramesubtitleStrutend}{0pt}
6114 % \setlength{\gothamFramesubtitleStrutend}{-1.25ex} %% When \newcommand{\gothamFrameSubtitleSep}{\\[-.42em]}
6115 % \end{macrocode}
6116 % \end{variable}
6117 % \end{implementation}
6118
6119 % \begin{implementation}
6120 % \begin{macro}{\defbeamertemplate{frametitle}{default/gotham~subsameline}}
6121 % Template for frametitle include subtitle on the same line and a logo a flushed left.
6122 % \UnitTested
6123 % \TestFiles{gotham-test-047}
6124 % \begin{macrocode}
6125 \defbeamertemplate{frametitle}{default/gotham~subsameline}{
6126 \nointerlineskip
6127 \begin{beamercolorbox}[
6128 wd=\paperwidth,
6129 sep=0pt,
6130 leftskip=\gothamFrametitleLeftpading,
6131 rightskip=\gothamFrametitleRightpading,
6132 ]{frametitle}
6133 \gotham@frametitlestrut@start
6134 \insertframetitle
6135 \ifx\insertframesubtitle\@empty
6136 %% if subtitle to the frame is empty
6137 \else
6138 %% if not empty: add subtitle
6139 {\usebeamerfont{framesubtitle}\usebeamercolor[fg]{framesubtitle}\gothamFrameSubtitleSep \insertframesubtitle}
6140 \vspace*{\gothamFramesubtitleStrutend}
6141 \fi
6142 \nolinebreak
6143 %% Add logo
6144 \hfill{
6145 \setbeamertemplate{instituteLogo}[default/\prop_item:Nn \l__gotham_template_name_prop {instituteLogo/default}]
6146 \usebeamertemplate{instituteLogo}
6147 }
6148 \gotham@frametitlestrut@end
6149 \end{beamercolorbox}
6150 }
6151 \prop_put:Nnn \l__gotham_template_name_prop {frametitle/default} {gotham~subsameline}
6152 % \end{macrocode}
6153 % \end{macro}
6154 % \end{implementation}
6155
6156 % \begin{implementation}
6157 % \begin{macro}{\defbeamertemplate{framesubtitle}{default/gotham~subnewline}}
6158 % Template for framesubtitle include subtitle on the same line and a logo a flushed left.
6159 % \UnitTested
6160 % \TestFiles{gotham-test-047}
6161 % \begin{macrocode}
6162 \dim_new:N \l__gotham_framesubtitle_subnewline_strutend_dim
6163 \defbeamertemplate{framesubtitle}{default/gotham~subnewline}{
6164 \nointerlineskip
6165 \begin{beamercolorbox}[
6166 wd=\paperwidth,
6167 sep=0pt,
6168 leftskip=\gothamFrametitleLeftpading,
6169 rightskip=\gothamFrametitleRightpading,
6170 ]{frametitle}
6171 % put the subtitle in a raisebox to have no influence on the result.
6172 \raisebox{0pt}[0pt][0pt]{
6173 \raisebox{-0.3ex}{
6174 { \usebeamerfont{framesubtitle}\usebeamercolor[fg]{framesubtitle}\insertframesubtitle}
6175 }
6176 }
6177 % add 1ex to take into account the subtitle height.
6178 \dim_set:Nn \l__gotham_framesubtitle_subnewline_strutend_dim {1.ex+\gothamFramesubtitleStrutend}
6179 \vspace{\l__gotham_framesubtitle_subnewline_strutend_dim}
6180 \end{beamercolorbox}
6181 }
6182 \prop_put:Nnn \l__gotham_template_name_prop {framesubtitle/default} {gotham~subnewline}
6183 % \end{macrocode}
6184 % \end{macro}
6185 % \end{implementation}
6186
6187 % \begin{implementation}
6188 % \begin{macro}{\defbeamertemplate{framesubtitle}{default/gotham~subnewline}}
6189 % Template for frametitle and a logo a flushed left then the subtitle on a new line.
6190 % \UnitTested
6191 % \TestFiles{gotham-test-047}
6192 % \begin{macrocode}
6193 \defbeamertemplate{frametitle}{default/gotham~subnewline}{
6194 \nointerlineskip
6195 \begin{beamercolorbox}[
6196 wd=\paperwidth,
6197 sep=0pt,
6198 leftskip=\gothamFrametitleLeftpading,
6199 rightskip=\gothamFrametitleRightpading,
6200 ]{frametitle}
6201 \gotham@frametitlestrut@start
6202 \insertframetitle
6203 \nolinebreak
6204 \hfill{
6205 \setbeamertemplate{instituteLogo}[default/\prop_item:Nn \l__gotham_template_name_prop {instituteLogo/default}]
6206 \usebeamertemplate{instituteLogo}
6207 }
6208 \gotham@frametitlestrut@end
6209 \end{beamercolorbox}
6210 %% End of the frametitle box, start then use the subtitle template if needed.
6211 \ifx\insertframesubtitle\@empty
6212 %% if subtitle to the frame is not empty
6213 \else
6214 % reduce vertical space to have a 1pt overlap, so no white line appears with vectorial viewers.
6215 \vspace*{-1pt}
6216 % add the subtitle
6217 \setbeamertemplate{framesubtitle}[default/\prop_item:Nn \l__gotham_template_name_prop {framesubtitle/default}]
6218 % \setbeamertemplate{framesubtitle}%[framesubtitle/default]
6219 \usebeamertemplate{framesubtitle}
6220 \fi
6221 }
6222 % \end{macrocode}
6223 % \end{macro}
6224 % \end{implementation}
6225
6226 % \begin{documentation}
6227 % \begin{function}{\useoutertheme}
6228 % \begin{syntax}
6229 % \cs{useoutertheme}\oarg{option1=value1, ...}\marg{gotham}
6230 % \textrm{where the options are (default marked as} \defopt{default}\textrm{):}
6231 % \meta{frametitle template} = \oarg{\defopt{gotham subsameline} \textbar gotham subnewline \textbar ... }
6232 % \meta{framesubtitle template} = \oarg{\defopt{gotham subnewline} \textbar ...}
6233 % \end{syntax}
6234 % The 'package' (useoutertheme) options can control |frametitle| (and |framesubtitle|) templates.
6235 % \end{function}
6236 % \end{documentation}
6237 %%%%
6238 % \begin{implementation}
6239 % \begin{macro}{outer key -- interface}
6240 % Controls the outer settings for frametitle and framesubtitle.
6241 % \UnitTested
6242 % \TestFiles{gotham-test-047}
6243 % \begin{macrocode}
6244 \keys_define:nn { gotham / outer }{
6245 % frametitle template
6246 frametitle~template .usage:n = { general },
6247 frametitle~template .default:n = { gotham~subsameline },
6248 frametitle~template .code:n = {
6249 \__gotham_set_prop_template:nn{frametitle/default}{#1}
6250 \setbeamertemplate{frametitle}[default/\prop_item:Nn \l__gotham_template_name_prop {frametitle/default}]
6251 }
6252 }
6253 \keys_define:nn { gotham / outer }{
6254 % frametitle template
6255 framesubtitle~template .usage:n = { general },
6256 framesubtitle~template .default:n = { gotham~subnewline },
6257 framesubtitle~template .code:n = {
6258 \__gotham_set_prop_template:nn{framesubtitle/default}{#1}
6259 \setbeamertemplate{framesubtitle}[default/\prop_item:Nn \l__gotham_template_name_prop {framesubtitle/default}]
6260 }
6261 }
6262 % \end{macrocode}
6263 % \end{macro}
6264 % \end{implementation}
6265
6266
6267 %%% Continuation %%%
6268
6269 % \begin{implementation}
6270 % \begin{macro}{\defbeamertemplate{frametitle~continuation}{default/beamer}}
6271 % Template for numerotation of frametitle when a frame are continuing on sevral pages (allowed with the beamer option |allowframebreaks|).
6272 % Beamer theme (by default) is using roman number with uppercase.
6273 % \UnitTested
6274 % \TestFiles{gotham-test-047}
6275 % \begin{macrocode}
6276 \defbeamertemplate{frametitle~continuation}{default/beamer}{
6277 \usebeamerfont{frametitle}
6278 {
6279 \MakeUppercase{\romannumeral \insertcontinuationcount}
6280 }
6281 }
6282 % \end{macrocode}
6283 % \end{macro}
6284 % \end{implementation}
6285
6286 % \begin{implementation}
6287 % \begin{macro}{\defbeamertemplate{frametitle~continuation}{default/tot}}
6288 % Template for numerotation of frametitle when a frame are continuing on sevral pages (allowed with the beamer option |allowframebreaks|).
6289 % This template is using arabic number slash over the total number of page for this frame.
6290 % \UnitTested
6291 % \TestFiles{gotham-test-047}
6292 % \begin{macrocode}
6293 \defbeamertemplate{frametitle~continuation}{default/tot}{
6294 \usebeamerfont{frametitle}
6295 {
6296 \textmd{%
6297 [\insertcontinuationcount
6298 \,/\,%
6299 \the\numexpr\beamer@endpageofframe+1-\beamer@startpageofframe
6300 ]%
6301 }%
6302 }
6303 }
6304 % \end{macrocode}
6305 % \end{macro}
6306 % \end{implementation}
6307
6308 % \begin{implementation}
6309 % \begin{macro}{\defbeamertemplate{frametitle~continuation}{default/gotham}}
6310 % Template for numerotation of frametitle when a frame are continuing on sevral pages (allowed with the beamer option |allowframebreaks|).
6311 % Gotham theme (by default) is using roman number with lowercase.
6312 % \UnitTested
6313 % \TestFiles{gotham-test-047}
6314 % \begin{macrocode}
6315 \defbeamertemplate{frametitle~continuation}{default/gotham}{
6316 \usebeamerfont{frametitle}
6317 {
6318 %\small
6319 (\romannumeral \insertcontinuationcount)
6320 }
6321 }
6322 \prop_put:Nnn \l__gotham_template_name_prop {frametitle~continuation/default} {gotham}
6323 % \end{macrocode}
6324 % \end{macro}
6325 % \end{implementation}
6326
6327 % \begin{documentation}
6328 % \begin{function}{\useoutertheme}
6329 % \begin{syntax}
6330 % \cs{useoutertheme}\oarg{option1=value1, ...}\marg{gotham}
6331 % \textrm{where the options are (default marked as} \defopt{default}\textrm{):}
6332 % \meta{frametitle continuation template} = \oarg{\defopt{gotham} \textbar tot \textbar beamer \textbar ... }
6333 % \end{syntax}
6334 % The 'package' (useoutertheme) options can control |frametitle continuation| templates.
6335 % \end{function}
6336 % \end{documentation}
6337 %%%%
6338 % \begin{implementation}
6339 % \begin{macro}{outer key -- interface}
6340 % Controls the outer settings for frametitle continuation.
6341 % \UnitTested
6342 % \TestFiles{gotham-test-047}
6343 % \begin{macrocode}
6344 \keys_define:nn { gotham / outer }{
6345 % frametitle template
6346 frametitle~continuation~template .usage:n = { general },
6347 frametitle~continuation~template .default:n = { gotham },
6348 frametitle~continuation~template .code:n = {
6349 \__gotham_set_prop_template:nn{frametitle~continuation/default}{#1}
6350 \setbeamertemplate{frametitle~continuation}[default/\prop_item:Nn \l__gotham_template_name_prop {frametitle~continuation/default}]
6351 }
6352 }
6353 % \end{macrocode}
6354 % \end{macro}
6355 % \end{implementation}
6356
6357
6358 %%% Footer \& Footline %%%
6359 %%%%%%%%%%%%%%%%%%%%%%%%%%
6360
6361 %%% Footline %%%
6362
6363 % \begin{implementation}
6364 % \begin{macro}{\defbeamertemplate{footline}{empty}}
6365 % Empty footline template used when the option nofootline is given.
6366 % \UnitTested
6367 % \TestFiles{gotham-test-048}
6368 % \begin{macrocode}
6369 \defbeamertemplate{footline}{empty}{}
6370 % \end{macrocode}
6371 % \end{macro}
6372 % \end{implementation}
6373
6374 % \begin{documentation}
6375 % \begin{function}{\begin{frame}[nofootline]}
6376 % Add a frame option |nofootline| to do not display nofootline.
6377 % \end{function}
6378 % \end{documentation}
6379 %%%%%%
6380 % \begin{implementation}
6381 % \begin{macro}{\begin{frame}[nofootline]}
6382 % Add a frame option |nofootline| to do not display an empty footline.
6383 % To do it, we must add a global boolean variable, capture the option at the begin of the frame and patch the end of the frame.
6384 % \UnitTested
6385 % \TestFiles{gotham-test-048}
6386 % \begin{macrocode}
6387 % bool to trigger the add of nofootline in frame.
6388 \newenvironment{nofootlineenv}{
6389 \setbeamertemplate{footline}[empty]
6390 }{}
6391 \__gotham_add_beamerframe_key:n {nofootline}
6392 % \end{macrocode}
6393 % \end{macro}
6394 % \end{implementation}
6395
6396 % \begin{documentation}
6397 % \begin{variable}[updated=2024-11-11]{\gothamFootlineVOffset, \gothamFootlineHRightOffset,\gothamFootlineHeight, \gothamFootlineDepth}
6398 % Lengths controlling the position of |footline|.
6399 % |\gothamFootlineVOffset| is controlling vertical space between to bottom of the text (or the footnote) and the footline.
6400 % |\gothamFootlineVOffset| is by default -0.5ex, to have more space in the frame but if the footer is not really used, the space can be even more optimized using |\setlength{\gothamFootlineVOffset}{-2.0ex}|.
6401 % |\gothamFootlineHRightOffset| is horizontal space between the right corner and the footline.
6402 % Obviously, it can be back to "normal" setting it to 0pt.
6403 % |\gothamFootlineHeight| and |\gothamFootlineDepth| are controlling the heigth of the footline and the position of the text within.
6404 % \end{variable}
6405 % \end{documentation}
6406 %%%%%%
6407 % \begin{implementation}
6408 % \begin{variable}[updated=2024-11-11]{\gothamFootlineVOffset, \gothamFootlineHeight, \gothamFootlineDepth}
6409 % Lengths used in |footline| template.
6410 % \begin{macrocode}
6411 % Footline lengths
6412 % space between to bottom of the text (or the footnote) and the footline
6413 \newlength{\gothamFootlineVOffset}
6414 \newlength{\gothamFootlineHeight}
6415 \newlength{\gothamFootlineDepth}
6416 \newlength{\gothamFootlineHRightOffset}
6417
6418 \setlength{\gothamFootlineVOffset}{-0.5ex}
6419 \setlength{\gothamFootlineDepth}{0.1ex}
6420 \setlength{\gothamFootlineHeight}{1.5ex}
6421 \setlength{\gothamFootlineHRightOffset}{\spaceskip}
6422 % \end{macrocode}
6423 % \end{variable}
6424 % \end{implementation}
6425
6426 % \begin{implementation}
6427 % \begin{macro}{\defbeamertemplate*{footline}{default/gotham}}
6428 % Template that is activate by default since this footline is relatively generic.
6429 % \changes{v1.2.0}{2024-11-11}{add gothamFootlineHRightOffset}
6430 % \UnitTested
6431 % \TestFiles{gotham-test-048}
6432 % \begin{macrocode}
6433 \defbeamertemplate*{footline}{default/gotham}{
6434 % new line to adjust the footline position.
6435 \vspace*{\gothamFootlineVOffset}
6436 \begin{beamercolorbox}[
6437 wd=\textwidth,
6438 sep=0pt,
6439 leftskip=3ex,
6440 rightskip=3ex,
6441 ht={\gothamFootlineHeight},
6442 dp={\gothamFootlineDepth},
6443 ]{footline}
6444 \usebeamerfont{page number in head/foot}
6445 \ifbeamertemplateempty{frame~footer}{
6446 %executed if empty
6447 \hfill \ \gotham@strut
6448 }{
6449 %⟨executed otherwise⟩
6450 \usebeamertemplate*{frame~footer}
6451 }
6452 \hspace{\gothamRightFooterPadding}
6453 {\usebeamertemplate{page~number~in~head/foot}}
6454 \hspace*{\gothamFootlineHRightOffset}
6455 \end{beamercolorbox}
6456 }
6457 \prop_put:Nnn \l__gotham_template_name_prop {footline/default} {gotham}
6458 % \end{macrocode}
6459 % \end{macro}
6460 % \end{implementation}
6461
6462 % \begin{documentation}
6463 % \begin{function}{\begin{frame}[nopagenumber]}
6464 % Add a frame option |nopagenumber| to do not display the page number in the footline.
6465 % \end{function}
6466 % \end{documentation}
6467 %%%%%%
6468 % \begin{implementation}
6469 % \begin{macro}{\begin{frame}[nopagenumber]}
6470 % Add a frame option |nopagenumber| to do not display an page number locally.
6471 % To do it, we must add a global boolean variable, capture the option at the begin of the frame and patch the end of the frame.
6472 % \UnitTested
6473 % \TestFiles{gotham-test-048}
6474 % \begin{macrocode}
6475 % bool to trigger the add of nopagenumber in frame.
6476 \newenvironment{nopagenumberenv}{
6477 \setbeamertemplate{page~number~in~head/foot}[none]
6478 }{}
6479 \__gotham_add_beamerframe_key:n {nopagenumber}
6480 % \end{macrocode}
6481 % \end{macro}
6482 % \end{implementation}
6483
6484
6485 %%% Footer %%%
6486
6487 % \begin{documentation}
6488 % \begin{variable}{\gothamLeftFooterPadding, \gothamRightFooterPadding, \gothamFooterHOffset}
6489 % Lengths controlling the position of |footer|.
6490 % |\gothamFooterHOffset| is controlling the horizontal space between the footer and the bottom of the page (or the progressbar).
6491 % |\gothamLeftFooterPadding| and |\gothamLeftFooterPadding| are controlling the space between the left and right side of the footer and the border of the page.
6492 % \end{variable}
6493 % \end{documentation}
6494 %%%%%%
6495 % \begin{implementation}
6496 % \begin{variable}{\gothamLeftFooterPadding, \gothamRightFooterPadding, \gothamFooterHOffset}
6497 % Lengths used in |footer| template for positioning left right and bottom.
6498 % \begin{macrocode}
6499 \newlength{\gothamLeftFooterPadding}
6500 \newlength{\gothamRightFooterPadding}
6501 \newlength{\gothamFooterHOffset}
6502 \setlength{\gothamLeftFooterPadding}{2.0ex}
6503 \setlength{\gothamRightFooterPadding}{3.5ex}
6504 \setlength{\gothamFooterHOffset}{0pt}
6505 % \end{macrocode}
6506 % \end{variable}
6507 % \end{implementation}
6508
6509 % \begin{implementation}
6510 % \begin{macro}{\defbeamertemplate{frame~footer}{none}}
6511 % Footer template used when nothing is put as footer but it will create undesired results.
6512 % \UnitTested
6513 % \TestFiles{gotham-test-048}
6514 % \begin{macrocode}
6515 \defbeamertemplate{frame~footer}{none}{}
6516 % \end{macrocode}
6517 % \end{macro}
6518 % \end{implementation}
6519
6520 % \begin{implementation}
6521 % \begin{macro}{\defbeamertemplate{frame~footer}{empty}}
6522 % Footer template used when |nofooter| option is given and it presevers spacing to have nice results.
6523 % \UnitTested
6524 % \TestFiles{gotham-test-048}
6525 % \begin{macrocode}
6526 \defbeamertemplate{frame~footer}{empty}{
6527 \hspace{\gothamLeftFooterPadding}
6528 \hfill \
6529 \gotham@strut
6530 % decrease space between progress bar and footer
6531 \vspace*{\gothamFooterHOffset}
6532 }
6533 % \end{macrocode}
6534 % \end{macro}
6535 % \end{implementation}
6536
6537 % \begin{documentation}
6538 % \begin{function}{\begin{frame}[nofooter]}
6539 % Add a frame option |nofooter| to do not display nofooter.
6540 % \end{function}
6541 % \end{documentation}
6542 %%%%%%
6543 % \begin{implementation}
6544 % \begin{macro}{\begin{frame}[nofooter]}
6545 % Add a frame option |nofooter| to do not display an empty footer.
6546 % To do it, we must add a global boolean variable, capture the option at the begin of the frame and patch the end of the frame.
6547 % \UnitTested
6548 % \TestFiles{gotham-test-048}
6549 % \begin{macrocode}
6550 % bool to trigger the add of nofooter in frame.
6551 \newenvironment{nofooterenv}{
6552 \setbeamertemplate{frame~footer}[empty]
6553 }{}
6554 \__gotham_add_beamerframe_key:n {nofooter}
6555 % \end{macrocode}
6556 % \end{macro}
6557 % \end{implementation}
6558
6559 % \begin{documentation}
6560 % \begin{variable}{\l_gotham_defaultRotateFooter}
6561 % Boolean to triggering if rotated footer should be displayed by default (without giving the frame option).
6562 % The variable is |false| by default.
6563 % \end{variable}
6564 % \end{documentation}
6565 %%%%%%
6566 % \begin{implementation}
6567 % \begin{macro}{\l_gotham_defaultRotateFooter}
6568 % Boolean variable to display the rotated footer by default (or not).
6569 % \UnitTested
6570 % \TestFiles{gotham-test-048}
6571 % \begin{macrocode}
6572 \bool_new:N \l_gotham_defaultRotateFooter
6573 \bool_set_false:N \l_gotham_defaultRotateFooter
6574 \bool_new:N \l_gotham_RotateFooter
6575 \bool_set_false:N \l_gotham_RotateFooter
6576 % At every new frame, reset the options to default (unless some options/keys are given)
6577 \BeforeBeginEnvironment{frame}{
6578 \bool_if:NTF \l_gotham_defaultRotateFooter {
6579 \bool_set_true:N \l_gotham_RotateFooter
6580 }{% false
6581 \bool_set_false:N \l_gotham_RotateFooter
6582 }
6583 }
6584 % \end{macrocode}
6585 % \end{macro}
6586 % \end{implementation}
6587
6588 % \begin{documentation}
6589 % \begin{function}{\begin{frame}[rotateFooter]}
6590 % Add a frame option |rotateFooter| to display rotated footer.
6591 % \end{function}
6592 % \end{documentation}
6593 %%%%%%
6594 % \begin{implementation}
6595 % \begin{macro}{\begin{frame}[rotateFooter]}
6596 % Add a frame option |rotateFooter| to display a rotated footer.
6597 % To do it, we must add a global boolean variable, capture the option at the begin of the frame and patch the end of the frame.
6598 % \UnitTested
6599 % \TestFiles{gotham-test-048}
6600 % \begin{macrocode}
6601 % bool to trigger
6602 % Capture new options/keys for frames
6603 \define@key{beamerframe}{rotateFooter}[true]{
6604 \bool_set_true:N \l_gotham_RotateFooter
6605 }
6606 % \end{macrocode}
6607 % \end{macro}
6608 % \end{implementation}
6609
6610 % \begin{documentation}
6611 % \begin{function}{\begin{frame}[noRotateFooter]}
6612 % Add a frame option |noRotateFooter| to display a none-RotateFooter.
6613 % \end{function}
6614 % \end{documentation}
6615 %%%%%%
6616 % \begin{implementation}
6617 % \begin{macro}{\begin{frame}[noRotateFooter]}
6618 % Add a frame option |noRotateFooter| to display a none-rotated footer.
6619 % To do it, we must add a global boolean variable, capture the option at the begin of the frame and patch the end of the frame.
6620 % \UnitTested
6621 % \TestFiles{gotham-test-048}
6622 % \begin{macrocode}
6623 % Capture new options/keys for frames
6624 \define@key{beamerframe}{noRotateFooter}[true]{
6625 \bool_set_false:N \l_gotham_RotateFooter
6626 }
6627 % \end{macrocode}
6628 % \end{macro}
6629 % \end{implementation}
6630
6631 % \begin{documentation}
6632 % \begin{function}{\useoutertheme}
6633 % \begin{syntax}
6634 % \cs{useoutertheme}\oarg{option1=value1, ...}\marg{gotham}
6635 % \textrm{where the options are (default marked as} \defopt{default}\textrm{):}
6636 % \meta{rotateFooter default} = \oarg{\defopt{off} \textbar on }
6637 % \end{syntax}
6638 % The option |rotateFooter default=on| can enable the rotation of the footer on every frame; but it can all be turned on for specific frames when using the frame option |\begin{frame}[rotateFooter]|.
6639 % \end{function}
6640 % \end{documentation}
6641 %%%%
6642 % \begin{implementation}
6643 % \begin{macro}{outer key -- interface}
6644 % Controls the outer settings for sidebar canvas right and sidebar canvas left.
6645 % \UnitTested
6646 % \TestFiles{gotham-test-048}
6647 % \begin{macrocode}
6648 \keys_define:nn { gotham / outer }{
6649 % rotateFooter default
6650 rotateFooter~default .choice:,
6651 rotateFooter~default .usage:n = { general },
6652 rotateFooter~default .default:n = { false },
6653
6654 rotateFooter~default / true .code:n = { \bool_set_true:N \l_gotham_defaultRotateFooter },
6655 rotateFooter~default / on .code:n = { \bool_set_true:N \l_gotham_defaultRotateFooter },
6656 rotateFooter~default / enable .code:n = { \bool_set_true:N \l_gotham_defaultRotateFooter },
6657
6658 rotateFooter~default / false .code:n = { \bool_set_false:N \l_gotham_defaultRotateFooter },
6659 rotateFooter~default / off .code:n = { \bool_set_false:N \l_gotham_defaultRotateFooter },
6660 rotateFooter~default / disable .code:n = { \bool_set_false:N \l_gotham_defaultRotateFooter },
6661
6662 rotateFooter~default / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'#1'~is~unknown~for~the~(known)~option~'rotateFooter~default',~so~being~ignored. }{helping~message: rotateFooter~default / unknown} },
6663 }
6664 % \end{macrocode}
6665 % \end{macro}
6666 % \end{implementation}
6667
6668 % \begin{documentation}
6669 % \begin{variable}{\gothamFootlineRuleLeftPadding, \gothamFootlineRuleHeight, \gothamFootlineRuleLength, \gothamHposLeftRotFooter, \gothamHposRightRotFooter, \gothamVposLeftRotFooter, \gothamVposRightRotFooter}
6670 % Lengths controlling the position of |footer|.
6671 % |\gothamFootlineRuleLeftPadding| is controlling the horizontal space between the left border of the page and the left side of the rule.
6672 % |\gothamFootlineRuleHeight| is controlling the height of the rule use to delimit the footer.
6673 % |\gothamFootlineRuleLength| is controlling the length of the rule use to delimit the footer.
6674 % |\gothamHposLeftRotFooter| is controlling the horizontal positioning of the left part of the rotatated footer.
6675 % |\gothamHposRightRotFooter| is controlling the horizontal positioning of the right part of the rotatated footer.
6676 % |\gothamVposLeftRotFooter| is controlling the vertical positioning of the left part of the rotatated footer.
6677 % |\gothamVposRightRotFooter| is controlling the vertical positioning of the right part of the rotatated footer.
6678 %
6679 % \end{variable}
6680 % \end{documentation}
6681 %%%%%%
6682 % \begin{implementation}
6683 % \begin{variable}{\gothamFootlineRuleLeftPadding, \gothamFootlineRuleHeight, \gothamFootlineRuleLength, \gothamHposLeftRotFooter, \gothamHposRightRotFooter, \gothamVposLeftRotFooter, \gothamVposRightRotFooter}
6684 % Lengths used in |footer| template.
6685 % \begin{macrocode}
6686 \newlength{\gothamFootlineRuleLeftPadding}
6687 \newlength{\gothamFootlineRuleHeight}
6688 \newlength{\gothamFootlineRuleLength}
6689
6690 \setlength{\gothamFootlineRuleLeftPadding}{7mm}
6691 \setlength{\gothamFootlineRuleHeight}{0.0pt}
6692 % \setlength{\gothamFootlineRuleHeight}{0.5pt} % This is nice also but have a cleaner default, I turned it to 0.
6693 \setlength{\gothamFootlineRuleLength}{15mm}
6694
6695 % horizontal position (in picture env) for the rotated footer.
6696 \newlength{\gothamHposLeftRotFooter}
6697 \newlength{\gothamHposRightRotFooter}
6698 \newlength{\gothamVposLeftRotFooter}
6699 \newlength{\gothamVposRightRotFooter}
6700
6701 \setlength{\gothamHposLeftRotFooter}{-7pt}
6702 \setlength{\gothamHposRightRotFooter}{2pt}
6703 \setlength{\gothamVposLeftRotFooter}{15pt}
6704 \setlength{\gothamVposRightRotFooter}{15pt}
6705 % \end{macrocode}
6706 % \end{variable}
6707 % \end{implementation}
6708
6709 % \begin{implementation}
6710 % \begin{variable}{\hlenRightRotFooter, \hlenLeftRotFooter}
6711 % Temporary variables for the horizontal length of the rotated footer
6712 % \begin{macrocode}
6713 % Not used yet because I need to have a latex3 settowidth equivalent.
6714 % I will maybe take inspiration from https://tex.stackexchange.com/questions/492367/does-expl3-have-alternative-to-settowidth-and-settoheight
6715 % \dim_new:N \l__gotham_HLen_rightRotFooter_dim
6716 % \dim_new:N \l__gotham_HLen_leftRotFooter_dim
6717 \newlength{\hlenRightRotFooter}
6718 \newlength{\hlenLeftRotFooter}
6719 % \end{macrocode}
6720 % \end{variable}
6721 % \end{implementation}
6722
6723 % \begin{implementation}
6724 % \begin{macro}{\defbeamertemplate{frame~footer}{default/gotham}}
6725 % Template for frame footer used by gotham, allowing a rotated footer.
6726 % \changes{v1.2.0}{2024-11-11}{add hook gothamHookFooter and gothamFootlineHRightOffset}
6727 % \UnitTested
6728 % \TestFiles{gotham-test-048}
6729 % \begin{macrocode}
6730 \providecommand{\gothamHookFooter}{}
6731 \defbeamertemplate{frame~footer}{default/gotham}{
6732 %%% Add a ruler but wihtout affecting the dimensions of the footline
6733 \vbox to 0pt{
6734 % Vertical stretch to ensure proper spacing
6735 \vss
6736 \hbox to 0pt{
6737 \hspace*{\gothamFootlineRuleLeftPadding}
6738 % \usebeamercolor{frametitle}
6739 % \color{frametitle.bg}
6740 \usebeamercolor{footlineRule}
6741 \color{footlineRule.fg}
6742 \rule{\gothamFootlineRuleLength}{\gothamFootlineRuleHeight}
6743 \vspace*{
6744 \dimexpr \gothamFootlineHeight -0.25em\relax
6745 }
6746 % Horizontal stretch to ensure proper spacing
6747 \hss
6748 }
6749 }
6750 %%% Add Hook
6751 \gothamHookFooter{}
6752 %%% Add short date
6753 \hspace{\gothamLeftFooterPadding}
6754 \settowidth{\hlenLeftRotFooter}{\hspace{-\gothamLeftFooterPadding}}
6755 \addtolength{\hlenLeftRotFooter}{\gothamHposLeftRotFooter}
6756 % \ifbool{rotateFooter}{
6757 \bool_if:NTF \l_gotham_RotateFooter {
6758 % rotateFooter true
6759 \begin{picture}(0,0)(0,0)
6760 \put(\hlenLeftRotFooter,\gothamVposLeftRotFooter){\rotatebox{90}{\insertshortdate}}
6761 \end{picture}
6762 }{
6763 % rotateFooter false
6764 \insertshortdate
6765 }
6766 \hfill \
6767 %%% Add short title
6768 \hfill \ \insertshorttitle
6769 % make sure that the vertical space is constant: strut.
6770 \gotham@strut
6771 \hfill \
6772 \hfill \
6773 %%% Add short author
6774 \bool_if:NTF \l_gotham_RotateFooter {
6775 % rotateFooter true
6776 \settowidth{\hlenRightRotFooter}{\hspace{\gothamRightFooterPadding}\usebeamertemplate{page~number~in~head/foot}\hspace*{\gothamFootlineHRightOffset}}
6777 \addtolength{\hlenRightRotFooter}{\gothamHposRightRotFooter}
6778 \begin{picture}(0,0)(0,0)
6779 \put(\hlenRightRotFooter,\gothamVposRightRotFooter){\rotatebox{90}{\insertshortauthor}}
6780 \end{picture}
6781 }{
6782 % rotateFooter false
6783 \insertshortauthor
6784 }
6785 %%% Decrease space between progress bar and footer
6786 \vspace*{\gothamFooterHOffset}
6787 }
6788 \prop_put:Nnn \l__gotham_template_name_prop {frame~footer/default} {gotham}
6789 % \end{macrocode}
6790 % \end{macro}
6791 % \end{implementation}
6792
6793 % \begin{documentation}
6794 % \begin{function}{\useoutertheme}
6795 % \begin{syntax}
6796 % \cs{useoutertheme}\oarg{option1=value1, ...}\marg{gotham}
6797 % \textrm{where the options are (default marked as} \defopt{default}\textrm{):}
6798 % \meta{footer template} = \oarg{\defopt{gotham} \textbar ... }
6799 % \end{syntax}
6800 % The option |footer template| can which template to use as a footer.
6801 % \end{function}
6802 % \end{documentation}
6803 %%%%
6804 % \begin{implementation}
6805 % \begin{macro}{outer key -- interface}
6806 % Controls the outer settings for footer template.
6807 % \UnitTested
6808 % \TestFiles{gotham-test-048}
6809 % \begin{macrocode}
6810 \keys_define:nn { gotham / outer }{
6811 % footer template
6812 footer~template .usage:n = { general },
6813 footer~template .default:n = { gotham },
6814 footer~template .code:n = {
6815 \__gotham_set_prop_template:nn{frame~footer/default}{#1}
6816 \setbeamertemplate{frame~footer}[
6817 default/\prop_item:Nn \l__gotham_template_name_prop {frame~footer/default}
6818 ]
6819 }
6820 }
6821 % \end{macrocode}
6822 % \end{macro}
6823 % \end{implementation}
6824
6825
6826 %%% Numbering %%%
6827 %%%%%%%%%%%%%%%%%
6828
6829 % \begin{implementation}
6830 % \begin{macro}{\inserttotalframenumber}
6831 % We defined the number of total frame, if not defined or equal to 0 because of the first compilation, we set it to avoid arthimetical errors
6832 % \UnitTested
6833 % \TestFiles{gotham-test-046}
6834 % \begin{macrocode}
6835 %
6836 \def\inserttotalframenumber{100}
6837 % \end{macrocode}
6838 % \end{macro}
6839 % \end{implementation}
6840
6841 % \begin{implementation}
6842 % \begin{macro}{\defbeamertemplate{page~number~in~head/foot}{none}}
6843 % Template to do not numbering the current frame.
6844 % \UnitTested
6845 % \TestFiles{gotham-test-048}
6846 % \begin{macrocode}
6847 \defbeamertemplate{page~number~in~head/foot}{none}{ }
6848 % \end{macrocode}
6849 % \end{macro}
6850 % \end{implementation}
6851
6852 % \begin{documentation}
6853 % \begin{variable}{\gothamCircleNumberingVshift, \gothamCircleNumberingHshift}
6854 % Variable lengths controling the vertical and horizontal positioning of the |circle| frame numbering template.
6855 % \end{variable}
6856 % \end{documentation}
6857 %%%%
6858 % \begin{implementation}
6859 % \begin{variable}{\gothamCircleNumberingVshift, \gothamCircleNumberingHshift}
6860 % Length used in |raisebox| and |hspace| in |circle| frame numbering.
6861 % \begin{macrocode}
6862 \newlength{\gothamCircleNumberingVshift}
6863 \newlength{\gothamCircleNumberingHshift}
6864 \setlength{\gothamCircleNumberingVshift}{1.4mm}
6865 \setlength{\gothamCircleNumberingHshift}{2.6mm}
6866 % \end{macrocode}
6867 % \end{variable}
6868 % \end{implementation}
6869
6870 % \begin{implementation}
6871 % \begin{macro}{\defbeamertemplate{page~number~in~head/foot}{circle}}
6872 % Template to add, in a circle, the number of the current frame over (slash) the total number of frames.
6873 % \UnitTested
6874 % \TestFiles{gotham-test-048}
6875 % \begin{macrocode}
6876 \defbeamertemplate{page~number~in~head/foot}{circle}{
6877 % horizontal space between the circle and the right part of the footer (email).
6878 \hspace{+2em}
6879 % \raisebox{lift}[height][depth]{text} => lift here = vertical space between the bottom of the page (or the progress bar) and the center of the circle
6880 \raisebox{\gothamCircleNumberingVshift}[0pt][0pt]{
6881 \begin{tikzpicture}[remember~picture, overlay]
6882 \coordinate (circleCenter);
6883
6884 \usebeamercolor{frametitle}
6885
6886 \draw[fill, color=frametitle.bg] (circleCenter) circle (6mm);
6887 \draw[fill, color=frametitle.fg] (circleCenter) circle (5mm);
6888 \node[color=frametitle.bg] at (circleCenter)
6889 {\small$^{\insertframenumber}\negmedspace/\negthinspace\sb{\inserttotalframenumber}$}
6890 ;
6891 \end{tikzpicture}
6892 % horizontal space between the right border of the page and the center of the circle.
6893 \hspace{\gothamCircleNumberingHshift}
6894 }
6895 }
6896 % \end{macrocode}
6897 % \end{macro}
6898 % \end{implementation}
6899
6900 % \begin{documentation}
6901 % \begin{function}{\useoutertheme}
6902 % \begin{syntax}
6903 % \cs{useoutertheme}\oarg{option1=value1, ...}\marg{gotham}
6904 % \textrm{where the options are (default marked as} \defopt{default}\textrm{):}
6905 % \meta{numbering} = \oarg{\defopt{none} \textbar framenumber \textbar totalframenumber \textbar appendixframenumber \textbar pagenumber \textbar totalpagenumber \textbar circle \textbar ... }
6906 % \meta{framesubtitle template} = \oarg{\defopt{gotham subnewline} \textbar ...}
6907 % \end{syntax}
6908 % The 'package' (useoutertheme) options can control |frame numbering| templates used in |footer| template.
6909 % \end{function}
6910 % \end{documentation}
6911 %%%%
6912 % \begin{implementation}
6913 % \begin{macro}{outer key -- interface}
6914 % Controls the outer settings for frame numbering.
6915 % \UnitTested
6916 % \TestFiles{gotham-test-048}
6917 % \begin{macrocode}
6918 \keys_define:nn { gotham / outer }{
6919 % numbering
6920 numbering .choice:,
6921 numbering .usage:n = { general },
6922 numbering .default:n = { none },
6923
6924 % \__gotham_set_template:nn{title~page}{#1}
6925 numbering / none .code:n = { \setbeamertemplate{page~number~in~head/foot}[none] },
6926 numbering / framenumber .code:n = { \setbeamertemplate{page~number~in~head/foot}[framenumber] },
6927 numbering / totalframenumber .code:n = {\setbeamertemplate{page~number~in~head/foot}[totalframenumber] },
6928 numbering / appendixframenumber .code:n = {\setbeamertemplate{page~number~in~head/foot}[appendixframenumber] },
6929 numbering / pagenumber .code:n = { \setbeamertemplate{page~number~in~head/foot}[pagenumber] },
6930 numbering / totalpagenumber .code:n = {\setbeamertemplate{page~number~in~head/foot}[totalpagenumber] },
6931 numbering / circle .code:n = {\setbeamertemplate{page~number~in~head/foot}[circle] },
6932
6933 numbering / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'#1'~is~unknown~for~the~(known)~option~'numbering',~so~being~ignored. }{helping~message} },
6934 }
6935 % \end{macrocode}
6936 % \end{macro}
6937 % \end{implementation}
6938
6939
6940 %%% MiniFrames \& Progress bar %%%
6941 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6942
6943 %%% MiniFrames %%%
6944
6945 % \begin{implementation}
6946 % \begin{macro}{\defbeamertemplate{section~in~head/foot}{default/beamer}}
6947 % Template control how the section appears by default when sections are add to the headline or footline.
6948 % \UnitTested
6949 % \TestFiles{gotham-test-048}
6950 % \begin{macrocode}
6951 \defbeamertemplate{section~in~head/foot}{default/beamer}{
6952 \insertsectionhead
6953 }
6954 \defbeamertemplate{section~in~head/foot~shaded}{default/beamer}{
6955 \color{fg!50!bg}\usebeamertemplate{section~in~head/foot}
6956 }
6957
6958 % \defbeamertemplate{includeLogo}{default/gotham~square}{
6959 \prop_put:Nnn \l__gotham_template_name_prop {section~in~head/foot~shaded/default} {beamer}
6960 % \defbeamertemplate{includeLogo}{default/gotham~square}{
6961 \prop_put:Nnn \l__gotham_template_name_prop {section~in~head/foot/default} {beamer}
6962 % \end{macrocode}
6963 % \end{macro}
6964 % \end{implementation}
6965
6966 % \begin{implementation}
6967 % \begin{macro}{\defbeamertemplate{section~in~head/foot}{default/gotham~secSubsec}}
6968 % Template for section and subsection in headline.
6969 % \UnitTested
6970 % \TestFiles{gotham-test-048}
6971 % \begin{macrocode}
6972 \defbeamertemplate{section~in~head/foot}{default/gotham~secSubsec}{
6973 \insertsectionhead
6974 \ifx\insertsubsection\empty\else
6975 \ifdefempty{\subsecname}{\relax}{
6976 \ \textbar\ \insertsubsectionhead
6977 }
6978 \fi
6979 }
6980 \defbeamertemplate{section~in~head/foot~shaded}{default/gotham~secSubsec}{
6981 \insertsectionhead
6982 }
6983 % \end{macrocode}
6984 % \end{macro}
6985 % \end{implementation}
6986
6987 % \begin{implementation}
6988 % \begin{macro}{\defbeamertemplate{section~in~head/foot}{default/empty}}
6989 % Empty template for section in headline, compensating the height of a line.
6990 % \UnitTested
6991 % \TestFiles{gotham-test-048}
6992 % \begin{macrocode}
6993 \defbeamertemplate{section~in~head/foot}{default/empty}{
6994 \vspace{3.875ex}
6995 }
6996 \defbeamertemplate{section~in~head/foot~shaded}{default/empty}{
6997 \vspace{3.875ex}
6998 }
6999 % \end{macrocode}
7000 % \end{macro}
7001 % \end{implementation}
7002
7003 % \begin{implementation}
7004 % \begin{variable}{\gotham@temp@heightFrametitle, \gotham@temp@PaperheightFrametitle}
7005 % Temporary length variables to compute the height of the frametitle and the height of the paper minus the frametitle.
7006 % \begin{macrocode}
7007 \newlength{\gotham@temp@heightFrametitle}
7008 \newlength{\gotham@temp@PaperheightFrametitle}
7009 % \end{macrocode}
7010 % \end{variable}
7011 % \end{implementation}
7012
7013 % \begin{implementation}
7014 % \begin{macro}{\defbeamertemplate*{mini~nav~progress~head/foot left right}{gotham~miniframes~theme}}
7015 % Template to insert the navigation bar (using miniframes) that can be added to headline (or footline) left sidebar or righ sidebar.
7016 % \UnitTested
7017 % \TestFiles{gotham-test-048}
7018 % \begin{macrocode}
7019 \defbeamertemplate*{mini~nav~progress~head/foot}{gotham~miniframes~theme}
7020 {
7021 %,ht=1.75ex,dp=2.75ex
7022 \begin{beamercolorbox}[ignorebg]{section~in~head/foot}
7023 \hfuzz=\paperwidth
7024 \insertnavigation{\paperwidth}
7025 % \dohead
7026 \vspace{0.05cm}
7027 \end{beamercolorbox}
7028 }
7029 \defbeamertemplate*{mini~nav~progress~left}{gotham~miniframes~theme}
7030 {
7031 \settoheight{\gotham@temp@heightFrametitle}{\gotham@strut}
7032 \addtolength{\gotham@temp@heightFrametitle}{\gothamFrametitleToppading+\gothamFrametitleBottompading+\gothamProgressHeadFootLineheight}
7033
7034 \setlength{\gotham@temp@PaperheightFrametitle}{\paperheight-\gotham@temp@heightFrametitle-\gothamFootlineHeight-\gothamFootlineDepth-\gothamProgressHeadFootLineheight}
7035
7036 \vspace{-0.6\paperheight}
7037 \rotatebox{90}{
7038 %,ht=1.75ex,dp=2.75ex
7039 \begin{beamercolorbox}[ignorebg]{section~in~head/foot}
7040 \hfuzz=\gotham@temp@PaperheightFrametitle
7041 \insertnavigation{\gotham@temp@PaperheightFrametitle}
7042 % \dohead
7043 % \vspace{0.05cm}
7044 \end{beamercolorbox}
7045 }
7046 }
7047 \defbeamertemplate*{mini~nav~progress~right}{gotham~miniframes~theme}
7048 {
7049 \settoheight{\gotham@temp@heightFrametitle}{\gotham@strut}
7050 \addtolength{\gotham@temp@heightFrametitle}{\gothamFrametitleToppading+\gothamFrametitleBottompading+\gothamProgressHeadFootLineheight}
7051
7052 \setlength{\gotham@temp@PaperheightFrametitle}{\paperheight-\gotham@temp@heightFrametitle-\gothamFootlineHeight-\gothamFootlineDepth-\gothamProgressHeadFootLineheight}
7053
7054 \vspace{\gotham@temp@heightFrametitle}
7055 \hspace{-2.3em}
7056 \rotatebox{-90}{
7057 %,ht=1.75ex,dp=2.75ex
7058 \begin{beamercolorbox}[ignorebg]{section~in~head/foot}
7059 \hfuzz=\gotham@temp@PaperheightFrametitle
7060 \insertnavigation{\gotham@temp@PaperheightFrametitle}
7061 % \dohead
7062 % \vspace{0.05cm}
7063 \end{beamercolorbox}
7064 }
7065 }
7066 % \end{macrocode}
7067 % \end{macro}
7068 % \end{implementation}
7069
7070 %% Select the bullets shape
7071 % \begin{implementation}
7072 % \begin{macro}{\defbeamertemplate{mini~frame}{gotham~box}}
7073 % Template to add a new shape for miniframes |gotham box|.
7074 % \UnitTested
7075 % \TestFiles{gotham-test-048}
7076 % \begin{macrocode}
7077 \defbeamertemplate{mini~frame}{gotham~box}
7078 {
7079 \begin{pgfpicture}{0pt}{0pt}{.1cm}{.1cm}
7080 \pgfpathrectangle{\pgfpointorigin}{\pgfpoint{0.1cm}{0.1cm}}
7081 \pgfusepath{fill,stroke}
7082 \end{pgfpicture}
7083 }[action]{
7084 \setbeamersize{mini~frame~size=.14cm, mini~frame~offset=.05cm}
7085 }
7086 %
7087 \defbeamertemplate{mini~frame~in~current~subsection}{gotham~box}
7088 {
7089 \begin{pgfpicture}{0pt}{0pt}{.1cm}{.1cm}
7090 \pgfpathrectangle{\pgfpointorigin}{\pgfpoint{0.1cm}{0.1cm}}
7091 \pgfusepath{stroke}
7092 \end{pgfpicture}
7093 }
7094 % \end{macrocode}
7095 % \end{macro}
7096 % \end{implementation}
7097
7098 % \begin{implementation}
7099 % \begin{macro}{\defbeamertemplate{mini~frame}{gotham~minibox}}
7100 % Template to add a new shape for miniframes |gotham minibox|.
7101 % \UnitTested
7102 % \TestFiles{gotham-test-048}
7103 % \begin{macrocode}
7104 \defbeamertemplate{mini~frame}{gotham~minibox}
7105 {
7106 \begin{pgfpicture}{0pt}{0pt}{.05cm}{.05cm}
7107 \pgfpathrectangle{\pgfpointorigin}{\pgfpoint{0.05cm}{0.05cm}}
7108 \pgfusepath{fill,stroke}
7109 \end{pgfpicture}
7110 }[action]{
7111 \setbeamersize{mini~frame~size=.08cm, mini~frame~offset=.05cm}
7112 }
7113 %
7114 \defbeamertemplate{mini~frame~in~current~subsection}{gotham~minibox}
7115 {
7116 \begin{pgfpicture}{0pt}{0pt}{.05cm}{.05cm}
7117 \pgfpathrectangle{\pgfpointorigin}{\pgfpoint{0.05cm}{0.05cm}}
7118 \pgfusepath{stroke}
7119 \end{pgfpicture}
7120 }
7121 % \end{macrocode}
7122 % \end{macro}
7123 % \end{implementation}
7124
7125 % \begin{implementation}
7126 % \begin{macro}{\defbeamertemplate{mini~frame}{gotham~minibullet}}
7127 % Template to add a new shape for miniframes |gotham minibullet|.
7128 % \UnitTested
7129 % \TestFiles{gotham-test-048}
7130 % \begin{macrocode}
7131 \defbeamertemplate{mini~frame}{gotham~minibullet}
7132 {
7133 \beamer@xelatex@fixminiframes
7134 \begin{pgfpicture}{0pt}{0pt}{0.05cm}{0.05cm}
7135 \pgfpathcircle{\pgfpoint{0.03cm}{0.03cm}}{0.03cm}
7136 \pgfusepath{fill,stroke}
7137 \end{pgfpicture}
7138 }[action]{
7139 \setbeamersize{mini~frame~size=.09cm, mini~frame~offset=.05cm}
7140 }
7141 %
7142 \defbeamertemplate{mini~frame~in~current~subsection}{gotham~minibullet}
7143 {
7144 \beamer@xelatex@fixminiframes
7145 \begin{pgfpicture}{0pt}{0pt}{0.05cm}{0.05cm}
7146 \pgfpathcircle{\pgfpoint{0.03cm}{0.03cm}}{0.03cm}
7147 \pgfusepath{stroke}
7148 \end{pgfpicture}
7149 }
7150 % \end{macrocode}
7151 % \end{macro}
7152 % \end{implementation}
7153
7154 % \begin{documentation}
7155 % \begin{function}{\useoutertheme}
7156 % \begin{syntax}
7157 % \cs{useoutertheme}\oarg{option1=value1, ...}\marg{gotham}
7158 % \textrm{where the options are (default marked as} \defopt{default}\textrm{):}
7159 % \meta{mini frames shape} = \oarg{\defopt{gotham minibullet} \textbar default (bullet from beamer) \textbar tick \textbar box \textbar gotham box \textbar gotham minibox \textbar ... }
7160 % \meta{framesubtitle template} = \oarg{\defopt{gotham subnewline} \textbar ...}
7161 % \end{syntax}
7162 % The 'package' (useoutertheme) options can control |frame numbering| templates used in |footer| template.
7163 % \end{function}
7164 % \end{documentation}
7165 %%%%
7166 % \begin{implementation}
7167 % \begin{macro}{outer key -- interface}
7168 % Controls the outer settings for mini frames shape template.
7169 % \UnitTested
7170 % \TestFiles{gotham-test-048}
7171 % \begin{macrocode}
7172 \keys_define:nn { gotham / outer }{
7173 %% mini~frames~shape
7174 % mini~frames~shape .choice:,
7175 mini~frames~shape .usage:n = { general },
7176 mini~frames~shape .default:n = { gotham~minibullet },
7177 % \__gotham_set_template:nn{title~page}{#1}
7178 mini~frames~shape .code:n = {
7179 % \__gotham_set_template:nn{mini~frames}{#1}% This can not work since this is an alias, so go back to normal
7180 \setbeamertemplate{mini~frames}[#1]
7181 },
7182 % mini~frames~shape / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'#1'~is~unknown~for~the~(known)~option~'numbering',~so~being~ignored. }{helping~message} },
7183 }
7184 % \end{macrocode}
7185 % \end{macro}
7186 % \end{implementation}
7187
7188 % \begin{implementation}
7189 % \begin{macro}{\defbeamertemplate*{miniframe~home}}
7190 % Template to adapt Beamer to the internal modification brought by Gotham: differientiation between slide to come and those done, idem for section, subsection...
7191 % \UnitTested
7192 % \TestFiles{gotham-test-048}
7193 % \begin{macrocode}
7194 \defbeamertemplate*{miniframe~home}{beamer}{
7195 % $\equiv$
7196 }
7197 \defbeamertemplate*{miniframe~current~slide}{beamer}{
7198 \usebeamertemplate{mini~frame}
7199 }
7200 \defbeamertemplate*{miniframe~done~current~section}{beamer}{
7201 \usebeamertemplate{mini~frame~in~current~subsection}
7202 }
7203 \defbeamertemplate*{miniframe~todo~current~section}{beamer}{
7204 \usebeamertemplate{mini~frame~in~current~subsection}
7205 }
7206 \defbeamertemplate*{miniframe~done~other~section}{beamer}{
7207 \usebeamertemplate{mini~frame~in~other~subsection}
7208 }
7209 \defbeamertemplate*{miniframe~todo~other~section}{beamer}{
7210 \usebeamertemplate{mini~frame~in~other~subsection}
7211 }
7212 % Templates about should appear sectioning in mini frame.
7213 % \defbeamertemplate*{miniframe~part}{beamer}{}
7214 \defbeamertemplate*{miniframe~section~current}{beamer}{}
7215 \defbeamertemplate*{miniframe~section~done}{beamer}{}
7216 \defbeamertemplate*{miniframe~section~todo}{beamer}{}
7217 \defbeamertemplate*{miniframe~subsection~current}{beamer}{}
7218 \defbeamertemplate*{miniframe~subsection~todo}{beamer}{}
7219 \defbeamertemplate*{miniframe~subsection~done}{beamer}{}
7220 % \defbeamertemplate*{miniframe~subsubsection}{beamer}{}
7221 \defbeamertemplate*{miniframe~section~done~in~other~section}{default}[1][50]
7222 {
7223 \color{fg!#1!bg}\usebeamertemplate{miniframe~section~done}
7224 }
7225 \defbeamertemplate*{miniframe~section~todo~in~other~section}{default}[1][50]
7226 {
7227 \color{fg!#1!bg}\usebeamertemplate{miniframe~section~todo}
7228 }
7229 \defbeamertemplate*{miniframe~subsection~done~in~other~section}{default}[1][50]
7230 {
7231 \color{fg!#1!bg}\usebeamertemplate{miniframe~subsection~done}
7232 }
7233 \defbeamertemplate*{miniframe~subsection~todo~in~other~section}{default}[1][50]
7234 {
7235 \color{fg!#1!bg}\usebeamertemplate{miniframe~subsection~todo}
7236 }
7237 % \end{macrocode}
7238 % \end{macro}
7239 % \end{implementation}
7240
7241 % \begin{implementation}
7242 % \begin{macro}{\defbeamertemplate{miniframe~home}{gotham~mini}}
7243 % Templates for miniframes using a Gotham style inspired by a miniaturization than the one from Beamer.
7244 % \UnitTested
7245 % \TestFiles{gotham-test-048}
7246 % \begin{macrocode}
7247 \defbeamertemplate{miniframe~home}{gotham~mini}{
7248 \resizebox{0.85\beamer@boxsize}{\beamer@boxsize}{$\equiv$}
7249 % \scalebox{0.5}[0.95]{$\equiv$}
7250 }
7251 \defbeamertemplate{miniframe~current~slide}{gotham~mini}{
7252 \usebeamercolor[fg]{alerted~text}
7253 \usebeamertemplate{mini~frame}
7254 }
7255 \defbeamertemplate{miniframe~done~current~section}{gotham~mini}{
7256 \usebeamertemplate{mini~frame}
7257 }
7258 \defbeamertemplate{miniframe~todo~current~section}{gotham~mini}{
7259 \usebeamertemplate{mini~frame~in~current~subsection}
7260 }
7261 \defbeamertemplate{miniframe~done~other~section}{gotham~mini}[1][50]{
7262 \color{fg!#1!bg}\usebeamertemplate{mini~frame}
7263 }
7264 \defbeamertemplate{miniframe~todo~other~section}{gotham~mini}[1][50]{
7265 \color{fg!#1!bg}\usebeamertemplate{mini~frame~in~other~subsection}
7266 }
7267 % Templates about should appear sectioning in mini frame.
7268 % \defbeamertemplate{miniframe~part}{gotham~mini}[1][]{
7269 % p
7270 % }
7271 \defbeamertemplate{miniframe~section~current}{gotham~mini}{
7272 \fontsize{3pt}{0pt}\selectfont
7273 % \color{blue}
7274 \tl_use:N \l__gotham_minif_tmpa_tl
7275 \hspace{1.pt}
7276 }
7277 \defbeamertemplate{miniframe~section~done}{gotham~mini}{
7278 \fontsize{3pt}{0pt}\selectfont
7279 % \color{green}
7280 \tl_use:N \l__gotham_minif_tmpa_tl
7281 \hspace{1.pt}
7282 }
7283 \defbeamertemplate{miniframe~section~todo}{gotham~mini}{
7284 \fontsize{3pt}{0pt}\selectfont
7285 % \color{red}
7286 \tl_use:N \l__gotham_minif_tmpa_tl
7287 \hspace{1.pt}
7288 }
7289 \defbeamertemplate{miniframe~subsection~current}{gotham~mini}{
7290 \usebeamercolor[fg]{alerted~text}
7291 \hspace{-0.15pt}
7292 \resizebox{\beamer@boxsize}{!}{\hspace{-0.75pt}$\blacklozenge$}
7293 }
7294 \defbeamertemplate{miniframe~subsection~todo}{gotham~mini}{
7295 \hspace{-0.15pt}
7296 \resizebox{\beamer@boxsize}{!}{\hspace{-0.75pt}$\lozenge$}
7297 }
7298 \defbeamertemplate{miniframe~subsection~done}{gotham~mini}{
7299 \hspace{-0.15pt}
7300 \resizebox{\beamer@boxsize}{!}{\hspace{-0.75pt}$\blacklozenge$}
7301 }
7302 % \defbeamertemplate{miniframe~subsubsection}{gotham~mini}{
7303 % d
7304 % }
7305 % \end{macrocode}
7306 % \end{macro}
7307 % \end{implementation}
7308
7309 % \begin{implementation}
7310 % \begin{macro}{\defbeamertemplate{miniframe~home}{gotham~nano}}
7311 % Template for Gotham mini frame style using even less space.
7312 % \UnitTested
7313 % \TestFiles{gotham-test-048}
7314 % \begin{macrocode}
7315 \defbeamertemplate{miniframe~home}{gotham~nano}{
7316 % \resizebox{\beamer@boxsize}{!}{$\equiv$}
7317 \scalebox{0.5}[0.95]{$\equiv$}
7318 }
7319 \defbeamertemplate{miniframe~current~slide}{gotham~nano}{
7320 o
7321 }
7322 \defbeamertemplate{miniframe~done~current~section}{gotham~nano}{
7323 x
7324 }
7325 \defbeamertemplate{miniframe~todo~current~section}{gotham~nano}{
7326 $\cdot$
7327 }
7328 \defbeamertemplate{miniframe~done~other~section}{gotham~nano}{
7329 x
7330 }
7331 \defbeamertemplate{miniframe~todo~other~section}{gotham~nano}{
7332 $\cdot$
7333 }
7334 % Templates about should appear sectioning in mini frame.
7335 % \defbeamertemplate{miniframe~part}{gotham~nano}[1][]{
7336 % p
7337 % }
7338 \defbeamertemplate{miniframe~section~current}{gotham~nano}{
7339 \tl_use:N \l__gotham_minif_tmpa_tl
7340 }
7341 \defbeamertemplate{miniframe~section~done}{gotham~nano}{
7342 \tl_use:N \l__gotham_minif_tmpa_tl
7343 }
7344 \defbeamertemplate{miniframe~section~todo}{gotham~nano}{
7345 \tl_use:N \l__gotham_minif_tmpa_tl
7346 }
7347 \defbeamertemplate{miniframe~subsection~current}{gotham~nano}{
7348 \usebeamercolor[fg]{alerted~text}$\diamond$
7349 }
7350 \defbeamertemplate{miniframe~subsection~todo}{gotham~nano}{
7351 $\diamond$
7352 }
7353 \defbeamertemplate{miniframe~subsection~done}{gotham~nano}{
7354 $\diamond$
7355 }
7356 % \end{macrocode}
7357 % \end{macro}
7358 % \end{implementation}
7359
7360 % \begin{implementation}
7361 % \begin{macro}{\defbeamertemplateparent{mini~frames~bundle}}
7362 % Define a parent template to set the 6 templates at once.
7363 % \UnitTested
7364 % \TestFiles{gotham-test-048}
7365 % \begin{macrocode}
7366 \defbeamertemplateparent{mini~frames~bundle}
7367 { miniframe~home, miniframe~current~slide,
7368 miniframe~done~current~section, miniframe~todo~current~section, miniframe~done~other~section, miniframe~todo~other~section,
7369 miniframe~section~current, miniframe~section~done, miniframe~section~todo,
7370 miniframe~subsection~current, miniframe~subsection~done, miniframe~subsection~todo,
7371 }{}
7372 %\setbeamertemplate{mini~frames~bundle}[gotham~mini]%[beamer]%[gotham~nano]%
7373 % \end{macrocode}
7374 % \end{macro}
7375 % \end{implementation}
7376
7377 % \begin{documentation}
7378 % \begin{function}{\useoutertheme}
7379 % \begin{syntax}
7380 % \cs{useoutertheme}\oarg{option1=value1, ...}\marg{gotham}
7381 % \textrm{where the options are (default marked as} \defopt{default}\textrm{):}
7382 % \meta{mini frames bundle} = \oarg{\defopt{gotham minibullet} \textbar default (bullet from beamer) \textbar tick \textbar box \textbar gotham box \textbar gotham minibox \textbar ... }
7383 % \meta{framesubtitle template} = \oarg{\defopt{gotham subnewline} \textbar ...}
7384 % \end{syntax}
7385 % The 'package' (useoutertheme) options can control |mini frame| templates.
7386 % \end{function}
7387 % \end{documentation}
7388 %%%%
7389 % \begin{implementation}
7390 % \begin{macro}{outer key -- interface}
7391 % Controls the outer settings for mini frames bundle template.
7392 % \UnitTested
7393 % \TestFiles{gotham-test-050}
7394 % \begin{macrocode}
7395 \keys_define:nn { gotham / outer }{
7396 %% mini~frames~bundle
7397 % mini~frames~bundle .choice:,
7398 mini~frames~bundle .usage:n = { general },
7399 mini~frames~bundle .default:n = { gotham~mini },
7400 % \__gotham_set_template:nn{title~page}{#1}
7401 mini~frames~bundle .code:n = {
7402 % \__gotham_set_template:nn{mini~frames}{#1}% This can not work since this is an alias, so go back to normal
7403 \setbeamertemplate{mini~frames~bundle}[#1]
7404 },
7405 % mini~frames~bundle / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'#1'~is~unknown~for~the~(known)~option~'numbering',~so~being~ignored. }{helping~message} },
7406 }
7407 % \end{macrocode}
7408 % \end{macro}
7409 % \end{implementation}
7410
7411
7412 %%% MiniFrames Navigation %%%
7413
7414 % \begin{documentation}
7415 % \begin{function}{\useoutertheme}
7416 % \begin{syntax}
7417 % \cs{useoutertheme}\oarg{option1=value1, ...}\marg{gotham}
7418 % \textrm{where the options are (default marked as} \defopt{default}\textrm{):}
7419 % \meta{mini frames compress} = \oarg{\defopt{on} \textbar off }
7420 % \end{syntax}
7421 % The 'package' (useoutertheme) options can control |compress| option in mini frames.
7422 % \end{function}
7423 % \end{documentation}
7424 %%%%
7425 % \begin{implementation}
7426 % \begin{macro}{outer key -- interface}
7427 % Controls the outer settings for mini frames compress template.
7428 % \UnitTested
7429 % \TestFiles{gotham-test-050}
7430 % \begin{macrocode}
7431 \keys_define:nn { gotham / outer }{
7432 % mini~frames~compress default
7433 mini~frames~compress .choice:,
7434 mini~frames~compress .usage:n = { general },
7435 mini~frames~compress .default:n = { true },
7436
7437 mini~frames~compress / true .code:n = { \beamer@compresstrue },
7438 mini~frames~compress / on .code:n = { \beamer@compresstrue },
7439 mini~frames~compress / enable .code:n = { \beamer@compresstrue },
7440
7441 mini~frames~compress / false .code:n = { \beamer@compressfalse },
7442 mini~frames~compress / off .code:n = { \beamer@compressfalse },
7443 mini~frames~compress / disable .code:n = { \beamer@compressfalse },
7444
7445 mini~frames~compress / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'#1'~is~unknown~for~the~(known)~option~'mini~frames~compress',~so~being~ignored. }{helping~message: mini~frames~compress / unknown} },
7446 }
7447 % \end{macrocode}
7448 % \end{macro}
7449 % \end{implementation}
7450
7451 % \begin{implementation}
7452 % \begin{variable}{\l__gotham_minif_tmpa_tl, \gotham@temp@MiniframeSubsecDim, \gotham@temp@lastSec}
7453 % Temporary variables used for the store dimension of the miniframe subsection, check if the last section treated and the pass the value of the section to the section template.
7454 % \begin{macrocode}
7455 \newlength{\gotham@temp@MiniframeSubsecDim}
7456 \newlength{\gotham@temp@MiniframeSecDim}
7457 \def\gotham@temp@lastSec{-1}
7458 \tl_new:N \l__gotham_minif_tmpa_tl
7459 \tl_new:N \l__gotham_minif_tmpb_tl
7460 % \end{macrocode}
7461 % \end{variable}
7462 % \end{implementation}
7463
7464 % \begin{implementation}
7465 % \begin{function}{\renewcommand{\slideentry}}
7466 % Redefinition of the slideentry command from Beamer in order to add home page symbol, section symbol, subsection symbol to come and done.
7467 % \TestFiles{gotham-test-048}
7468 % \begin{macrocode}
7469 % definition from Beamerbasenavigation.sty
7470 % \def\slideentry#1#2#3#4#5#6{%
7471 \renewcommand{\slideentry}[6]{%
7472 %section number, subsection number, slide number, first/last frame, page number, part number
7473 \ifnum#6=\c@part\ifnum#3>0%\ifnum#6=\c@part\ifnum#1>0\ifnum#3>0 MODIF
7474 \ifbeamer@compress%
7475 \advance\beamer@xpos by1\relax%
7476 \else%
7477 \ifnum#2=0%
7478 \beamer@ypos@offset=1\relax%
7479 \fi%
7480 \beamer@xpos=#3\relax%
7481 \beamer@ypos=#2\relax%
7482 \advance\beamer@ypos by \beamer@ypos@offset\relax%
7483 \fi%
7484 %% Add section number and subsection symbol to miniframes.
7485 %% MODIF below, inspired from https://tex.stackexchange.com/questions/722523
7486 \ifnum#3=1%\c@subsectionslide=#3 % if =1, so it has been reset => new section or subsection
7487 \ifnum#1>0\ifnum#2<2% => there no subsection in this section.
7488 \ifnum\gotham@temp@lastSec=#1%
7489 % this means, that we already went through: there no subsec, then the first subsec has been defined.
7490 \else%
7491 \tl_set:Nn \l__gotham_minif_tmpa_tl {#1}
7492 \settowidth{\gotham@temp@MiniframeSecDim}{\usebeamertemplate{miniframe~section~current}}%
7493 % \addtolength{\gotham@temp@MiniframeSecDim}{1.5pt}
7494 \hbox to 0pt{%
7495 \beamer@tempdim=-\beamer@vboxoffset%
7496 \advance\beamer@tempdim by-\beamer@boxsize%
7497 \multiply\beamer@tempdim by\beamer@ypos%
7498 \advance\beamer@tempdim by -.05cm%
7499 \raise\beamer@tempdim\hbox{%
7500 \beamer@tempdim=\beamer@boxsize%
7501 \multiply\beamer@tempdim by\beamer@xpos%
7502 \advance\beamer@tempdim by -\beamer@boxsize%
7503 \advance\beamer@tempdim by -\gotham@temp@MiniframeSecDim% NEW
7504 \advance\beamer@tempdim by 1pt%
7505 \kern\beamer@tempdim%
7506 \global\beamer@section@min@dim\beamer@tempdim%
7507 \hbox{\beamer@link(#4){%
7508 % \usebeamertemplate{miniframe~section}%
7509 % if not first page then check if it is the current section.
7510 \ifnum\c@section=#1%
7511 % check if it is the current slide
7512 \ifnum\c@subsectionslide=#3%
7513 \usebeamertemplate{miniframe~section~current}
7514 \else%
7515 \ifnum\c@subsectionslide<#3
7516 \usebeamertemplate{miniframe~section~todo}
7517 \else%
7518 \usebeamertemplate{miniframe~section~done}
7519 \fi%
7520 \fi%
7521 \else% \ifnum\c@section=#1%
7522 \ifnum\c@section<#1
7523 \usebeamertemplate{miniframe~section~todo~in~other~section}
7524 \else%
7525 \usebeamertemplate{miniframe~section~done~in~other~section}
7526 \fi%
7527 \fi% \ifnum\c@section=#1
7528 }}%
7529 }%
7530 }%
7531 \def\gotham@temp@lastSec{#1}%
7532 \fi%
7533 \fi\fi%
7534 \ifnum#2>0%
7535 % Check if the miniframe subsection template is empty
7536 \ifbeamertemplateempty{miniframe~subsection~current}{
7537 % do nothing
7538 }{
7539 \tl_set:Nn \l__gotham_minif_tmpb_tl {#2}
7540 \settowidth{\gotham@temp@MiniframeSubsecDim}{}%\usebeamertemplate{miniframe~subsection~current}}%
7541 \addtolength{\gotham@temp@MiniframeSubsecDim}{+1.\beamer@boxsize}%
7542 \advance\beamer@xpos by1\relax%
7543 \hbox to 0pt{%
7544 \beamer@tempdim=-\beamer@vboxoffset%
7545 \advance\beamer@tempdim by-\beamer@boxsize%
7546 \multiply\beamer@tempdim by\beamer@ypos%
7547 \advance\beamer@tempdim by -.05cm%
7548 \raise\beamer@tempdim\hbox{%
7549 \beamer@tempdim=\beamer@boxsize%
7550 \multiply\beamer@tempdim by\beamer@xpos%
7551 \advance\beamer@tempdim by -\beamer@boxsize%
7552 \advance\beamer@tempdim by -\gotham@temp@MiniframeSubsecDim% NEW
7553 \advance\beamer@tempdim by 1pt%
7554 \kern\beamer@tempdim%
7555 \global\beamer@section@min@dim\beamer@tempdim%
7556 \hbox{\beamer@link(#4){%
7557 % \usebeamertemplate{miniframe~subsection~current}%
7558 % if not first page then check if it is the current section.
7559 \ifnum\c@section=#1%
7560 % check if it is the current subsection
7561 \ifnum\c@subsection=#2%
7562 % check if it is the current slide
7563 \ifnum\c@subsectionslide=#3%
7564 \usebeamertemplate{miniframe~subsection~current}
7565 \else%
7566 \ifnum\c@subsectionslide<#3
7567 \usebeamertemplate{miniframe~subsection~todo}
7568 \else%
7569 \usebeamertemplate{miniframe~subsection~done}
7570 \fi%
7571 \fi%
7572 \else% \ifnum\c@subsection=#2%
7573 \ifnum\c@subsection<#2
7574 \usebeamertemplate{miniframe~subsection~todo}
7575 \else%
7576 \usebeamertemplate{miniframe~subsection~done}
7577 \fi%
7578 \fi% \ifnum\c@subsection=#2%
7579 \else% \ifnum\c@section=#1%
7580 \ifnum\c@section<#1
7581 \usebeamertemplate{miniframe~subsection~todo~in~other~section}
7582 \else%
7583 \usebeamertemplate{miniframe~subsection~done~in~other~section}
7584 \fi%
7585 \fi% \ifnum\c@section=#1
7586 }}% \hbox{\beamer@link
7587 }% raisebox
7588 }% hbox
7589 }% end if template empty
7590 \fi% \ifnum#2>0
7591 \else
7592 \ifbeamer@compress%
7593 % \advance\beamer@xpos by1\relax%
7594 \else%
7595 \ifbeamertemplateempty{miniframe~subsection~current}{
7596 % NEW
7597 % do nothing
7598 }{
7599 \advance\beamer@xpos by 1\relax%
7600 }
7601 \fi%
7602 \fi% \ifnum#3=1
7603
7604 %% end of modif to add section number and subsection symbol.
7605 \hbox to 0pt{%
7606 \beamer@tempdim=-\beamer@vboxoffset%
7607 \advance\beamer@tempdim by-\beamer@boxsize%
7608 \multiply\beamer@tempdim by\beamer@ypos%
7609 \advance\beamer@tempdim by -.05cm%
7610 \raise\beamer@tempdim\hbox{%
7611 \beamer@tempdim=\beamer@boxsize%
7612 \multiply\beamer@tempdim by\beamer@xpos%
7613 \advance\beamer@tempdim by -\beamer@boxsize%
7614 \advance\beamer@tempdim by 1pt%
7615 \kern\beamer@tempdim
7616 \global\beamer@section@min@dim\beamer@tempdim
7617 \hbox{\beamer@link(#4){%
7618 \usebeamerfont{mini~frame}%
7619 % \ifnum\c@section=#1%
7620 % \ifnum\c@subsection=#2%
7621 % \usebeamercolor[fg]{mini~frame}%
7622 % \ifnum\c@subsectionslide=#3%
7623 % \usebeamertemplate{mini~frame}%\beamer@minislidehilight%
7624 % \else%
7625 % \usebeamertemplate{mini~frame~in~current~subsection}%\beamer@minisliderowhilight%
7626 % \fi%
7627 % \else%
7628 % \usebeamercolor{mini~frame}%
7629 % %\color{fg!50!bg}%
7630 % \usebeamertemplate{mini~frame~in~other~subsection}%\beamer@minislide%
7631 % \fi%
7632 % \else%
7633 % \usebeamercolor{mini~frame}%
7634 % %\color{fg!50!bg}%
7635 % \usebeamertemplate{mini~frame~in~other~subsection}%\beamer@minislide%
7636 % \fi%
7637 %%
7638 %% CHANGE FROM HERE: I rewrote this part.
7639 % If first page (ie. 1/1)
7640 \def\gotham@temp@i{1/1}
7641 \def\gotham@temp@ii{#4}
7642 \ifx\gotham@temp@i\gotham@temp@ii
7643 % If first page (ie. title page) then apply a special mini frame
7644 \usebeamertemplate{miniframe~home}
7645 \else
7646 % if not first page then check if it is the current section.
7647 \ifnum\c@section=#1%
7648 % check if it is the current subsection
7649 \ifnum\c@subsection=#2%
7650 \usebeamercolor[fg]{mini~frame}%
7651 % check if it is the current slide
7652 \ifnum\c@subsectionslide=#3%
7653 \usebeamertemplate{miniframe~current~slide}
7654 % \usebeamertemplate{mini~frame}% \beamer@minislidehilight%
7655 \else%
7656 % \usebeamertemplate{mini~frame~in~current~subsection}% \beamer@minisliderowhilight%
7657 \ifnum\c@subsectionslide<#3
7658 \usebeamertemplate{miniframe~todo~current~section}
7659 \else%
7660 \usebeamertemplate{miniframe~done~current~section}
7661 \fi%
7662 \fi%
7663 \else% \ifnum\c@subsection=#2%
7664 \usebeamercolor{mini~frame}%
7665 % \usebeamertemplate{mini~frame~in~other~subsection}% \beamer@minislide%
7666 \ifnum\c@subsection<#2
7667 \usebeamertemplate{miniframe~todo~other~section}
7668 \else%
7669 \usebeamertemplate{miniframe~done~other~section}
7670 \fi%
7671 \fi% \ifnum\c@subsection=#2%
7672 \else% \ifnum\c@section=#1%
7673 \usebeamercolor{mini~frame}%
7674 % \usebeamertemplate{mini~frame~in~other~subsection}% \beamer@minislide%
7675 \ifnum\c@section<#1
7676 \usebeamertemplate{miniframe~todo~other~section}
7677 \else%
7678 \usebeamertemplate{miniframe~done~other~section}
7679 \fi%
7680 \fi% \ifnum\c@section=#1
7681 \fi% \ifx\gotham@temp@i\gotham@temp@ii
7682 }}}\hskip-10cm plus 1fil%
7683 }\fi% \ifnum#1>0\ifnum#3>0%
7684 \else% \ifnum#6=\c@part
7685 \fakeslideentry{#1}{#2}{#3}{#4}{#5}{#6}%
7686 \fi\ignorespaces%
7687 % \def\gotham@temp@lastSec{-1}%
7688 }%
7689 % \end{macrocode}
7690 % \end{function}
7691 % \end{implementation}
7692
7693 % \begin{documentation}
7694 % \begin{variable}{gothamZerosectionframes}
7695 % Boolean variable to flag if they are frame in a zeroth section.
7696 % This variable helps to adapt the spreading of |mini frames nav| bar.
7697 % This variable is automatically set if the spread is set correctly at the beginning of the presention.
7698 % If the spreading or the mini frame nav is disable at the zeroth section then reactivated latter, it might create unwanted spreading.
7699 % In such situation the variable has to be set manually to correct the spreading.
7700 % \end{variable}
7701 % \end{documentation}
7702 %%%%
7703 % \begin{implementation}
7704 % \begin{variable}{gothamZerosectionframes}
7705 % Boolean variable to flag if they are frame in a zeroth section.
7706 % \begin{macrocode}
7707 \providebool{gothamZerosectionframes}
7708 \boolfalse{gothamZerosectionframes}
7709 % \end{macrocode}
7710 % \end{variable}
7711 % \end{implementation}
7712
7713 % \begin{implementation}
7714 % \begin{macro}{\insertnavigation,\sectionentry}
7715 % Patches for |\insertnavigation| and |\sectionentry| to be able to adapt with spreading values.
7716 % \UnitTested
7717 % \TestFiles{gotham-test-048}
7718 % \begin{macrocode}
7719 \providecommand{\gothamInsertNavlength}{
7720 % spreading by default
7721 \ifbool{gothamZerosectionframes}{
7722 %true
7723 % spreading
7724 \hskip-0.5ex~plus~1fill
7725 }{
7726 %false
7727 \hskip-1.875ex~plus-1fill
7728 }%
7729 }
7730 \providecommand{\gothamPatchInsertNav}{
7731 % Don't patch for now
7732 \box\beamer@sectionbox\hfil\hskip.3cm
7733 }
7734 \providecommand{\gothamPatchSectionentry}{
7735 % Don't patch for now
7736 \hskip1.875ex~plus~1fill
7737 }
7738 \providecommand{\gothamPatchSectionbox}{
7739 % Don't patch for now
7740 \ht\beamer@sectionbox=1.875ex
7741 \dp\beamer@sectionbox=0.75ex
7742 }
7743 \ExplSyntaxOff
7744 % To let the 0-th section appear.
7745 \patchcmd{\insertnavigation}{\hskip-1.875ex plus-1fill}{%
7746 \ifnum\value{section}=0%
7747 \ifnum\value{framenumber}>0%
7748 \hskip-0ex%
7749 \global\booltrue{gothamZerosectionframes}%
7750 \fi\fi%
7751 \gothamInsertNavlength%
7752 }{}{}
7753 %% Remove hfill between sections => flush right bullet bar, if not corrected.
7754 \patchcmd{\sectionentry}{\hskip1.875ex plus 1fill}{\gothamPatchSectionentry}{}{}
7755 %% Centering the bullet bar
7756 \patchcmd{\insertnavigation}{\box\beamer@sectionbox\hfil\hskip.3cm}{\gothamPatchInsertNav}{}{}
7757 % Patch size of sectionbox
7758 \patchcmd{\insertnavigation}{\ht\beamer@sectionbox=1.875ex%
7759 \dp\beamer@sectionbox=0.75ex%
7760 }{
7761 \gothamPatchSectionbox
7762 }{}{}
7763 \patchcmd{\sectionentry}{\ht\beamer@sectionbox=1.875ex%
7764 \dp\beamer@sectionbox=0.75ex%
7765 }{
7766 \gothamPatchSectionbox
7767 }{}{}
7768 \ExplSyntaxOn
7769 % \end{macrocode}
7770 % \end{macro}
7771 % \end{implementation}
7772
7773 % \begin{documentation}
7774 % \begin{function}{\useoutertheme}
7775 % \begin{syntax}
7776 % \cs{useoutertheme}\oarg{option1=value1, ...}\marg{gotham}
7777 % \textrm{where the options are (default marked as} \defopt{default}\textrm{):}
7778 % \meta{mini frames nav spreading} = \oarg{\defopt{centering} \textbar spreading \textbar left \textbar right }
7779 % \end{syntax}
7780 % The 'package' (useoutertheme) options can control spreading of the mini frames navigation.
7781 % \end{function}
7782 % \end{documentation}
7783 %%%%
7784 % \begin{implementation}
7785 % \begin{macro}{outer key -- interface}
7786 % Controls the outer settings for mini frames navigation spreading.
7787 % \UnitTested
7788 % \TestFiles{gotham-test-051}
7789 % \begin{macrocode}
7790 \keys_define:nn { gotham / outer }{
7791 % mini~frames~nav~spreading default
7792 mini~frames~nav~spreading .choice:,
7793 mini~frames~nav~spreading .usage:n = { general },
7794 mini~frames~nav~spreading .default:n = { spreading },
7795
7796 mini~frames~nav~spreading / spreading .code:n = {
7797 %
7798 \renewcommand{\gothamInsertNavlength}{
7799 \ifbool{gothamZerosectionframes}{
7800 %true
7801 % spreading
7802 \hskip-0.5ex
7803 }{
7804 %false
7805 \hskip-1.875ex~plus-1fill
7806 }%
7807 }
7808 % No other patch needed, but renewcommand if it has been modified previously.
7809 \renewcommand{\gothamPatchInsertNav}{
7810 % Don't patch for now
7811 \box\beamer@sectionbox\hfil\hskip.3cm
7812 }
7813 \renewcommand{\gothamPatchSectionentry}{
7814 % Don't patch for now
7815 \hskip1.875ex~plus~1fill
7816 }
7817 },
7818 mini~frames~nav~spreading / centering .code:n = {
7819 %
7820 \renewcommand{\gothamInsertNavlength}{
7821 \ifbool{gothamZerosectionframes}{
7822 %true
7823 % centering +patch sectionenty +patch insertnav @sectionbox
7824 \hskip-0.5ex~plus~1fill
7825 }{
7826 %false
7827 % \patchcmd{\insertnavigation}{\hskip-1.875ex plus-1fill}{\hfill}{}{}
7828 \hfill
7829 }%
7830 }
7831 % Centering the bullet bar
7832 % \patchcmd{\insertnavigation}{\box\beamer@sectionbox\hfil\hskip.3cm}{ \box\beamer@sectionbox\hfill\hskip.3cm}{}{}
7833 \renewcommand{\gothamPatchInsertNav}{
7834 \box\beamer@sectionbox\hfill\hskip.3cm
7835 }
7836 %% Remove hfill between sections => flush right bullet bar, if not corrected.
7837 % \patchcmd{\sectionentry}{\hskip1.875ex plus 1fill}{\hskip 3.5ex}{}{}
7838 \renewcommand{\gothamPatchSectionentry}{
7839 \hskip~3.5ex
7840 }
7841 },
7842 mini~frames~nav~spreading / left .code:n = {
7843 %
7844 \renewcommand{\gothamInsertNavlength}{
7845 \ifbool{gothamZerosectionframes}{
7846 %true
7847 % flush left +patch sectionenty
7848 \hskip-0.5ex
7849 }{
7850 %false
7851 % no patch
7852 \hskip-1.875ex plus-1fill
7853 }%
7854 }
7855 % Centering the bullet bar : NO
7856 % no patch
7857 \renewcommand{\gothamPatchInsertNav}{
7858 \box\beamer@sectionbox\hfil\hskip.3cm
7859 }
7860 %% Remove hfill between sections => flush right bullet bar, if not corrected.
7861 % \patchcmd{\sectionentry}{\hskip1.875ex plus 1fill}{\hskip 3.5ex}{}{}
7862 \renewcommand{\gothamPatchSectionentry}{
7863 \hskip~3.5ex
7864 }
7865 },
7866 mini~frames~nav~spreading / right .code:n = {
7867 %
7868 \renewcommand{\gothamInsertNavlength}{
7869 \ifbool{gothamZerosectionframes}{
7870 %true
7871 % flush right +patch sectionenty
7872 \hskip-0.5ex~plus~1fill
7873 }{
7874 %false
7875 % no patch
7876 \hskip-1.875ex plus-1fill
7877 }%
7878 }
7879 % Centering the bullet bar : NO
7880 % no patch
7881 \renewcommand{\gothamPatchInsertNav}{
7882 \box\beamer@sectionbox\hfil\hskip.3cm
7883 }
7884 %% Remove hfill between sections => flush right bullet bar, if not corrected.
7885 % \patchcmd{\sectionentry}{\hskip1.875ex plus 1fill}{\hskip 3.5ex}{}{}
7886 \renewcommand{\gothamPatchSectionentry}{
7887 \hskip~3.5ex
7888 }
7889 },
7890 mini~frames~nav~spreading / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'#1'~is~unknown~for~the~(known)~option~'mini~frames~nav~spreading',~so~being~ignored. }{helping~message: mini~frames~nav~spreading / unknown} },
7891 }
7892 % \end{macrocode}
7893 % \end{macro}
7894 % \end{implementation}
7895
7896 % \begin{documentation}
7897 % \begin{function}{\useoutertheme}
7898 % \begin{syntax}
7899 % \cs{useoutertheme}\oarg{option1=value1, ...}\marg{gotham}
7900 % \textrm{where the options are (default marked as} \defopt{default}\textrm{):}
7901 % \meta{mini frames nav sectioning} = \oarg{\defopt{on} \textbar off }
7902 % \end{syntax}
7903 % The 'package' (useoutertheme) options can control navigation sectioning option in mini frames.
7904 % \end{function}
7905 % \end{documentation}
7906 %%%%
7907 % \begin{implementation}
7908 % \begin{macro}{outer key -- interface}
7909 % Controls the outer settings for mini frames navigation sectioning template.
7910 % \UnitTested
7911 % \TestFiles{gotham-test-051}
7912 % \begin{macrocode}
7913 \keys_define:nn { gotham / outer }{
7914 % mini~frames~nav~sectioning default
7915 mini~frames~nav~sectioning .choice:,
7916 mini~frames~nav~sectioning .usage:n = { general },
7917 mini~frames~nav~sectioning .default:n = { secsubsection },
7918
7919 mini~frames~nav~sectioning / none .code:n = {
7920 %
7921 \__gotham_set_template:nn{section~in~head/foot~shaded}{default/empty}
7922 \__gotham_set_template:nn{section~in~head/foot}{default/empty}
7923 \renewcommand{\gothamPatchSectionbox}{
7924 % patch to set section box height to 0.
7925 \ht\beamer@sectionbox=0pt
7926 \dp\beamer@sectionbox=0pt
7927 }
7928 },
7929 mini~frames~nav~sectioning / section .code:n = {
7930 %
7931 \__gotham_set_template:nn{section~in~head/foot~shaded}{default} %from Beamer
7932 \__gotham_set_template:nn{section~in~head/foot}{default} %from Beamer
7933 },
7934 mini~frames~nav~sectioning / secsubsection .code:n = {
7935 %
7936 \__gotham_set_template:nn{section~in~head/foot~shaded}{default/gotham~secSubsec}
7937 \__gotham_set_template:nn{section~in~head/foot}{default/gotham~secSubsec}
7938 },
7939
7940 mini~frames~nav~sectioning / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'#1'~is~unknown~for~the~(known)~option~'mini~frames~nav~sectioning',~so~being~ignored. }{helping~message: mini~frames~nav~sectioning / unknown} },
7941 }
7942 % \end{macrocode}
7943 % \end{macro}
7944 % \end{implementation}
7945
7946 % \begin{documentation}
7947 % \begin{function}{\useoutertheme}
7948 % \begin{syntax}
7949 % \cs{useoutertheme}\oarg{option1=value1, ...}\marg{gotham}
7950 % \textrm{where the options are (default marked as} \defopt{default}\textrm{):}
7951 % \meta{mini frames nav position} = \oarg{\defopt{none} \textbar head \textbar foot \textbar left \textbar right}
7952 % \end{syntax}
7953 % The 'package' (useoutertheme) options can control navigation position option in mini frames.
7954 % \end{function}
7955 % \end{documentation}
7956 %%%%
7957 % \begin{implementation}
7958 % \begin{macro}{outer key -- interface}
7959 % Controls the outer settings for mini frames navigation position template.
7960 % \UnitTested
7961 % \TestFiles{gotham-test-051}
7962 % \begin{macrocode}
7963 \tl_new:N \l__gotham_out_tmp_mfnposi_tl
7964 \tl_new:N \l__gotham_out_tmp_pbar_tl
7965 \keys_define:nn { gotham / outer }{
7966 % mini~frames~nav~position default
7967 mini~frames~nav~position .choice:,
7968 mini~frames~nav~position .usage:n = { general },
7969 mini~frames~nav~position .default:n = { none },
7970
7971 mini~frames~nav~position / none .code:n = {
7972 %
7973 % reset if it has modified by another progressbar strategy
7974 % \__gotham_set_prop_template:nn{sidebar~canvas~right/default}{#1}
7975 \tl_set:Nn \l__gotham_out_tmp_mfnposi_tl {none}
7976
7977 % head
7978 \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {head} {
7979 % True: nothing to do it is already occupied.
7980 }{
7981 \setbeamertemplate{headline}[default/\prop_item:Nn \l__gotham_template_name_prop {headline/default}]
7982 }
7983 % frametitle
7984 % \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {frametitle} {
7985 % % True: nothing to do it is already occupied.
7986 % }{
7987 % \setbeamertemplate{frametitle}[default/\prop_item:Nn \l__gotham_template_name_prop {frametitle/default}]
7988 % }
7989 % foot
7990 \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {footline} {
7991 % True: nothing to do it is already occupied.
7992 }{
7993 \setbeamertemplate{footline}[default/\prop_item:Nn \l__gotham_template_name_prop {footline/default}]
7994 }
7995 % left
7996 \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {left} {
7997 % True: nothing to do it is already occupied.
7998 }{
7999 \setbeamertemplate{sidebar~left}[default/\prop_item:Nn \l__gotham_template_name_prop {sidebar~left/default}]
8000 }
8001 % right
8002 \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {right} {
8003 % True: nothing to do it is already occupied.
8004 }{
8005 \setbeamertemplate{sidebar~right}[default/\prop_item:Nn \l__gotham_template_name_prop {sidebar~right/default}]
8006 }
8007 },
8008 mini~frames~nav~position / head .code:n = {
8009 %
8010 \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {head} {
8011 % True: nothing to do it is already done.
8012 }{
8013 % False : remember that choice in order to do not apply it several time and add to beamer template.
8014 \tl_set:Nn \l__gotham_out_tmp_mfnposi_tl {head}
8015
8016 \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {head} {
8017 % True: nothing to do it is already occupied.
8018 }{
8019 \setbeamertemplate{headline}[default/\prop_item:Nn \l__gotham_template_name_prop {headline/default}]
8020 }
8021 % \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {frametitle} {
8022 % % True: nothing to do it is already occupied.
8023 % }{
8024 % \setbeamertemplate{frametitle}[default/\prop_item:Nn \l__gotham_template_name_prop {frametitle/default}]
8025 % }
8026 \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {footline} {
8027 % True: nothing to do it is already occupied.
8028 }{
8029 \setbeamertemplate{footline}[default/\prop_item:Nn \l__gotham_template_name_prop {footline/default}]
8030 }
8031 \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {left} {
8032 % True: nothing to do it is already occupied.
8033 }{
8034 \setbeamertemplate{sidebar~left}[default/\prop_item:Nn \l__gotham_template_name_prop {sidebar~left/default}]
8035 }
8036 \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {right} {
8037 % True: nothing to do it is already occupied.
8038 }{
8039 \setbeamertemplate{sidebar~right}[default/\prop_item:Nn \l__gotham_template_name_prop {sidebar~right/default}]
8040 }
8041
8042 %
8043 \addtobeamertemplate{headline}{}{
8044 \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {head} {
8045 \usebeamertemplate*{mini~nav~progress~head/foot}
8046 }{}
8047 }
8048 }
8049 },
8050 mini~frames~nav~position / foot .code:n = {
8051 %
8052 \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {foot} {
8053 % True: nothing to do it is already done.
8054 }{
8055 % False : remember that choice in order to do not apply it several time and add to beamer template.
8056 \tl_set:Nn \l__gotham_out_tmp_mfnposi_tl {foot}
8057
8058 \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {head} {
8059 % True: nothing to do it is already occupied.
8060 }{
8061 \setbeamertemplate{headline}[default/\prop_item:Nn \l__gotham_template_name_prop {headline/default}]
8062 }
8063 % \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {frametitle} {
8064 % % True: nothing to do it is already occupied.
8065 % }{
8066 % \setbeamertemplate{frametitle}[default/\prop_item:Nn \l__gotham_template_name_prop {frametitle/default}]
8067 % }
8068 \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {footline} {
8069 % True: nothing to do it is already occupied.
8070 }{
8071 \setbeamertemplate{footline}[default/\prop_item:Nn \l__gotham_template_name_prop {footline/default}]
8072 }
8073 \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {left} {
8074 % True: nothing to do it is already occupied.
8075 }{
8076 \setbeamertemplate{sidebar~left}[default/\prop_item:Nn \l__gotham_template_name_prop {sidebar~left/default}]
8077 }
8078 \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {right} {
8079 % True: nothing to do it is already occupied.
8080 }{
8081 \setbeamertemplate{sidebar~right}[default/\prop_item:Nn \l__gotham_template_name_prop {sidebar~right/default}]
8082 }
8083
8084 \addtobeamertemplate{footline}{}{
8085 \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {foot} {
8086 \usebeamertemplate*{mini~nav~progress~head/foot}
8087 }{}
8088 }
8089 }
8090 },
8091 mini~frames~nav~position / left .code:n = {
8092 %
8093 \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {left} {
8094 % True: nothing to do it is already done.
8095 }{
8096 % False : remember that choice in order to do not apply it several time and add to beamer template.
8097 \tl_set:Nn \l__gotham_out_tmp_mfnposi_tl {left}
8098
8099 \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {head} {
8100 % True: nothing to do it is already occupied.
8101 }{
8102 \setbeamertemplate{headline}[default/\prop_item:Nn \l__gotham_template_name_prop {headline/default}]
8103 }
8104 % \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {frametitle} {
8105 % % True: nothing to do it is already occupied.
8106 % }{
8107 % \setbeamertemplate{frametitle}[default/\prop_item:Nn \l__gotham_template_name_prop {frametitle/default}]
8108 % }
8109 \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {footline} {
8110 % True: nothing to do it is already occupied.
8111 }{
8112 \setbeamertemplate{footline}[default/\prop_item:Nn \l__gotham_template_name_prop {footline/default}]
8113 }
8114 \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {left} {
8115 % True: nothing to do it is already occupied.
8116 }{
8117 \setbeamertemplate{sidebar~left}[default/\prop_item:Nn \l__gotham_template_name_prop {sidebar~left/default}]
8118 }
8119 \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {right} {
8120 % True: nothing to do it is already occupied.
8121 }{
8122 \setbeamertemplate{sidebar~right}[default/\prop_item:Nn \l__gotham_template_name_prop {sidebar~right/default}]
8123 }
8124
8125 %
8126 \addtobeamertemplate{sidebar~left}{}{
8127 \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {left} {
8128 \usebeamertemplate*{mini~nav~progress~left}
8129 }{}
8130 }
8131 }
8132 },
8133 mini~frames~nav~position / right .code:n = {
8134 %
8135 \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {right} {
8136 % True: nothing to do it is already done.
8137 }{
8138 % False : remember that choice in order to do not apply it several time and add to beamer template.
8139 \tl_set:Nn \l__gotham_out_tmp_mfnposi_tl {right}
8140
8141 \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {head} {
8142 % True: nothing to do it is already occupied.
8143 }{
8144 \setbeamertemplate{headline}[default/\prop_item:Nn \l__gotham_template_name_prop {headline/default}]
8145 }
8146 % \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {frametitle} {
8147 % % True: nothing to do it is already occupied.
8148 % }{
8149 % \setbeamertemplate{frametitle}[default/\prop_item:Nn \l__gotham_template_name_prop {frametitle/default}]
8150 % }
8151 \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {footline} {
8152 % True: nothing to do it is already occupied.
8153 }{
8154 \setbeamertemplate{footline}[default/\prop_item:Nn \l__gotham_template_name_prop {footline/default}]
8155 }
8156 \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {left} {
8157 % True: nothing to do it is already occupied.
8158 }{
8159 \setbeamertemplate{sidebar~left}[default/\prop_item:Nn \l__gotham_template_name_prop {sidebar~left/default}]
8160 }
8161 \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {right} {
8162 % True: nothing to do it is already occupied.
8163 }{
8164 \setbeamertemplate{sidebar~right}[default/\prop_item:Nn \l__gotham_template_name_prop {sidebar~right/default}]
8165 }
8166
8167 %
8168 \addtobeamertemplate{sidebar~right}{}{
8169 \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {right} {
8170 \usebeamertemplate*{mini~nav~progress~right}
8171 }{}
8172 }
8173 }
8174 },
8175
8176 mini~frames~nav~position / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'#1'~is~unknown~for~the~(known)~option~'mini~frames~nav~position',~so~being~ignored. }{helping~message: mini~frames~nav~position / unknown} },
8177 }
8178 % \end{macrocode}
8179 % \end{macro}
8180 % \end{implementation}
8181
8182
8183 %%% Progress bar %%%
8184
8185 % \begin{documentation}
8186 % \begin{variable}{\gothamProgressHeadFootLineheight}
8187 % Variable vertical length defining the height of the progressbar.
8188 % \end{variable}
8189 % \end{documentation}
8190 %%%%%%
8191 % \begin{implementation}
8192 % \begin{variable}{\gothamProgressHeadFootLineheight}
8193 % Lengths used in tikz rectangle.
8194 % \begin{macrocode}
8195 \newlength{\gotham@progressinheadfoot}
8196 \newlength{\gothamProgressHeadFootLineheight}
8197 \setlength{\gothamProgressHeadFootLineheight}{1.2ex}
8198 % \end{macrocode}
8199 % \end{variable}
8200 % \end{implementation}
8201
8202 % \begin{documentation}
8203 % \begin{variable}{\l_gotham_ProgCircleMoving_bool, \l_gotham_progbar_advancement_tlbr_bool, \l_gotham_pmfn_bool}
8204 % Boolean variables controlling the direction of progression and if the current frame number is moving with the progression.
8205 % \end{variable}
8206 % \end{documentation}
8207 %%%%%%
8208 % \begin{implementation}
8209 % \begin{variable}{\l_gotham_ProgCircleMoving_bool, \l_gotham_progbar_advancement_tlbr_bool, \l_gotham_pmfn_bool}
8210 % Boolean variables controlling the direction of progression and if the current frame number is moving with the progression and if the miniframes navigation should be printed inside the progress bar.
8211 % \begin{macrocode}
8212 \bool_new:N \l_gotham_ProgCircleMoving_bool
8213 \bool_set_true:N \l_gotham_ProgCircleMoving_bool
8214
8215 \bool_new:N \l_gotham_progbar_advancement_tlbr_bool
8216 \bool_set_true:N \l_gotham_progbar_advancement_tlbr_bool
8217
8218 \bool_new:N \l_gotham_pmfn_bool
8219 \bool_set_false:N \l_gotham_pmfn_bool
8220 % \end{macrocode}
8221 % \end{variable}
8222 % \end{implementation}
8223
8224 % \begin{implementation}
8225 % \begin{function}{\__gotham_rectangle_box_progressbar:n}
8226 % \begin{arguments}
8227 % \item |width| of the progress bar.
8228 % \end{arguments}
8229 % Command to draw a rectangular progress bar that can go from left to right or the opposite and that can include a navigation miniframes bar.
8230 % \TestFiles{gotham-test-048}
8231 % \begin{macrocode}
8232 % #1: 'linewidth'
8233 \cs_new_protected:Npn \__gotham_rectangle_box_progressbar:n #1
8234 {
8235 %
8236 \setlength{\gotham@progressinheadfoot}{
8237 #1 * \ratio{\insertframenumber pt}{\inserttotalframenumber pt}
8238 }
8239
8240 %
8241 \begin{beamercolorbox}[wd=#1]{progress~bar~in~head/foot}
8242 \begin{tikzpicture}
8243 \usebeamercolor{progress~bar~in~head/foot}
8244
8245 % gray rectangle in the background.
8246 \fill[color=progress~bar~in~head/foot.bg]
8247 (0pt, 0pt) rectangle ++ (#1, \gothamProgressHeadFootLineheight)
8248 ;
8249
8250 \bool_if:NTF \l_gotham_progbar_advancement_tlbr_bool {
8251 % from left to right
8252 % orange rectangle progressing
8253 \fill[color=progress~bar~in~head/foot.fg]
8254 (0pt, 0pt) rectangle ++ (\gotham@progressinheadfoot, \gothamProgressHeadFootLineheight)
8255 ;
8256 }{
8257 % from right to left
8258 % orange rectangle progressing
8259 \fill[color=progress~bar~in~head/foot.fg]
8260 (#1, \gothamProgressHeadFootLineheight) rectangle ++ (-\gotham@progressinheadfoot, -\gothamProgressHeadFootLineheight)
8261 ;
8262 }
8263
8264 \bool_if:NTF \l_gotham_pmfn_bool {
8265 % progress miniframes navigation is on.
8266 \node at (#1/2, \gothamProgressHeadFootLineheight/2)
8267 [text~height=0.1pt, text~depth=0.05pt, inner~sep=0pt] %draw=red,
8268 {
8269 \usebeamercolor[fg]{normal~text}
8270 % \fontsize{3.5pt}{0pt}\selectfont
8271 \raisebox{0.5\gothamProgressHeadFootLineheight+1.4pt}[0pt][0pt]{
8272 %\dohead
8273 \hfuzz=#1
8274 \insertnavigation{#1}
8275 }
8276 }
8277 ;
8278 }{
8279 % false
8280 % nothing to do since progress miniframes navigation is off.
8281 }
8282 \end{tikzpicture}
8283 \end{beamercolorbox}
8284 }
8285 % \end{macrocode}
8286 % \end{function}
8287 % \end{implementation}
8288
8289 % \begin{implementation}
8290 % \begin{macro}{\defbeamertemplate{progress~bar~in~head/foot}{gotham~rectangle}}
8291 % template displaying the progress bar in head, frametitle or footline.
8292 % \UnitTested
8293 % \TestFiles{gotham-test-046, gotham-test-046b, gotham-test-047, gotham-test-048}
8294 % \begin{macrocode}
8295 \defbeamertemplate{progress~bar~in~head/foot}{gotham~rectangle}{
8296 \nointerlineskip
8297 \__gotham_rectangle_box_progressbar:n {\paperwidth}
8298 }
8299 % \end{macrocode}
8300 % \end{macro}
8301 % \end{implementation}
8302
8303 % \begin{implementation}
8304 % \begin{macro}{\defbeamertemplate{progress~bar~in~left/right}{gotham~rectangle}}
8305 % template displaying the progress bar in left or right.
8306 % \UnitTested
8307 % \TestFiles{gotham-test-046, gotham-test-046b, gotham-test-047,gotham-test-048}
8308 % \begin{macrocode}
8309 \defbeamertemplate{progress~bar~in~left}{gotham~rectangle}{
8310 \nointerlineskip
8311
8312 \settoheight{\gotham@temp@heightFrametitle}{\gotham@strut}
8313 \addtolength{\gotham@temp@heightFrametitle}{\gothamFrametitleToppading+\gothamFrametitleBottompading+\gothamProgressHeadFootLineheight}
8314
8315 \setlength{\gotham@temp@PaperheightFrametitle}{\paperheight-\gotham@temp@heightFrametitle-\gothamFootlineHeight-\gothamFootlineDepth-0.25\baselineskip}
8316
8317 \vspace{0.12275\paperheight}
8318 \rotatebox{90}{
8319 \__gotham_rectangle_box_progressbar:n {\gotham@temp@PaperheightFrametitle}
8320 }
8321 }
8322 \defbeamertemplate{progress~bar~in~right}{gotham~rectangle}{
8323 \nointerlineskip
8324
8325 \settoheight{\gotham@temp@heightFrametitle}{\gotham@strut}
8326 \addtolength{\gotham@temp@heightFrametitle}{\gothamFrametitleToppading+\gothamFrametitleBottompading+\gothamProgressHeadFootLineheight}
8327
8328 \setlength{\gotham@temp@PaperheightFrametitle}{\paperheight-\gotham@temp@heightFrametitle-\gothamFootlineHeight-\gothamFootlineDepth-0.25\baselineskip}
8329
8330 \hspace{-\gothamProgressHeadFootLineheight}
8331 \vspace{\gotham@[email protected]}
8332 \rotatebox{-90}{
8333 \__gotham_rectangle_box_progressbar:n {\gotham@temp@PaperheightFrametitle}
8334 }
8335 }
8336 % \end{macrocode}
8337 % \end{macro}
8338 % \end{implementation}
8339
8340 % \begin{implementation}
8341 % \begin{function}{\__gotham_rounded_box_progressbar:nnnn}
8342 % \begin{arguments}
8343 % \item |width| Name of the option to add, this name should also correspond to the name of the environment followed by the suffix 'env'.
8344 % \item |ratio progressbar/extra command|
8345 % \item |colorbox name|
8346 % \item |extra command|
8347 % \end{arguments}
8348 % Command to draw a rounded box progress bar that can go from left to right or the opposite and that can include a navigation miniframes bar.
8349 % The fourth argument is a command to control what to display at the right side of the rounded box.
8350 % \TestFiles{gotham-test-048}
8351 % \begin{macrocode}
8352 % #1: 'linewidth'
8353 % #2: ratio of the progress bar
8354 % #3: colorbox name
8355 % #4: command for percent of progress
8356 \cs_new_protected:Npn \__gotham_rounded_box_progressbar:nnnn #1#2#3#4
8357 {
8358 \setlength{\gotham@progressinheadfoot}{
8359 #2#1 * \ratio{\insertframenumber pt}{\inserttotalframenumber pt}
8360 }
8361
8362 % 1.035\gothamProgressHeadFootLineheight is to include the border inside the box.
8363 \begin{beamercolorbox}[wd=#1, ht=1.035\gothamProgressHeadFootLineheight]{#3}
8364 \;\hfill
8365 %\tikzexternaldisable%
8366 \begin{tikzpicture}[rounded~corners=0.5\gothamProgressHeadFootLineheight, very~thin]
8367 \usebeamercolor{progress~bar~in~head/foot}
8368
8369 % gray rectangle in the background.
8370 \shade[top~color=progress~bar~in~head/foot.bg!65, bottom~color=progress~bar~in~head/foot.bg!65, middle~color=progress~bar~in~head/foot.bg]
8371 (0pt, 0pt) rectangle ++ (#2#1, \gothamProgressHeadFootLineheight)
8372 ;
8373
8374 \bool_if:NTF \l_gotham_progbar_advancement_tlbr_bool {
8375 % from left to right
8376 % orange rectangle progressing
8377 \shade[draw=progress~bar~in~head/foot.fg, top~color=progress~bar~in~head/foot.fg!70, bottom~color=progress~bar~in~head/foot.fg!70, middle~color=progress~bar~in~head/foot.fg]
8378 (0pt, 0pt) rectangle ++ (\gotham@progressinheadfoot, \gothamProgressHeadFootLineheight)
8379 ;
8380 }{
8381 % from right to left
8382 % orange rectangle progressing
8383 \shade[draw=progress~bar~in~head/foot.fg, top~color=progress~bar~in~head/foot.fg!70, bottom~color=progress~bar~in~head/foot.fg!70, middle~color=progress~bar~in~head/foot.fg]
8384 (#2#1, \gothamProgressHeadFootLineheight) rectangle ++ (-\gotham@progressinheadfoot, -\gothamProgressHeadFootLineheight)
8385 ;
8386 }
8387
8388 \bool_if:NTF \l_gotham_pmfn_bool {
8389 % progress miniframes navigation is on.
8390 \node at (#2#1/2, \gothamProgressHeadFootLineheight/2)
8391 [text~height=0.1pt, text~depth=0.05pt, inner~sep=0pt] %draw=red,
8392 {
8393 \usebeamercolor[fg]{normal~text}
8394 % \fontsize{3.5pt}{0pt}\selectfont
8395 \raisebox{0.5\gothamProgressHeadFootLineheight+1.4pt}[0pt][0pt]{
8396 \hfuzz=#2#1
8397 %\dohead
8398 \insertnavigation{#2#1}
8399 }
8400 }
8401 ;
8402 }{
8403 % false
8404 % nothing to do since progress miniframes navigation is off.
8405 }
8406 \end{tikzpicture}
8407 #4
8408 \hfill \;
8409 \end{beamercolorbox}
8410 }
8411 % \cs_generate_variant:Nn \__gotham_rounded_box_progressbar:nnnn { Nnnn }
8412 % \end{macrocode}
8413 % \end{function}
8414 % \end{implementation}
8415
8416 % \begin{implementation}
8417 % \begin{macro}{\defbeamertemplate{progress~bar~in~head/foot}{gotham~rounded~box}}
8418 % template displaying the progress bar in head, frametitle or footline.
8419 % \UnitTested
8420 % \TestFiles{gotham-test-046, gotham-test-046b, gotham-test-047,gotham-test-048}
8421 % \begin{macrocode}
8422 \defbeamertemplate{progress~bar~in~head/foot}{gotham~rounded~box}{
8423 \nointerlineskip
8424 \__gotham_rounded_box_progressbar:nnnn {\paperwidth}{0.93}{footline}{
8425 \hfill
8426 \raisebox{0.5\gothamProgressHeadFootLineheight-1.75pt}[0pt][0pt]{
8427 \fontsize{5pt}{0pt}\selectfont
8428 \usebeamercolor[fg]{normal~text}
8429 \fp_eval:n {round(\insertframenumber*100/\inserttotalframenumber,0)}\,\%
8430 }
8431 }
8432 % \__gotham_rounded_box_progressbar:nnnn {\paperwidth}{0.53}{progress~bar~in~head/foot}{}
8433 }
8434 % \end{macrocode}
8435 % \end{macro}
8436 % \end{implementation}
8437
8438 % \begin{implementation}
8439 % \begin{macro}{\defbeamertemplate{progress~bar~in~left/right}{gotham~rounded~box}}
8440 % template displaying the progress bar in left or right sidebar.
8441 % \UnitTested
8442 % \TestFiles{gotham-test-046, gotham-test-046b, gotham-test-047,gotham-test-048}
8443 % \begin{macrocode}
8444 \defbeamertemplate{progress~bar~in~left}{gotham~rounded~box}{
8445 \nointerlineskip
8446
8447 \settoheight{\gotham@temp@heightFrametitle}{\gotham@strut}
8448 \addtolength{\gotham@temp@heightFrametitle}{\gothamFrametitleToppading+\gothamFrametitleBottompading+\gothamProgressHeadFootLineheight}
8449
8450 \setlength{\gotham@temp@PaperheightFrametitle}{\paperheight-\gotham@temp@heightFrametitle-\gothamFootlineHeight-\gothamFootlineDepth-0.25\baselineskip}
8451
8452 \vspace{0.12275\paperheight}
8453 % \hspace{\gothamProgressHeadFootLineheight}
8454 \rotatebox{90}{
8455 \__gotham_rounded_box_progressbar:nnnn {\gotham@temp@PaperheightFrametitle}{0.89}{footline}{
8456 \hfill
8457 \raisebox{0.5\gothamProgressHeadFootLineheight-1.75pt}[0pt][0pt]{
8458 \fontsize{5pt}{0pt}\selectfont
8459 \fp_eval:n {round(\insertframenumber*100/\inserttotalframenumber,0)}\,\%
8460 }
8461 }
8462 }
8463 }
8464 \defbeamertemplate{progress~bar~in~right}{gotham~rounded~box}{
8465 \nointerlineskip
8466
8467 \settoheight{\gotham@temp@heightFrametitle}{\gotham@strut}
8468 \addtolength{\gotham@temp@heightFrametitle}{\gothamFrametitleToppading+\gothamFrametitleBottompading+\gothamProgressHeadFootLineheight}
8469
8470 \setlength{\gotham@temp@PaperheightFrametitle}{\paperheight-\gotham@temp@heightFrametitle-\gothamFootlineHeight-\gothamFootlineDepth-0.25\baselineskip}
8471
8472 \hspace{-\gothamProgressHeadFootLineheight-0.2pt}
8473 \vspace{\gotham@[email protected]}
8474 \rotatebox{-90}{
8475 \__gotham_rounded_box_progressbar:nnnn {\gotham@temp@PaperheightFrametitle}{0.89}{footline}{
8476 \hfill
8477 \raisebox{0.5\gothamProgressHeadFootLineheight-1.75pt}[0pt][0pt]{
8478 \fontsize{5pt}{0pt}\selectfont
8479 \fp_eval:n {round(\insertframenumber*100/\inserttotalframenumber,0)}\,\%
8480 }
8481 }
8482 }
8483 }
8484 % \end{macrocode}
8485 % \end{macro}
8486 % \end{implementation}
8487
8488 % \begin{documentation}
8489 % \begin{variable}{\gothamProgressCircHeight, \gothamCounterCircleRadius, \gothamProgressCircBorderWidth}
8490 % Lengths controlling the aspect of |progress circle|.
8491 % |\gothamProgressCircHeight| is controlling the inner height of the circle (related to its diameter).
8492 % |\gothamCounterCircleRadius| is controlling the size of the counter circle containing the frame number.
8493 % |\gothamProgressCircBorderWidth| is controlling width of the progress circle.
8494 % \end{variable}
8495 % \end{documentation}
8496 %%%%%%
8497 % \begin{implementation}
8498 % \begin{variable}{\gothamProgressCircHeight, \gothamCounterCircleRadius, \gothamProgressCircBorderWidth}
8499 % Lengths used in tikz rectangle.
8500 % \begin{macrocode}
8501 %the height of the header is 1.8 times the lineheight of the frame title
8502 \newlength{\gothamProgressCircHeight}
8503 \setlength{\gothamProgressCircHeight}{1.8\baselineskip}
8504 %\setlength{\gothamProgressCircHeight}{2\baselineskip}
8505 \newlength{\gothamCounterCircleRadius}
8506 \setlength{\gothamCounterCircleRadius}{1.12ex}
8507 % width of the border
8508 \newlength{\gothamProgressCircBorderWidth}
8509 \setlength{\gothamProgressCircBorderWidth}{1.65mm}
8510
8511 %% Induced length used internally, but can still be tuned manually by inspired people.
8512 % radius of the logo
8513 \newlength{\gothamProgressCircLogoRadius}
8514 \setlength{\gothamProgressCircLogoRadius}{1.2\gothamProgressCircHeight/2}
8515 % inner radius of border of the logo frame
8516 \newlength{\gothamProgressCircLogoInnerRadius}
8517 \setlength{\gothamProgressCircLogoInnerRadius}{1.1\gothamProgressCircLogoRadius}
8518 % radius of the outer border of the logo frame
8519 \newlength{\gothamProgressCircLogoOuterRadius}
8520 \setlength{\gothamProgressCircLogoOuterRadius}{\gothamProgressCircLogoInnerRadius+\gothamProgressCircBorderWidth}
8521 % radius of the counters
8522 \newlength{\gothamCounterRadius}
8523 \setlength{\gothamCounterRadius}{\gothamProgressCircLogoInnerRadius/2+\gothamProgressCircLogoOuterRadius/2}
8524 % \end{macrocode}
8525 % \end{variable}
8526 % \end{implementation}
8527
8528 % \begin{implementation}
8529 % \begin{variable}{\l_gotham_ratio_progresscircle_fp, \l_gotham_angle_counterradius_fp}
8530 % angle ratio of the progress in degree and angle of the counter circle intercepted by the half of the border.
8531 % \begin{macrocode}
8532 % \fp_new:N \l_gotham_ratio_progress_fp
8533 \fp_new:N \l_gotham_ratio_progresscircle_fp
8534 % the angle token by the counter radius
8535 \fp_new:N \l_gotham_angle_counterradius_fp
8536 % requires xfp for asind
8537 \fp_set:Nn \l_gotham_angle_counterradius_fp {
8538 \fpeval{ 2* asind (\gothamCounterCircleRadius / (2*\gothamCounterRadius)) }
8539 }
8540 % \end{macrocode}
8541 % \end{variable}
8542 % \end{implementation}
8543
8544 % \begin{documentation}
8545 % \begin{function}{\gothamInstituteLogoCircle[#1]}
8546 % \begin{syntax}
8547 % \cs{gothamInstituteLogoCircle} \oarg{height (4ex)}
8548 % \end{syntax}
8549 % Command that have to be redefined in order to include your circular logo.
8550 % For example your can do |\renewcommand{\gothamInstituteLogoCircle}[1][4ex]{\includegraphics[height=#1]{gotham-logo.pdf}}|.
8551 % \end{function}
8552 % \end{documentation}
8553 %%%%%%
8554 % \begin{implementation}
8555 % \begin{function}{\gothamInstituteLogoCircle[#1]}
8556 % \begin{arguments}
8557 % \item |height| of the picture
8558 % \end{arguments}
8559 % Command to be redefined by users.
8560 % \TestFiles{ gotham-test-046b}
8561 % \begin{macrocode}
8562 \providecommand{\gothamInstituteLogoCircle}[1][4ex]{
8563 \includegraphics[height=#1]{gotham-logo.pdf}
8564 }
8565 % \end{macrocode}
8566 % \end{function}
8567 % \end{implementation}
8568
8569 % \begin{implementation}
8570 % \begin{function}{\gothamProgressCircle}
8571 % Internal command plotting the circle progress and that is used internal in the instituteLogo template within the frametitle template.
8572 % \TestFiles{ gotham-test-046b}
8573 % \begin{macrocode}
8574 \providecommand{\gothamProgressCircle}{
8575 % \tikzexternaldisable
8576 \begin{tikzpicture}[remember~picture,overlay]
8577 % Load colors
8578 \usebeamercolor{standin}
8579 \usebeamercolor{frametitle}
8580 \usebeamercolor{progress~bar~in~head/foot}
8581
8582 % Define center
8583 \coordinate (localCenter);
8584 % draw the outer circle
8585 \fill[fill=progress~bar~in~head/foot.bg] (localCenter) circle (\gothamProgressCircLogoOuterRadius);
8586 % draw the inner circle
8587 \fill[fill=frametitle.bg] (localCenter) circle (\gothamProgressCircLogoInnerRadius);
8588 \node at (localCenter) {\gothamInstituteLogoCircle[1.9\gothamProgressCircLogoRadius]};
8589
8590 %% draw progress circle/bar
8591 \bool_if:NTF \l_gotham_ProgCircleMoving_bool {
8592 % the circular counter with a moving counter
8593
8594 %% compute the angle for the progress circle
8595 \bool_if:NTF \l_gotham_progbar_advancement_tlbr_bool {
8596 \fp_set:Nn \l_gotham_ratio_progresscircle_fp {-(360)*\insertframenumber/\inserttotalframenumber }
8597 }{
8598 %\else% clockwise rotation
8599 \fp_set:Nn \l_gotham_ratio_progresscircle_fp {(360)*(\insertframenumber/\inserttotalframenumber)}
8600 }
8601 %\fi
8602
8603 % draw the arc progress bar
8604 \draw[
8605 color=progress~bar~in~head/foot.fg,
8606 line~width=0.6*\gothamProgressCircBorderWidth
8607 ]
8608 (localCenter)
8609 ++
8610 ([
8611 xshift=\gothamCounterRadius
8612 ]localCenter)
8613 arc[
8614 radius=\gothamCounterRadius,
8615 start~angle=0,
8616 end~angle={\fp_eval:n \l_gotham_ratio_progresscircle_fp}
8617 ]
8618 ;
8619
8620 % draw a point at the beginning of the progress circle
8621 \fill[fill=frametitle.bg]
8622 ([
8623 xshift={\gothamCounterRadius}
8624 ]localCenter.center)
8625 circle (0.3*\gothamProgressCircBorderWidth)
8626 ;
8627 % place the current frame number
8628 \node[
8629 % fill=standin.bg, draw=progress~bar~in~head/foot.bg, thick, circle, minimum~width={\gothamCounterCircleRadius}, text~width={0pt}
8630 ]
8631 (pagenumframe) at (
8632 [rotate=
8633 {\fp_eval:n {\l_gotham_ratio_progresscircle_fp}},
8634 xshift=\gothamCounterRadius
8635 ]localCenter) {}
8636 ;
8637 \filldraw[
8638 draw=progress~bar~in~head/foot.bg,
8639 fill=standin.bg,
8640 thick,
8641 ]
8642 (pagenumframe) circle (\gothamCounterCircleRadius)
8643 ;
8644 % place the frame number in another node to avoid unwanted rescaling.
8645 \node[at=(pagenumframe.center), anchor=center] {
8646 {\usebeamercolor[fg]{standin}\tiny\insertframenumber}
8647 };
8648 }{
8649 %\else gothamProgCircleMoving
8650 % the circular counter with a fixed counter
8651
8652 %% compute the angle for the progress circle
8653 \bool_if:NTF \l_gotham_progbar_advancement_tlbr_bool {
8654 \fp_set:Nn \l_gotham_ratio_progresscircle_fp {-(360-2\l_gotham_angle_counterradius_fp)*\insertframenumber/\inserttotalframenumber -\l_gotham_angle_counterradius_fp}
8655 }{
8656 %\else% clockwise rotation
8657 \fp_set:Nn \l_gotham_ratio_progresscircle_fp {(360-2\l_gotham_angle_counterradius_fp)*(\insertframenumber/\inserttotalframenumber) +\l_gotham_angle_counterradius_fp}
8658 }
8659 %\fi
8660
8661 % draw the arc progress bar
8662 \draw[
8663 color=progress~bar~in~head/foot.fg,
8664 line~width=0.6*\gothamProgressCircBorderWidth
8665 ]
8666 (localCenter)
8667 ++
8668 ([rotate={\fp_eval:n {\l_gotham_angle_counterradius_fp}},
8669 xshift=\gothamCounterRadius
8670 ]localCenter)
8671 arc[
8672 radius=\gothamCounterRadius,
8673 start~angle={\fp_eval:n \l_gotham_angle_counterradius_fp},
8674 end~angle={\fp_eval:n \l_gotham_ratio_progresscircle_fp}
8675 ]
8676 ;
8677
8678 % draw a point at the end of the progress circle
8679 \fill[fill=frametitle.bg]
8680 ([
8681 rotate={\fp_eval:n {\l_gotham_ratio_progresscircle_fp}}, xshift={\gothamCounterRadius}
8682 ]localCenter.center)
8683 circle (0.3*\gothamProgressCircBorderWidth)
8684 ;
8685 % place the total number of frames
8686 \node[] (leftick)
8687 at ([xshift={\gothamProgressCircLogoOuterRadius+1.25ex}]localCenter) {}
8688 ;
8689 %% draw a line ticks
8690 \draw[
8691 color=frametitle.fg,
8692 fill=frametitle.fg,
8693 ]
8694 ([xshift=\gothamProgressCircLogoOuterRadius,yshift={-0.05ex}] localCenter)
8695 rectangle ([yshift={0.05ex}] leftick)
8696 ;
8697 \node[ at=(leftick), anchor=west, inner~sep = 1pt,]
8698 {\usebeamercolor[fg]{frametitle}\tiny\inserttotalframenumber}
8699 ;
8700 % place the current frame number
8701 \node[
8702 % fill=standin.bg, draw=progress~bar~in~head/foot.bg, thick, circle, minimum~width={\gothamCounterCircleRadius}, text~width={0pt}
8703 ]
8704 (pagenumframe) at ([xshift=\gothamCounterRadius]localCenter) {}
8705 ;
8706 \filldraw[
8707 draw=progress~bar~in~head/foot.bg,
8708 fill=standin.bg,
8709 thick,
8710 ]
8711 (pagenumframe) circle (\gothamCounterCircleRadius)
8712 ;
8713 % place the frame number in another node to avoid unwanted rescaling.
8714 \node[at=(pagenumframe.center), anchor=center] {
8715 {\usebeamercolor[fg]{standin}\tiny\insertframenumber}
8716 };
8717 }
8718 %\fi gothamProgCircleMoving
8719 \end{tikzpicture}
8720 \bool_if:NTF \l_gotham_ProgCircleMoving_bool {
8721 % nothing
8722 \hspace{\gothamProgressCircLogoOuterRadius+0.75ex}
8723 }{
8724 % else
8725 % extra space to compensate the total number of frame
8726 \hspace{\gothamProgressCircLogoOuterRadius+3ex}
8727 }
8728 % \tikzexternalenable
8729 }
8730 % \end{macrocode}
8731 % \end{function}
8732 % \end{implementation}
8733
8734 % \begin{documentation}
8735 % \begin{function}{\useoutertheme}
8736 % \begin{syntax}
8737 % \cs{useoutertheme}\oarg{option1=value1, ...}\marg{gotham}
8738 % \textrm{where the options are (default marked as} \defopt{default}\textrm{):}
8739 % \meta{progressbar~position} = \oarg{\defopt{foot} \textbar none \textbar head \textbar circlehead \textbar ... }
8740 % \end{syntax}
8741 % The 'package' (useoutertheme) options can control |progress bar| templates that be placed in the head (over the frametitle), frametitle (under it), below the footer or the circlehead (around the logo in the frametitle).
8742 % \end{function}
8743 % \end{documentation}
8744 %%%%
8745 % \begin{implementation}
8746 % \begin{macro}{outer key -- interface}
8747 % Controls the outer settings for progress bar.
8748 % \UnitTested
8749 % \TestFiles{gotham-test-048}
8750 % \begin{macrocode}
8751 % token list to remember what is the current state
8752 % \tl_new:N \l__gotham_out_tmp_pbar_tl
8753 \keys_define:nn { gotham / outer }{
8754 % progressbar~position default
8755 progressbar~position .choice:,
8756 progressbar~position .usage:n = { general },
8757 progressbar~position .default:n = { none },
8758
8759 progressbar~position / none .code:n = {
8760 % reset if it has modified by another progressbar~position strategy
8761 % \__gotham_set_prop_template:nn{sidebar~canvas~right/default}{#1}
8762 \tl_set:Nn \l__gotham_out_tmp_pbar_tl {none}
8763
8764 % head
8765 \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {head} {
8766 % True: nothing to do it is already occupied.
8767 }{
8768 \setbeamertemplate{headline}[default/\prop_item:Nn \l__gotham_template_name_prop {headline/default}]
8769 }
8770 % frametitle
8771 % \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {frametitle} {
8772 % % True: nothing to do it is already occupied.
8773 % }{
8774 \setbeamertemplate{frametitle}[default/\prop_item:Nn \l__gotham_template_name_prop {frametitle/default}]
8775 % }
8776 % foot
8777 \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {foot} {
8778 % True: nothing to do it is already occupied.
8779 }{
8780 \setbeamertemplate{footline}[default/\prop_item:Nn \l__gotham_template_name_prop {footline/default}]
8781 }
8782 % left
8783 \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {left} {
8784 % True: nothing to do it is already occupied.
8785 }{
8786 \setbeamertemplate{sidebar~left}[default/\prop_item:Nn \l__gotham_template_name_prop {sidebar~left/default}]
8787 }
8788 % right
8789 \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {right} {
8790 % True: nothing to do it is already occupied.
8791 }{
8792 \setbeamertemplate{sidebar~right}[default/\prop_item:Nn \l__gotham_template_name_prop {sidebar~right/default}]
8793 }
8794
8795 % logo
8796 \__gotham_set_prop_template:nn{includeLogo/default}{gotham~square}
8797 % section in head
8798 \setbeamertemplate{section~in~head/foot~shaded}[default/\prop_item:Nn \l__gotham_template_name_prop {section~in~head/foot~shaded/default}]
8799 \setbeamertemplate{section~in~head/foot}[default/\prop_item:Nn \l__gotham_template_name_prop {section~in~head/foot/default}]
8800 },
8801 progressbar~position / head .code:n = {
8802 \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {head} {
8803 % True: nothing to do it is already done.
8804 } {
8805 % False : remember that choice in order to do not apply it several time and add to beamer template.
8806 \tl_set:Nn \l__gotham_out_tmp_pbar_tl {head}
8807
8808 \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {head} {
8809 % True: nothing to do it is already occupied.
8810 }{
8811 \setbeamertemplate{headline}[default/\prop_item:Nn \l__gotham_template_name_prop {headline/default}]
8812 }
8813 % \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {frametitle} {
8814 % % True: nothing to do it is already occupied.
8815 % }{
8816 \setbeamertemplate{frametitle}[default/\prop_item:Nn \l__gotham_template_name_prop {frametitle/default}]
8817 % }
8818 \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {foot} {
8819 % True: nothing to do it is already occupied.
8820 }{
8821 \setbeamertemplate{footline}[default/\prop_item:Nn \l__gotham_template_name_prop {footline/default}]
8822 }
8823 \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {left} {
8824 % True: nothing to do it is already occupied.
8825 }{
8826 \setbeamertemplate{sidebar~left}[default/\prop_item:Nn \l__gotham_template_name_prop {sidebar~left/default}]
8827 }
8828 \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {right} {
8829 % True: nothing to do it is already occupied.
8830 }{
8831 \setbeamertemplate{sidebar~right}[default/\prop_item:Nn \l__gotham_template_name_prop {sidebar~right/default}]
8832 }
8833
8834 %
8835 \addtobeamertemplate{headline}{}{
8836 \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {head} {
8837 \usebeamertemplate*{progress~bar~in~head/foot}
8838 }{}
8839 }
8840 }
8841 },
8842 progressbar~position / frametitle .code:n = {
8843 \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {frametitle} {
8844 % True: nothing to do it is already done.
8845 } {
8846 % False : remember that choice in order to do not apply it several time and add to beamer template.
8847 \tl_set:Nn \l__gotham_out_tmp_pbar_tl {frametitle}
8848
8849 \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {head} {
8850 % True: nothing to do it is already occupied.
8851 }{
8852 \setbeamertemplate{headline}[default/\prop_item:Nn \l__gotham_template_name_prop {headline/default}]
8853 }
8854 % \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {frametitle} {
8855 % % True: nothing to do it is already occupied.
8856 % }{
8857 \setbeamertemplate{frametitle}[default/\prop_item:Nn \l__gotham_template_name_prop {frametitle/default}]
8858 % }
8859 \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {foot} {
8860 % True: nothing to do it is already occupied.
8861 }{
8862 \setbeamertemplate{footline}[default/\prop_item:Nn \l__gotham_template_name_prop {footline/default}]
8863 }
8864 \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {left} {
8865 % True: nothing to do it is already occupied.
8866 }{
8867 \setbeamertemplate{sidebar~left}[default/\prop_item:Nn \l__gotham_template_name_prop {sidebar~left/default}]
8868 }
8869 \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {right} {
8870 % True: nothing to do it is already occupied.
8871 }{
8872 \setbeamertemplate{sidebar~right}[default/\prop_item:Nn \l__gotham_template_name_prop {sidebar~right/default}]
8873 }
8874
8875 %
8876 \addtobeamertemplate{frametitle}{}{
8877 \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {frametitle} {
8878 \usebeamertemplate*{progress~bar~in~head/foot}
8879 }{}
8880 }
8881 }
8882 },
8883 progressbar~position / foot .code:n = {
8884 \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {footline} {
8885 % True: nothing to do it is already done.
8886 } {
8887 % False : remember that choice in order to do not apply it several time and add to beamer template.
8888 \tl_set:Nn \l__gotham_out_tmp_pbar_tl {footline}
8889
8890 \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {head} {
8891 % True: nothing to do it is already occupied.
8892 }{
8893 \setbeamertemplate{headline}[default/\prop_item:Nn \l__gotham_template_name_prop {headline/default}]
8894 }
8895 % \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {frametitle} {
8896 % % True: nothing to do it is already occupied.
8897 % }{
8898 \setbeamertemplate{frametitle}[default/\prop_item:Nn \l__gotham_template_name_prop {frametitle/default}]
8899 % }
8900 \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {foot} {
8901 % True: nothing to do it is already occupied.
8902 }{
8903 \setbeamertemplate{footline}[default/\prop_item:Nn \l__gotham_template_name_prop {footline/default}]
8904 }
8905 \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {left} {
8906 % True: nothing to do it is already occupied.
8907 }{
8908 \setbeamertemplate{sidebar~left}[default/\prop_item:Nn \l__gotham_template_name_prop {sidebar~left/default}]
8909 }
8910 \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {right} {
8911 % True: nothing to do it is already occupied.
8912 }{
8913 \setbeamertemplate{sidebar~right}[default/\prop_item:Nn \l__gotham_template_name_prop {sidebar~right/default}]
8914 }
8915
8916 %
8917 \addtobeamertemplate{footline}{}{
8918 \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {footline} {
8919 \usebeamertemplate*{progress~bar~in~head/foot}
8920 }{}
8921 }
8922 }
8923 },
8924 progressbar~position / circlehead .code:n = {
8925 \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {circlehead} {
8926 % True: nothing to do it is already done.
8927 } {
8928 % False : remember that choice in order to do not apply it several time and add to beamer template.
8929 \tl_set:Nn \l__gotham_out_tmp_pbar_tl {circlehead}
8930
8931 %
8932 %%%\prop_put:Nnn \l__gotham_template_name_SAVE_prop {includeLogo/default} {gotham~square} % not needed after all.
8933 \__gotham_set_prop_template:nn{includeLogo/default}{gotham~circle}
8934 \__gotham_set_template:nn{section~in~head/foot~shaded}{default/gotham~secSubsec}
8935 \__gotham_set_template:nn{section~in~head/foot}{default/gotham~secSubsec}
8936 % \__gotham_set_template:nn{headline}{default/gotham~section}
8937 % \setbeamertemplate{headline}[default/gotham~section]
8938
8939 \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {head} {
8940 % True: it is already occupied, so let's emulate the gotham section
8941 \addtobeamertemplate{headline}{}{
8942 \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {circlehead} {
8943 \begin{beamercolorbox}[wd=1.0\paperwidth, ht=2.5ex, dp=1.4ex, left]{headfoot}
8944 \usebeamerfont{section~in~head/foot}\hspace*{3.5ex}
8945 \usebeamertemplate{section~in~head/foot}
8946 \end{beamercolorbox}
8947 }{}
8948 }
8949 }{
8950 % \setbeamertemplate{headline}[default/\prop_item:Nn \l__gotham_template_name_prop {headline/default}]
8951 \__gotham_set_template:nn{headline}{default/gotham~section}
8952 }
8953 % \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {frametitle} {
8954 % % True: nothing to do it is already occupied.
8955 % }{
8956 \setbeamertemplate{frametitle}[default/\prop_item:Nn \l__gotham_template_name_prop {frametitle/default}]
8957 % }
8958 \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {foot} {
8959 % True: nothing to do it is already occupied.
8960 }{
8961 \setbeamertemplate{footline}[default/\prop_item:Nn \l__gotham_template_name_prop {footline/default}]
8962 }
8963 \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {left} {
8964 % True: nothing to do it is already occupied.
8965 }{
8966 \setbeamertemplate{sidebar~left}[default/\prop_item:Nn \l__gotham_template_name_prop {sidebar~left/default}]
8967 }
8968 \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {right} {
8969 % True: nothing to do it is already occupied.
8970 }{
8971 \setbeamertemplate{sidebar~right}[default/\prop_item:Nn \l__gotham_template_name_prop {sidebar~right/default}]
8972 }
8973 }
8974 },
8975 progressbar~position / left .code:n = {
8976 \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {left} {
8977 % True: nothing to do it is already done.
8978 } {
8979 % False : remember that choice in order to do not apply it several time and add to beamer template.
8980 \tl_set:Nn \l__gotham_out_tmp_pbar_tl {left}
8981
8982 \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {head} {
8983 % True: nothing to do it is already occupied.
8984 }{
8985 \setbeamertemplate{headline}[default/\prop_item:Nn \l__gotham_template_name_prop {headline/default}]
8986 }
8987 % \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {frametitle} {
8988 % % True: nothing to do it is already occupied.
8989 % }{
8990 \setbeamertemplate{frametitle}[default/\prop_item:Nn \l__gotham_template_name_prop {frametitle/default}]
8991 % }
8992 \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {foot} {
8993 % True: nothing to do it is already occupied.
8994 }{
8995 \setbeamertemplate{footline}[default/\prop_item:Nn \l__gotham_template_name_prop {footline/default}]
8996 }
8997 \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {left} {
8998 % True: nothing to do it is already occupied.
8999 }{
9000 \setbeamertemplate{sidebar~left}[default/\prop_item:Nn \l__gotham_template_name_prop {sidebar~left/default}]
9001 }
9002 \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {right} {
9003 % True: nothing to do it is already occupied.
9004 }{
9005 \setbeamertemplate{sidebar~right}[default/\prop_item:Nn \l__gotham_template_name_prop {sidebar~right/default}]
9006 }
9007
9008 %
9009 \addtobeamertemplate{sidebar~left}{}{
9010 \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {left} {
9011 \usebeamertemplate*{progress~bar~in~left}
9012 }{}
9013 }
9014 }
9015 },
9016 progressbar~position / right .code:n = {
9017 \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {right} {
9018 % True: nothing to do it is already done.
9019 } {
9020 % False : remember that choice in order to do not apply it several time and add to beamer template.
9021 \tl_set:Nn \l__gotham_out_tmp_pbar_tl {right}
9022
9023 \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {head} {
9024 % True: nothing to do it is already occupied.
9025 }{
9026 \setbeamertemplate{headline}[default/\prop_item:Nn \l__gotham_template_name_prop {headline/default}]
9027 }
9028 % \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {frametitle} {
9029 % % True: nothing to do it is already occupied.
9030 % }{
9031 \setbeamertemplate{frametitle}[default/\prop_item:Nn \l__gotham_template_name_prop {frametitle/default}]
9032 % }
9033 \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {foot} {
9034 % True: nothing to do it is already occupied.
9035 }{
9036 \setbeamertemplate{footline}[default/\prop_item:Nn \l__gotham_template_name_prop {footline/default}]
9037 }
9038 \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {left} {
9039 % True: nothing to do it is already occupied.
9040 }{
9041 \setbeamertemplate{sidebar~left}[default/\prop_item:Nn \l__gotham_template_name_prop {sidebar~left/default}]
9042 }
9043 \tl_if_eq:VnTF \l__gotham_out_tmp_mfnposi_tl {right} {
9044 % True: nothing to do it is already occupied.
9045 }{
9046 \setbeamertemplate{sidebar~right}[default/\prop_item:Nn \l__gotham_template_name_prop {sidebar~right/default}]
9047 }
9048
9049 %
9050 \addtobeamertemplate{sidebar~right}{}{
9051 \tl_if_eq:VnTF \l__gotham_out_tmp_pbar_tl {right} {
9052 \usebeamertemplate*{progress~bar~in~right}
9053 }{}
9054 }
9055 }
9056 },
9057
9058 progressbar~position / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'#1'~is~unknown~for~the~(known)~option~'progressbar~position',~so~being~ignored. }{helping~message: progressbar~position / unknown} },
9059 }
9060 % \end{macrocode}
9061 % \end{macro}
9062 % \end{implementation}
9063
9064 % \begin{documentation}
9065 % \begin{function}{\useoutertheme}
9066 % \begin{syntax}
9067 % \cs{useoutertheme}\oarg{option1=value1, ...}\marg{gotham}
9068 % \textrm{where the options are (default marked as} \defopt{default}\textrm{):}
9069 % \meta{progressbar style} = \oarg{\defopt{rectangle} \textbar rounded box \textbar moving circle \textbar fixed circle }
9070 % \end{syntax}
9071 % The 'package' (useoutertheme) options can control |progress bar style| templates that .
9072 % \end{function}
9073 % \end{documentation}
9074 %%%%
9075 % \begin{implementation}
9076 % \begin{macro}{outer key -- interface}
9077 % Controls the outer settings for progress bar style.
9078 % \UnitTested
9079 % \TestFiles{gotham-test-049}
9080 % \begin{macrocode}
9081 % token list to remember what is the current state
9082 \keys_define:nn { gotham / outer }{
9083 % progressbar~style default
9084 progressbar~style .choice:,
9085 progressbar~style .usage:n = { general },
9086 progressbar~style .default:n = { rectangle },
9087
9088 progressbar~style / rectangle .code:n = {
9089 %
9090 % \defbeamertemplate*{progress~bar~in~head/foot}{gotham~rectangle}
9091 \__gotham_set_template:nn{progress~bar~in~head/foot}{gotham~rectangle}
9092 \__gotham_set_template:nn{progress~bar~in~left}{gotham~rectangle}
9093 \__gotham_set_template:nn{progress~bar~in~right}{gotham~rectangle}
9094 },
9095
9096 progressbar~style / rounded~box .code:n = {
9097 %
9098 \__gotham_set_template:nn{progress~bar~in~head/foot}{gotham~rounded~box}
9099 \__gotham_set_template:nn{progress~bar~in~left}{gotham~rounded~box}
9100 \__gotham_set_template:nn{progress~bar~in~right}{gotham~rounded~box}
9101 },
9102
9103 progressbar~style / moving~circle .code:n = {
9104 %
9105 \bool_set_true:N \l_gotham_ProgCircleMoving_bool
9106 },
9107
9108 progressbar~style / fixed~circle .code:n = {
9109 %
9110 \bool_set_false:N \l_gotham_ProgCircleMoving_bool
9111 },
9112
9113 progressbar~style / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'#1'~is~unknown~for~the~(known)~option~'progressbar~style',~so~being~ignored. }{helping~message: progressbar~style / unknown} },
9114 }
9115 % \end{macrocode}
9116 % \end{macro}
9117 % \end{implementation}
9118
9119 % \begin{documentation}
9120 % \begin{function}{\useoutertheme}
9121 % \begin{syntax}
9122 % \cs{useoutertheme}\oarg{option1=value1, ...}\marg{gotham}
9123 % \textrm{where the options are (default marked as} \defopt{default}\textrm{):}
9124 % \meta{progressbar~advancement} = \oarg{\defopt{tlbr} \textbar brlt }
9125 % \end{syntax}
9126 % The 'package' (useoutertheme) options can control |progress bar| advandement: tlbr) from top left corner to the bottom and right or brlt) from the bottom right to the left and top.
9127 % \end{function}
9128 % \end{documentation}
9129 %%%%
9130 % \begin{implementation}
9131 % \begin{macro}{outer key -- interface}
9132 % Controls the outer settings for progress bar style.
9133 % \UnitTested
9134 % \TestFiles{gotham-test-049}
9135 % \begin{macrocode}
9136 % token list to remember what is the current state
9137 \keys_define:nn { gotham / outer }{
9138 % progressbar~advancement default
9139 progressbar~advancement .choice:,
9140 progressbar~advancement .usage:n = { general },
9141 progressbar~advancement .default:n = { tlbr },
9142
9143 progressbar~advancement / tlbr .code:n = {
9144 %
9145 \bool_set_true:N \l_gotham_progbar_advancement_tlbr_bool
9146 },
9147 progressbar~advancement / TLBR .code:n = {
9148 %
9149 \bool_set_true:N \l_gotham_progbar_advancement_tlbr_bool
9150 },
9151
9152 progressbar~advancement / brlt .code:n = {
9153 %
9154 \bool_set_false:N \l_gotham_progbar_advancement_tlbr_bool
9155 },
9156 progressbar~advancement / BRLT .code:n = {
9157 %
9158 \bool_set_false:N \l_gotham_progbar_advancement_tlbr_bool
9159 },
9160
9161 progressbar~advancement / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'#1'~is~unknown~for~the~(known)~option~'progressbar~advancement',~so~being~ignored. }{helping~message: progressbar~advancement / unknown} },
9162 }
9163 % \end{macrocode}
9164 % \end{macro}
9165 % \end{implementation}
9166
9167 % \begin{documentation}
9168 % \begin{function}{\useoutertheme}
9169 % \begin{syntax}
9170 % \cs{useoutertheme}\oarg{option1=value1, ...}\marg{gotham}
9171 % \textrm{where the options are (default marked as} \defopt{default}\textrm{):}
9172 % \meta{progressbar mfn} = \oarg{\defopt{off} \textbar on }
9173 % \end{syntax}
9174 % The 'package' (useoutertheme) options can control if the progress bar includes a miniframe navigation.
9175 % \end{function}
9176 % \end{documentation}
9177 %%%%
9178 % \begin{implementation}
9179 % \begin{macro}{outer key -- interface}
9180 % Controls the outer settings for progress bar style.
9181 % \UnitTested
9182 % \TestFiles{gotham-test-049}
9183 % \begin{macrocode}
9184 % token list to remember what is the current state
9185 \keys_define:nn { gotham / outer }{
9186 % progressbar~mfn default
9187 progressbar~mfn .choice:,
9188 progressbar~mfn .usage:n = { general },
9189 progressbar~mfn .default:n = { off },
9190
9191 progressbar~mfn / true .code:n = {
9192 \bool_set_true:N \l_gotham_pmfn_bool
9193
9194 \__gotham_set_template:nn{section~in~head/foot~shaded}{default/empty}
9195 \__gotham_set_template:nn{section~in~head/foot}{default/empty}
9196 \renewcommand{\gothamPatchSectionbox}{
9197 % patch to set section box height to 0.
9198 \ht\beamer@sectionbox=0.ex
9199 \dp\beamer@sectionbox=0.ex
9200 }
9201 },
9202 progressbar~mfn / on .code:n = {
9203 \bool_set_true:N \l_gotham_pmfn_bool
9204
9205 \__gotham_set_template:nn{section~in~head/foot~shaded}{default/empty}
9206 \__gotham_set_template:nn{section~in~head/foot}{default/empty}
9207 \renewcommand{\gothamPatchSectionbox}{
9208 % patch to set section box height to 0.
9209 \ht\beamer@sectionbox=0.ex
9210 \dp\beamer@sectionbox=0.ex
9211 }
9212 },
9213 progressbar~mfn / enable .code:n = {
9214 \bool_set_true:N \l_gotham_pmfn_bool
9215
9216 \__gotham_set_template:nn{section~in~head/foot~shaded}{default/empty}
9217 \__gotham_set_template:nn{section~in~head/foot}{default/empty}
9218 \renewcommand{\gothamPatchSectionbox}{
9219 % patch to set section box height to 0.
9220 \ht\beamer@sectionbox=0.ex
9221 \dp\beamer@sectionbox=0.ex
9222 }
9223 },
9224
9225 progressbar~mfn / false .code:n = { \bool_set_false:N \l_gotham_pmfn_bool },
9226 progressbar~mfn / off .code:n = { \bool_set_false:N \l_gotham_pmfn_bool },
9227 progressbar~mfn / disable .code:n = { \bool_set_false:N \l_gotham_pmfn_bool },
9228
9229 progressbar~mfn / unknown .code:n = { \PackageWarning{ gotham } { The~choice~'#1'~is~unknown~for~the~(known)~option~'progressbar~mfn',~so~being~ignored. }{helping~message: progressbar~mfn / unknown} },
9230 }
9231 % \end{macrocode}
9232 % \end{macro}
9233 % \end{implementation}
9234
9235
9236 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
9237
9238 % \begin{implementation}
9239 % \begin{macro}{Default outer keys}
9240 % Apply default key options.
9241 % \UnitTested
9242 % \TestFiles{gotham-test-048}
9243 % \begin{macrocode}
9244 % when no value is given, default is called.
9245 \keys_set:nn { gotham / outer } {
9246 sidebar~canvas~right~template, sidebar~canvas~left~template,
9247 edging~default,
9248 frametitle~template, framesubtitle~template, frametitle~continuation~template,
9249 numbering,
9250 rotateFooter~default,
9251 footer~template,
9252 mini~frames~shape, mini~frames~bundle,
9253 mini~frames~compress,
9254 mini~frames~nav~spreading,
9255 mini~frames~nav~sectioning,
9256 mini~frames~nav~position,
9257 progressbar~position, progressbar~style, progressbar~advancement, progressbar~mfn,
9258 }
9259 % \end{macrocode}
9260 % \end{macro}
9261 % \end{implementation}
9262
9263 % \begin{implementation}
9264 % \begin{macro}{Process outer keys}
9265 % Process package options.
9266 % \UnitTested
9267 % \TestFiles{gotham-test-048}
9268 % \begin{macrocode}
9269 \ProcessKeyOptions[ gotham / outer ]
9270 % \mode<all>
9271 % \end{macrocode}
9272 % \end{macro}
9273 % \end{implementation}
9274
9275 %
9276 %
9277 % \begin{implementation}
9278 % \begin{macrocode}
9279 %\endinput
9280 %</outer>
9281 % \end{macrocode}
9282 % \end{implementation}
9283 %
9284 % ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
9285 %
9286 %
9287 %\begin{implementation}
9288 % \begin{macrocode}
9289 %<*package>
9290 \RequirePackage{expl3}
9291 % \RequirePackage{ifxetex}
9292 % \RequirePackage{ifluatex}
9293 % \RequirePackage{etoolbox}
9294 % \RequirePackage{xcolor}
9295 % \RequirePackage{tikz}
9296 % \RequirePackage{calc} % I think I can remove it with a bit of work
9297 % \RequirePackage{xfp}
9298 % \end{macrocode}
9299 % \end{implementation}
9300 %
9301 % \begin{implementation}
9302 % \begin{macrocode}
9303 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9304 %%%%%%%%%%%% PACKAGE %%%%%%%%%%%%%
9305 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9306 %
9307 %
9308 % \end{macrocode}
9309 % \end{implementation}
9310 %
9311 % Most options are passed off to the component sub-packages.
9312 % \begin{implementation}
9313 % \begin{macrocode}
9314
9315 %
9316 \usefonttheme{gotham}
9317 \usecolortheme{gotham}
9318 \useinnertheme{gotham}
9319 \useoutertheme{gotham}
9320 %
9321 %
9322 %
9323
9324 %%%%% Setting keys %%%%%
9325
9326 % set new counter for how many time the lookup is used
9327 \int_new:N \l_gotham_lookup_cnt
9328 \int_set:Nn \l_gotham_lookup_cnt {0}
9329
9330 \seq_const_from_clist:Nn \c__gotham_load_submodules_seq { font, color, inner, outer }
9331
9332 \cs_new_protected:Npn \__gotham_lookup_keymodules:nn #1#2
9333 {
9334 \int_incr:N \l_gotham_lookup_cnt
9335 % \int_show:n \l_gotham_lookup_cnt
9336
9337 % if lookup counter is lower than the number of submodules-1 [before it was +1, not completely clear to me], do nothing (let the other submodules do their job), otherwise lookup in the submodules
9338 \if_int_compare:w \l_gotham_lookup_cnt < 2
9339 %true : do nothing
9340 \else:
9341 % \int_show:n \l_gotham_lookup_cnt
9342 \seq_map_inline:Nn \c__gotham_load_submodules_seq
9343 {
9344 \keys_if_exist:nnT { gotham / ##1 } {#1}
9345 {
9346 % missing feature in l3keys, we have no better way to detect an omitted value, so we have to guess that all empty values are in fact omitted values.
9347 \tl_if_empty:nTF {#2}
9348 { \keys_set:nn { gotham / ##1 } { #1 } }
9349 { \keys_set:nn { gotham / ##1 } { #1 = {#2} } }
9350 \prg_break:
9351 }
9352 }
9353 \msg_error:nnn { gotham } { unknown-key } {#1}
9354 \prg_break_point:
9355 \fi:
9356 }
9357 \cs_generate_variant:Nn \__gotham_lookup_keymodules:nn { Vn }
9358 \msg_new:nnn { gotham } { unknown-key } { Unknown~ key~ #1~ encountered. }
9359
9360 % Property list for all groups.
9361 \prop_new:N \l__gotham_all_all_user_keys_prop
9362 \prop_const_from_keyval:Nn \c__gotham_all_pkg_keys_prop {}
9363
9364 \keys_define:nn { gotham / all / all }
9365 {
9366 unknown .code:n =
9367 {\__gotham_lookup_keymodules:Vn \l_keys_key_str {#1}}
9368 }
9369
9370 % Set default keys/options from keyval
9371 % \__gotham_set_default_from_keyval: variant, keyval, group command
9372 \cs_new_protected:Npn \__gotham_set_default_from_keyval:nnn #1 #2 #3
9373 { %%
9374 % Check if keyvalues have been given.
9375 \tl_if_novalue:nTF {#2}
9376 { % no user keys given so _user_keys_prop is taking pkg prop
9377 \prop_set_eq:cc { l__gotham_#3_#1_user_keys_prop } { c__gotham_#3_pkg_keys_prop }
9378 }{ % user key given and put it in prop
9379 \prop_put_from_keyval:cn { l__gotham_#3_#1_user_keys_prop } {#2}
9380 }% end if
9381 %
9382 % xx
9383 \__gotham_set_default_auxi:cnn { l__gotham_#3_#1_user_keys_prop } {#1} {#3}
9384 %
9385 % xx
9386 \keys_set:nn { gotham/#3/#1 } { default }
9387 }
9388 %
9389 % prop-key-val, variant, group command
9390 \cs_new_protected:Npn \__gotham_set_default_auxi:Nnn #1 #2 #3
9391 {
9392 \__gotham_set_default_auxii:fnn { \prop_to_keyval:N #1 } {#2} {#3}
9393 }
9394 \cs_generate_variant:Nn \__gotham_set_default_auxi:Nnn { c }
9395 %
9396 % key-val, variant, group command
9397 \cs_new_protected:Npn \__gotham_set_default_auxii:nnn #1 #2 #3
9398 {
9399 \keys_define:nn { gotham/#3/#2 } { default .meta:n = {#1} }
9400 }
9401 \cs_generate_variant:Nn \__gotham_set_default_auxii:nnn { f }
9402 %
9403 %
9404 % (re)set keys/options by default for a group of commands.
9405 % \gothamset m:options:#1
9406 \DeclareDocumentCommand{\gothamset}{ m }
9407 {
9408 \__gotham_set_default_from_keyval:nnn { all } {#1} { all }
9409 \keys_set:nn { gotham/all/all } { default }
9410 }
9411
9412 \def\gotham@plaintitleformat#1{#1}
9413 \providecommand{\mreducelistspacing}{\vspace{-\topsep}}
9414
9415 \ProcessOptionsBeamer
9416 \keys_define:nn { gotham / font }
9417 {
9418 unknown .code:n =
9419 {\__gotham_lookup_keymodules:Vn \l_keys_key_str {#1}}
9420 }
9421 \keys_define:nn { gotham / color }
9422 {
9423 unknown .code:n =
9424 {\__gotham_lookup_keymodules:Vn \l_keys_key_str {#1}}
9425 }
9426 \keys_define:nn { gotham / inner }
9427 {
9428 unknown .code:n =
9429 {\__gotham_lookup_keymodules:Vn \l_keys_key_str {#1}}
9430 }
9431 \keys_define:nn { gotham / outer }
9432 {
9433 unknown .code:n =
9434 {\__gotham_lookup_keymodules:Vn \l_keys_key_str {#1}}
9435 }
9436
9437 \ProcessKeyOptions[ gotham / font ]
9438 \ProcessKeyOptions[ gotham / color ]
9439 \ProcessKeyOptions[ gotham / inner ]
9440 \ProcessKeyOptions[ gotham / outer ]
9441
9442 %
9443 % \end{macrocode}
9444 % \end{implementation}
9445
9446 % \begin{documentation}
9447 % \begin{function}{\gothamreset}
9448 % \begin{syntax}
9449 % \cs{gothamreset}
9450 % \end{syntax}
9451 % Command to reset gotham to default. Mainly useful when other theme have left some definitions.
9452 % \end{function}
9453 % \end{documentation}
9454 %%%%%%
9455 % \begin{implementation}
9456 % \begin{function}{\gothamreset}
9457 % \begin{arguments}
9458 % \item |height| of the picture
9459 % \end{arguments}
9460 % Command to be redefined by users.
9461 % \TestFiles{gotham-test-046b}
9462 % \begin{macrocode}
9463 \DeclareDocumentCommand{\gothamreset}{m}{
9464 % commands
9465 \renewcommand{\gothamInstituteLogoSquare}[1][4ex]{ }
9466 \renewcommand{\gothamInstituteLogoCircle}[1][4ex]{ }
9467 \renewcommand{\gothamHookPostColorBGSet}{
9468 \colorlet{colorStandout}{colorA}
9469 \colorlet{colorFrametitle}{colorA}
9470 \colorlet{colorProgBar}{colorC}
9471 \setbeamercolor{frametitle}{
9472 use=primary~palette,
9473 parent=primary~palette,
9474 bg=colorFrametitle,
9475 fg=colorBG
9476 }
9477 \setbeamercolor{standout}{bg=colorStandout, fg=colorPale}
9478 }
9479 \renewcommand{\gothamtitlepagelogo}{}
9480 \renewcommand{\gothamtitlepagebg}{}
9481 \renewcommand{\gothamRightFiligrane}{}
9482 \renewcommand{\gothamLeftFiligrane}{}
9483 \renewcommand{\gothamHookFooter}{}
9484
9485 % lengths
9486 \setlength{\gothamProgressSectionHeight}{3pt}
9487 \setlength{\sectionhoffset}{0pt}
9488 \setlength{\sidebarRightHOffset}{-2.5ex}
9489 \setlength{\sidebarLeftHOffset}{+0.5ex}
9490 \setlength{\gothamFrametitleToppading}{2.2ex}
9491 \setlength{\gothamFrametitleBottompading}{2.2ex}
9492 \setlength{\gothamFrametitleLeftpading}{2.2ex}
9493 \setlength{\gothamFrametitleRightpading}{2.2ex}
9494 \setlength{\gothamFramesubtitleStrutend}{0pt}
9495 \setlength{\gothamFootlineVOffset}{-0.5ex}
9496 \setlength{\gothamFootlineDepth}{0.1ex}
9497 \setlength{\gothamFootlineHeight}{1.5ex}
9498 \setlength{\gothamFootlineHRightOffset}{\spaceskip}
9499 \setlength{\gothamHposLeftRotFooter}{-7pt}
9500 \setlength{\gothamHposRightRotFooter}{2pt}
9501 \setlength{\gothamVposLeftRotFooter}{15pt}
9502 \setlength{\gothamVposRightRotFooter}{15pt}
9503 \setlength{\gothamLeftFooterPadding}{2.0ex}
9504 \setlength{\gothamRightFooterPadding}{3.5ex}
9505 \setlength{\gothamFooterHOffset}{0pt}
9506 \setlength{\gothamFootlineRuleLeftPadding}{7mm}
9507 \setlength{\gothamFootlineRuleHeight}{0.0pt}
9508 \setlength{\gothamFootlineRuleLength}{15mm}
9509 \setlength{\gothamProgressCircHeight}{1.8\baselineskip}
9510 \setlength{\gothamCounterCircleRadius}{1.12ex}
9511 \setlength{\gothamProgressCircBorderWidth}{1.65mm}
9512 \setlength{\gothamCircleNumberingVshift}{1.4mm}
9513 \setlength{\gothamCircleNumberingHshift}{2.6mm}
9514 \setlength{\gothamProgressHeadFootLineheight}{1.2ex}
9515
9516 % options to default
9517 \keys_set:nn { gotham/all/all } { default }
9518 }
9519 % \end{macrocode}
9520 % \end{function}
9521 % \end{implementation}
9522
9523 % \begin{implementation}
9524 % \begin{macrocode}
9525 %\endinput
9526 %</package>
9527 % \end{macrocode}
9528 % \end{implementation}
9529 %
9530 %
9531 \endinput
9532 %
9533 % \Finale