fhtw.sty 13.2 KB
Newer Older
Alija Sabic's avatar
Alija Sabic committed
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
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% FHTW beamer
% 
% Alija Sabic, 21.11.2018
%
% based on Matthias Wenzl's template at https://es.technikum-wien.at/embedded-systems-intern/ci/tree/master/slides-latexbeamer
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% This style file is a combination of the four files required to create the complete theme

%   1. Inner
%   2. Outer
%   3. Color
%   4. Font

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Packages
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\mode<presentation>
\RequirePackage{xcolor}
\RequirePackage[utf8]{inputenc}
\RequirePackage[T1]{fontenc}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Tikz
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\RequirePackage{tikz}
\usetikzlibrary{shapes.geometric}
\usetikzlibrary{fadings}
\usetikzlibrary{external}
\usetikzlibrary{calc}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Colors
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% define fhtw ci colors
\definecolor{tw-blue}{RGB}{0, 101, 156}
\definecolor{tw-green}{RGB}{140, 177, 16}
\definecolor{tw-gray}{RGB}{113, 120, 125}

% non-ci, but useful
\definecolor{tw-black}{RGB}{0,0,0}
\definecolor{ttw-blue}{RGB}{28,98,182}
\definecolor{ttw-violett}{RGB}{197,10,140}
\definecolor{ttw-green}{RGB}{128,204,39}
\definecolor{ttw-red}{RGB}{238,49,32}
\definecolor{ttw-gray}{RGB}{100,104,108}
\definecolor{ttw-lightblue}{RGB}{0,173,239}
\definecolor{ttw-lightorange}{RGB}{251,198,7}
\definecolor{ttw-lightgreen}{RGB}{192,223,19}
\definecolor{ttw-yellow}{RGB}{255,242,0}
\definecolor{ttw-darkcyan}{RGB}{0,168,144}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% Customization
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\def\sidebarwidth{2cm}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% Color theme
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% This sets the colour of the title of the presentation and titles of all the slides in the presentation.
\setbeamercolor{frametitle}{fg=\primarycolor}
\setbeamercolor{Title}{fg=\primarycolor}

% In case you choose to display the Table of Contents, or the Outline slide.
\setbeamercolor{section in toc}{fg = \primarycolor}
\setbeamercolor{section in toc shaded}{fg = \primarycolor}
\setbeamercolor{subsection in toc}{fg = tw-green}
\setbeamercolor{subsection in toc shaded}{fg = tw-green}

% The colour of all the items, subitems and and subsubitems are set to black.
\setbeamercolor{item}{fg = \primarycolor}
\setbeamercolor{subitem}{fg = \primarycolor}
\setbeamercolor{subsubitem}{fg = \primarycolor}

% This sets the color for each item heading of the description environment.
\setbeamercolor{description item}{fg = \primarycolor}

% We also need to fix the colours for captions for figures and tables.
\setbeamercolor{caption}{fg = tw-green}
\setbeamercolor{caption name}{fg = \primarycolor}

%Standard block
\setbeamercolor{block title}{fg = tw-blue, bg = tw-blue!15!white}
\setbeamercolor{block body}{bg = tw-blue!5!white}

% Alert block
\setbeamercolor{block title alerted}{fg = tw-orange, bg = tw-orange!50!white}
\setbeamercolor{block body alerted}{bg = tw-orange!5!white}

% Example block
\setbeamercolor{block title example}{fg = tw-green, bg = tw-green!15!white}
\setbeamercolor{block body example}{bg = tw-green!5!white}

% Color of basic text
\setbeamercolor{normal text}{fg=tw-black}

% Sidebar
\usecolortheme{sidebartab}
\setbeamercolor{sidebar right}{fg=white, bg=\secondarycolor!30}
\setbeamercolor{section in sidebar}{fg=white, bg=\primarycolor}
\setbeamercolor{subsection in sidebar}{fg=white, bg=\primarycolor}
\setbeamercolor{title in sidebar}{fg=\primarycolor}
\setbeamercolor{subtitle in sidebar}{fg=\primarycolor}
\setbeamercolor{author in sidebar}{fg=\primarycolor}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% Font theme
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% use the default fonts
\usefonttheme{professionalfonts}

% Font for the presentation title
\setbeamerfont{title}{size = \huge}

% Font of the frame titles
\setbeamerfont{frametitle}{size = \Large}

\setbeamercolor{block body}{bg=\primarycolor!10}
\setbeamercolor{block title}{bg=\primarycolor!20,fg=\primarycolor}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% Inner theme
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\useinnertheme{rounded}

\setbeamercovered{transparent = 0}

% Navigation Symbols
\setbeamertemplate{navigation symbols}{}

% \defbeamertemplate{itemize subitem}{minus}{\textbf{-}}
% \defbeamertemplate{itemize subsubitem}{bullet}{$\bullet$}

% Instead of rounded circles, we will use triangles as the indicator for items.
\setbeamertemplate{itemize item}[square]
\setbeamertemplate{itemize subitem}[minus]
\setbeamertemplate{itemize subsubitem}[bullet]

% The default option for enumerate environment removes the circles around the numbers provided by the "rounded" inner theme. Just simple numbers remain.
\setbeamertemplate{enumerate items}[square]

% in case you want to have an 1.2.3 numbering style use the template below
\setbeamertemplate{enumerate subitem}{\insertenumlabel.\insertsubenumlabel}
\setbeamertemplate{enumerate subitem}{\insertenumlabel.\insertsubenumlabel}
\setbeamertemplate{enumerate subsubitem}{\insertenumlabel.\insertsubenumlabel.\insertsubsubenumlabel}

\setbeamertemplate{sections/subsections in toc}[square]

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% Outer theme
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\useoutertheme[right,width=\sidebarwidth,height=0em,itemsep=2em]{sidebar}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Title Page
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setbeamertemplate{title page}{

    \begin{tikzpicture}[
        remember picture,
        overlay,
        base text style/.style  = { draw=none, anchor=north west },
        title text style/.style = { base text style, font=\fontsize{14}{24}\sffamily\bfseries\selectfont, text width=\textwidth },
        norm text style/.style  = { base text style, font=\fontsize{10}{10}\sffamily\selectfont, align=left }
    ]
        \coordinate (start) at ($(current page.south west)+(0.1,0.1)$);
        \coordinate (end)   at ($(current page.north east)+(-0.1,-0.1)$);
        \def\identation{0.4}
        
        % Content
        \node[title text style, shift={(\identation,8)}]    at (current page.south west) {\title};
        \node[norm text style,  shift={(\identation,4.5)}]    at (current page.south west) {\author};
        \node[norm text style,  shift={(\identation,4)}]  at (current page.south west) {\studentid};
        \node[norm text style,  shift={(\identation,3.25)}] at (current page.south west) {\supervisortitle};
        \node[norm text style,  shift={(\identation+1.5,3.25)}] at (current page.south west) {\supervisor};
        \node[norm text style,  shift={(\identation+1.5,2.75)}] at (current page.south west) {\secondsupervisor};
        \node[norm text style,  shift={(10,\identation)}, anchor=south east] at (current page.south west) {\place, \currentdate};

        % Colored rectangles
        \def\fw{9.4/42}
        \foreach \color [count=\ci] in {ttw-blue,ttw-violett,ttw-green,ttw-red,ttw-gray,ttw-lightblue,ttw-lightorange,ttw-red,ttw-gray,ttw-lightblue,
                                        ttw-green,ttw-lightorange,ttw-red,ttw-gray,ttw-green,ttw-gray,ttw-yellow,ttw-lightorange,ttw-darkcyan,ttw-blue,
                                        ttw-darkcyan,ttw-red,ttw-green,ttw-lightblue,ttw-gray,ttw-lightblue,ttw-green,ttw-gray,ttw-red,ttw-lightorange,
                                        ttw-gray,ttw-green,ttw-gray,ttw-lightorange,ttw-darkcyan,ttw-violett,ttw-gray,ttw-blue,ttw-green,ttw-gray,
                                        ttw-red,ttw-gray} {
            \draw[draw=none,fill=\color] ($(end)+(0,-(\ci*\fw)$) rectangle ++(-2,\fw);
        }

        % Logo
        \node[anchor=south west] at ($(current page.south west)+(\identation,\identation)$) {\includegraphics[scale=0.3]{resources/images/fhtw-logo.pdf}};

        % Frame
        \draw[draw=black,line width=0.2mm,anchor=north west] (start) rectangle (end);

    \end{tikzpicture}
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Sidebar
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \setbeamertemplate{sidebar \beamer@sidebarside}{
\makeatletter
\defbeamertemplate*{sidebar \beamer@sidebarside}{fhtw}{

    % Variant 1,2
    % \vskip 0.25cm \hskip 0.30cm
    % \includegraphics[height=20pt]{resources/images/fhtw-logo.pdf}

    % Variant 3
    \vskip 0.7cm \hskip 0.50cm
    \includegraphics[height=15pt]{resources/images/fhtw-logo.pdf}

    \vskip 0.25cm
    {
        \usebeamercolor[fg]{title in sidebar}
        \insertshorttitle[width=\sidebarwidth,center,respectlinebreaks]
    }

    \vskip 0.10cm
    {
        \usebeamercolor[fg]{author in sidebar}
        \insertshortauthor[width=\sidebarwidth,center,respectlinebreaks]
    }

    \vskip 1.00cm
    \insertverticalnavigation{\sidebarwidth}

    \vfill

    \hbox to \sidebarwidth{
        \hfill
        {\small \textcolor{\secondarycolor}{\insertframenumber/\inserttotalframenumber}}
        \hskip 0.10mm
    }

    \vskip 0.10mm

    \begin{tikzpicture}[overlay]
        \def\ratio{\insertframenumber/\inserttotalframenumber}
        
        % Variant 1
        % \draw[draw=\primarycolor!33,line width=1.8mm] (-0.10,9.6) -- ++(0,-9.6);
        % \draw[draw=\primarycolor,line width=1.8mm,line cap=round] (-0.10,9.6) -- ++(0,-9.6*\ratio);
        % \draw[draw=\primarycolor,line width=0.15mm] (0,0) -- (0,10);

        % Variant 2
        \draw[draw=\primarycolor,line width=0.4mm] (-0.04,9.6) -- ++(0,-9.6);
        \draw[draw=\primarycolor,line width=0.15mm] (0,0) -- (0,10);

        % Variant 3
        \draw[draw=\primarycolor!25,line width=0.8mm] (1.7,8.6375) arc (0:360:0.7);
        \draw[draw=\primarycolor,line width=0.8mm] (1.7,8.6375) arc (0:(360*\ratio):0.7);

    \end{tikzpicture}

}
\makeatother
\setbeamertemplate{sidebar right,width=\sidebarwidth}{fhtw}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Frametitle
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Now that we have changed the headline, we will need to orient the frame titles in a way that they come at the 
% right stop just above the horizontal line.

\setbeamertemplate{frametitle}{\insertframetitle}
\setbeamertemplate{frametitle}{
    \ifx\insertframesubtitle\empty
        \vskip 2mm \hskip -2mm
        \color{tw-blue}{\insertframetitle}
    \else
        \vskip 2mm \hskip -2mm
        \color{tw-blue}{\insertframetitle} - \color{tw-green}{\insertframesubtitle}
    \fi
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Captions
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\setbeamertemplate{caption}[numbered]

\mode
<all>