-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.tex
229 lines (193 loc) · 4.69 KB
/
main.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
225
226
227
% !TEX encoding = UTF-8 Unicode
\documentclass[
10pt,
aspectratio=169,
]{beamer}
\setbeamercovered{transparent=10}
\usetheme[
% showheader,
% red,
purple,
% gray,
% graytitle,
colorblocks,
% noframetitlerule,
]{Verona}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lipsum}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Mac上使用如下命令声明隶书字体,windows也有相关方式,大家可自行修改
\providecommand{\lishu}{\CJKfamily{zhli}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{tikz}
\usetikzlibrary{fadings}
%
%\setbeamertemplate{sections/subsections in toc}[ball]
\usepackage{xeCJK}
\usepackage{listings}
\usepackage{caption}
\usepackage{subfigure}
\usefonttheme{professionalfonts}
\def\mathfamilydefault{\rmdefault}
\usepackage{amsmath}
\usepackage{multirow}
\usepackage{booktabs}
\usepackage{bm}
\setbeamertemplate{section in toc}{\hspace*{1em}\inserttocsectionnumber.~\inserttocsection\par}
\setbeamertemplate{subsection in toc}{\hspace*{2em}\inserttocsectionnumber.\inserttocsubsectionnumber.~\inserttocsubsection\par}
\setbeamerfont{subsection in toc}{size=\small}
\AtBeginSection[]{%
\begin{frame}%
\frametitle{Outline}%
\textbf{\tableofcontents[currentsection]} %
\end{frame}%
}
\AtBeginSubsection[]{%
\begin{frame}%
\frametitle{Outline}%
\textbf{\tableofcontents[currentsection, currentsubsection]} %
\end{frame}%
}
\title{Beamer for BUCT}
\subtitle{A Simple while elegant template}
\author[HS.Peng]{Peng Haosong}
\mail{livion\_i@icloud.com}
\institute[Beijing University of Chemical Technology]{College of Information and Science Technology \\
Beijing University of Chemical Technology}
\date{\today}
\titlegraphic[width=4cm]{logo.png}{}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% ----------- 标题页 ------------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\maketitle
%%% define code
\defverbatim[colored]\lstI{
\begin{lstlisting}[language=C++,basicstyle=\ttfamily,keywordstyle=\color{red}]
int main() {
// Define variables at the beginning
// of the block, as in C:
CStash intStash, stringStash;
int i;
char* cp;
ifstream in;
string line;
[...]
\end{lstlisting}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% ----------- FRAME ------------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Basics}
\subsection{Blocks}
\begin{frame}[c]{Blocks}
The blocks are shown below
这是一个block
\begin{block}{Regular Block}
Content of a regular block
\end{block}
\begin{exampleblock}{Example Block}
Content of an example block
\end{exampleblock}
\begin{alertblock}{Alert block}
Content of an alert block
\end{alertblock}
\end{frame}
\subsection{Enumerate \& Overlays}
\begin{frame}[c]{Enumerate \& Overlays}
{\large An Example of \texttt{enumerate}}
\begin{enumerate}[<+->]
\item First item
\item Second item
\item Third item
\end{enumerate}
\vfill
{\large An Example of \texttt{itemize}}
\begin{itemize}[<+->]
\item First item
\item Second item
\item Third item
\end{itemize}
\end{frame}
\subsection{Two columns}
\begin{frame}[c]{Two columns}
\begin{columns}[onlytextwidth]
\column{0.4\textwidth}
Content for column one
\begin{equation}
E = mc^2
\end{equation}
\column{0.4\textwidth}
Content for column two
\begin{equation}
F=ma
\end{equation}
\end{columns}
\end{frame}
\begin{frame}{分栏:左图右字或者左字右图}
\begin{columns}
\column{0.5\textwidth}
\begin{figure}
\centering
% Requires \usepackage{graphicx}
\includegraphics[width=5cm]{logo}
\caption{分栏示意图}
\end{figure}
\column{0.55\textwidth}
\small
这里输入文字
\end{columns}
\end{frame}
\subsection{Figures}
\begin{frame}[c]{Figures}
\begin{figure}
\centering
\begin{tikzpicture}
\draw [help lines,very thick] (0,0) grid (5,4);
\end{tikzpicture}
\caption{Credits to Ti\textit{k}Z}
\end{figure}
\end{frame}
\begin{frame}{Figures}
怎么插入多张图片:
\begin{figure}[h]
\centering
\subfigure[校徽1]{
\includegraphics[scale=0.022]{logo.png}
}
\subfigure[校徽2]{
\includegraphics[scale=0.022]{logo.png}
}
\subfigure[校徽3]{
\includegraphics[scale=0.022]{logo.png}
}
\subfigure[校徽4]{
\includegraphics[scale=0.022]{logo.png}
}
\caption{demo}
\end{figure}
\end{frame}
\subsection{Code Demo}
\begin{frame}{A Listings Demo}{C++}
\lstI
\end{frame}
\section{References}
\begin{frame}{BibTex使用}
这里引用文献\cite{9492070}。
\end{frame}
\begin{frame}{References}
\bibliographystyle{abbrv} %论文引用格式
\bibliography{References}
\end{frame}
% Thank you page
\beamertemplateshadingbackground{structure.fg!90}{structure.fg}
\begin{frame}[plain]
\vfill
\centering
{
\centering \Huge \color{white} Thank you for your attention!\\[10pt]Questions?
}
\vfill
\end{frame}
\end{document}