]> git.siccegge.de Git - talk/attack-i2p-raid2013.git/blob - beamerthemei4.sty
Include missing files
[talk/attack-i2p-raid2013.git] / beamerthemei4.sty
1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 % $Id$
3 %
4 % a beamer style for i4
5 %
6 % Copyright 2009 by Daniel Lohmann (dl@cs.fau.de)
7 %
8 % This file may be distributed and/or modified
9 %
10 % 1. under the LaTeX Project Public License and/or
11 % 2. under the GNU Public License.
12 %
13 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
14
15
16 \mode<presentation>
17
18 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
19 % color setup
20 %
21 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
22 \definecolor{i4red}{rgb}{0.69,0.11,0.18}
23 \definecolor{i4blue}{rgb}{0.0,0.4,0.62}
24 \definecolor{i4gray}{rgb}{0.827,0.827,0.827}
25 \definecolor{darkred}{rgb}{0.8,0,0}
26
27 % the "example green" beamer defines in the default colortheme
28 \colorlet{beamergreen}{green!50!black}
29
30 \setbeamercolor{structure}{fg=i4blue,bg={}}
31 \setbeamercolor{section in toc}{fg=black,bg={}}
32 \setbeamercolor{subsection in toc}{fg=black,bg={}}
33 \setbeamercolor{alerted text}{fg=i4red}
34 \setbeamercolor*{palette primary}{fg=black,bg=white}
35 \setbeamercolor*{palette secondary}{fg=i4blue,bg=white}
36 \setbeamercolor*{palette tertiary}{fg=i4red,bg=white}
37 \setbeamercolor*{palette quaternary}{fg=darkred,bg=gray!5!white}
38 \setbeamercolor{titlelike}{parent=structure}
39 \setbeamercolor{itemize subitem}{fg=i4red}
40 \setbeamercolor{page number in head/foot}{fg=i4red}
41 \setbeamercolor{sidebar left}{bg={}}
42 \setbeamercolor{footline}{parent=structure}
43
44 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
45 % background image setup
46 %
47 % This is the real trick :-) All graphical elements of the i4-layout are just
48 % in the background image. To support the "plain"-option for frames, we actually
49 % need two different background images (and probably a third one for the title
50 % slide, don't know yet)
51 %
52 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
53 \usebackgroundtemplate{
54 \ifbeamer@plainframe%
55 \includegraphics[width=\paperwidth]{beamerthemei4_bgplain}%
56 \else %
57 \includegraphics[width=\paperwidth]{beamerthemei4_bg}
58 \fi%
59 }
60
61
62 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
63 % enumeration style and borders setup
64 %
65 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
66 \setbeamersize{sidebar width left=1.07cm}
67 \setbeamersize{text margin left=0.5em}
68 \setbeamersize{text margin right=3.5mm}
69
70 % the top-level item symbol is rendered into the sidebar
71 \setbeamertemplate{itemize item}{\raise.5pt\hbox{\vrule width 1ex height 1ex}\hspace{0.5em}}
72 \setbeamertemplate{itemize subitem}{\raise.5pt\hbox{\vrule width 0.8ex height 0.8ex}}
73 \setbeamertemplate{itemize subsubitem}{\raise.5ex\hbox{\vrule width 1ex height 0.2ex}}
74 \setbeamertemplate{headline}[default]
75
76 \setlength{\labelwidth}{2em}
77 \setlength{\labelsep}{0.5em}
78 \setlength{\leftmargini}{0em}
79 \setlength{\leftmarginii}{1em}
80 \setlength{\leftmarginiii}{1em}
81
82 % the above looks nice on slides, but bad in block environments; hence we override
83 % beamers original block envs to modify them
84
85 % command to be installed at the begin of every block environment
86 \newcommand{\beamerblock}{
87 \setbeamertemplate{itemize item}{\raise.5pt\hbox{\vrule width 0.8ex height 0.8ex}}
88 \setbeamertemplate{itemize subitem}{\raise.5pt\hbox{\vrule width 0.6ex height 0.6ex}}
89 \setlength{\leftmargini}{1.5em}
90 \setlength{\labelsep}{0.5em}
91 }
92
93 \renewenvironment{block}[1]{%
94 \begin{actionenv}%
95 \beamerblock%
96 \def\insertblocktitle{#1}%
97 \par%
98 \usebeamertemplate{block begin}}
99 {\par%
100 \usebeamertemplate{block end}%
101 \end{actionenv}
102 }
103 \renewenvironment{alertblock}[1]{%
104 \begin{actionenv}%
105 \beamerblock%
106 \def\insertblocktitle{#1}%
107 \par%
108 \mode<presentation>{%\usebeamerfont{block}%
109 \setbeamercolor{local structure}{parent=alerted text}}%
110 \usebeamertemplate{block alerted begin}}
111 {\par%
112 \usebeamertemplate{block alerted end}%
113 \end{actionenv}
114 }
115 \renewenvironment{exampleblock}[1]{%
116 \begin{actionenv}%
117 \beamerblock%
118 \def\insertblocktitle{#1}%
119 \par%
120 \mode<presentation>{%\usebeamerfont{block}%
121 \setbeamercolor{local structure}{parent=example text}}%
122 \usebeamertemplate{block example begin}}
123 {\par%
124 \usebeamertemplate{block example end}%
125 \end{actionenv}
126 }
127
128
129 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
130 % footline definitions
131 %
132 % The footline is one of the things that are heavily customizable in beamer using
133 % outer themes. However, we skip (and do not support) all those fancy beamer
134 % themes here and just let beamer it render as text line. This gives us full
135 % control and easy adaptation, but some things (especially the vertical layout)
136 % remain a bit hacky :-)
137 %
138 % To provide for more easy customization within presentations, the framenumbering
139 % can be customized (and also locally surpressed) by overwriting the
140 % macro \InsertFrameNumber
141 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
142
143 % default style for frame numbers
144 \def\InsertFrameNumber{\insertframenumber\,--\,\inserttotalframenumber}
145 \setbeamertemplate{footline}[text line]{
146 % beamer has already set footline color/font here
147 %
148 % use raisebox to align footline with i4logo
149 \raisebox{2.5mm}{\vbox{
150 % insert a strut (invisible vertical line) to prevent line breaks
151 \rule{0mm}{3mm}
152 % here the real content starts
153 % print author and title
154 \insertshortauthor
155 \hspace{2em}
156 \insertshorttitle
157 % if a shortdate is given, print it in brackets after the title
158 \ifx\insertshortdate\@empty
159 \else
160 ~(\insertshortdate)
161 \fi
162 \hspace{2em}
163 % if section/subsection are defined, print them (seperated by an em-dash)
164 \ifx\insertsection\@empty%
165 \else%
166 \insertsection%
167 \ifx\insertsubsection\@empty%
168 \else%
169 \,--\,\insertsubsection%
170 \fi
171 \fi
172 % print the remaining stuff right-aligned
173 \hfill
174 % print page number
175 {
176 \usebeamercolor[fg]{page number in head/foot}\usebeamerfont{page number in head/foot}
177 \parbox[t]{0.7cm}{\centering{\InsertFrameNumber}}
178 }%
179 }}
180 }
181
182
183 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
184 % frametitle setup
185 %
186 % This is probably the most hacky part of i4beamer We completely overwrite the
187 % code beamer uses to render the frame title, especially to get the vertical
188 % spacing and alignment right, so it fits with the "background".
189 %
190 % The i4-Layout does not really offer space for subtitles. We support them
191 % anyway by printing them right-aligned.
192 %
193 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
194 \setbeamertemplate{frametitle}{
195 \usebeamerfont{frametitle}\usebeamercolor[fg]{frametitle}
196 \insertframetitle\strut
197 \ifx\insertframesubtitle\@empty
198 \else {%
199 \usebeamerfont{framesubtitle}\usebeamercolor[fg]{framesubtitle}
200 \hfill\insertframesubtitle\strut
201 }%
202 \fi
203 \par\vskip2pt
204 }
205
206 \mode
207 <all>