fhtw.sty 13 KB
Newer Older
Alija Sabic's avatar
Alija Sabic committed
1
2
3
4
5
6
7
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 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
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8
9
\NeedsTeXFormat{LaTeX2e}[1994/06/01]
\ProvidesPackage{fhtw}[2018/11/23 FHTW Beamer Template]
Alija Sabic's avatar
Alija Sabic committed
10
11
12
13
14
15
16
17
18
19
20
21

% 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>
Alija Sabic's avatar
Alija Sabic committed
22
\RequirePackage{custom}
23
\RequirePackage{twcolors}
Alija Sabic's avatar
Alija Sabic committed
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
\RequirePackage[utf8]{inputenc}
\RequirePackage[T1]{fontenc}

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

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% 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}
50
% \setbeamercolor{Title}{fg=\primarycolor}
Alija Sabic's avatar
Alija Sabic committed
51
52
53
54

% 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}
55
56
\setbeamercolor{subsection in toc}{fg = \secondarycolor}
\setbeamercolor{subsection in toc shaded}{fg = \secondarycolor}
Alija Sabic's avatar
Alija Sabic committed
57
58
59
60
61
62
63
64
65
66

% 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.
67
\setbeamercolor{caption}{fg = \secondarycolor}
Alija Sabic's avatar
Alija Sabic committed
68
69
70
\setbeamercolor{caption name}{fg = \primarycolor}

%Standard block
71
72
\setbeamercolor{block title}{fg = \primarycolor, bg = \primarycolor!15!white}
\setbeamercolor{block body}{bg = \primarycolor!5!white}
Alija Sabic's avatar
Alija Sabic committed
73
74

% Alert block
75
76
\setbeamercolor{block title alerted}{fg = ttw-red, bg = ttw-red!15!white}
\setbeamercolor{block body alerted}{bg = ttw-red!5!white}
Alija Sabic's avatar
Alija Sabic committed
77
78

% Example block
79
80
\setbeamercolor{block title example}{fg = \secondarycolor, bg = \secondarycolor!15!white}
\setbeamercolor{block body example}{bg = \secondarycolor!5!white}
Alija Sabic's avatar
Alija Sabic committed
81
82
83
84
85
86
87
88
89
90
91

% 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}
92
93
94
95
\setbeamercolor{author in sidebar}{fg=black!15!\secondarycolor}

\setbeamercolor{palette sidebar secondary}{fg=\primarycolor}
\setbeamercolor{palette sidebar tertiary}{fg=\primarycolor}
Alija Sabic's avatar
Alija Sabic committed
96

97
98
99
100
\setbeamercolor{note page}{bg=\accentcolor!10}
\setbeamercolor{note title}{bg=\accentcolor!30}
\setbeamercolor{note date}{fg=\secondarycolor}

Alija Sabic's avatar
Alija Sabic committed
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% 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}

116
117
\setbeamerfont{author in sidebar}{size=\fontsize{6}{8}\selectfont}
\setbeamerfont{title in sidebar}{size=\fontsize{6}{8}\selectfont}
118
119
120
\setbeamerfont{section in sidebar}{size=\fontsize{6}{8}\selectfont}
\setbeamerfont{subsection in sidebar}{size=\fontsize{6}{8}\selectfont}
\setbeamerfont{subsubsection in sidebar}{size=\fontsize{6}{8}\selectfont}
Alija Sabic's avatar
Alija Sabic committed
121
122
123
124
125
126
127
128
129
130
131
132
133
134

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

\useinnertheme{rounded}

\setbeamercovered{transparent = 0}

% Navigation Symbols
\setbeamertemplate{navigation symbols}{}

135
136
\defbeamertemplate{itemize subitem}{minus}{\textbf{-}}
\defbeamertemplate{itemize subsubitem}{bullet}{$\bullet$}
Alija Sabic's avatar
Alija Sabic committed
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

% 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
177
178
        \node[title text style, shift={(\identation,8)}]    at (start) {\title};
        \coordinate (textstart) at ($(current page.south west)+(0.1,-0.1)$);
179
        \node[norm text style,  shift={(\identation,4.75)}]    at (textstart) {\authortext};
180
181
182
183
184
        \node[norm text style,  shift={(\identation,4.25)}]  at (textstart) {\studentid};
        \node[norm text style,  shift={(\identation,3.5)}] at (textstart) {\supervisortitle};
        \node[norm text style,  shift={(\identation+1.5,3.5)}] at (textstart) {\supervisor};
        \node[norm text style,  shift={(\identation+1.5,3)}] at (textstart) {\secondsupervisor};
        \node[norm text style,  shift={(10,3)}, anchor=south east] at (textstart) {\place, \currentdate};
Alija Sabic's avatar
Alija Sabic committed
185
186
187
188
189
190
191
192
193
194
195
196

        % 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
197
198
199
200
        \def\logowidth{2.5cm}
        \node[anchor=center] at ($(current page.south west)+(3*\logowidth/4,3*\identation)$) {\includegraphics[width=\logowidth]{resources/images/fhtw-logo.pdf}};
        \node[anchor=center] at ($(current page.south west)+(22*\identation+4*\logowidth/2,3*\identation)$) {\includegraphics[width=\logowidth]{resources/images/placeholder.pdf}};
        \node[anchor=center] at ($(current page.south west)+(180*\identation+5*\logowidth/2,3*\identation)$) {\includegraphics[width=\logowidth]{resources/images/placeholder.pdf}};
Alija Sabic's avatar
Alija Sabic committed
201
202
203
204
205
206
207
208
209
210

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

    \end{tikzpicture}
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Sidebar
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Alija Sabic's avatar
Alija Sabic committed
211

Alija Sabic's avatar
Alija Sabic committed
212
213
214
215
% \setbeamertemplate{sidebar \beamer@sidebarside}{
\makeatletter
\defbeamertemplate*{sidebar \beamer@sidebarside}{fhtw}{

Alija Sabic's avatar
Alija Sabic committed
216
    % Progressbar
217
    \slicedcircularprogressbar{(1,-0.965)}{0.8cm}{0.7cm}{1}{\inserttotalframenumber}{\insertframenumber}{\primarycolor!30}{\primarycolor}{\secondarycolor!30}
Alija Sabic's avatar
Alija Sabic committed
218

Alija Sabic's avatar
Alija Sabic committed
219
220
221
    \vskip 0.7cm \hskip 0.50cm
    \includegraphics[height=15pt]{resources/images/fhtw-logo.pdf}

222
    %FIXME: Place via tikz environment
223
    \vskip 0.75cm
Alija Sabic's avatar
Alija Sabic committed
224
    {
225
226
        \usebeamercolor[fg]{author in sidebar}
        \insertshortauthor[width=\sidebarwidth,center,respectlinebreaks]
Alija Sabic's avatar
Alija Sabic committed
227
228
    }

229
    \vskip 0.25cm
Alija Sabic's avatar
Alija Sabic committed
230
    {
231
232
        \usebeamercolor[fg]{title in sidebar}
        \shorttitle
Alija Sabic's avatar
Alija Sabic committed
233
234
    }

235
    \vskip 0.50cm
236
    {
237
238
        \insertverticalnavigation{\sidebarwidth}
    }
Alija Sabic's avatar
Alija Sabic committed
239
240
241

    \vfill

Alija Sabic's avatar
Alija Sabic committed
242
    % Slide number
Alija Sabic's avatar
Alija Sabic committed
243
244
245
246
247
248
249
250
    \hbox to \sidebarwidth{
        \hfill
        {\small \textcolor{\secondarycolor}{\insertframenumber/\inserttotalframenumber}}
        \hskip 0.10mm
    }

    \vskip 0.10mm

Alija Sabic's avatar
Alija Sabic committed
251
252
    % Line separating sidebar and main content
    \begin{tikzpicture}[overlay]
Alija Sabic's avatar
Alija Sabic committed
253
254
255
256
257
258
259
260
        \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);
    \end{tikzpicture}

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

261
262
263
264
265
%% Sidebar (shaded)
% \makeatletter
% \setbeamertemplate{sidebar canvas \beamer@sidebarside}[vertical shading][top=tw-green!30,bottom=tw-green!30!tw-blue!10]
% \makeatother

Alija Sabic's avatar
Alija Sabic committed
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
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% 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>