-
Notifications
You must be signed in to change notification settings - Fork 0
/
beamerouterthemestatmod.sty
217 lines (182 loc) · 6.98 KB
/
beamerouterthemestatmod.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
\ProvidesPackage{beamerouterthemestatmod}[2007/05/12]
% Copyright 2003 by Till Tantau <tantau@users.sourceforge.net>
% and 2005-2006 by Joerg Cassens <jmt@cassens.org>
% and 2007 by Anton Korobeynikov <asl@math.spbu.ru>
%
% Bug fixes 2006 by Helge Langseth
% and 2006 by Jyun-Fan Tsai
%
%
% This program can be redistributed and/or modified under the terms
% of the GNU Public License, version 2.
\mode<presentation>
\pgfdeclareimage[height=2em,interpolate=true]{statmodlogotext}{statmod/logo}
\ifbeamer@mylogo
\pgfdeclareimage[height=2em,interpolate=true]{statmodlogotext}{statmod/mylogo}
\fi
\ifbeamer@nologo
\titlegraphic{\pgfuseimage{statmodlogotext}}
\fi
% The first part is based on the split theme
\setbeamercolor{section in head/foot}{parent=palette primary}
\setbeamercolor{subsection in head/foot}{parent=palette secondary}
\setbeamercolor{author in head/foot}{parent=section in head/foot}
\setbeamercolor{title in head/foot}{parent=subsection in head/foot}
\setbeamercolor{date in head/foot}{parent=palette tertiary}
\usesectionheadtemplate
{\hfill\insertsectionhead}
{\hfill\color{fg!50!bg}\insertsectionhead}
% Head
\ifbeamer@compress
\defbeamertemplate*{headline}{statmod theme}
{%
\leavevmode%
\begin{beamercolorbox}[wd=.5\paperwidth,ht=2.5ex,dp=1.125ex,right]{section in head/foot}%
\usebeamerfont{section in head/foot}\insertsectionhead\hspace*{2ex}
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.5\paperwidth,ht=2.5ex,dp=1.125ex,left]{subsection in head/foot}%
\usebeamerfont{subsection in head/foot}\hspace*{2ex}\insertsubsectionhead
\end{beamercolorbox}%
}
\else
\ifbeamer@minimal
\defbeamertemplate*{headline}{statmod theme}{}
\else
\defbeamertemplate*{headline}{statmod theme}
{%
\leavevmode%
\@tempdimb=2.4375ex%
\ifnum\beamer@subsectionmax<\beamer@sectionmax%
\multiply\@tempdimb by\beamer@sectionmax%
\else%
\multiply\@tempdimb by\beamer@subsectionmax%
\fi%
\ifdim\@tempdimb>0pt%
\advance\@tempdimb by 1.125ex%
\begin{beamercolorbox}[wd=.5\paperwidth,ht=\@tempdimb]{section in head/foot}%
\vbox to\@tempdimb{\vfil\insertsectionnavigation{.5\paperwidth}\vfil}%
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.5\paperwidth,ht=\@tempdimb]{subsection in head/foot}%
\vbox to\@tempdimb{\vfil\insertsubsectionnavigation{.5\paperwidth}\vfil}%
\end{beamercolorbox}%
\fi%
}
\fi
\fi
\ifbeamer@numbers
\defbeamertemplate*{footline}{statmod theme}
{%
\leavevmode%
\hbox{%
\begin{beamercolorbox}[wd=.5\paperwidth,ht=2.5ex,dp=1.125ex,leftskip=.3cm,rightskip=.3cm]{author in head/foot}%
\usebeamerfont{author in head/foot}\insertframenumber{}%
\ifbeamer@totalnumbers
/\inserttotalframenumber
\fi
\hfill\insertshortauthor
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.5\paperwidth,ht=2.5ex,dp=1.125ex,leftskip=.3cm,rightskip=.3cm plus1fil]{title in head/foot}%
\usebeamerfont{title in head/foot}\insertshorttitle
\end{beamercolorbox}}%
\vskip0pt%
}
% as an alternative to putting the pagenumber in the corner, we can put it in the center
% {%
% \leavevmode%
% \hbox{\begin{beamercolorbox}[wd=.45\paperwidth,ht=2.5ex,dp=1.125ex,leftskip=.3cm plus1fill,rightskip=.3cm]{author in head/foot}%
% \usebeamerfont{author in head/foot}\insertshortauthor
% \end{beamercolorbox}%
% \begin{beamercolorbox}[wd=.1\paperwidth,ht=2.5ex,dp=1.125ex,leftskip=.3cm,rightskip=.3cm,center]{date in head/foot}%
% \usebeamerfont{date in head/foot}\insertframenumber{}
% \end{beamercolorbox}%
% \begin{beamercolorbox}[wd=.45\paperwidth,ht=2.5ex,dp=1.125ex,leftskip=.3cm,rightskip=.3cm plus1fil]{title in head/foot}%
% \usebeamerfont{title in head/foot}\insertshorttitle
% \end{beamercolorbox}}%
% \vskip0pt%
% }
\else
\defbeamertemplate*{footline}{statmod theme}
{%
\leavevmode%
\hbox{\begin{beamercolorbox}[wd=.5\paperwidth,ht=2.5ex,dp=1.125ex,leftskip=.3cm plus1fill,rightskip=.3cm]{author in head/foot}%
\usebeamerfont{author in head/foot}\insertshortauthor
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.5\paperwidth,ht=2.5ex,dp=1.125ex,leftskip=.3cm,rightskip=.3cm plus1fil]{title in head/foot}%
\usebeamerfont{title in head/foot}\insertshorttitle
\end{beamercolorbox}}%
\vskip0pt%
}
\fi
% this part is based on the shadow theme
\setbeamercolor{frametitle}{parent=subsection in head/foot}
\setbeamercolor{frametitle right}{parent=section in head/foot}
\pgfdeclarehorizontalshading[frametitle.bg,frametitle right.bg]{beamer@frametitleshade}{\paperheight}{%
color(0pt)=(frametitle.bg);
color(\paperwidth)=(frametitle right.bg)}
\AtBeginDocument{
\pgfdeclareverticalshading{beamer@topshade}{\paperwidth}{%
color(0pt)=(bg);
color(4pt)=(black!50!bg)}
}
\addtobeamertemplate{headline}
{}
{%
\vskip-0.2pt
\pgfuseshading{beamer@topshade}
\vskip-2pt
}
\defbeamertemplate*{frametitle}{statmod theme}
{%
\nointerlineskip%
\vskip-2pt%
\hbox{\leavevmode
\advance\beamer@leftmargin by -12bp%
\advance\beamer@rightmargin by -12bp%
\beamer@tempdim=\textwidth%
\advance\beamer@tempdim by \beamer@leftmargin%
\advance\beamer@tempdim by \beamer@rightmargin%
\hskip-\Gm@lmargin\hbox{%
\setbox\beamer@tempbox=\hbox{\begin{minipage}[b]{\paperwidth}%
\vbox{}\vskip-.75ex%
\leftskip0.3cm%
\rightskip0.3cm plus1fil\leavevmode
\ifbeamer@nologo
\ifbeamer@mylogo
\insertframetitle%
\pgfdeclareimage[width=3ex,interpolate=true]{statmodlogowhite}{statmod/mysmall}\hfill\pgfuseimage{statmodlogowhite}\hspace{.5ex}%
\else
\insertframetitle%
% \pgfdeclareimage[width=1ex,interpolate=true]{statmodlogowhite}{statmod/blank}\hfill\pgfuseimage{statmodlogowhite}\hspace{.5ex}%
\fi
\else
\insertframetitle%
% \pgfdeclareimage[width=1ex,interpolate=true]{statmodlogowhite}{statmod/blank}%
\fi
\ifx\insertframesubtitle\@empty%
\strut\par%
\else
\par{\usebeamerfont*{framesubtitle}{\usebeamercolor[fg]{framesubtitle}\insertframesubtitle}\strut\par}%
\fi%
\nointerlineskip
\vbox{}%
\end{minipage}}%
\beamer@tempdim=\ht\beamer@tempbox%
\advance\beamer@tempdim by 2pt%
\begin{pgfpicture}{0pt}{0pt}{\paperwidth}{\beamer@tempdim}
\usebeamercolor{frametitle right}
\pgfpathrectangle{\pgfpointorigin}{\pgfpoint{\paperwidth}{\beamer@tempdim}}
\pgfusepath{clip}
\pgftext[left,base]{\pgfuseshading{beamer@frametitleshade}}
\end{pgfpicture}
\hskip-\paperwidth%
\box\beamer@tempbox%
}%
\hskip-\Gm@rmargin%
}%
\nointerlineskip
\vskip-0.2pt
\hbox to\textwidth{\hskip-\Gm@lmargin\pgfuseshading{beamer@topshade}\hskip-\Gm@rmargin}
\vskip-2pt
}
\mode
<all>