summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/fibeamer/beamerthemefibeamer.sty
blob: 5ccfdb52d34450d563f4b62242bdd72c4be4d28a (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
%%
%% This is file `beamerthemefibeamer.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% fibeamer.dtx  (with options: `class')
%% 
%% Copyright 2015  Vít Novotný <witiko@mail.muni.cz>
%% Faculty of Informatics, Masaryk University (Brno, Czech Republic)
%% 
%% This work is based on the (Unofficial) University of Manchester
%% Beamer Theme by Andrew Mundy <andrew.mundy@cs.man.ac.uk>.
%% 
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version
%% 1.3 of this license or (at your option) any later version.
%% The latest version of this license is available at
%% 
%%   http://www.latex-project.org/lppl.txt
%% 
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
%% 
%% This work has the LPPL maintenance status `maintained'.
%% 
%% The Current Maintainer of this work is Vít Novotný (VN).
%% Send bug reports, requests for additions and questions
%% either to the fithesis discussion forum at
%% 
%%   http://is.muni.cz/auth/df/fithesis-sazba/
%% 
%% or to the e-mail address <witiko@mail.muni.cz>.
%% 
%% 
%% MODIFICATION ADVICE:
%% 
%% If you want to customize this file, it is best to make a copy of
%% the source file(s) from which it was produced.  Use a different
%% name for your copy(ies) and modify the copy(ies); this will ensure
%% that your modifications do not get overwritten when you install a
%% new release of the standard system.  You should also ensure that
%% your modified source file does not generate any modified file with
%% the same name as a standard file.
%% 
%% You will also need to produce your own, suitably named, .ins file to
%% control the generation of files from your source file; this file
%% should contain your own preambles for the files it generates, not
%% those in the standard .ins files.
%% 
%% The names of the source files used are shown above.
%% 
\NeedsTeXFormat{LaTeX2e}
{\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.4}{2016/05/07}}
\hypersetup{pdfcreator=\fibeamer@version}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ProvidesPackage{fibeamer/beamerthemefibeamer}[\fibeamer@version]
\newif\iffibeamer@fonts
\DeclareOptionBeamer{fonts}{\fibeamer@fontstrue}
\ExecuteOptionsBeamer{fonts}
\DeclareOptionBeamer{nofonts}{\fibeamer@fontsfalse}
\newif\iffibeamer@microtype
\DeclareOptionBeamer{microtype}{\fibeamer@microtypetrue}
\ExecuteOptionsBeamer{microtype}
\DeclareOptionBeamer{nomicrotype}{\fibeamer@microtypefalse}
\DeclareOptionBeamer{university}{\def\fibeamer@university{#1}}
\ExecuteOptionsBeamer{university=mu}
\DeclareOptionBeamer{faculty}{\def\fibeamer@faculty{#1}}
\ExecuteOptionsBeamer{faculty=fi}
\def\fibeamer@locale{%
  % Babel / polyglossia detection
  \ifx\languagename\undefined%
  english\else\languagename\fi}
\DeclareOptionBeamer{locale}{%
  \def\fibeamer@locale{#1}}
\def\fibeamer@logoLocale{\fibeamer@locale}
\DeclareOptionBeamer{logoLocale}{%
  \def\fibeamer@logoLocale{#1}}
\DeclareOptionBeamer{basePath}{%
  \ifx\fibeamer@empty#1\fibeamer@empty%
    \def\fibeamer@basePath{}%
  \else%
    \def\fibeamer@basePath{#1/}%
  \fi}
\ExecuteOptionsBeamer{basePath=fibeamer}
\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}
\DeclareOptionBeamer{themePath}{%
  \def\fibeamer@themePath{\fibeamer@subdir#1%
    \empty\empty\empty\empty}}
\ExecuteOptionsBeamer{themePath=theme}
\DeclareOptionBeamer{logoPath}{%
  \def\fibeamer@logoPath{\fibeamer@subdir#1%
    \empty\empty\empty\empty}}
\ExecuteOptionsBeamer{logoPath=logo/\fibeamer@university}
\DeclareOptionBeamer{logo}{\def\fibeamer@logo{#1}}
\ExecuteOptionsBeamer{%
  logo=\fibeamer@logoPath fibeamer-\fibeamer@university-%
    \fibeamer@faculty-\fibeamer@logoLocale}
\DeclareOptionBeamer{fallbackLogo}{\def\fibeamer@fallbackLogo{#1}}
\def\fibeamer@fallbackLogo{%
  \fibeamer@logoPath fibeamer-\fibeamer@university-%
    \fibeamer@faculty-english}
\def\fibeamer@require#1{\IfFileExists{#1.sty}{%
  \@ifpackageloaded{#1}{}{\RequirePackage{#1}}}{}}
\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}}
\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}}
\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,}
\ProcessOptionsBeamer
  % Set up the microtypographic extensions
  \iffibeamer@microtype
    \RequirePackage{microtype}
  \fi
\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}
      \setmonofont[Scale=0.85,Ligatures=TeX]{DejaVu Sans Mono}
    }{
      \usepackage[scaled=0.85]{DejaVuSansMono}
      \RequirePackage[resetfonts]{cmap}
      \RequirePackage[T1]{fontenc}
    }
    \RequirePackage{setspace}
    \setstretch{1.15}
  \fi
\mode
  <all>
\fibeamer@requireTheme{color}
\fibeamer@requireTheme{font}
\fibeamer@requireTheme{inner}
\fibeamer@requireTheme{outer}
\endinput
%%
%% End of file `beamerthemefibeamer.sty'.