-
Notifications
You must be signed in to change notification settings - Fork 0
/
beamerthemetib.sty
235 lines (189 loc) · 7.27 KB
/
beamerthemetib.sty
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
\RequirePackage{tikz, xcolor, textpos, calc}
\usetikzlibrary{shapes.geometric,matrix}
% Colour settings
\definecolor{TIB_red}{RGB}{194, 18, 34}
\definecolor{TIB_gray}{RGB}{85, 85, 85}
\setbeamercolor*{alerted text}{fg=TIB_red}
\setbeamercolor*{caption}{fg=TIB_gray}
\setbeamercolor*{caption name}{fg=TIB_gray}
\setbeamercolor*{description item}{fg=TIB_gray}
\setbeamercolor*{footline}{fg=TIB_gray}
\setbeamercolor*{frametitle}{fg=TIB_red}
\setbeamercolor*{item}{fg=TIB_gray}
\setbeamercolor*{normal text}{fg=TIB_gray}
\setbeamercolor*{section in toc}{fg=TIB_gray} % Why don't you work? Link colour must be adapted
\setbeamercolor*{subsection in toc}{fg=TIB_gray} % Why don't you work? Link colour must be adapted
\setbeamercolor*{separation line}{fg=TIB_gray}
\setbeamercolor*{structure}{fg=TIB_gray} % might be redundant to item list et al.
\setbeamercolor*{subitem}{fg=TIB_gray}
\setbeamercolor*{subsubitem}{fg=TIB_gray}
\setbeamercolor*{title}{fg=TIB_red}
% Font settings
\setbeamerfont*{author}{size=\normalsize, series=\bfseries}
\setbeamerfont*{frametitle}{size=\large, series=\bfseries}
\setbeamerfont*{subtitle}{size=\Large, series=\bfseries}
\setbeamerfont*{title}{size=\large, series=\bfseries}
\setbeamerfont*{author}{size=\scriptsize}
\setbeamerfont*{institute}{size=\tiny}
\setbeamerfont*{date}{size=\tiny}
% boxes
\setbeamerfont{block title}{size=\normalsize}
\setbeamerfont{block body}{size=\normalsize}
%\setbeamertemplate{blocks}[rounded][shadow=true]
\setbeamercolor{block body}{bg=TIB_gray!10!white}
\setbeamercolor{block title}{bg=TIB_gray, fg=white}
% Inner theme
\setbeamertemplate{itemize items}[square]
\setbeamertemplate{section in toc}[sections numbered]
\setbeamertemplate{headline}{}
\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{subsection in toc}[square]
% Outer theme
\newlength{\TIBTitleBorder}
\setlength{\TIBTitleBorder}{0.5cm}
\newlength{\TIBLogoBorder}
\setlength{\TIBLogoBorder}{0.3cm}
\newlength{\TIBInnerSpace}
\setlength{\TIBInnerSpace}{0.88\paperwidth-\TIBTitleBorder-\TIBTitleBorder}
\newcommand{\TIBShowBackground}{
\begin{tikzpicture}[remember picture,overlay]
\node[at=(current page.south east),anchor=south east,inner sep=0pt] {
\includegraphics[height=\paperheight,width=\paperwidth]{tib/background}};
\end{tikzpicture}
}
\newcommand{\TIBShowOverlay}{
\begin{tikzpicture}[ampersand replacement=\&,remember picture,overlay]
\node[at=(current page.north west),anchor=north west, xshift=.06\paperwidth, yshift=-1.0cm, inner sep=0pt] (overlay) {
\includegraphics[height=0.78\paperheight,width=.88\paperwidth]{tib/overlay}
};
\node[at=(overlay.north east),anchor=north east, xshift=-\TIBTitleBorder, yshift=-\TIBTitleBorder] (logo) {
\includegraphics[height=0.15\paperheight]{tib/logo.pdf}
};
% \node[at=(overlay.south west),anchor=south west, xshift=\TIBTitleBorder, yshift=+\TIBTitleBorder] (eah_logo) {
% \includegraphics[height=0.10\paperheight]{other_logos/marburg_logo.pdf}
% };
% \node[at=(overlay.south east),anchor=south east, xshift=-\TIBTitleBorder, yshift=\TIBTitleBorder] (l3s_logo) {
% \includegraphics[height=0.10\paperheight]{other_logos/l3s_logo.pdf}
% };
% \node[at=(overlay.south),anchor=south, yshift=\TIBTitleBorder] (ecir_logo) {
% \includegraphics[height=0.07\paperheight]{other_logos/poznan_logo.jpg}%
% \includegraphics[height=0.07\paperheight]{other_logos/paderborn_logo.png}
% };
\node[at=(overlay.north west),anchor=north west, xshift=\TIBTitleBorder, yshift=-\TIBTitleBorder] {
\includegraphics[height=0.08\paperheight]{tib/firm_en.pdf}
};
\node[at=(overlay.north west),
anchor=north west,
yshift=-\TIBTitleBorder-0.15\paperheight,
minimum height=0.78\paperheight-\TIBTitleBorder-0.15\paperheight,
minimum width =\TIBInnerSpace] (area) {};
\end{tikzpicture}
}
\setbeamertemplate{title page}{
\TIBShowBackground
\TIBShowOverlay
\begin{tikzpicture}[remember picture,overlay]
\node[at=(area.south west),anchor=south west, xshift=\TIBTitleBorder, yshift=0.10\paperheight+\TIBTitleBorder](event){
\begin{beamercolorbox}[wd=\TIBInnerSpace]{headline}
\usebeamerfont{institute}\insertinstitute
\end{beamercolorbox}
};
% \node[at=(event.north west),anchor=south west](date){
% \begin{beamercolorbox}[wd=\TIBInnerSpace]{normal text}
% \usebeamerfont{date}\insertshortdate
% \end{beamercolorbox}
% };
% \node[at=(date.north west),anchor=south west](affi){
% \begin{beamercolorbox}[wd=\TIBInnerSpace]{normal text}
% \usebeamerfont{institute}\insertinstitute
% \end{beamercolorbox}
% };
\node[at=(event.north west),anchor=south west](author){
\begin{beamercolorbox}[wd=\TIBInnerSpace]{normal text}
\usebeamerfont{author}\insertauthor
\end{beamercolorbox}
};
\node[at=(area.north west),anchor=north west, xshift=\TIBTitleBorder, yshift=-\TIBTitleBorder](title){
\begin{beamercolorbox}[wd=\TIBInnerSpace]{title}
\usebeamerfont{title}\inserttitle
\end{beamercolorbox}
};
\end{tikzpicture}
}
% Frame title
\defbeamertemplate*{frametitle}{TIB}
{
\usebeamerfont*{frametitle}
\usebeamercolor[fg]{frametitle}
\begin{tikzpicture}[remember picture,overlay]
\node[anchor=north west, xshift=\TIBTitleBorder, yshift=-\TIBTitleBorder] at (current page.north west)
{
\begin{beamercolorbox}[wd=8cm]{}
\insertframetitle
\end{beamercolorbox}
};
\end{tikzpicture}
\begin{tikzpicture}[remember picture, overlay]
\node[anchor=north east, xshift=-\TIBLogoBorder, yshift=-\TIBLogoBorder] at (current page.north east)
{
\includegraphics[width=0.15\linewidth, height=\paperheight, keepaspectratio]{tib/logo.pdf}
};
\end{tikzpicture}
\vspace{10pt}
}
% \setbeamertemplate{section in head/foot shaded}{\color{KlopeCedar}\insertsectionhead}
% \setbeamertemplate{background}{
% \begin{tikzpicture}
% \useasboundingbox (0,0) rectangle (\the\paperwidth,\the\paperheight);
% \ifnum\thepage>1\relax%
%
% \else % Title page
% \node[at=(current page.south east),anchor=south east,inner sep=0pt] {
% \includegraphics[height=\paperheight,width=\paperwidth]{tib/background}};
% \fi
% \end{tikzpicture}
% }
% Frame title continuations
\defbeamertemplate*{frametitle continuation}{TIB}{\insertcontinuationcountroman}
% Section frame
\setbeamertemplate{section page}
{
\TIBShowBackground
\TIBShowOverlay
\begin{tikzpicture}[remember picture,overlay]
\node[at=(area.north west),anchor=north west, xshift=\TIBTitleBorder, yshift=-\TIBTitleBorder](title){
\begin{beamercolorbox}[wd=\TIBInnerSpace]{title}
\usebeamerfont{section title}\insertsection
\end{beamercolorbox}
};
\end{tikzpicture}
}
% Footer
\addtobeamertemplate{footnote}{}{\vspace{2ex}}
\newcommand{\TIB@footline}{\hfill \insertframenumber/\inserttotalframenumber}
% TODO
%\newcommand{\TIB@footline}{\insertsectionnumber.~\insertsection \hfill \insertframenumber/\inserttotalframenumber}
\defbeamertemplate*{footline}{TIB}
{
\begin{beamercolorbox}[leftskip=15pt,rightskip=15pt,ht=2.5ex,dp=1ex]{footline}
\usebeamerfont{footline}\TIB@footline\par
\vspace{2ex}
\end{beamercolorbox}
}
% \AtBeginSection{
% \ifbeamer@inframe
% \sectionpage
% \else
% \frame[plain,c,noframenumbering]{\sectionpage}
% \fi
% }
\def\maketitle{%
\ifbeamer@inframe
\titlepage
\else
\frame[plain,noframenumbering]{\titlepage}
\fi
}
\def\titlepage{%
\usebeamertemplate{title page}
}