blob: f01eabcb2e0bdae1902c2e9f43d1722a751e468b (
plain)
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
|
\ProvidesPackageRCS $Header: /cvsroot/latex-beamer/latex-beamer/themes/theme/beamerthemeboxes.sty,v 1.7 2004/10/11 16:10:12 tantau Exp $
% Copyright 2003 by Till Tantau <tantau@users.sourceforge.net>
%
% This program can be redistributed and/or modified under the terms
% of the GNU Public License, version 2.
\DeclareOptionBeamer{headheight}{\beamer@boxheadheight=#1}
\DeclareOptionBeamer{footheight}{\beamer@boxfootheight=#1}
\newdimen\beamer@boxheadheight
\newdimen\beamer@boxfootheight
\beamer@boxheadheight=10pt
\beamer@boxfootheight=10pt
\ProcessOptionsBeamer
% For example:
%\addheadboxtemplate{\color{black}}{\hfill\color{white}\insertshorttitle\hskip0.3cm}
%\addheadboxtemplate{\color{structure}}{\hskip0.3cm\color{white}\insertshortauthor}
%\addfootboxtemplate{\color{black}}{\hfill\color{white}\insertshortinstitute\hskip0.3cm}
%\addfootboxtemplate{\color{structure}}{}
%\addfootboxtemplate{\color{black}}{\hfill\color{white}\insertframenumber\hskip0.3cm}
\mode<presentation>
% Head
\newcount\beamer@headboxes
\newdimen\beamer@headboxsizes
\newcount\beamer@currentbox
\def\addheadboxtemplate#1#2{
\expandafter\def\csname beamer@headbox\the\beamer@headboxes\endcsname{#2}
\expandafter\def\csname beamer@headbg\the\beamer@headboxes\endcsname{#1}
\advance\beamer@headboxes by 1\relax
\beamer@headboxsizes=\paperwidth
\divide\beamer@headboxsizes by\beamer@headboxes
}
\def\addheadbox#1#2{\addheadboxtemplate{\usebeamercolor[bg]{#1}}{\usebeamercolor[fg]{#1}\usebeamerfont{#1}#2}}
\defbeamertemplate*{headline}{boxes theme}
{%
\leavevmode
\beamer@currentbox=0\relax%
\loop%
\ifnum\beamer@currentbox<\beamer@headboxes%
\hbox to\beamer@headboxsizes{%
% Background
{%
\csname beamer@headbg\the\beamer@currentbox\endcsname%
\vrule width\beamer@headboxsizes height\beamer@boxheadheight%
\hskip-\beamer@headboxsizes%
}%
% Box
{%
\setbox\beamer@tempbox=\hbox to\beamer@headboxsizes{%
\csname beamer@headbox\the\beamer@currentbox\endcsname\hfil}%
\dp\beamer@tempbox=0pt%
\setbox\beamer@tempbox=\hbox{\vbox{\box\beamer@tempbox\vskip3pt}}%
\ht\beamer@tempbox=\beamer@boxheadheight%
\dp\beamer@tempbox=0pt%
\box\beamer@tempbox%
}}%
\advance\beamer@currentbox by 1%
\repeat%
}%
% Foot
\newcount\beamer@footboxes
\newdimen\beamer@footboxsizes
\def\addfootboxtemplate#1#2{
\expandafter\def\csname beamer@footbox\the\beamer@footboxes\endcsname{#2}
\expandafter\def\csname beamer@footbg\the\beamer@footboxes\endcsname{#1}
\advance\beamer@footboxes by 1\relax
\beamer@footboxsizes=\paperwidth
\divide\beamer@footboxsizes by\beamer@footboxes
}
\def\addfootbox#1#2{\addfootboxtemplate{\usebeamercolor[bg]{#1}}{\usebeamercolor[fg]{#1}\usebeamerfont{#1}#2}}
\defbeamertemplate*{footline}{boxes theme}
{%
\leavevmode
\beamer@currentbox=0\relax%
\loop%
\ifnum\beamer@currentbox<\beamer@footboxes%
\hbox to\beamer@footboxsizes{%
% Background
{%
\csname beamer@footbg\the\beamer@currentbox\endcsname%
\vrule width\beamer@footboxsizes height\beamer@boxfootheight%
\hskip-\beamer@footboxsizes%
}%
% Box
{%
\setbox\beamer@tempbox=\hbox to\beamer@footboxsizes{%
\csname beamer@footbox\the\beamer@currentbox\endcsname\hfil}%
\dp\beamer@tempbox=0pt%
\setbox\beamer@tempbox=\hbox{\vbox{\box\beamer@tempbox\vskip3pt}}%
\ht\beamer@tempbox=\beamer@boxfootheight%
\dp\beamer@tempbox=0pt%
\box\beamer@tempbox%
}%
}%
\advance\beamer@currentbox by 1%
\repeat%
}%
\mode
<all>
|