-
Notifications
You must be signed in to change notification settings - Fork 16
/
beamerthemeCockrell.sty
178 lines (153 loc) · 5.87 KB
/
beamerthemeCockrell.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
%Copyright (c) <2015> <John T. Foster>
%Permission is hereby granted, free of charge, to any person obtaining a copy
%of this software and associated documentation files (the "Software"), to deal
%in the Software without restriction, including without limitation the rights
%to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
%copies of the Software, and to permit persons to whom the Software is
%furnished to do so, subject to the following conditions:
%The above copyright notice and this permission notice shall be included in
%all copies or substantial portions of the Software.
%THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
%IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
%FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
%AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
%LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
%OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
%THE SOFTWARE.
\DeclareOptionBeamer{dept}{\def\beamer@Cockrell@dept{#1}}
\ExecuteOptionsBeamer{dept=CockrellSchool}
\ProcessOptionsBeamer
\mode<presentation>
%Requirements
\RequirePackage{tikz}
\graphicspath{{./figs/}}
%The base themes we inherit from
\usetheme[headheight=1.0cm]{boxes}
\usecolortheme{default}
\definecolor{utorange}{RGB}{191, 87, 0}
\definecolor{utblack}{RGB}{51, 63, 72}
\definecolor{cffffff}{RGB}{255,255,255}
\pgfdeclareimage[width=0.7\textwidth]{CockrellSchool}{./figs/CockrellSchool}
%The titlebar showing the Dept name and UT-Austin logo
\addheadbox{section in head/foot}{\raisebox{-8em}{\pgfuseimage{CockrellSchool}}}
%\addheadbox{section in head/foot}{\raisebox{0.0em}{\includegraphics[width=1.0\textwidth]{\beamer@Cockrell@dept}}}
%Theme settings
%Title page
\setbeamerfont{title page}{series=\mdseries}
\setbeamercolor{title page}{fg=utblack}
\setbeamerfont{title}{series=\bfseries}
\setbeamercolor{title}{fg=utorange}
\setbeamerfont{subtitle}{series=\bfseries}
\setbeamercolor{subtitle}{fg=utblack}
\setbeamerfont{author}{series=\mdseries}
\setbeamercolor{author}{fg=utblack}
%Color palette
\setbeamercolor{structure}{fg=utorange}
\setbeamercolor{section in head/foot}{bg=utorange, fg=white}
\setbeamercolor*{palette primary}{use=structure,bg=white, fg=utorange}
\setbeamercolor*{palette secondary}{use=structure,bg=white, fg=utorange}
\setbeamercolor*{palette tertiary}{bg=utorange, fg=utorange}
\setbeamercolor*{palette quaternary}{bg=white, fg=utorange}
%Frames
\setbeamercolor*{frametitle}{use=structure,fg=utorange, bg=white}
\setbeamercolor*{framesubtitle}{fg=utblack}
%Blocks
\setbeamertemplate{blocks}[rounded][shadow=true]
\setbeamercolor*{block title}{fg=white, bg=utorange}
%Text
\setbeamercolor{normal text}{bg=white,fg=utblack}
\setbeamercolor{alerted text}{fg=utblack}
\setbeamercolor{item projected}{use=item,fg=black,bg=item.fg!35}
\setbeamertemplate{itemize subitem}{{\textendash}}
\setbeamercolor{subitem}{fg=utblack}
%Remove navigation symbols
\setbeamertemplate{navigation symbols}{}
%Note page settings
\setbeamerfont{note page}{size=\scriptsize}
\setbeamertemplate{note page}{\insertnote\par}
%Setup title page
\defbeamertemplate*{title page}{customized}[1][]{%
\vspace{1cm}
\usebeamerfont{title page}\usebeamercolor[fg]{title page}
Cockrell School of Engineering \par
\vspace{-0.2cm}
\rule{11cm}{0.4pt}\par
\bigskip
\usebeamerfont{title}\usebeamercolor[fg]{title}\inserttitle\par
\usebeamerfont{subtitle}\usebeamercolor[fg]{subtitle}\insertsubtitle\par
\bigskip
\usebeamerfont{title page}\usebeamercolor[fg]{title page}
\rule{11cm}{0.4pt}\par
{\flushright
\usebeamerfont{author}\usebeamercolor[fg]{author}\insertauthor\par
\usebeamerfont{institute}\usebeamercolor[fg]{institute}\insertinstitute\par
\usebeamerfont{date}\usebeamercolor[fg]{institute}\insertdate\par
}
}
%Use correct fonts
\usepackage[default,oldstyle,scale=0.95]{opensans}
\usepackage[T1]{fontenc}
%Use biber for special bibliogrphay. The next few lines are all custom hacks to
%make nice footnote citation in beamer.
\usepackage[hyperref=true,style=verbose,labeldate=true,minnames=2,maxnames=10,maxbibnames=99,backend=biber]{biblatex}
%Use utorange for hyperlinks
\hypersetup{colorlinks=true, allcolors=utblack, linkcolor=utblack, urlcolor=utorange}
%\renewcommand*{\labelnamepunct}{\addcolon\addspace}
\DeclareFieldFormat[article,inbook,incollection,inproceedings,patent,thesis,unpublished]
{title}{#1\isdot}
\renewbibmacro*{cite:short}{%
\printnames{labelname}%
\setunit*{\addspace}%
\printtext[bibhyperlink]{%
\printfield{labelyear}\printfield{extrayear}}}
%Remove footnote marks
\newcommand\footnotenonum[1]{%
\begingroup
\renewcommand\thefootnote{}\footnote{#1}%
\addtocounter{footnote}{-1}%
\endgroup
}
\makeatletter
\renewrobustcmd{\blx@mkbibfootnote}[2]{%
\iftoggle{blx@footnote}
{\blx@warning{Nested notes}%
\addspace\mkbibparens{#2}}
{\unspace
\ifnum\blx@notetype=\tw@
\expandafter\@firstoftwo
\else
\expandafter\@secondoftwo
\fi
{\csuse{blx@theendnote#1}{\protecting{\blxmkbibnote{end}{#2}}}}
{\csuse{footnotenonum#1}{\protecting{\blxmkbibnote{foot}{#2}}}}}}
\makeatother
%For footnote citing
\setbeamertemplate{footnote}{%
\parbox[b]{1.0\textwidth}{%
\tiny
\parindent 1em
\noindent
\hbox to 1.8 em{\hfil\insertfootnotemark}
\insertfootnotetext
}
}
\renewcommand\cite{\footcite}
%Create lastpage macro
\newcommand{\lastframe}{%
\setbeamercolor{background canvas}{bg=utorange}
\setbeamertemplate{headline}{
\leavevmode%
\hbox{%
\begin{beamercolorbox}[wd=\paperwidth,ht=8.25ex,dp=3.5ex]{utorange}%
\end{beamercolorbox}%
}%
}
\begin{frame}
\vspace{1.5cm}
\begin{center}
\includegraphics[width=1.48\textwidth]{CockrellSchool}
\end{center}
\end{frame}
}
\newcommand{\titleframe}{\frame{\maketitle}}
\mode<all>