-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbeamerthemeHRTheme.sty
419 lines (365 loc) · 12.2 KB
/
beamerthemeHRTheme.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
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
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
\newcommand{\SlideSection}[1]{
\def \CurrentSection {#1}
\section{#1}
}
\newcommand{\SlideSubSection}[1]{
\def \CurrentSubSection {#1}
%\subsection{#1}
}
\newenvironment{slide}[1]
{
\begin{frame}{\CurrentSection}
\begin{block}{\CurrentSubSection}
\begin{itemize}
#1
\end{itemize}
\end{block}
}{
\end{frame}
}
\newenvironment{textslide}[1]
{
\begin{frame}{\CurrentSection}
\begin{block}{\CurrentSubSection}
#1
\end{block}
}{
\end{frame}
}
\newenvironment{codeslide}[1]
{
\begin{frame}[fragile]{\CurrentSection}
\begin{block}{\CurrentSubSection}
\begin{lstlisting}[language=CAML]
#1
\end{lstlisting}
\end{block}
}{
\end{frame}
}
\newenvironment{picturetextslide}[2]
{
\begin{frame}{\CurrentSection}
\begin{columns}[c]
\column{.5\textwidth}
\begin{block}{\CurrentSubSection}
\begin{itemize}
#1
\end{itemize}
\end{block}
\column{.5\textwidth}
\center
\includegraphics[width=4cm]{#2}
\end{columns}
}{
\end{frame}
}
\ProvidesPackageRCS $Header: /cvsroot/latex-beamer/latex-beamer/themes/theme/beamerthemeHRTheme.sty,v 1.10 2004/10/07 20:53:10 bourke Exp $
% This theme modifies the PaloAlto, sidebar, and sidebartab beamer themes
% Modifications by Chris Bourke
% Last modified 3/7/05
% BEGIN sidebar dimension setup
\newdimen\beamer@sidebarwidth
\newdimen\beamer@headheight
\usebeamerfont{frametitle}
\beamer@sidebarwidth=2.5\baselineskip
\beamer@headheight=2.5\baselineskip
\reset@font
\def\beamer@lefttext{left}
% Package options
\DeclareOptionBeamer{hideothersubsections}[]{\beamer@nav@subsectionstyle{show/show/hide}}
\DeclareOptionBeamer{hideallsubsections}[]{\beamer@nav@subsectionstyle{hide}}
\DeclareOptionBeamer{width}{\beamer@sidebarwidth=#1}
\DeclareOptionBeamer{height}{\beamer@headheight=#1}
\DeclareOptionBeamer{left}{\def\beamer@sidebarside{left}}
\DeclareOptionBeamer{right}{\def\beamer@sidebarside{right}}
\ExecuteOptionsBeamer{left}
\ProcessOptionsBeamer
% Default mode (<presentation> encompasses <beamer>, <handout>, and <trans> (transparencies))
\mode<beamer>
% All Beamer Boxes will be rounded with a drop shadow
\useinnertheme[shadow=true]{rounded}
% cut-pasted-n-hacked sidebar theme
\ifdim\beamer@headheight>0pt
% if head height is 0pt, use default frame title
\setbeamercolor*{frametitle}{parent=sidebar}
\defbeamertemplate*{frametitle}{sidebar theme}
{%
\nointerlineskip%
\vskip-\beamer@headheight%
\vbox to \beamer@headheight{%
\vfil
\leftskip=-\beamer@leftmargin%
\advance\leftskip by0.3cm%
\rightskip=-\beamer@rightmargin%
\advance\rightskip by0.3cm plus1fil%
{\usebeamercolor[fg]{frametitle}\usebeamerfont{frametitle}\insertframetitle\par}%
{\usebeamercolor[fg]{framesubtitle}\usebeamerfont{framesubtitle}\insertframesubtitle\par}%
\vbox{}%
\vskip-1em%
\vfil
}%
}
\defbeamertemplate*{headline}{sidebar theme}
{%
\begin{beamercolorbox}[wd=\paperwidth]{frametitle}
\ifx\beamer@sidebarside\beamer@lefttext%
\else%
\hfill%
\fi%
\ifdim\beamer@sidebarwidth>0pt%
\usebeamercolor[bg]{logo}%
\vrule width\beamer@sidebarwidth height \beamer@headheight%
\hskip-\beamer@sidebarwidth%
\hbox to \beamer@sidebarwidth{\hss\vbox to
\beamer@headheight{\vss\hbox{\color{fg}\insertlogo}\vss}\hss}%
\else%
\vrule width0pt height \beamer@headheight%
\fi%
\end{beamercolorbox}
}
\fi
\def\beamer@sidebarformat#1#2#3{%
\begin{beamercolorbox}[wd=\beamer@sidebarwidth,leftskip=#1,rightskip=1ex plus1fil,vmode]{#2}
\vbox{}%
#3\par%
\vbox{}%
\vskip-1.5ex%
\end{beamercolorbox}
}
\defbeamertemplate*{section in sidebar}{sidebar theme}
{%
\vbox{%
\vskip1ex%
\beamer@sidebarformat{3pt}{section in sidebar}{\insertsectionhead}%
}%
}
\defbeamertemplate*{section in sidebar shaded}{sidebar theme}
{%
\vbox{%
\vskip1ex%
\beamer@sidebarformat{3pt}{section in sidebar shaded}{\insertsectionhead}%
}%
}
\defbeamertemplate*{subsection in sidebar}{sidebar theme}
{%
\beamer@sidebarformat{5pt}{subsection in sidebar}{\insertsubsectionhead}%
}
\defbeamertemplate*{subsection in sidebar shaded}{sidebar theme}
{%
\beamer@sidebarformat{5pt}{subsection in sidebar shaded}{\insertsubsectionhead}%
}
\ifdim\beamer@sidebarwidth>0pt
% Sidebar
\setbeamersize{sidebar width \beamer@sidebarside=\beamer@sidebarwidth}
\defbeamertemplate*{sidebar \beamer@sidebarside}{sidebar theme}
{
\beamer@tempdim=\beamer@sidebarwidth%
\advance\beamer@tempdim by -6pt%
{\usebeamerfont{title in sidebar}%
\vskip1.5em%
\hskip3pt%
\usebeamercolor[fg]{title in sidebar}%
\insertshorttitle[width=\beamer@tempdim,center,respectlinebreaks]\par%
\vskip1.25em%
}%
{%
\hskip3pt%
\usebeamercolor[fg]{author in sidebar}%
\usebeamerfont{author in sidebar}%
\insertshortauthor[width=\beamer@tempdim,center,respectlinebreaks]\par%
\vskip1.25em%
}%
\insertverticalnavigation{\beamer@sidebarwidth}%
\vfill
\ifx\beamer@sidebarside\beamer@lefttext%
\else%
\usebeamercolor{normal text}%
\llap{\usebeamertemplate***{navigation symbols}\hskip0.1cm}%
\vskip2pt%
\fi%
}%
\ifx\beamer@sidebarside\beamer@lefttext%
\defbeamertemplate*{sidebar right}{sidebar theme}
{%
\vfill%
\llap{\usebeamertemplate***{navigation symbols}\hskip0.1cm}%
\vskip2pt}
\fi
% Margins
\setbeamersize{text margin left=0.5cm,text margin right=0.5cm}
\fi
%\usecolortheme{sidebartab} cut-pasted-n-hacked:
\setbeamercolor*{section in sidebar shaded}{parent=palette sidebar secondary}
\setbeamercolor*{section in sidebar}
{parent=section in sidebar shaded,use={sidebar,section in sidebar shaded},%
fg=UNL@Scarlet,bg=UNL@Cream}
\setbeamercolor*{subsection in sidebar shaded}{parent=palette sidebar primary}
\setbeamercolor*{subsection in sidebar}
{parent=subsection in sidebar shaded,use=section in sidebar,%
bg=section in sidebar.bg, % We simply inherit the section properties
fg=section in sidebar.fg} % Here too.
% We use *part* of the outer theme "shadow" but without the "split" theme
% This gives us a (hacked) drop shadow on the sidebar and frametitle bar
\pgfdeclarehorizontalshading[frametitle.bg,frametitle right.bg]{beamer@frametitleshade}{\paperheight}{%
color(0pt)=(frametitle.bg);
color(\paperwidth)=(frametitle right.bg)}
\AtBeginDocument{
%
\pgfdeclareverticalshading{beamer@topborder}{\paperwidth}{%
color(0pt)=(black);
color(1pt)=(black)}
\pgfdeclarehorizontalshading{beamer@sideborder}{\paperheight}{%
color(0pt)=(black);
color(1pt)=(black)}
\pgfdeclareverticalshading{beamer@topshade}{\paperwidth}{%
color(0pt)=(bg);
color(4pt)=(black!50!bg)}
\pgfdeclareverticalshading{beamer@topshadesidebarcover}{\beamer@sidebarwidth}{%
color(0pt)=(UNL@Scarlet);
color(4pt)=(UNL@Scarlet)}
\pgfdeclareverticalshading{beamer@topshadesidebarcoverwhite}{6pt}{%
color(0pt)=(white);
color(4pt)=(white)}
\pgfdeclarehorizontalshading{beamer@sideshade}{\paperheight}{%
color(0pt)=(black!50!bg);
color(4pt)=(bg)}
% An attempt at getting the shadings to meet nicely, FAILED
% \pgfdeclarehorizontalshading{beamer@sidediagshade}{5.66pt}{%
% color(0pt)=(green!50!bg);
% color(5.66pt)=(bg)}
}
\addtobeamertemplate{headline}
{}
{%
% \vskip-0.2pt
%drop-shadow:
%old: \hskip\beamer@sidebarwidth\hskip.2cm\pgfuseshading{beamer@topshade}
\hskip\beamer@sidebarwidth\pgfuseshading{beamer@topshadesidebarcoverwhite}\pgfuseshading{beamer@topshade}
%border: \hskip\beamer@sidebarwidth\hskip.2cm\pgfuseshading{beamer@topborder}
% Attempted to combine two drop shadows in a transition, failed
%*** TRY HERE INSTEAD: declare a horizontal shade, rotate it 45 degrees and clip it.
% \pgfmoveto{\pgfxy{0,0}}
% \pgflineto{\pgfxy{0,-2}}
% \pgflineto{\pgfxy{-2,-2}}
% \pgflineto{\pgfxy{2,-2}}
% \pgflineto{\pgfxy{2,2}}
% \pgflineto{\pgfxy{2,0}}
% \pgflineto{\pgfxy{0,0}}
% \pgfclip
\vskip-4pt
\pgfuseshading{beamer@topshadesidebarcover}
\vskip-2pt
}
% Add page numbering to bottom left.
% simply setting it (\setbeamertemplate{footline}[page number]) defaults to lower right
\addtobeamertemplate{footline}
{%
\usebeamercolor[fg]{author in sidebar}
\vskip-1cm\hskip10pt
%\insertpagenumber\,/\,\insertpresentationendpage\kern1em\vskip2pt%
\insertframenumber\,/\,\inserttotalframenumber\kern1em\vskip2pt%
}
\addtobeamertemplate{sidebar \beamer@sidebarside}
{}
{
%Want to "rewind" to the top of the sidebar, but how?
%drop-shadow:
\vskip-\paperwidth\hskip\beamer@sidebarwidth\pgfuseshading{beamer@sideshade}
%border: \vskip-\paperwidth\hskip\beamer@sidebarwidth\pgfuseshading{beamer@sideborder}
}
% End Shadow
\usecolortheme[RGB={210,18,65}]{structure}
% Complete color themes:
% albatross, beetle, crane, dove, fly, seagull
% Inner color themes:
% lily, orchid, rose
% Outer color themes:
% whale, seahorse, dolphin(?)
\usecolortheme{orchid} % Establishes inner, dark colors
\usecolortheme{whale} % Establishes outer, dark colors
% Customized Various Color elements:
\setbeamercolor{titlelike}{fg=UNL@Cream,bg=UNL@Scarlet} %
\setbeamercolor{sidebar}{fg=UNL@Cream} %
\setbeamercolor{frametitle}{fg=UNL@Cream} %
\setbeamercolor{title in sidebar}{fg=UNL@Cream} %
\setbeamercolor{author in sidebar}{fg=UNL@Cream} %
%\setbeamercolor{section in sidebar}{fg=yellow} These two do not load (are overwritten) if
%\setbeamercolor{subsection in sidebar}{fg=yellow} you use the sidebartab
\setbeamercolor{section in sidebar shaded}{fg=UNL@Cream}
\setbeamercolor{subsection in sidebar shaded}{fg=UNL@Cream}
%\setbeamertemplate{blocks}[rounded]{shadow=true}
\setbeamercolor{block title}{fg=white,bg=black}
\setbeamercolor{block body}{fg=black,bg=UNL@VeryLightGrey}
% Set the UNL logo, UNL.pdf must be in the latex path or working directory
\setbeamercolor{logo}{fg=black,bg=white}
\logo{\includegraphics[height=1.2cm]{logoHRBig.png}}
% Handout Mode - Using the default layouts, no menus, etc.
\mode
<handout>
\usetheme{default}
\usecolortheme{default}
\setbeamertemplate{navigation symbols}{}
\useinnertheme{default}
%reset shadow boxes to very light grey
\setbeamercolor{block title}{fg=black,bg=UNL@LightGrey} %
\setbeamercolor{block body}{fg=black,bg=UNL@VeryLightGrey} %
% Settings for every mode
\mode
<all>
% We like algorithms in CS, right?
\newtheorem{algorithmblock}[theorem]{Algorithm}
\newtheorem{exercise}[theorem]{Exercise}
%\newtheorem{problem}[theorem]{Problem}
%Two horrible hacks to get a "note page" after every slide.
\newcommand{\noteframe}{
\only<handout>{ %
\begin{frame}
\frametitle{Notes}
\begin{center}
\begin{tikzpicture}
\foreach \y in {0,1,2,3,4,5,6}
\draw[thick] (0,\y) -- (11,\y);
\end{tikzpicture}
\end{center}
\end{frame}
}%
}
\newcommand{\noteslide}{%to be used after every \framebreak
\only<handout>{ %
\begin{center}
\begin{tikzpicture}
\foreach \y in {0,1,2,3,4,5,6}
\draw[thick] (0,\y) -- (11,\y);
\end{tikzpicture}
\end{center}
\framebreak
}%
}
% We declare the main color theme: Scarlet & Cream
\definecolor{UNL@Scarlet}{RGB}{210,18,65}
% Alternate UNL@Reds: 204,0,0 (unl.edu) <--seems to be the best
% 240,7,46 (logo)
% 255,25,25 (original)
% 140,17,17 ("scarlet")
\definecolor{UNL@Cream}{RGB}{245,240,219}
%Cream 245 240 219
%Cream2 245 255 250 - Whitest
%Dairy Cream 249 228 188 - more peachy
%Cream Brulee 255 229 160 - peach
%Cream Can 245 200 92 - Almost a peach
%Coconut Cream 248 247 220 - More white
\definecolor{UNL@DarkGrey}{RGB}{35,35,35}
\definecolor{UNL@Grey}{RGB}{100,100,100}
\definecolor{UNL@LightGrey}{RGB}{200,200,200}
\definecolor{UNL@VeryLightGrey}{RGB}{225,225,225}
% We enforce conformity at UNL!
% so we override example (greenish) and alerted (redish)
\setbeamercolor{block title example}{fg=white,bg=black} %
%\setbeamercolor{block body example}{fg=block body.fg,bg=block body.bg} %
\setbeamercolor{block title alerted}{fg=block title.fg,bg=block title.bg} %
\setbeamercolor{block body alerted}{fg=block body.fg,bg=block body.bg} %
\setlength{\parskip}{.25cm}
%\def\mathfamilydefault{\rmdefault}\beamer@sansmathfalse
\usefonttheme[onlymath]{serif}
\beamertemplatetheoremsunnumbered %This suppresses theorem numbers