-
Notifications
You must be signed in to change notification settings - Fork 4
/
style.sty
207 lines (193 loc) · 7.28 KB
/
style.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
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
\usepackage{ctex}
\usepackage{setspace}
\usepackage[backend=biber,style=nature]{biblatex}
\renewcommand*{\cite}[1]{\footnote[frame]{\fullcite{#1}}}
% \usepackage[english]{babel}
\usepackage{color,xcolor}
\graphicspath{{figures/}}
%可选的一些宏包
\usepackage{graphics}
\usepackage{multicol}
\usepackage{multirow}
\usepackage{amsmath}
\usepackage{booktabs} %三线表
%\usepackage{chemformula} %化学式
%\usepackage{tikz} %画圆
%\usepackage{caption} %图表标题
%\newcommand{\tabincell}[2]{\begin{tabular}{@{}#1@{}}#2\end{tabular}} %表格内换行命令
%\tabincell{c}{AAA \\BBB} %表格内换行的用法
\setCJKmainfont[Path="fonts/",BoldFont={SourceHanSansCN-Bold.otf}]{SourceHanSansCN-Normal.otf} %思源黑体按细至粗 ExtrlLight Light Normal Regular Medium Bold Heavy
\setCJKfamilyfont{zhsong}[AutoFakeBold = {2.17}]{SimSun}
\renewcommand*{\songti}{\CJKfamily{zhsong}}
\setCJKfamilyfont{zhkai}[AutoFakeBold = {2.17}]{KaiTi}
\renewcommand*{\kaishu}{\CJKfamily{zhkai}}
%\setCJKfamilyfont{zhhei}[AutoFakeBold = {2.17}]{SimHei}
\setCJKfamilyfont{zhhei}[Path="fonts/",BoldFont={SourceHanSansCN-Medium.otf}]{SourceHanSansCN-Regular.otf}
\renewcommand*{\heiti}{\CJKfamily{zhhei}}
\setmainfont[BoldFont={Arial Bold},ItalicFont={Arial Italic}]{Arial} %衬线字体
\setsansfont[BoldFont={Arial Bold},ItalicFont={Arial Italic}]{Arial} %无衬线字体
\setmonofont[BoldFont={Arial Bold},ItalicFont={Arial Italic}]{Arial} %等宽字体
\sffamily
%幻灯片中推荐使用无衬线字体,这里把所有字体全设置成Arial,如有需求可自行更改
\setbeamerfont{title}{family=\zihao{3}\bfseries}
\setbeamerfont{frametitle}{family=\zihao{-3}\bfseries}
\setbeamerfont{block title}{family=\heiti}
\setbeamerfont{author}{family=\zihao{5}\kaishu}
\setbeamerfont{institute}{family=\zihao{5}\kaishu}
\setbeamerfont{id}{family=\zihao{5}\kaishu}
\setbeamerfont{supervisor}{family=\zihao{5}\kaishu}
\setbeamerfont{date}{family=\zihao{5}\kaishu}
\setbeamerfont{caption}{family=\zihao{6}\kaishu}
\setbeamerfont{footnote}{family=\zihao{-6}\kaishu}
\setbeamerfont{section in toc}{family=\zihao{5}\heiti \bfseries}
%\setbeamerfont{subsection in toc}{family=\zihao{-5}\songti}
\setbeamerfont{subsection in toc}{family=\zihao{-5}\heiti}
\setbeamerfont{section number projected}{family=\usebeamerfont{section in toc}}
\setbeamerfont{subsection number projected}{family=\usebeamerfont{subsection in toc}}
\setbeamerfont{alerted text}{family=\heiti}
%\definecolor{njuPurple}{RGB}{110,15,109} %南大紫
%\definecolor{njuPurple}{RGB}{0,51,255} %科大蓝
\definecolor{njuPurple}{cmyk}{1,0.8,0,0} %科大蓝
\setbeamercolor{background canvas}{bg=white}
\setbeamercolor{block body}{bg=normal text.bg!90!black}
\setbeamercolor{block title}{bg=njuPurple, fg=white}
\setbeamercolor{frametitle}{fg=njuPurple}
\setbeamercolor{title}{bg=njuPurple, fg=white}
\setbeamercolor{structure}{fg=njuPurple}
\setbeamercolor{footnote}{fg=black, bg=black}
\setbeamercolor{section number projected}{bg=njuPurple,fg=white}
\setbeamercolor{subsection number projected}{bg=njuPurple,fg=white}
\setbeamercolor{alerted text}{fg=red}
\setbeamertemplate{footline}[page number]{}
\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{blocks}[rounded][shadow=false]
\setbeamertemplate{block title}[rounded]
\setbeamertemplate{section in toc}[sections numbered]
%\setbeamertemplate{subsection in toc}[subsections numbered]
\setbeamertemplate{subsection in toc}[square]
\setbeamertemplate{title page}
{
\vfill
\vskip-10pt\hskip-10pt
\includegraphics[width=0.4\paperwidth]{ustc_logo_name.png}\\
\vskip40pt
\hfill
\begin{beamercolorbox}[rounded=true,wd=0.75\paperwidth,shadow=true]{title}
\centering\usebeamerfont{title}\inserttitle
\end{beamercolorbox}
\hfill\hfill
\vskip25pt
\hfill\usebeamerfont{author}姓名: \insertauthor\quad\quad\usebeamerfont{id}学号: \insertid\hfill\hfill
\vskip10pt
\hfill\usebeamerfont{institute}专业: \insertinstitute\quad\quad\usebeamerfont{supervisor}导师: \insertsupervisor\hfill\hfill
\vskip10pt
\hfill\usebeamerfont{date}答辩日期: \insertdate\hfill\hfill
\vfill
}
\renewcommand*{\thanks}
{
\vfill
\vskip-10pt\hskip-10pt
\includegraphics[width=0.4\paperwidth]{ustc_logo_name.png}\\
\vskip40pt
\hfill
\begin{beamercolorbox}[rounded=true,wd=0.6\paperwidth,shadow=true]{title}
\centering\usebeamerfont{title}谢谢!
\end{beamercolorbox}
\hfill\hfill
\vskip25pt
\hfill\usebeamerfont{author}姓名: \insertauthor\quad\quad\usebeamerfont{id}学号: \insertid\hfill\hfill
\vskip10pt
\hfill\usebeamerfont{institute}专业: \insertinstitute\quad\quad\usebeamerfont{supervisor}导师: \insertsupervisor\hfill\hfill
\vskip10pt
\hfill\usebeamerfont{date}答辩日期: \insertdate\hfill\hfill
\vfill
}
\setbeamertemplate{frametitle}
{
\begin{spacing}{1.0}
\vskip10pt\hskip-10pt
\includegraphics[height=25pt]{ustc_logo.pdf}
\vskip-28pt\hskip20pt
\usebeamerfont{frametitle}\usebeamercolor{frametitle}\insertframetitle
\vskip-10pt\noindent\hskip15pt\rule{0.8\paperwidth}{1pt}
\vskip-5pt
\end{spacing}
}
\setbeamertemplate{headline}{}
\newcommand{\id}[1]{\newcommand{\insertid}{#1}}
\newcommand{\supervisor}[1]{\newcommand{\insertsupervisor}{#1}}
\newcommand*{\makecontents}
{
\begin{spacing}{1.5}
\hfill
\parbox[t]{.95\textwidth}
{
\begin{minipage}[c][0.75\textheight]{\textwidth}
\tableofcontents[hideallsubsections]
\end{minipage}
}
\end{spacing}
}
\setbeamercolor{section in head/foot}{fg=black,bg=white}
\setbeamertemplate{section in head/foot shaded}[default][35]%被暗淡的其他标题;调节系数为fg!35!bg
%页脚
\defbeamertemplate*{footline}{footlineoff}{}
\defbeamertemplate*{footline}{footlineon}{%
\leavevmode%
\ifnum\c@framenumber=1
\else
\vspace{-0.004\paperheight}\hspace{-0.01\paperwidth}
\begin{beamercolorbox}[wd=.56\paperwidth,ht=.025\paperheight,left,dp=2ex]{section in footline}
\insertsectionnavigationhorizontal{.5\textwidth}{}{}
\end{beamercolorbox}
\begin{beamercolorbox}[wd=.25\paperwidth,right,dp=2ex]{shorttitle in footline}
\quad\insertshorttitle
\end{beamercolorbox}
\begin{beamercolorbox}[wd=.1\paperwidth,right,dp=2ex]{shortauthor in footline}
\insertshortauthor
\end{beamercolorbox}
\begin{beamercolorbox}[wd=.08\paperwidth,right,dp=2ex]{page in footline}
{\insertframenumber{}}/{\inserttotalframenumber\quad}
\end{beamercolorbox}
\fi%
}
\AtBeginSection[]
{
\setbeamertemplate{footline}[footlineoff]%取消页脚
\begin{frame}
\frametitle{目录}
\begin{spacing}{1.5}
\hfill
\parbox[t]{.95\textwidth}
{
\begin{minipage}[c][0.75\textheight]{\textwidth}
%\tableofcontents[currentsection]
\tableofcontents[currentsection,subsectionstyle=show/show/hide]%show,shaded,hide
\end{minipage}
}
\end{spacing}
\end{frame}
\setbeamertemplate{footline}[footlineon]%添加页脚
}
%%%%%%%%%%%%%%%%%%%%%%%
%%小节开头的目录
%%%%%%%%%%%%%%%%%%%%%%%%
%\AtBeginSubsection[]
%{
% \setbeamertemplate{footline}[footlineoff]%取消页脚
% \begin{frame}
% \frametitle{目录}
% \begin{spacing}{1.5}
% \hfill
% \parbox[t]{.95\textwidth}
% {
% \begin{minipage}[c][0.75\textheight]{\textwidth}
% %\tableofcontents[currentsection,currentsubsection]
% \tableofcontents[currentsection,subsectionstyle=show/shaded/hide]%show,shaded,hide
% \end{minipage}
% }
% \end{spacing}
% \end{frame}
% \setbeamertemplate{footline}[footlineon]%添加页脚
%}