Newer
Older
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
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% $Id$
%
% a beamer style for i4
%
% Copyright 2009 by Daniel Lohmann (dl@cs.fau.de)
%
% This file may be distributed and/or modified
%
% 1. under the LaTeX Project Public License and/or
% 2. under the GNU Public License.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\mode<presentation>
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% color setup
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\definecolor{i4red}{rgb}{0.69,0.11,0.18}
\definecolor{i4blue}{rgb}{0.0,0.4,0.62}
\definecolor{i4gray}{rgb}{0.827,0.827,0.827}
\definecolor{darkred}{rgb}{0.8,0,0}
% the "example green" beamer defines in the default colortheme
\colorlet{beamergreen}{green!50!black}
\setbeamercolor{structure}{fg=i4blue,bg={}}
\setbeamercolor{section in toc}{fg=black,bg={}}
\setbeamercolor{subsection in toc}{fg=black,bg={}}
\setbeamercolor{alerted text}{fg=i4red}
\setbeamercolor*{palette primary}{fg=black,bg=white}
\setbeamercolor*{palette secondary}{fg=i4blue,bg=white}
\setbeamercolor*{palette tertiary}{fg=i4red,bg=white}
\setbeamercolor*{palette quaternary}{fg=darkred,bg=gray!5!white}
\setbeamercolor{titlelike}{parent=structure}
\setbeamercolor{itemize subitem}{fg=i4red}
\setbeamercolor{page number in head/foot}{fg=i4red}
\setbeamercolor{sidebar left}{bg={}}
\setbeamercolor{footline}{parent=structure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% background image setup
%
% This is the real trick :-) All graphical elements of the i4-layout are just
% in the background image. To support the "plain"-option for frames, we actually
% need two different background images (and probably a third one for the title
% slide, don't know yet)
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usebackgroundtemplate{
\ifbeamer@plainframe%
\includegraphics[width=\paperwidth]{beamerthemei4_bgplain}%
\else %
\includegraphics[width=\paperwidth]{beamerthemei4_bg}
\fi%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% enumeration style and borders setup
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setbeamersize{sidebar width left=1.07cm}
\setbeamersize{text margin left=0.5em}
\setbeamersize{text margin right=3.5mm}
% the top-level item symbol is rendered into the sidebar
\setbeamertemplate{itemize item}{\raise.5pt\hbox{\vrule width 1ex height 1ex}\hspace{0.5em}}
\setbeamertemplate{itemize subitem}{\raise.5pt\hbox{\vrule width 0.8ex height 0.8ex}}
\setbeamertemplate{itemize subsubitem}{\raise.5ex\hbox{\vrule width 1ex height 0.2ex}}
\setbeamertemplate{headline}[default]
\setlength{\labelwidth}{2em}
\setlength{\labelsep}{0.5em}
\setlength{\leftmargini}{0em}
\setlength{\leftmarginii}{1em}
\setlength{\leftmarginiii}{1em}
% the above looks nice on slides, but bad in block environments; hence we override
% beamers original block envs to modify them
% command to be installed at the begin of every block environment
\newcommand{\beamerblock}{
\setbeamertemplate{itemize item}{\raise.5pt\hbox{\vrule width 0.8ex height 0.8ex}}
\setbeamertemplate{itemize subitem}{\raise.5pt\hbox{\vrule width 0.6ex height 0.6ex}}
\setlength{\leftmargini}{1.5em}
\setlength{\labelsep}{0.5em}
}
\renewenvironment{block}[1]{%
\begin{actionenv}%
\beamerblock%
\def\insertblocktitle{#1}%
\par%
\usebeamertemplate{block begin}}
{\par%
\usebeamertemplate{block end}%
\end{actionenv}
}
\renewenvironment{alertblock}[1]{%
\begin{actionenv}%
\beamerblock%
\def\insertblocktitle{#1}%
\par%
\mode<presentation>{%\usebeamerfont{block}%
\setbeamercolor{local structure}{parent=alerted text}}%
\usebeamertemplate{block alerted begin}}
{\par%
\usebeamertemplate{block alerted end}%
\end{actionenv}
}
\renewenvironment{exampleblock}[1]{%
\begin{actionenv}%
\beamerblock%
\def\insertblocktitle{#1}%
\par%
\mode<presentation>{%\usebeamerfont{block}%
\setbeamercolor{local structure}{parent=example text}}%
\usebeamertemplate{block example begin}}
{\par%
\usebeamertemplate{block example end}%
\end{actionenv}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% footline definitions
%
% The footline is one of the things that are heavily customizable in beamer using
% outer themes. However, we skip (and do not support) all those fancy beamer
% themes here and just let beamer it render as text line. This gives us full
% control and easy adaptation, but some things (especially the vertical layout)
% remain a bit hacky :-)
%
% To provide for more easy customization within presentations, the framenumbering
% can be customized (and also locally surpressed) by overwriting the
% macro \InsertFrameNumber
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% default style for frame numbers
\def\InsertFrameNumber{\insertframenumber\,--\,\inserttotalframenumber}
\setbeamertemplate{footline}[text line]{
% beamer has already set footline color/font here
%
% use raisebox to align footline with i4logo
\raisebox{2.5mm}{\vbox{
% insert a strut (invisible vertical line) to prevent line breaks
\rule{0mm}{3mm}
% here the real content starts
% print author and title
\insertshortauthor
\hspace{2em}
\insertshorttitle
% if a shortdate is given, print it in brackets after the title
\ifx\insertshortdate\@empty
\else
~(\insertshortdate)
\fi
\hspace{2em}
% if section/subsection are defined, print them (seperated by an em-dash)
\ifx\insertsection\@empty%
\else%
\insertsection%
\ifx\insertsubsection\@empty%
\else%
\,--\,\insertsubsection%
\fi
\fi
% print the remaining stuff right-aligned
\hfill
% print page number
{
\usebeamercolor[fg]{page number in head/foot}\usebeamerfont{page number in head/foot}
\parbox[t]{0.7cm}{\centering{\InsertFrameNumber}}
}%
}}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% frametitle setup
%
% This is probably the most hacky part of i4beamer We completely overwrite the
% code beamer uses to render the frame title, especially to get the vertical
% spacing and alignment right, so it fits with the "background".
%
% The i4-Layout does not really offer space for subtitles. We support them
% anyway by printing them right-aligned.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setbeamertemplate{frametitle}{
\usebeamerfont{frametitle}\usebeamercolor[fg]{frametitle}
\insertframetitle\strut
\ifx\insertframesubtitle\@empty
\else {%
\usebeamerfont{framesubtitle}\usebeamercolor[fg]{framesubtitle}
\hfill\insertframesubtitle\strut
}%
\fi
\par\vskip2pt
}
\mode
<all>