forked from YLiu1231/njumath_beamer
-
Notifications
You must be signed in to change notification settings - Fork 1
/
NJU_BeamerTemplate.tex
189 lines (149 loc) · 4.65 KB
/
NJU_BeamerTemplate.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
%!TEX program = xelatex
%!TEX options = --shell-escape
\documentclass[10pt,aspectratio=169,mathserif]{beamer}
% ---------------- Packages and their settings ----------------
% Adjust as you want
\usepackage{nju} % import nju template
\usepackage{ctex} % support Chinese
\usepackage{amsmath,amsfonts,amssymb,bm} % math packages
\usepackage{color} % support colored text
\usepackage{graphicx,hyperref,url}
% By the way, go check Présentation.app if you are on MacOS
\usepackage[draft]{pdfcomment} % would be helpful in presentation mode
% \usepackage[final]{pdfcomment} % if you do not want PDF annotations be typeset
\usepackage{caption}
\captionsetup[figure]{font=footnotesize}
\usepackage{multirow}
\usepackage{media9}
\usepackage{minted} % better source code highlighting, you have to add --shell-escape to enable it
\usepackage{tikz} % for tikz picturing
\usetikzlibrary{
arrows.meta,
automata,
backgrounds,
calc,
calendar,
er,
intersections,
mindmap,
math,
matrix,
folding,
graphs,
patterns,
plothandlers,
plotmarks,
positioning,
shapes,
snakes,
topaths,
trees,
%...
}
\newcommand{\pdfnote}[1]{\marginnote{\pdfcomment[icon=note]{#1}}} % pdfnote move the annotation away from the main content of your slide
\newcommand{\xdownarrow}[2][]{%
\left.{#1}\right\downarrow{#2}}
\newcommand\blfootnote[1]{%
\begingroup
\renewcommand\thefootnote{}\footnote{#1}%
\addtocounter{footnote}{-1}%
\endgroup
}
% \newif\ifplacelogo % create a new conditional
% \placelogotrue % set it to true
\newcommand{\nologo}{\setbeamertemplate{logo}{}} % command to set the logo to nothing
% ---------------- Settings ----------------
% If you have uncommon letter in name just like me...
\setCJKmainfont[ItalicFont=Adobe Kaiti Std, BoldFont=Adobe Heiti Std]{Adobe Song Std}
\setCJKsansfont{Adobe Heiti Std}
\setCJKmonofont{Adobe Fangsong Std}
\hypersetup{
colorlinks,
allcolors=.,
urlcolor=blue,
% linkcolor=green,
% linkbordercolor=red,
% pdfborderstyle={/S/U/W 1},
}
\beamertemplateballitem
% This would show a highlightened toc before each section
\AtBeginSection[]
{
\setbeamertemplate{background}{\pgfuseimage{bg}}
\begin{frame}
\frametitle{目录}
\tableofcontents[currentsection]
\end{frame}
\setbeamertemplate{background}{}
}
% ---------------- Front page settings ----------------
\title[]{移动应用推广中流量劫持作弊行为的\\大规模检测与分析}
\subtitle{}
\author[]{赵旻睿}
\institute[COSEC]{南京大学网络合作与安全研究中心}
% \author{hakureicode@gmail.com}
\date{\today}
\logo{\includegraphics[height=1.5cm]{cosec.jpg}{\hspace{30pt}}} % If you do not need logo, just comment out it
% ---------------- Document begins ----------------
\begin{document}
\setbeamertemplate{headline}[nju theme no tos]
\frame{\titlepage}
\nologo
\setbeamertemplate{headline}[nju theme]
\frame{\frametitle{目录}\tableofcontents}
% Now followed blindtext, just for test
\section{Section 1}
\begin{frame}
\frametitle{Section 1}
In this slide, some important text will be
\alert{highlighted} because it's important.
Please, don't abuse it.
\begin{block}{Remark}
Sample text
\end{block}
\begin{alertblock}{Important theorem}
Sample text in red box
\end{alertblock}
\begin{examples}
Sample text in green box. The title of the block is ``Examples".
\end{examples}
\end{frame}
\section{Section 2}
\begin{frame}[fragile] % If you are using minted, remember to append fragile option to the frame
\frametitle{Section 2}
Houston, we have a problem.
\vspace*{10pt}
\begin{minted}[fontsize=\scriptsize]{java}
try {
throw new Exception("blah");
} catch(Exception e) {
for (StackTraceElement stackTraceElement: e.getStackTrace()) {
// stackTraceElement.getClassName() stackTraceElement.getMethodName()
// try to find Hook Frame in the calling stack
}
}
\end{minted}
\blfootnote{\tiny \url{https://www.gutenberg.org/files/18269/18269-h/18269-h.htm\#p_347}}
\end{frame}
\section{Section 3}
\begin{frame}
\frametitle{Section 3}
Example of pdfcomment
\pdfcomment{
blahblahblah, \textCR
blahblah.}
\end{frame}
\subsection{Subsection 4}
\begin{frame}
\frametitle{Subsection 4}
Example of pdfnote
\pdfnote{remember to say thankyou!!!}
\end{frame}
\setbeamertemplate{headline}[nju theme no tos]
\begin{frame}
\centering \Large Thanks for watching!
\end{frame}
% If needed
\setbeamertemplate{background}{\pgfuseimage{bg}}
\frame{\tableofcontents}
\end{document}