-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathncepu-beamer.sty
83 lines (74 loc) · 2.33 KB
/
ncepu-beamer.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
\useoutertheme{infolines}
\useinnertheme{circles}
\usecolortheme{orchid}
\usefonttheme{professionalfonts} % 数学公式使用带衬线字体
% 定义颜色
\definecolor{NCEPUblue}{RGB}{0,80,153}
\definecolor{NCEPUblueDark}{RGB}{0,50,100}
\setbeamertemplate{headline}
{%
\leavevmode%
\hbox{%
\begin{beamercolorbox}[wd=\paperwidth,ht=2.65ex,dp=1.5ex,center]{section in head/foot}%
% \usebeamerfont{title in head/foot}\color{white}\insertshorttitle% 在 headline 中显示标题(将该行取消注释时显示)
\end{beamercolorbox}%
}%
\vskip0pt%
}
\setbeamertemplate{footline}
{%
\leavevmode%
\hbox{%
\begin{beamercolorbox}[wd=\paperwidth,ht=1ex,dp=1ex,rightskip=2ex]{}%
\hfill\usebeamercolor[fg]{page number in head/foot}\usebeamerfont{page number in head/foot}\usebeamertemplate{page number in head/foot}
\end{beamercolorbox}%
}%
\vskip0pt%
}
% 配色
\setbeamercolor{palette tertiary}{bg=NCEPUblue}
% \setbeamercolor{palette secondary}{bg=NCEPUblue!85}
% \setbeamercolor{palette primary}{bg=NCEPUblue!35}
\setbeamercolor{title}{fg=NCEPUblue}
\setbeamercolor{frametitle}{fg=NCEPUblue}
\setbeamercolor{section number projected}{bg=NCEPUblue,fg=white}
\setbeamercolor{section in toc}{fg=NCEPUblueDark}
\setbeamercolor{subsection in toc}{fg=NCEPUblue}
% 标题样式
\setbeamertemplate{frametitle}[default][center]
% LOGO
\addtobeamertemplate{headline}{
\setlength\unitlength{1ex}
\begin{picture}(0,0)
% \put{} 确定 LOGO 的位置
\put(0,-10){\makebox(0,0)[bl]{
\includegraphics[width=3cm]{img/logo.png}
}}
\end{picture}%
}{}
% block 样式
% \setbeamercolor{block title}{bg=PurpleBlue,fg=white}
% \setbeamercolor{block body}{bg=blue!10,fg=black}
% 脚注样式
\setbeamertemplate{footnote}{
\parindent 1em\noindent%
\raggedright
\hbox to 0.5em{\hfil\insertfootnotemark}\insertfootnotetext\par%
}
% 章节前目录样式
\AtBeginSection{
\begin{frame}
\centering
\begin{minipage}{0.8\textwidth}
\tableofcontents[sectionstyle=show/shaded,subsectionstyle=hide/hide/hide,subsubsectionstyle=hide/hide/hide]
\end{minipage}
\end{frame}
}
\AtBeginSubsection{
\begin{frame}
\centering
\begin{minipage}{0.8\textwidth}
\tableofcontents[sectionstyle=show/shaded,subsectionstyle=show/shaded/hide,subsubsectionstyle=hide/hide/hide]
\end{minipage}
\end{frame}
}