| 1 |
% Layout scheme for outer elements: split header and footer |
| 2 |
\useoutertheme{split} |
| 3 |
\useoutertheme{smoothbars} |
| 4 |
|
| 5 |
% Color scheme for outer elements: use background colors |
| 6 |
\usecolortheme{whale} |
| 7 |
|
| 8 |
% Layout scheme for inner elements: rounded elements |
| 9 |
\useinnertheme[shadow=true]{rounded} |
| 10 |
|
| 11 |
% Color scheme for inner elements: use foreground colors |
| 12 |
\usecolortheme{orchid} |
| 13 |
|
| 14 |
% Itemize items: default (triangle), circle, square, ball |
| 15 |
\setbeamertemplate{itemize items}[ball] |
| 16 |
|
| 17 |
% Enumerate items: default, circle, square, ball |
| 18 |
\setbeamertemplate{enumerate items}[ball] |
| 19 |
|
| 20 |
% Outline: default, sections numbered, subsections numbered, circle, square, ball, ball unnumbered |
| 21 |
\setbeamertemplate{sections/subsections/subsubsections in toc}[default] |
| 22 |
|
| 23 |
% General blocks: |
| 24 |
\setbeamertemplate{blocks}[rounded][shadow=true] |
| 25 |
|
| 26 |
% Title page: |
| 27 |
\setbeamertemplate{title page}[default][colsep=-4bp,rounded=true] |
| 28 |
|
| 29 |
% Part page: |
| 30 |
\setbeamertemplate{part page}[default][colsep=-4bp,rounded=true] |
| 31 |
|
| 32 |
% Background |
| 33 |
%\pgfdeclareimage[width=\paperwidth,height=0.95\paperheight]{bg}{cqubackground} |
| 34 |
%\setbeamertemplate{background}{\pgfuseimage{bg}} |
| 35 |
|
| 36 |
% Colors |
| 37 |
\usecolortheme[RGB={36,73,164}]{structure} |
| 38 |
|
| 39 |
\setbeamercolor{frametitle}{parent=subsection in head/foot} |
| 40 |
\setbeamercolor{frametitle right}{parent=subsection in head/foot} |
| 41 |
\setbeamercolor{frametitle right}{parent=subsubsection in head/foot} |
| 42 |
|
| 43 |
\definecolor{titlebg}{RGB}{36,72,164} |
| 44 |
\setbeamercolor{frametitle}{fg=white,bg=titlebg} |
| 45 |
\setbeamercolor{section in head/foot}{fg=white,bg=titlebg} |
| 46 |
\setbeamercolor{subsection in head/foot}{fg=white,bg=titlebg} |
| 47 |
|
| 48 |
\pgfdeclarehorizontalshading[frametitle.bg,frametitle right.bg]{beamer@frametitleshade}{\paperheight}{% |
| 49 |
color(0pt)=(frametitle.bg); |
| 50 |
color(\paperwidth)=(frametitle right.bg)} |
| 51 |
|
| 52 |
\AtBeginDocument{ |
| 53 |
\pgfdeclareverticalshading{beamer@topshade}{\paperwidth}{% |
| 54 |
color(0pt)=(bg); |
| 55 |
color(4pt)=(black!50!bg)} |
| 56 |
} |
| 57 |
|
| 58 |
%%% 设置目录页各级标题显示与否 |
| 59 |
\AtBeginSection[]{ |
| 60 |
\begin{frame} |
| 61 |
\frametitle{目录} |
| 62 |
\begin{multicols}{2} |
| 63 |
\tableofcontents[current, subsubsectionstyle=hide] %subsubsectionstyle=hide 目录页隐藏三级标题,但书签中存在 |
| 64 |
% \tableofcontents[current, currentsubsection] |
| 65 |
\end{multicols} |
| 66 |
\addtocounter{framenumber}{-1} |
| 67 |
\end{frame} |
| 68 |
} |
| 69 |
|
| 70 |
|
| 71 |
% footline: author | title | date and framenumber |
| 72 |
|
| 73 |
\defbeamertemplate*{footline}{cqu theme}{% |
| 74 |
\setbeamercolor{footcolor}{fg=while,bg=blue!55} |
| 75 |
\leavevmode% |
| 76 |
\hbox{% |
| 77 |
\begin{beamercolorbox}[wd=0.30\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}% |
| 78 |
\usebeamerfont{author in head/foot}{\insertshortauthor} |
| 79 |
\end{beamercolorbox}% |
| 80 |
\begin{beamercolorbox}[wd=0.40\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}% |
| 81 |
\usebeamerfont{title in head/foot}{\insertshorttitle} |
| 82 |
\end{beamercolorbox}% |
| 83 |
\begin{beamercolorbox}[wd=0.30\paperwidth,ht=2.25ex,dp=1ex,right]{date in head/foot}% |
| 84 |
\usebeamerfont{date in head/foot}{\insertdate} |
| 85 |
\hspace*{2em} |
| 86 |
\insertframenumber{}/\inserttotalframenumber\hspace*{2ex} |
| 87 |
\end{beamercolorbox} |
| 88 |
}% |
| 89 |
\vskip0pt% |
| 90 |
} |
| 91 |
|
| 92 |
|
| 93 |
\defbeamertemplate*{headline}{cqu theme}{% |
| 94 |
\leavevmode% |
| 95 |
\@tempdimb=6.4375ex% |
| 96 |
\pgfdeclareimage[height=.95\@tempdimb]{logo}{logo/cqulogo.pdf}% |
| 97 |
\pgfdeclareimage[height=1.\@tempdimb]{title_logo}{logo/cquname.pdf}% |
| 98 |
\logo{\pgfuseimage{logo}}% |
| 99 |
\ifdim\@tempdimb>0pt% |
| 100 |
\advance\@tempdimb by 1.125ex% |
| 101 |
\begin{beamercolorbox}[wd=.8\paperwidth,ht=\@tempdimb,center]{subsection in head/foot}% |
| 102 |
\vbox to\@tempdimb{\vfil\insertnavigation{.5\textwidth}{\hskip0pt |
| 103 |
plus1filll}{}\vfil} |
| 104 |
\end{beamercolorbox}% |
| 105 |
\begin{beamercolorbox}[wd=.135\paperwidth,ht=\@tempdimb,center]{subsection in head/foot}% |
| 106 |
\vbox to\@tempdimb{\vfil\pgfuseimage{title_logo}\vfil}% |
| 107 |
\end{beamercolorbox}% |
| 108 |
\begin{beamercolorbox}[wd=.065\paperwidth,ht=\@tempdimb,center]{subsection in head/foot}% |
| 109 |
\vbox to\@tempdimb{\vfil\insertlogo\vfil\vfil}% |
| 110 |
\end{beamercolorbox}% |
| 111 |
\fi% |
| 112 |
} |
| 113 |
|
| 114 |
\defbeamertemplate*{frametitle}{cqu theme}{% |
| 115 |
\nointerlineskip% |
| 116 |
\hbox{\leavevmode |
| 117 |
\advance\beamer@leftmargin by -12bp% |
| 118 |
\advance\beamer@rightmargin by -12bp % |
| 119 |
\beamer@tempdim=\textwidth% |
| 120 |
\advance\beamer@tempdim by \beamer@leftmargin% |
| 121 |
\advance\beamer@tempdim by \beamer@rightmargin% |
| 122 |
\hskip-\Gm@lmargin\hbox{% |
| 123 |
\setbox\beamer@tempbox=\hbox{\begin{minipage}[b]{\paperwidth}% |
| 124 |
\vbox{}\vskip-.75ex% |
| 125 |
\leftskip0.3cm% |
| 126 |
\rightskip= 0pt plus1fil \leavevmode |
| 127 |
\insertframetitle% |
| 128 |
\ifx\insertframesubtitle\@empty% |
| 129 |
\strut\par% |
| 130 |
\else |
| 131 |
\par{\usebeamerfont*{framesubtitle}{\usebeamercolor[bg]{framesubtitle}\insertframesubtitle}\strut\par}% |
| 132 |
\fi% |
| 133 |
\nointerlineskip |
| 134 |
\vbox{}% |
| 135 |
\end{minipage}}% |
| 136 |
\beamer@tempdim=\ht\beamer@tempbox% |
| 137 |
\advance\beamer@tempdim by 2pt% |
| 138 |
\begin{pgfpicture}{0mm}{0pt}{\paperwidth}{\beamer@tempdim} |
| 139 |
\usebeamercolor{frametitle right} |
| 140 |
\pgfpathrectangle{\pgfpointorigin}{\pgfpoint{\paperwidth}{\beamer@tempdim}} |
| 141 |
\pgfusepath{clip} |
| 142 |
\pgftext[left,base]{\pgfuseshading{beamer@frametitleshade}} |
| 143 |
\end{pgfpicture} |
| 144 |
\hskip-\paperwidth% |
| 145 |
\box\beamer@tempbox% |
| 146 |
}% |
| 147 |
\hskip-\Gm@rmargin% |
| 148 |
}% |
| 149 |
} |
| 150 |
|
| 151 |
%%% 定制封面页 |
| 152 |
\makeatletter |
| 153 |
\defbeamertemplate*{title page}{mydefault}[1][] |
| 154 |
{ |
| 155 |
\vbox{} |
| 156 |
\vfill |
| 157 |
\begingroup |
| 158 |
\centering |
| 159 |
\parbox{.55\paperwidth}{ % 修改数字调整标题页中标题背景框长度 |
| 160 |
\begin{beamercolorbox}[wd=\linewidth,sep=8pt,center,#1]{title} |
| 161 |
\usebeamerfont{title}\inserttitle\par% |
| 162 |
\ifx\insertsubtitle\@empty% |
| 163 |
\else% |
| 164 |
\vskip0.25em% |
| 165 |
{\usebeamerfont{subtitle}\usebeamercolor[fg]{subtitle}\insertsubtitle\par}% |
| 166 |
\fi% |
| 167 |
\end{beamercolorbox}% |
| 168 |
} |
| 169 |
\vskip1em\par |
| 170 |
\begin{beamercolorbox}[sep=8pt,center,#1]{author} |
| 171 |
\usebeamerfont{author}\insertauthor |
| 172 |
\end{beamercolorbox} |
| 173 |
\begin{beamercolorbox}[sep=8pt,center,#1]{institute} |
| 174 |
\usebeamerfont{institute}\insertinstitute |
| 175 |
\end{beamercolorbox} |
| 176 |
\begin{beamercolorbox}[sep=8pt,center,#1]{date} |
| 177 |
\usebeamerfont{date}\insertdate |
| 178 |
\end{beamercolorbox}\vskip0.5em |
| 179 |
{\usebeamercolor[fg]{titlegraphic}\inserttitlegraphic\par} |
| 180 |
\endgroup |
| 181 |
\vfill |
| 182 |
} |
| 183 |
\setbeamertemplate{title page}[mydefault][colsep=-4bp,rounded=true,shadow=\beamer@themerounded@shadow] |
| 184 |
\makeatother |
| 185 |
|
| 186 |
|
| 187 |
\usepackage{hyperref} % 超链接相关设置 |
| 188 |
\hypersetup{ |
| 189 |
pdftitle = {}, |
| 190 |
pdfauthor = {}, |
| 191 |
linktoc=all, |
| 192 |
bookmarksnumbered=true, %书签编号 |
| 193 |
bookmarksopen=true, |
| 194 |
bookmarksopenlevel=4, |
| 195 |
breaklinks=true, |
| 196 |
colorlinks=false, |
| 197 |
linkcolor=blue, |
| 198 |
anchorcolor=black, |
| 199 |
citecolor=green, |
| 200 |
urlcolor=magenta |
| 201 |
} |
| 202 |
|
| 203 |
%%% 书签章节从1开始编号 |
| 204 |
\setcounter{tocdepth}{4} |
| 205 |
% get numbering in section bookmarks |
| 206 |
\usepackage{etoolbox} |
| 207 |
\usepackage{bookmark} |
| 208 |
\makeatletter |
| 209 |
|
| 210 |
\newcounter{realsection} |
| 211 |
\newif\ifrealsection |
| 212 |
\long\def\beamer@@ssection*#1{\realsectionfalse\beamer@section[{#1}]{}} |
| 213 |
\long\def\beamer@@@section#1{\realsectiontrue\beamer@section[{#1}]{#1}} |
| 214 |
|
| 215 |
\patchcmd{\beamer@section}% |
| 216 |
{\refstepcounter{section}}% |
| 217 |
{\ifrealsection\refstepcounter{realsection}\fi\refstepcounter{section}}% |
| 218 |
{}{\errmessage{failed to patch}} |
| 219 |
|
| 220 |
\patchcmd{\beamer@section}% |
| 221 |
{\Hy@writebookmark{\the\c@section}{\secname}}% |
| 222 |
{\Hy@writebookmark{\the\c@section}{\numberline{\therealsection}\secname}}% |
| 223 |
{}{\errmessage{failed to patch}} |
| 224 |
\patchcmd{\beamer@subsection}% |
| 225 |
{\Hy@writebookmark{\the\c@subsection}{#2}}% |
| 226 |
{\Hy@writebookmark{\the\c@subsection}{\numberline{\therealsection.\thesubsection}#2}}% |
| 227 |
{}{\errmessage{failed to patch}} |
| 228 |
\patchcmd{\beamer@subsubsection}% |
| 229 |
{\Hy@writebookmark{\the\c@subsubsection}{#2}}% |
| 230 |
{\Hy@writebookmark{\the\c@subsubsection}{\numberline{\therealsection.\thesubsection.\thesubsubsection}#2}}% |
| 231 |
{}{\errmessage{failed to patch}} |
| 232 |
\makeatother |
| 233 |
|
| 234 |
|
| 235 |
%%% 每页脚注从“1”开始编号 |
| 236 |
\usepackage{perpage} |
| 237 |
\MakePerPage{footnote} |
| 238 |
|
| 239 |
%%% 设置脚注标号颜色 |
| 240 |
\makeatletter |
| 241 |
\renewcommand\@makefnmark{\hbox{\@textsuperscript{\normalfont\color{blue}\@thefnmark}}} |
| 242 |
\renewcommand\@makefntext[1]{% |
| 243 |
\parindent 1em\noindent |
| 244 |
\hb@[email protected]{% |
| 245 |
\hss\@textsuperscript{\normalfont\@thefnmark}}#1} |
| 246 |
\makeatother |