summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/beamer-contrib/themes/fibeamer/fibeamer.dtx
blob: 5c682e4f5db0b34895849001d639c087b1570f84 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
% \iffalse\begin{macrocode}
%<*driver>

\documentclass{ltxdoc}
\usepackage[utf8]{inputenc} % this file uses UTF-8
\usepackage[english]{babel}
\usepackage{tgpagella}
\usepackage{tabularx}
\usepackage{hologo}
\usepackage{booktabs}
\usepackage[scaled=0.86]{berasans}
\usepackage[scaled=1.03]{inconsolata}
\usepackage[resetfonts]{cmap}
\usepackage[T1]{fontenc} % use 8bit fonts
\emergencystretch 2dd
\usepackage{hypdoc}
\usepackage{microtype}
\usepackage{ragged2e}

% Making paragraphs numbered
\makeatletter
\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
            {-2.5ex\@plus -1ex \@minus -.25ex}%
            {1.25ex \@plus .25ex}%
            {\normalfont\normalsize\bfseries}}
\makeatother
\setcounter{secnumdepth}{4} % how many sectioning levels to assign
\setcounter{tocdepth}{4}    % how many sectioning levels to show

% ltxdoc class options
\CodelineIndex
\MakeShortVerb{|}
\EnableCrossrefs
\DoNotIndex{}
\makeatletter
\c@IndexColumns=2
\makeatother

\begin{document}
  \RecordChanges
  \DocInput{fibeamer.dtx}
  \PrintIndex
  \RaggedRight
  \PrintChanges
\end{document}

%</driver>
%    \end{macrocode}
%<*class>
\NeedsTeXFormat{LaTeX2e}
%
% Define `\fibeamer@version` and store it in the `VERSION.tex` file \fi
{\def\fibeamer@versiondef#1#2{
  \gdef\fibeamer@version@number{#1}
  \gdef\fibeamer@version@date{#2}
  \gdef\fibeamer@version{#2 #1 fibeamer MU beamer theme}}
\fibeamer@versiondef{v1.1.8}{2019/12/16}}
% {\newwrite\f\openout\f=VERSION\write\f{\fibeamer@version}\closeout\f}
%
% \changes{v1.1.5:1} {2016/05/18}{Added \texttt{pdfencoding} to the
%   \textsf{hyperref} package setup. This fixes the problem with garbled
%   characters in PDF metadata with Lua\TeX.}
% \iffalse Use `\fibeamer@version` as the PDF creator key.
\hypersetup{%
  pdfcreator=\fibeamer@version,
  pdfencoding=auto}
% \fi
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 
% \changes{v1.1.8}   {2019/12/15}{Fixed active character \texttt{-}
%   in pdf\LaTeX{} example documents.}
% \changes{v1.1.3}   {2016/02/24}{Added visual tests of output
%   PDFs.}
% \changes{v1.1.1:3} {2016/01/14}{Refactored the themes of the
%   Masaryk University in Brno. Removed the useless uses of
%   \texttt{use} in the color themes. Replaced
%   \cs{setbeamertemplate} in the inner theme with the more
%   appropriate \cs{defbeamertemplate*}. Added missing
%   \texttt{\%}s. [VN]}
% \changes{v1.1.0:7} {2016/01/12}{Updated the example documents of
%   the Masaryk University in Brno to showcase the use of
%   \cs{alert}. [VN]}
% \changes{v1.1.0:6} {2016/01/11}{Updated the example documents of
%   the Masaryk University in Brno to showcase the use of the
%   \cs{tableofcontents}. [VN]}
% \changes{v1.1.0:1} {2015/11/24}{Added the new logo files for the
%   faculties of the Masaryk University in Brno and removed the old
%   logo files. [VN]}
% \changes{v1.0.4}   {2015/11/21}{Updated the user guide of the
%   Masaryk University in Brno. [VN]}
% \changes{v1.0.3}   {2015/11/20}{The example documents from the
%   \texttt{example} directory and the user guide from the
%   \texttt{guide} directory are now a part of the CTAN archive.
%   [VN]}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% \title{The beamer theme for the typesetting of thesis defense
%   presentations at the Masaryk University in Brno}
% \author{Vít Novotný}
% \date{\today}
% \maketitle
%
% \begin{abstract}
% \noindent This document details the design and the implementation
% of the \textsf{fibeamer} theme for the \textsf{beamer} document
% class. Included are technical information for anyone who wishes
% to extend the theme with their own beamer themes as well as
% information for ordinary users.
% \end{abstract}
%
% \tableofcontents
%
% \section{Basic usage}
% In order to use the \textsf{fibeamer} theme, insert
% |\usetheme|\oarg{options}|{fibeamer}| into the preamble of a
% \LaTeX\ document that uses the \textsf{beamer} document class.
% Refer to Section \ref{sec:options} for the list of available
% \textit{options}.
% 
% \section{Package options}\label{sec:options}
% \subsection{The \texttt{fonts} option}
% \begin{macro}{\iffibeamer@fonts}
% The |fonts| option instructs the package to set up the
% combination of the font families of Carlito, Arev, Iwona, Dsfont,
% and DejaVu for the typesetting of text and mathematics. This
% option is enabled by default.
%    \begin{macrocode}
\ProvidesPackage{fibeamer/beamerthemefibeamer}[\fibeamer@version]
\newif\iffibeamer@fonts
\DeclareOptionBeamer{fonts}{\fibeamer@fontstrue}
\ExecuteOptionsBeamer{fonts}
%    \end{macrocode}
% \end{macro}
% \subsection{The \texttt{nofonts} option}
% The |nofonts| option instructs the package not to alter the
% currently set text and mathematics font families.
%    \begin{macrocode}
\DeclareOptionBeamer{nofonts}{\fibeamer@fontsfalse}
%    \end{macrocode}
% \subsection{The \texttt{microtype} option}
% \changes{v1.0.2}{2015/11/18}{Added the opt-out \texttt{microtype
%   option}. [VN]}
% \begin{macro}{\iffibeamer@microtype}
% The |microtype| option instructs the package to use the
% microtypographic extensions of modern \TeX\ engines, such as
% \hologo{pdfTeX}, \Hologo{LuaTeX}, and (with only partial support)
% \Hologo{XeLaTeX}. This option is enabled by default.
%    \begin{macrocode}
\newif\iffibeamer@microtype
\DeclareOptionBeamer{microtype}{\fibeamer@microtypetrue}
\ExecuteOptionsBeamer{microtype}
%    \end{macrocode}
% \end{macro}
% \subsection{The \texttt{nomicrotype} option}
% The |nomicrotype| option disables the microtypographic
% extensions. This may be necessary, if an older \TeX\ engine,
% such as \hologo{TeX} or \hologo{eTeX}, is being used.
%    \begin{macrocode}
\DeclareOptionBeamer{nomicrotype}{\fibeamer@microtypefalse}
%    \end{macrocode}
% \begin{macro}{\fibeamer@university}
% \subsection{The \texttt{university} option}
% The \marg{\texttt{university}=identifier} option pair sets the
% identifier of the university, at which the presentation is being
% written, to \textit{identifier}. The \textit{identifier} is
% stored within the |\fibeamer@university| macro, whose
% implicit value is \texttt{mu}. This value corresponds to the
% Masaryk University in Brno.
%    \begin{macrocode}
\DeclareOptionBeamer{university}{\def\fibeamer@university{#1}}
\ExecuteOptionsBeamer{university=mu}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\fibeamer@faculty}
% \subsection{The \texttt{faculty} option}
% The \marg{\texttt{faculty}=identifier} pair sets the faculty, at
% which the thesis is being written, to \textit{domain}. The
% following faculty \textit{identifier}s are recognized at the
% Masaryk University in Brno:
% \begin{center}\begin{tabularx}{\textwidth}{Xc}\toprule
%   The faculty & The \textit{domain} name \\\midrule
%   The Faculty of Informatics & \texttt{fi} \\
%   The Faculty of Science & \texttt{sci} \\
%   The Faculty of Law & \texttt{law} \\
%   The Faculty of Economics and Administration & \texttt{econ} \\
%   The Faculty of Social Studies & \texttt{fss} \\
%   The Faculty of Medicine & \texttt{med} \\
%   The Faculty of Education & \texttt{ped} \\
%   The Faculty of Arts & \texttt{phil} \\
%   The Faculty of Sports Studies & \texttt{fsps} \\\bottomrule
% \end{tabularx}\end{center}
% The \textit{identifier} is stored within the |\fibeamer@faculty|
% macro, whose implicit value is \texttt{fi}.
%    \begin{macrocode}
\DeclareOptionBeamer{faculty}{\def\fibeamer@faculty{#1}}
\ExecuteOptionsBeamer{faculty=fi}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\fibeamer@locale}
% \subsection{The \texttt{locale} option}
% \changes{v1.1.0:1}{2015/11/24}{Added the \texttt{locale} option
%   and the \cs{fibeamer@locale} macro. [VN]}
% The \marg{\texttt{locale}=name} pair sets the name of the main
% locale to \textit{name}. The \textit{name} is stored within the
% |\fibeamer@locale| macro, whose implicit value is the main
% language of either the \textsf{babel} or the \textsf{polyglossia}
% package, or \texttt{english}, when undefined.
%
% With regards to the themes of the Masaryk University in Brno, the
% |\fibeamer@locale| macro is not used; it only provides the
% default value to the |\fibeamer@logoLocale| macro.
%    \begin{macrocode}
\def\fibeamer@locale{%
  % Babel / polyglossia detection
  \ifx\languagename\undefined%
  english\else\languagename\fi}
\DeclareOptionBeamer{locale}{%
  \def\fibeamer@locale{#1}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\fibeamer@logoLocale}
% \subsection{The \texttt{logoLocale} option}
% The \marg{\texttt{logoLocale}=name} pair sets the logo file
% locale to \textit{name}. The \textit{name} is stored within the
% |\fibeamer@logoLocale| macro, whose implicit value is
% |\fibeamer@locale|.
% \changes{v1.1.0:2}{2016/01/11}{Added the \texttt{logoLocale}
%   option and the \cs{fibeamer@logoLocale} macro. [VN]}
% \begin{macrocode}
\def\fibeamer@logoLocale{\fibeamer@locale}
\DeclareOptionBeamer{logoLocale}{%
  \def\fibeamer@logoLocale{#1}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\fibeamer@basePath}
% \subsection{The \texttt{basePath} option}
% The \marg{\texttt{basePath}=path} pair sets the \textit{path}
% containing the package files. The \textit{path} is prepended to
% every other path (|\fibeamer@logopath| and |\fibeamer@themePath|)
% used by the package. If non-empty, the
% \textit{path} gets normalized to \textit{path/}. The normalized
% \textit{path} is stored within the |\fibeamer@basePath| macro,
% whose implicit value is |fibeamer/|.
%    \begin{macrocode}
\DeclareOptionBeamer{basePath}{%
  \ifx\fibeamer@empty#1\fibeamer@empty%
    \def\fibeamer@basePath{}%
  \else%
    \def\fibeamer@basePath{#1/}%
  \fi}
\ExecuteOptionsBeamer{basePath=fibeamer}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\fibeamer@subdir}
% The |\fibeamer@subdir| macro returns |/| unchanged, coerces
% |.|, |..|, |/|\textit{path}, |./|\textit{path} and
% |../|\textit{path} to |./|, |../|, |/|\textit{path}|/|,
% |./|\textit{path}|/| and |../|\textit{path}|/|, respectively, and
% prefixes any other \textit{path} with |\fibeamer@basePath|. This
% macro is used within the definition of the \texttt{themePath} and
% \texttt{logoPath} options.
%    \begin{macrocode}
\def\fibeamer@subdir#1#2#3#4\empty{%
  \ifx#1\empty%           <empty> -> <basePath>
    \fibeamer@basePath
  \else
    \if#1/%
      \ifx#2\empty%             / -> /
        /%
      \else%              /<path> -> /<path>/
        #1#2#3#4/%
      \fi
    \else
      \if#1.%
        \ifx#2\empty%           . -> ./
          ./%
        \else
          \if#2.%
            \ifx#3\empty%      .. -> ../
              ../%
            \else
              \if#3/%   ../<path> -> ../<path>/
                ../#4/%
              \else
                \fibeamer@basePath#1#2#3#4/%
              \fi
            \fi
          \else
            \if#2/%      ./<path> -> ./<path>/
              ./#3#4/%
            \else
              \fibeamer@basePath#1#2#3#4/%
            \fi
          \fi
        \fi
      \else
        \fibeamer@basePath#1#2#3#4/%
      \fi
    \fi
  \fi}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\fibeamer@themePath}
% \subsection{The \texttt{themePath} option}
% The \marg{\texttt{themePath}=path} pair sets the \textit{path}
% containing the theme files. The \textit{path} is normalized using
% the |\fibeamer@subdir| macro and stored within the
% |\fibeamer@stylePath| macro, whose implicit value is
% |\fibeamer@basePath theme/|. By default, this expands to
% \texttt{fibeamer/theme/}.
%    \begin{macrocode}
\DeclareOptionBeamer{themePath}{%
  \def\fibeamer@themePath{\fibeamer@subdir#1%
    \empty\empty\empty\empty}}
\ExecuteOptionsBeamer{themePath=theme}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\fibeamer@logoPath}
% \subsection{The \texttt{logoPath} option}
% The \marg{\texttt{logoPath}=path} pair sets the \textit{path}
% containing the logo files, which is used by the outer themes to
% load the main logo. The \textit{path} is normalized using the
% |\fibeamer@subdir| macro and stored within the
% |\fibeamer@logoPath| macro, whose implicit value is
% |\fibeamer@basePath| followed by |logo/\fibeamer@university|. By
% default, this expands to \texttt{fibeamer/logo/mu/}.
%    \begin{macrocode}
\DeclareOptionBeamer{logoPath}{%
  \def\fibeamer@logoPath{\fibeamer@subdir#1%
    \empty\empty\empty\empty}}
\ExecuteOptionsBeamer{logoPath=logo/\fibeamer@university}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\fibeamer@logo}
% \subsection{The \texttt{logo} option}
% The \marg{\texttt{logo}=filename} pair sets the prefix of the
% filename of the main logo to \textit{filename}. The
% \textit{filename} is stored within the |\fibeamer@logo| macro,
% whose implicit value is
% \changes{v1.1.0:1}{2015/11/24}{Changed the implicit value of the
%   \cs{fibeamer@logo} macro. [VN]}
% |\fibeamer@logoPath| followed by
% \texttt{fibeamer-}|\fibeamer@university|\texttt{^^A
% \discretionary{-}{-}{-}}|\fibeamer@faculty|\texttt{-}^^A
% |\fibeamer@logoLocale|. By default, this expands to
% \texttt{fibeamer\discretionary{/}{/}{/}logo/fibeamer-mu-fi^^A
% -english}.
%    \begin{macrocode}
\DeclareOptionBeamer{logo}{\def\fibeamer@logo{#1}}
\ExecuteOptionsBeamer{%
  logo=\fibeamer@logoPath fibeamer-\fibeamer@university-%
    \fibeamer@faculty-\fibeamer@logoLocale}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\fibeamer@fallbackLogo}
% \subsection{The \texttt{fallbackLogo} option}
% \changes{v1.1.0:3}{2016/01/11}{Added the \cs{fibeamer@fallbackLogo}
%   macro. [VN]}
% \changes{v1.1.1:1}{2016/01/14}{Added the \texttt{fallbackLogo}
%   option. [VN]}
% The |\fibeamer@fallbackLogo| macro contains the filename of the
% logo file to be used, if |\fibeamer@logo| does not exist. The
% implicit value of the |\fibeamer@fall|\discretionary{-}{}{}^^A
% |backLogo| macro is |\fibeamer@logoPath| followed by
% \texttt{fibeamer-}|\fibeamer@uni|\texttt{\discretionary{-}{}{}}^^A
% |versity\fibeamer@faculty|\texttt{-english}. By default, this
% expands to \texttt{fibeamer/logo\discretionary{/}{/}{/}fi\-bea^^A
% mer-mu-fi-english}.
%    \begin{macrocode}
\DeclareOptionBeamer{fallbackLogo}{\def\fibeamer@fallbackLogo{#1}}
\ExecuteOptionsBeamer{%
  fallbackLogo=\fibeamer@logoPath fibeamer-\fibeamer@university-%
    \fibeamer@faculty-english}
%    \end{macrocode}
% \end{macro}
% \section{Logic}
% \subsection{Macros}
% \begin{macro}{\fibeamer@require}
% The |\fibeamer@require|\marg{package} macro is used to gracefully
% load a \textit{package}. Packages that have already been loaded
% or do not exist are ignored by the macro.
%    \begin{macrocode}
\def\fibeamer@require#1{\IfFileExists{#1.sty}{%
  \@ifpackageloaded{#1}{}{\RequirePackage{#1}}}{}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\fibeamer@requireTheme}
% The |\fibeamer@requireTheme|\marg{class} macro is used to load a
% \textit{class} of beamer themes. The following packages are
% loaded, provided they exist:
% \begin{itemize}
%  \item\texttt{beamer}\textit{class}\texttt{themefibeamer} from
%    the |\fibeamer@themePath| directory -- The base theme file. By
%    default, this expands to \texttt{fibeamer/theme/beamer}^^A
%    \textit{class}\texttt{themefibeamer}.
%  \item\texttt{beamer}\textit{class}\texttt{themefibeamer-}^^A
%    |\fibeamer@university| from the |\fibeamer@themePath|^^A
%    \discretionary{}{}{}|\fibeamer@university/| directory -- The
%    university theme file. By default, this expands to
%    \texttt{fibeamer/theme/mu/beamer}\textit{class}^^A
%    \texttt{themefibeamer-mu}.
%  \item\texttt{beamer}\textit{class}\texttt{themefibeamer-}^^A
%    |\fibeamer@university|\texttt{-}|\fibeamer@faculty| from the
%    |\fibeamer@themePath\fibeamer@university/| directory -- The
%    faculty theme file. By default, this expands to \texttt{^^A
%    fibeamer/theme/mu/beamer}\textit{class}\texttt{themefibeam^^A
%    er-mu-fi}.
% \end{itemize}
%    \begin{macrocode}
\def\fibeamer@requireTheme#1{%
  \fibeamer@require{\fibeamer@themePath beamer#1themefibeamer}
  \fibeamer@require{\fibeamer@themePath\fibeamer@university%
    /beamer#1themefibeamer-\fibeamer@university}
  \fibeamer@require{\fibeamer@themePath\fibeamer@university%
    /beamer#1themefibeamer-\fibeamer@university-\fibeamer@faculty}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\fibeamer@includeLogo}
% \changes{v1.1.0:5}{2016/01/11}{Added the
%   \cs{fibeamer@includeLogo} macro. [VN]}
% The |\fibeamer@includeLogo|\oarg{options} macro includes the
% main logo into the document. If specified, the \textit{options}
% are passed to the |\includegraphics| macro.  The
% |\fibeamer@includeLogo| macro requires the \textsf{etoolbox}
% package to function.
%    \begin{macrocode}
\fibeamer@require{etoolbox}
\newcommand\fibeamer@includeLogo[1][]{{
  % See <http://tex.stackexchange.com/a/39987/70941>.
  \patchcmd{\Gin@ii}% Make `\includegraphics` use `@fallbackLogo`.
    {\begingroup}% <search>
    {\begingroup\renewcommand{\@latex@error}[2]{%
       \includegraphics[#1]\fibeamer@fallbackLogo}}% <replace>
    {}% <success>
    {}% <failure>
  \includegraphics[#1]\fibeamer@logo}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\fibeamer@patch}
% \changes{v1.1.2}{2016/02/19}{Added \cs{fibeamer@patch}.}
% The |\fibeamer@patch|\oarg{versions}\oarg{patch} macro expands
% \textit{patch}, if |\fibeamer|\texttt{\discretionary{@}{@}{@}}^^A
% |version@number| (defined at the top of the file
% \texttt{beamerthemefibeamer.sty}) matches any of the
% comma-delimited \textit{versions}. This macro enables the simple
% deployment of version-targeted patches.
%    \begin{macrocode}
\def\fibeamer@patch#1#2{%
  \def\fibeamer@patch@versions{#1}%
  \def\fibeamer@patch@action{#2}%
  \def\fibeamer@patch@next##1,{%
    \def\fibeamer@patch@arg{##1}%
    \def\fibeamer@patch@relax{\relax}%
    \ifx\fibeamer@patch@arg\fibeamer@version@number
      \def\fibeamer@patch@next####1\relax,{}%
      \expandafter\fibeamer@patch@action
      \expandafter\fibeamer@patch@next
    \else\ifx\fibeamer@patch@arg\fibeamer@patch@relax\else
      \expandafter\expandafter\expandafter\fibeamer@patch@next
    \fi\fi}%
  \expandafter\expandafter\expandafter\fibeamer@patch@next
  \expandafter\fibeamer@patch@versions\expandafter,\relax,}
%    \end{macrocode}
% \end{macro}
% \subsection{Main routine}
% First, the theme processes the options.
%    \begin{macrocode}
\ProcessOptionsBeamer
%    \end{macrocode}
% When the |microtype| option is specified, the \textsf{microtype}
% package gets loaded.
%    \begin{macrocode}
  % Set up the microtypographic extensions
  \iffibeamer@microtype
    \RequirePackage{microtype}
  \fi
%    \end{macrocode}
% When the |fonts| option is specified, the following packages will
% be used by the package to configure the fonts in the presentation
% mode:
% \begin{itemize}
%   \item\textsf{ifthen} -- This package is used to construct
%     compound conditionals.
%   \item\textsf{ifxetex}, \textsf{ifluatex} -- These packages are
%     used to detect the used \TeX\ engine.
%   \item\textsf{lmodern} -- The Latin Modern font family is used as a
%     fallback for missing glyphs.
%   \item\textsf{carlito} -- The Carlito font family is used as the
%     primary text and math font face.
%   \item\textsf{arevmath} -- The Arev Sans math font family is used for
%     various symbols and greek alphabet.
%   \item\textsf{iwona} -- The Iwona font family is used for large
%     math symbols.
%   \item\textsf{dejavu} -- The DejaVu Sans Mono font family is
%     used for the typesetting of monospaced text.
%   \item\textsf{setspace} -- This package is used to adjust the
%     leading to 115 \%. Loading this package breaks any top-level
%     footnotes without the \texttt{[frame]} optional parameter
%     specified. This is a known bug.\footnote{See
%       \url{http://tex.stackexchange.com/a/118005/70941}.}
%   \item\textsf{fontenc} -- This package is used to set the font
%     encoding to Cork. This package is only used outside the
%     \Hologo{XeTeX} and \Hologo{LuaTeX} engines.
%   \item\textsf{fontspec} -- This package is used to load fonts.
%     This package is only used with the \Hologo{XeTeX} and
%     \Hologo{LuaTeX} engines.
% \end{itemize}
%    \begin{macrocode}
\mode<presentation>
  % Set up the fonts
  \iffibeamer@fonts
    \RequirePackage{ifthen}
    \RequirePackage{ifxetex}
    \RequirePackage{ifluatex}
    \RequirePackage{lmodern}
    \RequirePackage[sfdefault,lf]{carlito}
    \renewcommand*\oldstylenums[1]{{\carlitoOsF #1}}

    %% Load arev with scaling factor of .85
    %% See <http://tex.stackexchange.com/a/181240/70941>
    \DeclareFontFamily{OML}{zavm}{\skewchar\font=127 }
    \DeclareFontShape{OML}{zavm}{m}{it}{<-> s*[.85] zavmri7m}{}
    \DeclareFontShape{OML}{zavm}{b}{it}{<-> s*[.85] zavmbi7m}{}
    \DeclareFontShape{OML}{zavm}{m}{sl}{<->ssub * zavm/m/it}{}
    \DeclareFontShape{OML}{zavm}{bx}{it}{<->ssub * zavm/b/it}{}
    \DeclareFontShape{OML}{zavm}{b}{sl}{<->ssub * zavm/b/it}{}
    \DeclareFontShape{OML}{zavm}{bx}{sl}{<->ssub * zavm/b/sl}{}

    \AtBeginDocument{
      \SetSymbolFont{operators}   {normal}{OT1}{zavm}{m}{n}
      \SetSymbolFont{letters}     {normal}{OML}{zavm}{m}{it}
      \SetSymbolFont{symbols}     {normal}{OMS}{zavm}{m}{n}
      \SetSymbolFont{largesymbols}{normal}{OMX}{iwona}{m}{n}}
    \RequirePackage[sans]{dsfont}

    \ifthenelse{\boolean{xetex}\OR\boolean{luatex}}{
      \RequirePackage{fontspec}
%    \end{macrocode}
% \changes{v1.1.7}{2017/04/28}{Removed undesirable TeX ligatures from the mono
%   font. [VN]}
%    \begin{macrocode}
      \setmonofont[Scale=0.85]{DejaVu Sans Mono}
    }{
      \RequirePackage[scaled=0.85]{DejaVuSansMono}
      \RequirePackage[resetfonts]{cmap}
      \RequirePackage[T1]{fontenc}
    }
    \RequirePackage{setspace}
    \setstretch{1.15}
  \fi
\mode
  <all>
%    \end{macrocode}
% Finally, the color, font, inner and outer themes of the
% respective university and faculty will be loaded.
%    \begin{macrocode}
\fibeamer@requireTheme{color}
\fibeamer@requireTheme{font}
\fibeamer@requireTheme{inner}
\fibeamer@requireTheme{outer}
%    \end{macrocode}
%
% \section{Themes}
% This section contains the combined documentation of all available
% themes.  When creating a new theme file, it is advisable to
% create one self-contained \texttt{dtx} file, which is then
% partitioned into locale files via the \textsf{docstrip} tool
% based on the respective \texttt{ins} file. A
% \DescribeMacro{\file} macro |\file|\marg{filename} is available
% for the sectioning of the documentation of various files within
% the \texttt{dtx} file. For more information about \texttt{dtx}
% files and the \textsf{docstrip} tool, consult the \textsf{dtxtut,
% docstrip, doc} and \textsf{ltxdoc} manuals.
%
% \def\file#1{\subsubsection{The \texttt{#1} file}}
%
% \subsection{Base files}
% \input{theme/mu/base.dtx}
% \subsection{The Faculty of Informatics}
% \input{theme/mu/fi.dtx}
% \subsection{The Faculty of Science}
% \input{theme/mu/sci.dtx}
% \subsection{The Faculty of Arts}
% \input{theme/mu/phil.dtx}
% \subsection{The Faculty of Education}
% \input{theme/mu/ped.dtx}
% \subsection{The Faculty of Social Studies}
% \input{theme/mu/fss.dtx}
% \subsection{The Faculty of Law}
% \input{theme/mu/law.dtx}
% \subsection{The Faculty of Economics and Administration}
% \input{theme/mu/econ.dtx}
% \subsection{The Faculty of Medicine}
% \input{theme/mu/med.dtx}
% \subsection{The Faculty of Sports Studies}
% \input{theme/mu/fsps.dtx}
% \iffalse
%</class>
% \fi