1 \ProvidesPackageRCS $Header: /cvsroot/latex-beamer/latex-beamer/themes/theme/beamerthemeUNLTheme.sty,v 1.10 2004/10/07 20:53:10 bourke Exp $
3 % This theme modifies the PaloAlto, sidebar, and sidebartab beamer themes
4 % Modifications by Chris Bourke
7 % BEGIN sidebar dimension setup
8 \newdimen\beamer@sidebarwidth
9 \newdimen\beamer@headheight
10 \usebeamerfont{frametitle}
11 \beamer@sidebarwidth=2.5\baselineskip
12 \beamer@headheight=2.5\baselineskip
15 \def\beamer@lefttext{left}
19 \DeclareOptionBeamer{hideothersubsections}[]{\beamer@nav@subsectionstyle{show/show/hide}}
20 \DeclareOptionBeamer{hideallsubsections}[]{\beamer@nav@subsectionstyle{hide}}
22 \DeclareOptionBeamer{width}{\beamer@sidebarwidth=#1}
23 \DeclareOptionBeamer{height}{\beamer@headheight=#1}
24 \DeclareOptionBeamer{left}{\def\beamer@sidebarside{left}}
25 \DeclareOptionBeamer{right}{\def\beamer@sidebarside{right}}
26 \ExecuteOptionsBeamer{left}
29 % Default mode (<presentation> encompasses <beamer>, <handout>, and <trans> (transparencies))
32 % All Beamer Boxes will be rounded with a drop shadow
33 \useinnertheme[shadow=true]{rounded}
35 % cut-pasted-n-hacked sidebar theme
36 \ifdim\beamer@headheight>0pt
37 % if head height is 0pt, use default frame title
39 \setbeamercolor*{frametitle}{parent=sidebar}
41 \defbeamertemplate*{frametitle}{sidebar theme}
44 \vskip-\beamer@headheight%
45 \vbox to \beamer@headheight{%
47 \leftskip=-\beamer@leftmargin%
48 \advance\leftskip by0.3cm%
49 \rightskip=-\beamer@rightmargin%
50 \advance\rightskip by0.3cm plus1fil%
51 {\usebeamercolor[fg]{frametitle}\usebeamerfont{frametitle}\insertframetitle\par}%
52 {\usebeamercolor[fg]{framesubtitle}\usebeamerfont{framesubtitle}\insertframesubtitle\par}%
59 \defbeamertemplate*{headline}{sidebar theme}
61 \begin{beamercolorbox}[wd=\paperwidth]{frametitle}
62 \ifx\beamer@sidebarside\beamer@lefttext%
66 \ifdim\beamer@sidebarwidth>0pt%
67 \usebeamercolor[bg]{logo}%
68 \vrule width\beamer@sidebarwidth height \beamer@headheight%
69 \hskip-\beamer@sidebarwidth%
70 \hbox to \beamer@sidebarwidth{\hss\vbox to
71 \beamer@headheight{\vss\hbox{\color{fg}\insertlogo}\vss}\hss}%
73 \vrule width0pt height \beamer@headheight%
80 \def\beamer@sidebarformat#1#2#3{%
81 \begin{beamercolorbox}[wd=\beamer@sidebarwidth,leftskip=#1,rightskip=1ex plus1fil,vmode]{#2}
89 \defbeamertemplate*{section in sidebar}{sidebar theme}
93 \beamer@sidebarformat{3pt}{section in sidebar}{\insertsectionhead}%
97 \defbeamertemplate*{section in sidebar shaded}{sidebar theme}
101 \beamer@sidebarformat{3pt}{section in sidebar shaded}{\insertsectionhead}%
105 \defbeamertemplate*{subsection in sidebar}{sidebar theme}
107 \beamer@sidebarformat{5pt}{subsection in sidebar}{\insertsubsectionhead}%
110 \defbeamertemplate*{subsection in sidebar shaded}{sidebar theme}
112 \beamer@sidebarformat{5pt}{subsection in sidebar shaded}{\insertsubsectionhead}%
116 \ifdim\beamer@sidebarwidth>0pt
119 \setbeamersize{sidebar width \beamer@sidebarside=\beamer@sidebarwidth}
120 \defbeamertemplate*{sidebar \beamer@sidebarside}{sidebar theme}
122 \beamer@tempdim=\beamer@sidebarwidth%
123 \advance\beamer@tempdim by -6pt%
124 {\usebeamerfont{title in sidebar}%
127 \usebeamercolor[fg]{title in sidebar}%
128 \insertshorttitle[width=\beamer@tempdim,center,respectlinebreaks]\par%
133 \usebeamercolor[fg]{author in sidebar}%
134 \usebeamerfont{author in sidebar}%
135 \insertshortauthor[width=\beamer@tempdim,center,respectlinebreaks]\par%
138 \insertverticalnavigation{\beamer@sidebarwidth}%
140 \ifx\beamer@sidebarside\beamer@lefttext%
142 \usebeamercolor{normal text}%
143 \llap{\usebeamertemplate***{navigation symbols}\hskip0.1cm}%
148 \ifx\beamer@sidebarside\beamer@lefttext%
149 \defbeamertemplate*{sidebar right}{sidebar theme}
152 \llap{\usebeamertemplate***{navigation symbols}\hskip0.1cm}%
156 \setbeamersize{text margin left=0.5cm,text margin right=0.5cm}
159 %\usecolortheme{sidebartab} cut-pasted-n-hacked:
160 \setbeamercolor*{section in sidebar shaded}{parent=palette sidebar secondary}
161 \setbeamercolor*{section in sidebar}
162 {parent=section in sidebar shaded,use={sidebar,section in sidebar shaded},%
163 fg=UNL@Scarlet,bg=UNL@Cream}
165 \setbeamercolor*{subsection in sidebar shaded}{parent=palette sidebar primary}
166 \setbeamercolor*{subsection in sidebar}
167 {parent=subsection in sidebar shaded,use=section in sidebar,%
168 bg=section in sidebar.bg, % We simply inherit the section properties
169 fg=section in sidebar.fg} % Here too.
171 % We use *part* of the outer theme "shadow" but without the "split" theme
172 % This gives us a (hacked) drop shadow on the sidebar and frametitle bar
173 \pgfdeclarehorizontalshading[frametitle.bg,frametitle right.bg]{beamer@frametitleshade}{\paperheight}{%
174 color(0pt)=(frametitle.bg);
175 color(\paperwidth)=(frametitle right.bg)}
179 \pgfdeclareverticalshading{beamer@topborder}{\paperwidth}{%
182 \pgfdeclarehorizontalshading{beamer@sideborder}{\paperheight}{%
186 \pgfdeclareverticalshading{beamer@topshade}{\paperwidth}{%
188 color(4pt)=(black!50!bg)}
189 \pgfdeclareverticalshading{beamer@topshadesidebarcover}{\beamer@sidebarwidth}{%
190 color(0pt)=(UNL@Scarlet);
191 color(4pt)=(UNL@Scarlet)}
192 \pgfdeclareverticalshading{beamer@topshadesidebarcoverwhite}{6pt}{%
196 \pgfdeclarehorizontalshading{beamer@sideshade}{\paperheight}{%
197 color(0pt)=(black!50!bg);
199 % An attempt at getting the shadings to meet nicely, FAILED
200 % \pgfdeclarehorizontalshading{beamer@sidediagshade}{5.66pt}{%
201 % color(0pt)=(green!50!bg);
202 % color(5.66pt)=(bg)}
205 \addtobeamertemplate{headline}
210 %old: \hskip\beamer@sidebarwidth\hskip.2cm\pgfuseshading{beamer@topshade}
211 \hskip\beamer@sidebarwidth\pgfuseshading{beamer@topshadesidebarcoverwhite}\pgfuseshading{beamer@topshade}
212 %border: \hskip\beamer@sidebarwidth\hskip.2cm\pgfuseshading{beamer@topborder}
213 % Attempted to combine two drop shadows in a transition, failed
214 %*** TRY HERE INSTEAD: declare a horizontal shade, rotate it 45 degrees and clip it.
215 % \pgfmoveto{\pgfxy{0,0}}
216 % \pgflineto{\pgfxy{0,-2}}
217 % \pgflineto{\pgfxy{-2,-2}}
218 % \pgflineto{\pgfxy{2,-2}}
219 % \pgflineto{\pgfxy{2,2}}
220 % \pgflineto{\pgfxy{2,0}}
221 % \pgflineto{\pgfxy{0,0}}
224 \pgfuseshading{beamer@topshadesidebarcover}
228 % Add page numbering to bottom left.
229 % simply setting it (\setbeamertemplate{footline}[page number]) defaults to lower right
230 \addtobeamertemplate{footline}
232 \usebeamercolor[fg]{author in sidebar}
234 %\insertpagenumber\,/\,\insertpresentationendpage\kern1em\vskip2pt%
235 \insertframenumber\,/\,\inserttotalframenumber\kern1em\vskip2pt%
238 \addtobeamertemplate{sidebar \beamer@sidebarside}
241 %Want to "rewind" to the top of the sidebar, but how?
243 \vskip-\paperwidth\hskip\beamer@sidebarwidth\pgfuseshading{beamer@sideshade}
244 %border: \vskip-\paperwidth\hskip\beamer@sidebarwidth\pgfuseshading{beamer@sideborder}
248 \usecolortheme[RGB={140,17,17}]{structure}
250 % Complete color themes:
251 % albatross, beetle, crane, dove, fly, seagull
253 % Inner color themes:
256 % Outer color themes:
257 % whale, seahorse, dolphin(?)
259 \usecolortheme{orchid} % Establishes inner, dark colors
260 \usecolortheme{whale} % Establishes outer, dark colors
262 % Customized Various Color elements:
263 \setbeamercolor{titlelike}{fg=UNL@Cream,bg=UNL@Scarlet} %
264 \setbeamercolor{sidebar}{fg=UNL@Cream} %
265 \setbeamercolor{frametitle}{fg=UNL@Cream} %
266 \setbeamercolor{title in sidebar}{fg=UNL@Cream} %
267 \setbeamercolor{author in sidebar}{fg=UNL@Cream} %
268 %\setbeamercolor{section in sidebar}{fg=yellow} These two do not load (are overwritten) if
269 %\setbeamercolor{subsection in sidebar}{fg=yellow} you use the sidebartab
270 \setbeamercolor{section in sidebar shaded}{fg=UNL@Cream}
271 \setbeamercolor{subsection in sidebar shaded}{fg=UNL@Cream}
273 %\setbeamertemplate{blocks}[rounded]{shadow=true}
274 \setbeamercolor{block title}{fg=white,bg=black}
275 \setbeamercolor{block body}{fg=black,bg=UNL@VeryLightGrey}
277 % Set the UNL logo, UNL.pdf must be in the latex path or working directory
278 \setbeamercolor{logo}{fg=black,bg=white}
279 \logo{\includegraphics[height=0.75cm]{OneLab-logo-with-text-red.jpg}}
281 % Handout Mode - Using the default layouts, no menus, etc.
285 \usecolortheme{default}
286 \setbeamertemplate{navigation symbols}{}
287 \useinnertheme{default}
288 %reset shadow boxes to very light grey
289 \setbeamercolor{block title}{fg=black,bg=UNL@LightGrey} %
290 \setbeamercolor{block body}{fg=black,bg=UNL@VeryLightGrey} %
292 % Settings for every mode
295 % We like algorithms in CS, right?
297 \newtheorem{algorithmblock}[theorem]{Algorithm}
298 \newtheorem{exercise}[theorem]{Exercise}
299 %\newtheorem{problem}[theorem]{Problem}
301 %Two horrible hacks to get a "note page" after every slide.
302 \newcommand{\noteframe}{
308 \foreach \y in {0,1,2,3,4,5,6}
309 \draw[thick] (0,\y) -- (11,\y);
316 \newcommand{\noteslide}{%to be used after every \framebreak
320 \foreach \y in {0,1,2,3,4,5,6}
321 \draw[thick] (0,\y) -- (11,\y);
328 % We declare the main color theme: Scarlet & Cream
329 \definecolor{UNL@Scarlet}{RGB}{140,17,17}
330 % Alternate UNL@Reds: 204,0,0 (unl.edu) <--seems to be the best
332 % 255,25,25 (original)
333 % 140,17,17 ("scarlet")
334 \definecolor{UNL@Cream}{RGB}{245,240,219}
336 %Cream2 245 255 250 - Whitest
337 %Dairy Cream 249 228 188 - more peachy
338 %Cream Brulee 255 229 160 - peach
339 %Cream Can 245 200 92 - Almost a peach
340 %Coconut Cream 248 247 220 - More white
341 \definecolor{UNL@DarkGrey}{RGB}{35,35,35}
342 \definecolor{UNL@Grey}{RGB}{100,100,100}
343 \definecolor{UNL@LightGrey}{RGB}{200,200,200}
344 \definecolor{UNL@VeryLightGrey}{RGB}{225,225,225}
346 % We enforce conformity at UNL!
347 % so we override example (greenish) and alerted (redish)
348 \setbeamercolor{block title example}{fg=white,bg=black} %
349 %\setbeamercolor{block body example}{fg=block body.fg,bg=block body.bg} %
350 \setbeamercolor{block title alerted}{fg=block title.fg,bg=block title.bg} %
351 \setbeamercolor{block body alerted}{fg=block body.fg,bg=block body.bg} %
352 \setlength{\parskip}{.25cm}
353 %\def\mathfamilydefault{\rmdefault}\beamer@sansmathfalse
354 \usefonttheme[onlymath]{serif}
355 \beamertemplatetheoremsunnumbered %This suppresses theorem numbers