beamerthemeinformatics.sty 9.41 KB
Newer Older
Loïc Barrault's avatar
Loïc Barrault 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
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
%!TEX root = m2_trad_neuronale.tex
% (c) 2010 School of Infomatics
%
% v0.1, sviglas
%
% This file provides a beamer theme for the School of Informatics
%
% The LaTeX source may not be the cleanest ever, but it will do for
% now.

\ProvidesPackage{beamerthemeinformatics}

%%
%% first define some edinburgh colors
%%
\definecolor{edinblue}{rgb}{0,0.2,0.37}
\definecolor{edinred}{rgb}{0.76,0,0.26}
\definecolor{edinorange}{rgb}{0.76,0.365,0.141}
\definecolor{edinmagenta}{rgb}{0.529,0,0.357}
\definecolor{edingreen}{rgb}{0.008,0.286,0.188}
\definecolor{liumlightgray}{rgb}{0.9,0.9,0.9}

%% for the presentation
\mode<presentation>

%% structure options if's
\newif\ifbeamer@logoseparator
\newif\ifbeamer@author
\newif\ifbeamer@slidecount
\newif\ifbeamer@nonav
\newif\ifbeamer@secheadings

%% institute definitions if's
\newif\ifbeamer@inst@cisa
\newif\ifbeamer@inst@esi
\newif\ifbeamer@inst@ianc
\newif\ifbeamer@inst@iccs
\newif\ifbeamer@inst@icsa
\newif\ifbeamer@inst@ilsi
\newif\ifbeamer@inst@ipab
\newif\ifbeamer@inst@lfcs
\newif\ifbeamer@inst@inspace
\newif\ifbeamer@inst@empty

%% structure options
\beamer@logoseparatorfalse
\beamer@authorfalse
\beamer@slidecountfalse
\beamer@nonavfalse
\beamer@secheadingsfalse

%% institute options
\beamer@inst@cisafalse
\beamer@inst@esifalse
\beamer@inst@iancfalse
\beamer@inst@iccsfalse
\beamer@inst@icsafalse
\beamer@inst@ilsifalse
\beamer@inst@ipabfalse
\beamer@inst@lfcsfalse
\beamer@inst@inspacefalse
\beamer@inst@emptytrue

%% declare the various options for the package
\DeclareOptionBeamer{logoseparator}{
  \beamer@logoseparatortrue
  \beamer@secheadingsfalse
}
\DeclareOptionBeamer{secheadings}{
  \beamer@logoseparatorfalse
  \beamer@secheadingstrue
}
\DeclareOptionBeamer{author}{\beamer@authortrue}
\DeclareOptionBeamer{slidecount}{\beamer@slidecounttrue}
\DeclareOptionBeamer{nonav}{\beamer@nonavtrue}
\DeclareOptionBeamer{cisa}{
  \beamer@inst@cisatrue
  \beamer@inst@esifalse
  \beamer@inst@iancfalse
  \beamer@inst@iccsfalse
  \beamer@inst@icsafalse
  \beamer@inst@ilsifalse
  \beamer@inst@ipabfalse
  \beamer@inst@lfcsfalse
  \beamer@inst@inspacefalse
  \beamer@inst@emptyfalse
}
\DeclareOptionBeamer{esi}{
  \beamer@inst@cisafalse
  \beamer@inst@esitrue
  \beamer@inst@iancfalse
  \beamer@inst@iccsfalse
  \beamer@inst@icsafalse
  \beamer@inst@ilsifalse
  \beamer@inst@ipabfalse
  \beamer@inst@lfcsfalse
  \beamer@inst@inspacefalse
  \beamer@inst@emptyfalse
}
\DeclareOptionBeamer{ianc}{
  \beamer@inst@cisafalse
  \beamer@inst@esifalse
  \beamer@inst@ianctrue
  \beamer@inst@iccsfalse
  \beamer@inst@icsafalse
  \beamer@inst@ilsifalse
  \beamer@inst@ipabfalse
  \beamer@inst@lfcsfalse
  \beamer@inst@inspacefalse
  \beamer@inst@emptyfalse
}
\DeclareOptionBeamer{iccs}{
  \beamer@inst@cisafalse
  \beamer@inst@esifalse
  \beamer@inst@iancfalse
  \beamer@inst@iccstrue
  \beamer@inst@icsafalse
  \beamer@inst@ilsifalse
  \beamer@inst@ipabfalse
  \beamer@inst@lfcsfalse
  \beamer@inst@inspacefalse
  \beamer@inst@emptyfalse
}
\DeclareOptionBeamer{icsa}{
  \beamer@inst@cisafalse
  \beamer@inst@esifalse
  \beamer@inst@iancfalse
  \beamer@inst@iccsfalse
  \beamer@inst@icsatrue
  \beamer@inst@ilsifalse
  \beamer@inst@ipabfalse
  \beamer@inst@lfcsfalse
  \beamer@inst@inspacefalse
  \beamer@inst@emptyfalse
}
\DeclareOptionBeamer{ilsi}{
  \beamer@inst@cisafalse
  \beamer@inst@esifalse
  \beamer@inst@iancfalse
  \beamer@inst@iccsfalse
  \beamer@inst@icsafalse
  \beamer@inst@ilsitrue
  \beamer@inst@ipabfalse
  \beamer@inst@lfcsfalse
  \beamer@inst@inspacefalse
  \beamer@inst@emptyfalse
}
\DeclareOptionBeamer{ipab}{
  \beamer@inst@cisafalse
  \beamer@inst@esifalse
  \beamer@inst@iancfalse
  \beamer@inst@iccsfalse
  \beamer@inst@icsafalse
  \beamer@inst@ilsifalse
  \beamer@inst@ipabtrue
  \beamer@inst@lfcsfalse
  \beamer@inst@inspacefalse
  \beamer@inst@emptyfalse
}
\DeclareOptionBeamer{lfcs}{
  \beamer@inst@cisafalse
  \beamer@inst@esifalse
  \beamer@inst@iancfalse
  \beamer@inst@iccsfalse
  \beamer@inst@icsafalse
  \beamer@inst@ilsifalse
  \beamer@inst@ipabfalse
  \beamer@inst@lfcstrue
  \beamer@inst@inspacefalse
  \beamer@inst@emptyfalse
}
\DeclareOptionBeamer{inspace}{
  \beamer@inst@cisafalse
  \beamer@inst@esifalse
  \beamer@inst@iancfalse
  \beamer@inst@iccsfalse
  \beamer@inst@icsafalse
  \beamer@inst@ilsifalse
  \beamer@inst@ipabfalse
  \beamer@inst@lfcsfalse
  \beamer@inst@inspacetrue
  \beamer@inst@emptyfalse
}


\def\setlogochoice{
  \ifbeamer@inst@cisa
  \includegraphics[height=5ex]{cisa-long}      
  \hspace*{5ex} 
  \fi
  \ifbeamer@inst@esi
  \includegraphics[height=5ex]{esi-long}
  \hspace*{5ex} 
  \fi
  \ifbeamer@inst@ianc
  \includegraphics[height=5ex]{ianc-long}
  \hspace*{5ex} 
  \fi
  \ifbeamer@inst@iccs
  \includegraphics[height=5ex]{iccs-long}
  \hspace*{5ex} 
  \fi
  \ifbeamer@inst@icsa
  \includegraphics[height=5ex]{icsa-long}
  \hspace*{5ex} 
  \fi
  \ifbeamer@inst@ilsi
  \includegraphics[height=5ex]{ilsi-long}
  \hspace*{5ex} 
  \fi
  \ifbeamer@inst@ipab
  \includegraphics[height=5ex]{ipab-long}
  \hspace*{5ex} 
  \fi
  \ifbeamer@inst@lfcs
  \includegraphics[height=5ex]{lfcs-long}
  \hspace*{5ex} 
  \fi
  \ifbeamer@inst@inspace
  \includegraphics[height=5ex]{inspace-long}
  \hspace*{5ex} 
  \fi
}


%% parse the options
\ProcessOptionsBeamer

%%
%% Use circles for bullets
%%
%\setbeamertemplate{items}[circle]
%\setbeamertemplate{items}[triangle]
\setbeamertemplate{items}[ball]

%%
%% Now set colors/fonts for the various elements of the theme
%%
%% background color is white
\setbeamercolor{background canvas}{bg=white} 
%% normal text is in corporate blue
%\setbeamercolor{normal text}{fg=edinblue}
\setbeamercolor{normal text}{fg=black}
\setbeamercolor{bar}{bg=edinblue,fg=liumlightgray}
%% alerted text is in corporate red
\setbeamercolor{alerted text}{fg=edinred}
%% structure is set to corporate red
\setbeamercolor{structure}{fg=black}
%% title is typeset in corporate blue, bold, and roman
\setbeamercolor{title}{fg=edinred}
\setbeamerfont{title}{series=\bfseries,family=\rmfamily}
%% frametitle is typeset in a large, bold, and roman font
\setbeamerfont{frametitle}{size=\large,family=\rmfamily} %fg=edinred
\setbeamercolor{frametitle}{fg=edinred}
%% smaller font sizes for institute and date
\setbeamerfont{institute}{size=\small}
\setbeamerfont{date}{size=\scriptsize}
%% rounded and shadowed boxes for the various blocks
\setbeamertemplate{blocks}[rounded][shadow=true] 
%% normal size for block titles
\setbeamerfont{block title}{size={}} 
%% standard blocks are in corporate blue
\setbeamercolor{block title}{fg=black,bg=liumlightgray}
\setbeamercolor{block body}{parent=normal text,use=block
  title,bg=block title.bg!20!bg}
%% alerted blocks are in orange from the muted palette
\setbeamercolor{block title alerted}{fg=liumlightgray,bg=edinorange}
\setbeamercolor{block body alerted}{parent=normal text,use=block
  title alerted,bg=liumlightgray}
%% example blocks are in green from the muted palette
\setbeamercolor{block title example}{fg=liumlighthgray,bg=edingreen}
\setbeamercolor{block body example}{parent=normal text,use=block
  title example,bg=block title example.bg!20!bg}

\setbeamercolor{section in head/foot}{bg=liumlightgray,fg=edinred}
\setbeamercolor{section name}{bg=liumlightgray,fg=edinred}
\setbeamerfont{section title}{size=\Huge,family=\rmfamily}

\setbeamercolor{subsection in head/foot}{use=section in
  head/foot,bg=liumlightgray,fg=section in head/foot.fg!70}
%% suppress navigation symbols if requested
\ifbeamer@nonav
\setbeamertemplate{navigation symbols}{} 
\fi


%% frame title

\setbeamertemplate{frametitle} { 
  \vbox{  \vskip1pt \insertframetitle}\par
%  \hspace*{-0.045\paperwidth}
%  \vspace{-.5cm}
}

%% headline

%% headline contains the university and institute logos

\defbeamertemplate*{headline}{}{
  \vspace{0.05cm}
  \hbox{   
    \begin{beamercolorbox}[wd=.5\paperwidth,ht=5ex,dp=1ex,left]{}%
      \hspace*{3ex}
      \includegraphics[height=5ex]{informatics}
    \end{beamercolorbox}%
    \begin{beamercolorbox}[wd=.5\paperwidth,ht=5ex,dp=1ex,right]{}%
      \setlogochoice
    \end{beamercolorbox}
    }%    
    \ifbeamer@logoseparator
    \hbox{
      \begin{beamercolorbox}[wd=1.02\paperwidth,ht=0.5mm]{bar}%
      \end{beamercolorbox}
    }%
    \fi
    \ifbeamer@secheadings
    \hbox{
      \begin{beamercolorbox}[wd=1.02\paperwidth,ht=0.5mm]{bar}%
      \end{beamercolorbox}
    }%
    \hbox{
      \begin{beamercolorbox}[wd=.5\paperwidth,ht=2.25ex,dp=1ex,right]{section
        in head/foot}%
        \insertsectionhead
        \hspace*{2ex}
      \end{beamercolorbox}
      \begin{beamercolorbox}[wd=.5\paperwidth,ht=2.25ex,dp=1ex,left]{subsection
        in head/foot}%
        \hspace*{2ex}
        \insertsubsectionhead
      \end{beamercolorbox}
    }%
    \hbox{
      \begin{beamercolorbox}[wd=1.02\paperwidth,ht=0.5mm]{bar}%
      \end{beamercolorbox}
    }%
    \fi
}


%% footline

%% footline displays the School's URL by default and if the
%% corresponding options have been set, it also displays the author
%% and the slide count
\defbeamertemplate*{footline}{}{
  \leavevmode%
  \hbox{%
    \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,left]{}%
      \ifbeamer@author
      \hspace*{2ex}
      \insertshortauthor
      \fi
    \end{beamercolorbox}%
  \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{}%
    \ifbeamer@slidecount
    slide \insertframenumber{} of \inserttotalframenumber
    \fi
  \end{beamercolorbox}%
  \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,right]{}%
    www-lium.univ-lemans.fr
    \hspace*{2ex}
  \end{beamercolorbox}}%
  \vskip0pt%
}


\mode
<all>