-
Notifications
You must be signed in to change notification settings - Fork 2
/
template.tex
224 lines (189 loc) · 8.65 KB
/
template.tex
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
\documentclass[
11pt, % Set the default font size, options include: 8pt, 9pt, 10pt, 11pt, 12pt, 14pt, 17pt, 20pt
aspectratio=169, % Set the aspect ratio to a 16:9 ratio which matches the aspect ratio of 1080p and 4K screens and projectors
]{beamer}
% This template is inspired by the VT Presentation Template, as well as the THU Beamer Theme. Many thanks!
\graphicspath{{images/}{./}} % Specifies where to look for included images (trailing slash required)
\usepackage{booktabs} % Allows the use of \toprule, \midrule and \bottomrule for better rules in tables
\usepackage{calligra} % Font for wordart
% \usepackage{appendixnumberbeamer} % If you want a separate slide counter for your appendix
\usepackage{fnpct} % Eliminate the unwanted space before the footnote mark
\usepackage{listings} % For code display
%---------------------------------------------------------
% FOOTNOTES & CITATIONS BASIC SETUP
%---------------------------------------------------------
% Check FOOTNOTES & CITATIONS ADVANCED SETUP for solutions for intra- and inter-frame citations
% The workarounds in ADVANCED SETUP require the style to be "numeric"
% If you're good without ADVANCED SETUP, comment out the ADVANCED SETUP section, and pick whatever style you like
% \usepackage[style=authoryear, backend=bibtex]{biblatex}
\usepackage[style=numeric, sorting=none, backend=biber]{biblatex}
\addbibresource{bib.bib}
\setbeamerfont{footnote}{size=\tiny}
% The lines below set the citation style to "number, title, year". The ADVANCED SETUP will overwrite this style
\usepackage{xpatch}
\xapptobibmacro{cite}{\setunit{\nametitledelim} \printfield{title} \setunit{\nametitledelim} \printfield{year}}
%---------------------------------------------------------
% FOOTNOTES & CITATIONS ADVANCED SETUP
%---------------------------------------------------------
% Manage faulty intra- and inter-frame footnotes and citations. References:
% https://tex.stackexchange.com/a/520777
% https://topanswers.xyz/tex?q=453
% You might want to use \firstcite and \secondcite instead of \footnote in your document
% Mark the first citation with \firstcite and the rest with \secondcite
% \renewcommand{\thefootnote}{\arabic{footnote}} % Switch to footnote with numbers
% \renewcommand{\thefootnote}{\alph{footnote}} % Switch to footnote with letters
\DeclareCiteCommand{\firstcite}
{\usebibmacro{prenote}}
{%
\footnotemark[\thefield{labelnumber}]% mark corresponding to the number entry
\footnotetext[\thefield{labelnumber}]{% footnote text corresponding to the number entry
\printnames{labelname}% name
\setunit{\printdelim{nametitledelim}}% separator
% \setunit{\addperiod\space}% another way to add separator
\printfield[citetitle]{labeltitle}% title
\setunit{\printdelim{nametitledelim}}% separator
\printfield{year}% year
\newunit{\adddot}% ending dot
}%
}
{\multicitedelim}
{\usebibmacro{postnote}}
\DeclareCiteCommand{\secondcite}
{\usebibmacro{prenote}}
{%
\footnotemark[\thefield{labelnumber}]% mark corresponding to the number entry
}
{\multicitedelim}
{\usebibmacro{postnote}}
%---------------------------------------------------------
% SELECT THEME & COLORS
%---------------------------------------------------------
\usetheme{Madrid} % You can use other themes too, but this changes many things. I've found Madrid to be the best for this color scheme
% fg = foreground color
% bg = background color
% Many colors are linked to multiple attributes, change with caution!
\definecolor{hku_blue}{RGB}{0, 147, 204}
\definecolor{hku_green}{RGB}{0, 170, 132}
\setbeamercolor*{structure}{bg=hku_green, fg=hku_green}
% Title block and bottom right box color
\setbeamercolor*{palette primary}{use=structure, fg=white,bg=hku_green} % Bottom left box and bar between title & top bubbles
\setbeamercolor*{palette secondary}{use=structure, fg=hku_green, bg=white}
% Probably not used
\setbeamercolor*{palette tertiary}{use=structure, fg=white, bg=hku_green}
% Title of each slide
\setbeamercolor{frametitle}{bg=hku_green, fg=white}
\setbeamercolor*{titlelike}{parent=palette primary}
%%% Headline and Central Footer %%%
% You can change the theme back and forth for each frame
% Theme I - white head, white foot
% \setbeamercolor{section in head/foot}{fg=hku_blue, bg=white}
% \setbeamercolor{headline}{fg=hku_blue, bg=white}
% Theme II - gold head, gold foot (as shown in the title frame)
\setbeamercolor{section in head/foot}{fg=white, bg=hku_blue}
\setbeamercolor{headline}{fg=white, bg=hku_blue}
% Theme III - white head, gold foot (as shown in the rest of the frames)
% \setbeamercolor{section in head/foot}{fg=hku_blue, bg=white}
% \setbeamercolor{title in head/foot}{fg=white, bg=hku_blue}
% \setbeamercolor{headline}{fg=hku_blue, bg=white}
%%% Specific Colors %%%
\setbeamercolor{item projected}{bg=hku_blue}
\setbeamertemplate{enumerate items}{bg=hku_blue}
\setbeamercolor{itemize item}{fg=hku_blue}
\setbeamercolor{itemize subitem}{fg=hku_blue}
\setbeamercolor{button}{bg=hku_blue}
%%% Edits ONLY the TOC slide %%%
\setbeamercolor{section in toc}{fg=black}
\setbeamercolor{subsection in toc}{fg=black}
%%% Block Colors %%%
% Standard block
\setbeamercolor{block title}{bg=hku_blue, fg=white}
\setbeamercolor{block body}{bg=hku_blue!20}
% Alerted block
\setbeamercolor{block title alerted}{bg=orange, fg=white}
\setbeamercolor{block body alerted}{bg=orange!10}
% Example block
\setbeamercolor{block title example}{bg=hku_green, fg=white}
\setbeamercolor{block body example}{bg=hku_green!10}
%---------------------------------------------------------
% SELECT THE FONT THEME & FONTS
%---------------------------------------------------------
\usefonttheme{default} % Typeset using the default sans serif font
\usepackage{palatino} % Use the Palatino font for serif text
\usepackage[default]{opensans} % Use the Open Sans font for sans serif text
\useinnertheme{circles}
%---------------------------------------------------------
% SELECT THE OUTER THEME
%---------------------------------------------------------
% Outer themes change the overall layout of slides, such as header and footer lines, sidebars and slide titles. Uncomment each theme in turns to see what changes it makes to your presentation.
% \useoutertheme{default}
\useoutertheme{miniframes}
% \useoutertheme{infolines}
% \useoutertheme{smoothbars}
% \useoutertheme{sidebar}
% \useoutertheme{split}
% \useoutertheme{shadow}
% \useoutertheme{tree}
% \useoutertheme{smoothtree}
%---------------------------------------------------------
% PRESENTATION INFORMATION
%---------------------------------------------------------
% School logo
% You can enable and disable logo display for each frame
\title[HKU Beamer Template]{HKU Presentation Template}
% Click the middle footer can switch between the first and last numbered frame
\subtitle{Ver 1.0.0}
\author[For Internal Use]{Author: Wendong XU}
\institute[]{Department of Electrical and Electronic Engineering \\ \smallskip \textit{wdxu@connect.hku.hk}}
\date[Nov 2023]
% \date[\today]
% School logo
% You can enable and disable logo display for each frame
\logo{\includegraphics[width=2.5cm]{beamer/hku_logo_CE_C.png}}
%---------------------------------------------------------
% CODE DISPLAY
%---------------------------------------------------------
\lstset{
basicstyle=\ttfamily\small,
keywordstyle=\bfseries\color{blue},
emphstyle=\ttfamily\color{red},
stringstyle=\color{green},
numbers=left,
numberstyle=\small\color{gray},
rulesepcolor=\color{red!20!green!20!blue!20},
frame=shadowbox,
xleftmargin=1cm,
xrightmargin=1cm,
}
%---------------------------------------------------------
% EXTRA SETTINGS
%---------------------------------------------------------
% Clear warnings related to \translate
% https://github.com/josephwright/beamer/issues/449
\pdfstringdefDisableCommands{
\def\translate#1{#1}
}
% Adjust header height
\setbeamertemplate{headline}{
\nointerlineskip
\begin{beamercolorbox}[wd=\paperwidth,ht=7.0ex]{headline}
\insertnavigation{\paperwidth}\vspace*{2.0ex}
\end{beamercolorbox}
}
% Disable navigation symbols
\setbeamertemplate{navigation symbols}{}
%---------------------------------------------------------
% DOCUMENT BEGINS
%---------------------------------------------------------
\begin{document}
\input{01-title.tex}
\input{02-contents.tex}
\input{03-example-motivation.tex}
\input{04-example-theory.tex}
\input{05-example-conclusion.tex}
\input{06-example-appendix.tex}
\input{07-example-references.tex}
\input{08-example-appendix-figures.tex}
\input{09-example-appendix-terms.tex}
\input{10-example-appendix-code.tex}
\input{11-example-appendix-theorems.tex}
\end{document}