| 1 |
% \iffalse meta-comment |
| 2 |
% !TeX program = XeLaTeX |
| 3 |
% !TeX encoding = UTF-8 |
| 4 |
% |
| 5 |
% Copyright (C) 2019--2021 by Jingxuan Yang <[email protected]> |
| 6 |
% |
| 7 |
% This file may be distributed and/or modified under the |
| 8 |
% conditions of the LaTeX Project Public License, either version 1.3c |
| 9 |
% of this license or (at your option) any later version. |
| 10 |
% The latest version of this license is in: |
| 11 |
% |
| 12 |
% http://www.latex-project.org/lppl.txt |
| 13 |
% |
| 14 |
% and version 1.3c or later is part of all distributions of LaTeX |
| 15 |
% version 2008/05/04 or later. |
| 16 |
|
| 17 |
%<*internal> |
| 18 |
\def\nameofplainTeX{plain} |
| 19 |
\ifx\fmtname\nameofplainTeX\else |
| 20 |
\expandafter\begingroup |
| 21 |
\fi |
| 22 |
%</internal> |
| 23 |
%<*install> |
| 24 |
|
| 25 |
\input docstrip |
| 26 |
\keepsilent |
| 27 |
\askforoverwritefalse |
| 28 |
\preamble |
| 29 |
|
| 30 |
This is a generated file. |
| 31 |
|
| 32 |
Copyright (C) 2019--\the\year by Jingxuan Yang <[email protected]> |
| 33 |
|
| 34 |
This file may be distributed and/or modified under the |
| 35 |
conditions of the LaTeX Project Public License, either version 1.3c |
| 36 |
of this license or (at your option) any later version. |
| 37 |
The latest version of this license is in: |
| 38 |
|
| 39 |
http://www.latex-project.org/lppl.txt |
| 40 |
|
| 41 |
and version 1.3c or later is part of all distributions of LaTeX |
| 42 |
version 2008/05/04 or later. |
| 43 |
|
| 44 |
To produce the documentation run the original source files ending with `.dtx' |
| 45 |
through LaTeX. |
| 46 |
|
| 47 |
\endpreamble |
| 48 |
\postamble |
| 49 |
|
| 50 |
This package consists of the file thubeamer.dtx, |
| 51 |
and the derived files thubeamer.pdf, |
| 52 |
beamerthemethubeamer.sty, |
| 53 |
beamercolorthemethubeamer.sty, |
| 54 |
beamerinnerthemethubeamer.sty, |
| 55 |
beamerouterthemethubeamer.sty. |
| 56 |
|
| 57 |
\endpostamble |
| 58 |
|
| 59 |
\usedir{tex/latex/thubeamer} |
| 60 |
\generate |
| 61 |
{ |
| 62 |
\file{dtx-style.sty}{\from{\jobname.dtx}{dtx-style}} |
| 63 |
\file{beamerthemethubeamer.sty}{\from{\jobname.dtx}{thubeamer}} |
| 64 |
\file{beamercolorthemethubeamer.sty}{\from{\jobname.dtx}{thucolorstyle}} |
| 65 |
\file{beamerinnerthemethubeamer.sty}{\from{\jobname.dtx}{thuinnerstyle}} |
| 66 |
\file{beamerouterthemethubeamer.sty}{\from{\jobname.dtx}{thuouterstyle}} |
| 67 |
} |
| 68 |
|
| 69 |
\Msg{***********************************************************} |
| 70 |
\Msg{*} |
| 71 |
\Msg{* To finish the installation you have to move the following} |
| 72 |
\Msg{* files into a directory searched by TeX:} |
| 73 |
\Msg{*} |
| 74 |
\Msg{* The recommended directory is TEXMF/tex/latex/thubeamer} |
| 75 |
\Msg{*} |
| 76 |
\Msg{* \space\space dtx-style.sty} |
| 77 |
\Msg{* \space\space beamerthemethubeamer.sty} |
| 78 |
\Msg{* \space\space beamercolorthemethubeamer.sty} |
| 79 |
\Msg{* \space\space beamerinnerthemethubeamer.sty} |
| 80 |
\Msg{* \space\space beamerouterthemethubeamer.sty} |
| 81 |
\Msg{*} |
| 82 |
\Msg{* To produce the documentation run the files ending with} |
| 83 |
\Msg{* `.dtx' through LaTeX.} |
| 84 |
\Msg{*} |
| 85 |
\Msg{* Happy TeXing!} |
| 86 |
\Msg{***********************************************************} |
| 87 |
|
| 88 |
%</install> |
| 89 |
%<install>\endbatchfile |
| 90 |
%<*internal> |
| 91 |
|
| 92 |
\usedir{tex/latex/thubeamer} |
| 93 |
\generate |
| 94 |
{ |
| 95 |
\file{\jobname.ins}{\from{\jobname.dtx}{install}} |
| 96 |
} |
| 97 |
\nopreamble\nopostamble |
| 98 |
|
| 99 |
\ifx\fmtname\nameofplainTeX |
| 100 |
\expandafter\endbatchfile |
| 101 |
\else |
| 102 |
\expandafter\endgroup |
| 103 |
\fi |
| 104 |
%</internal> |
| 105 |
% |
| 106 |
%<thubeamer|thucolorstyle|thuinnerstyle|thuouterstyle>\NeedsTeXFormat{LaTeX2e} |
| 107 |
%<thubeamer>\ProvidesPackage{beamerthemethubeamer} |
| 108 |
%<thucolorstyle>\ProvidesPackage{beamercolorthemethubeamer} |
| 109 |
%<thuinnerstyle>\ProvidesPackage{beamerinnerthemethubeamer} |
| 110 |
%<thuouterstyle>\ProvidesPackage{beamerouterthemethubeamer} |
| 111 |
%<thubeamer|thucolorstyle|thuinnerstyle|thuouterstyle>[2021/11/15 v1.1.0 A Beamer Theme for Tsinghua University (THU)] |
| 112 |
% |
| 113 |
%<*driver> |
| 114 |
\ProvidesFile{thubeamer.dtx}[2021/11/15 v1.1.0 A Beamer Theme for Tsinghua University (THU)] |
| 115 |
\documentclass{ltxdoc} |
| 116 |
\usepackage{dtx-style} |
| 117 |
|
| 118 |
\EnableCrossrefs |
| 119 |
\CodelineIndex |
| 120 |
\RecordChanges |
| 121 |
|
| 122 |
\begin{document} |
| 123 |
\DocInput{\jobname.dtx} |
| 124 |
\end{document} |
| 125 |
%</driver> |
| 126 |
% |
| 127 |
% \fi |
| 128 |
% |
| 129 |
% \CheckSum{0} |
| 130 |
% \CharacterTable |
| 131 |
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z |
| 132 |
% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z |
| 133 |
% Digits \0\1\2\3\4\5\6\7\8\9 |
| 134 |
% Exclamation \! Double quote \" Hash (number) \# |
| 135 |
% Dollar \$ Percent \% Ampersand \& |
| 136 |
% Acute accent \' Left paren \( Right paren \) |
| 137 |
% Asterisk \* Plus \+ Comma \, |
| 138 |
% Minus \- Point \. Solidus \/ |
| 139 |
% Colon \: Semicolon \; Less than \< |
| 140 |
% Equals \= Greater than \> Question mark \? |
| 141 |
% Commercial at \@ Left bracket \[ Backslash \\ |
| 142 |
% Right bracket \] Circumflex \^ Underscore \_ |
| 143 |
% Grave accent \` Left brace \{ Vertical bar \| |
| 144 |
% Right brace \} Tilde \~} |
| 145 |
% |
| 146 |
% \GetFileInfo{\jobname.dtx} |
| 147 |
% |
| 148 |
% \changes{v1.0.0}{2021/07/07}{Initially design thubeamer} |
| 149 |
% |
| 150 |
% \DoNotIndex{\begin,\end,\begingroup,\endgroup} |
| 151 |
% \DoNotIndex{\ifx,\ifdim,\ifnum,\ifcase,\else,\or,\fi,\-} |
| 152 |
% \DoNotIndex{\let,\def,\xdef,\newcommand,\renewcommand} |
| 153 |
% \DoNotIndex{\expandafter,\csname,\endcsname,\relax,\protect} |
| 154 |
% \DoNotIndex{\Huge,\huge,\LARGE,\Large,\large,\normalsize} |
| 155 |
% \DoNotIndex{\small,\footnotesize,\scriptsize,\tiny} |
| 156 |
% \DoNotIndex{\normalfont,\bfseries,\slshape,\interlinepenalty} |
| 157 |
% \DoNotIndex{\hfil,\par,\hskip,\vskip,\vspace,\quad} |
| 158 |
% \DoNotIndex{\centering,\raggedright} |
| 159 |
% \DoNotIndex{\c@secnumdepth,\@startsection,\@setfontsize} |
| 160 |
% \DoNotIndex{\ ,\@plus,\@minus,\p@,\z@,\@m,\@M,\@ne,\m@ne} |
| 161 |
% \DoNotIndex{\@@par,\DeclareOperation,\RequirePackage,\LoadClass} |
| 162 |
% \DoNotIndex{\AtBeginDocument,\AtEndDocument} |
| 163 |
% |
| 164 |
% \IndexPrologue{\section*{索~~~~引}} |
| 165 |
% \GlossaryPrologue{\section*{修改记录}} |
| 166 |
% |
| 167 |
% \definecolor{beamer@headercolor}{RGB}{129,48,140} |
| 168 |
% \title{\bfseries\color{beamer@headercolor}\thubeamer:清华大学风格\\ Beamer主题} |
| 169 |
% \author{{\Large\fangsong 杨敬轩}\\[5pt]\texttt{[email protected]}\\[5pt]\texttt{[email protected]}} |
| 170 |
% \date{\fileversion\ (\filedate)} |
| 171 |
% |
| 172 |
% \maketitle\thispagestyle{empty} |
| 173 |
% |
| 174 |
% \vskip 0.5cm |
| 175 |
% |
| 176 |
% \def\abstractname{\Large 摘\quad 要} |
| 177 |
% \begin{abstract}\normalsize\vskip0.5cm |
| 178 |
% \thubeamer~主题为作者在准备课程展示时设计制作, |
| 179 |
% 旨在帮助清华大学师生进行学术交流或其他需要演示文稿活动时,方便的使用 \LaTeX{} 制作含有学校特色的演示文稿。 |
| 180 |
% \end{abstract} |
| 181 |
% |
| 182 |
% \vspace*{2em} |
| 183 |
% \def\abstractname{\Large 免责声明} |
| 184 |
% \begin{abstract} |
| 185 |
% \noindent\normalsize |
| 186 |
% \begin{enumerate} |
| 187 |
% \item 本模板的发布遵守 \href{http://www.latex-project.org/lppl.txt}{\LaTeX\ Project Public License 1.3c} 以及其后的最新版本,使用前请认真阅读协议内 |
| 188 |
% 容。 |
| 189 |
% \item 本主题为作者个人制作,使用仅供参考,任何由于使用本主题而引起的任何问题均与本主题作者无关。 |
| 190 |
% \item 任何个人或组织以本模板为基础进行修改、扩展而生成的新的专用模板,请严格遵 |
| 191 |
% 守 \href{http://www.latex-project.org/lppl.txt}{\LaTeX\ Project Public License 1.3c} 协议以及其后的最新版本。由于违犯协议而引起的任何纠纷争端均与 |
| 192 |
% 本模板作者无关。 |
| 193 |
% \end{enumerate} |
| 194 |
% \end{abstract} |
| 195 |
% |
| 196 |
% |
| 197 |
% \clearpage |
| 198 |
% \pagestyle{fancy} |
| 199 |
% \begin{multicols}{2}[ |
| 200 |
% \setlength{\columnseprule}{.4pt} |
| 201 |
% \setlength{\columnsep}{18pt}] |
| 202 |
% \tableofcontents |
| 203 |
% \end{multicols} |
| 204 |
% \clearpage |
| 205 |
% |
| 206 |
% \section{模板介绍} |
| 207 |
% \thubeamer\ (\textbf{T}sing\textbf{H}ua \textbf{U}niversity \LaTeX{} |
| 208 |
% \textbf{Beamer} Template) 是为了帮助清华大学师生撰写演示文稿而编写的 \LaTeX{} Beamer 模板。 |
| 209 |
% |
| 210 |
% 本文档将尽量完整的介绍模板的使用方法,如有不清楚之处可以参考示例文档或者根据 |
| 211 |
% 第~\ref{sec:howtoask} 节说明提问,有兴趣者可以联系作者参与完善此手册,非常欢迎你清学子对本代码作出贡献。 |
| 212 |
% |
| 213 |
% \section{安装} |
| 214 |
% \label{sec:installation} |
| 215 |
% |
| 216 |
% \thubeamer\ 已经上传 CTAN,已包含在 TeXLive 与 MiKTeX 发行版中。 |
| 217 |
% 安装方法:打开命令行,输入以下命令即可 |
| 218 |
% \begin{shell} |
| 219 |
% $ tlmgr install thubeamer |
| 220 |
% \end{shell} |
| 221 |
% 阅读本说明文档可以使用以下命令: |
| 222 |
% \begin{shell} |
| 223 |
% $ texdoc thubeamer |
| 224 |
% \end{shell} |
| 225 |
% |
| 226 |
% 如果要使用开发版,需自己下载,\thubeamer\ 相关链接: |
| 227 |
% \begin{itemize} |
| 228 |
% \item 主页:\href{https://github.com/YangLaTeX/thubeamer}{GitHub} |
| 229 |
% \item 下载:\href{http://www.ctan.org/pkg/thubeamer}{CTAN} |
| 230 |
% \end{itemize} |
| 231 |
% |
| 232 |
% \subsection{模板的组成} |
| 233 |
% 下表列出了 \thubeamer{} 的主要文件及其功能介绍: |
| 234 |
% |
| 235 |
% \begin{longtable}{l|p{8cm}} |
| 236 |
% \toprule |
| 237 |
% {\heiti 文件(夹)} & {\heiti 功能描述}\\\midrule |
| 238 |
% \endfirsthead |
| 239 |
% \midrule |
| 240 |
% {\heiti 文件(夹)} & {\heiti 功能描述}\\\midrule |
| 241 |
% \endhead |
| 242 |
% \endfoot |
| 243 |
% \endlastfoot |
| 244 |
% thubeamer.dtx & 主题宏包、说明文档以及主题驱动文件的混排文件\\ |
| 245 |
% main.tex & 主题测试文档\\ |
| 246 |
% figures/ & 主题相关矢量图存储文件夹\\ |
| 247 |
% makedoc.bat & 生成主题与用户手册脚本\\ |
| 248 |
% makebeamer.bat & 编译测试样例脚本\\ |
| 249 |
% makeclean.bat & 清理编译过程中间文件脚本\\ |
| 250 |
% makecleanall.bat & 清理编译过程中间文件与样式文件脚本\\ |
| 251 |
% Makefile & Linux \& Mac OS脚本\\ |
| 252 |
% \textbf{thubeamer.pdf} & 用户手册(本文档)\\ |
| 253 |
% \bottomrule |
| 254 |
% \end{longtable} |
| 255 |
% \textbf{注:}使用前,请仔细阅读\textbf{thubeamer.pdf},即本文档。 |
| 256 |
% |
| 257 |
% \section{使用说明} |
| 258 |
% \label{sec:usage} |
| 259 |
% 本手册假定用户已经能处理一般的 \LaTeX\ 文档,并对 \BibTeX\ 有一定了解。如果 |
| 260 |
% 从来没有接触过 \TeX\ 和 \LaTeX,建议先学习相关的基础知识。 |
| 261 |
% |
| 262 |
% \subsection{关于提问} |
| 263 |
% \label{sec:howtoask} |
| 264 |
% 按照优先级推荐提问的位置如下: |
| 265 |
% |
| 266 |
% \begin{itemize} |
| 267 |
% \item Github Issues: \href{http://github.com/YangLaTeX/thubeamer/issues}{http://github.com/YangLaTeX/thubeamer/issues} |
| 268 |
% \item Email: \href{mailto:[email protected]}{[email protected]}, \href{mailto:[email protected]}{[email protected]} |
| 269 |
% \end{itemize} |
| 270 |
% |
| 271 |
% \subsection{示例文件} |
| 272 |
% \label{sec:userguide} |
| 273 |
% 模板核心文件有四个\file{*.sty},但是如果 |
| 274 |
% 没有示例文档用户会发现很难下手。所以推荐新用户从模板自带的示例文档入手,里面包 |
| 275 |
% 括了Beamer写作用到的所有命令及其使用方法,只需要用自己的内容进行相应替换就可以。 |
| 276 |
% 对于不清楚的命令可以查阅本手册。下面的例子描述了模板中章节的组织形式,来自于示 |
| 277 |
% 例文档,具体内容可以参考模板附带的 \file{main.tex}。 |
| 278 |
% |
| 279 |
% \lstinputlisting[style=lstStyleLaTeX]{main.tex} |
| 280 |
% |
| 281 |
% \subsection{论文选项} |
| 282 |
% \label{sec:option} |
| 283 |
% |
| 284 |
% 论文选项在\file{main.tex} 文件的开头描述,此处不赘述。 |
| 285 |
% |
| 286 |
% \section{使用模板} |
| 287 |
% \subsection{如何编译}\label{SubSec:HowToMake} |
| 288 |
% \subsubsection{Windows用户} |
| 289 |
% 主题项目里已经列出了脚本: |
| 290 |
% 首先双击\file{makedoc.bat} 脚本,生成主题和用户手册; |
| 291 |
% 然后双击\file{makebeamer.bat} 脚本生成测试 Beamer 文件预览; |
| 292 |
% 最后双击\file{makeclean.bat} 清理编译过程的中间文件; |
| 293 |
% 双击\file{makecleanall.bat}可以清除辅助文件以及样式文件。 |
| 294 |
% |
| 295 |
% \subsubsection{Linux \& Mac OS用户} |
| 296 |
% 首先运行下面命令生成主题和用户手册; |
| 297 |
% \begin{shell} |
| 298 |
% $ make doc |
| 299 |
% \end{shell} |
| 300 |
% |
| 301 |
% 然后运行下面命令生成测试 Beamer 文件预览; |
| 302 |
% \begin{shell} |
| 303 |
% $ make beamer |
| 304 |
% \end{shell} |
| 305 |
% |
| 306 |
% 最后运行下面命令清理编译过程的中间文件。 |
| 307 |
% \begin{shell} |
| 308 |
% $ make clean |
| 309 |
% \end{shell} |
| 310 |
% |
| 311 |
% 若运行下面命令则清理编译过程的中间文件以及所有样式文件。 |
| 312 |
% \begin{shell} |
| 313 |
% $ make cleanall |
| 314 |
% \end{shell} |
| 315 |
% |
| 316 |
% \section{致谢} |
| 317 |
% \label{sec:thanks} |
| 318 |
% 感谢 \href{https://github.com/StickCui/XDUstyle-Beamer-Theme}{XDUstyle}、\href{https://github.com/tl3shi/THUBeamer}{thubeamer} 模板的作者,本模板基于他们改编而来! |
| 319 |
% |
| 320 |
% 欢迎各位到 \href{http://github.com/YangLaTeX/thubeamer/}{\thubeamer\ Github 主页}贡献! |
| 321 |
% |
| 322 |
% \StopEventually{\PrintChanges\PrintIndex} |
| 323 |
% \clearpage |
| 324 |
% |
| 325 |
% \section{实现细节} |
| 326 |
% |
| 327 |
% \subsection{主题主文件部分} |
| 328 |
% 导入必要宏包 |
| 329 |
% \begin{macrocode} |
| 330 |
%<*thubeamer> |
| 331 |
\def\thubeamer{\textsc{thu}\-\textsc{Beamer}} |
| 332 |
\RequirePackage{tikz} |
| 333 |
\usetikzlibrary{external} |
| 334 |
\RequirePackage{pgf} |
| 335 |
\RequirePackage{multicol} |
| 336 |
\RequirePackage{multimedia} |
| 337 |
\RequirePackage{calc} |
| 338 |
\RequirePackage{amsmath} |
| 339 |
\RequirePackage{amsthm} |
| 340 |
\RequirePackage{amssymb} |
| 341 |
\RequirePackage{bm} |
| 342 |
\RequirePackage{graphicx} |
| 343 |
\RequirePackage{tabularx} |
| 344 |
\RequirePackage{booktabs} |
| 345 |
\RequirePackage{multirow} |
| 346 |
\RequirePackage{enumerate} |
| 347 |
\RequirePackage{hyperref} |
| 348 |
\RequirePackage{algorithm} |
| 349 |
\RequirePackage{algorithmic} |
| 350 |
\RequirePackage[T1]{fontenc} |
| 351 |
\RequirePackage{latexsym,xcolor,multicol,calligra} |
| 352 |
\RequirePackage{pstricks,listings,stackengine} |
| 353 |
\RequirePackage[sort&compress,numbers]{natbib} |
| 354 |
% \end{macrocode} |
| 355 |
% |
| 356 |
% 主题选项 |
| 357 |
% \begin{macrocode} |
| 358 |
\DeclareOptionBeamer{thupurple}{ |
| 359 |
\PassOptionsToPackage{thupurple}{beamercolorthemethubeamer} |
| 360 |
\PassOptionsToPackage{thupurple}{beamerinnerthemethubeamer} |
| 361 |
\PassOptionsToPackage{thupurple}{beamerouterthemethubeamer} |
| 362 |
} |
| 363 |
\DeclareOptionBeamer{thupurple2}{ |
| 364 |
\PassOptionsToPackage{thupurple2}{beamercolorthemethubeamer} |
| 365 |
\PassOptionsToPackage{thupurple2}{beamerinnerthemethubeamer} |
| 366 |
\PassOptionsToPackage{thupurple2}{beamerouterthemethubeamer} |
| 367 |
} |
| 368 |
\DeclareOptionBeamer{smoothbars}{ |
| 369 |
\PassOptionsToPackage{smoothbars}{beamercolorthemethubeamer} |
| 370 |
\PassOptionsToPackage{smoothbars}{beamerouterthemethubeamer} |
| 371 |
} |
| 372 |
\DeclareOptionBeamer{sidebar}{ |
| 373 |
\PassOptionsToPackage{sidebar}{beamercolorthemethubeamer} |
| 374 |
\PassOptionsToPackage{sidebar}{beamerouterthemethubeamer} |
| 375 |
} |
| 376 |
\DeclareOptionBeamer{sectiontoc}{ |
| 377 |
\PassOptionsToPackage{sectiontoc}{beamerinnerthemethubeamer} |
| 378 |
} |
| 379 |
\DeclareOptionBeamer{subsectiontoc}{ |
| 380 |
\PassOptionsToPackage{subsectiontoc}{beamerinnerthemethubeamer} |
| 381 |
} |
| 382 |
\DeclareOptionBeamer{en}{ |
| 383 |
\PassOptionsToPackage{en}{beamerinnerthemethubeamer} |
| 384 |
} |
| 385 |
\ProcessOptionsBeamer |
| 386 |
% \end{macrocode} |
| 387 |
% |
| 388 |
% 特殊设置 |
| 389 |
% \begin{macrocode} |
| 390 |
\mode<presentation> |
| 391 |
{ |
| 392 |
\useinnertheme{thubeamer} |
| 393 |
\useoutertheme{thubeamer} |
| 394 |
\usecolortheme{thubeamer} |
| 395 |
} |
| 396 |
|
| 397 |
\mode<all> |
| 398 |
%</thubeamer> |
| 399 |
% \end{macrocode} |
| 400 |
% \subsection{主题配色文件部分} |
| 401 |
% |
| 402 |
% 参数设置 |
| 403 |
% \begin{macrocode} |
| 404 |
%<*thucolorstyle> |
| 405 |
\DeclareOptionBeamer{thupurple}{\def\beamer@thucolor{thupurple}} |
| 406 |
\DeclareOptionBeamer{thupurple2}{\def\beamer@thucolor{thupurple2}} |
| 407 |
\DeclareOptionBeamer{smoothbars}{\def\beamer@thubar{smoothbars}} |
| 408 |
\DeclareOptionBeamer{sidebar}{\def\beamer@thubar{sidebar}} |
| 409 |
\ProcessOptionsBeamer |
| 410 |
|
| 411 |
\def\beamer@thucolorpurple{thupurple} |
| 412 |
\def\beamer@thusidebar{sidebar} |
| 413 |
% \end{macrocode} |
| 414 |
% |
| 415 |
% 颜色设置。 |
| 416 |
% \begin{macrocode} |
| 417 |
\mode<presentation> |
| 418 |
|
| 419 |
\ifx\beamer@thucolor\beamer@thucolorpurple |
| 420 |
\definecolor{beamer@textcolor}{RGB}{119,33,151} |
| 421 |
\definecolor{beamer@headercolor}{RGB}{129,48,140} % purple |
| 422 |
\ifx\beamer@thubar\beamer@thusidebar |
| 423 |
\definecolor{beamer@sidebarcolor}{RGB}{129,48,140} |
| 424 |
\else |
| 425 |
\definecolor{beamer@sidebarcolor}{RGB}{129,48,140} |
| 426 |
\fi |
| 427 |
\else |
| 428 |
\definecolor{beamer@textcolor}{RGB}{119,33,151} |
| 429 |
\definecolor{beamer@headercolor}{RGB}{129,48,140} |
| 430 |
\ifx\beamer@thubar\beamer@thusidebar |
| 431 |
\definecolor{beamer@sidebarcolor}{RGB}{129,48,140} |
| 432 |
\else |
| 433 |
\definecolor{beamer@sidebarcolor}{RGB}{129,48,140} |
| 434 |
\fi |
| 435 |
\fi |
| 436 |
|
| 437 |
% \setbeamercolor{footline}{bg=beamer@headercolor} |
| 438 |
\setbeamercolor{title}{fg=white,bg=beamer@headercolor} |
| 439 |
\ifx\beamer@thubar\beamer@thusidebar |
| 440 |
\setbeamercolor{frametitle}{fg=beamer@headercolor,bg=beamer@headercolor!10} |
| 441 |
\else |
| 442 |
\setbeamercolor{frametitle}{fg=white,bg=beamer@headercolor} |
| 443 |
\fi |
| 444 |
\setbeamerfont{frametitle}{size=\large} |
| 445 |
|
| 446 |
\setbeamercolor{secondbottomline}{fg=white,bg=beamer@headercolor!50!black} |
| 447 |
\setbeamercolor{firstbottomline}{fg=white,bg=beamer@headercolor} |
| 448 |
|
| 449 |
\setbeamercolor{palette primary}{use=structure,fg=white,bg=structure.fg} |
| 450 |
\setbeamercolor{palette secondary}{use=structure,fg=white,bg=structure.fg!75!black} |
| 451 |
\setbeamercolor{palette tertiary}{use=structure,fg=white,bg=structure.fg!50!black} |
| 452 |
\setbeamercolor{palette quaternary}{fg=white,bg=structure.fg!50!black} |
| 453 |
|
| 454 |
\setbeamercolor{block title}{fg=white,bg=beamer@headercolor} |
| 455 |
\setbeamercolor{block body}{bg=beamer@headercolor!10} |
| 456 |
\setbeamercolor{block title example}{% |
| 457 |
use={normal text,example text},fg=white,bg=example text.fg!75!green |
| 458 |
} |
| 459 |
\setbeamercolor{fine separation line}{} |
| 460 |
\setbeamercolor{item projected}{fg=white} |
| 461 |
|
| 462 |
\setbeamercolor{palette sidebar primary}{use=normal text,fg=normal text.fg} |
| 463 |
\setbeamercolor{palette sidebar secondary}{use=structure,fg=structure.fg} |
| 464 |
\setbeamercolor{palette sidebar tertiary}{use=normal text,fg=normal text.fg} |
| 465 |
\setbeamercolor{palette sidebar quaternary}{use=structure,fg=structure.fg} |
| 466 |
|
| 467 |
\setbeamercolor{section in sidebar}{fg=beamer@textcolor} |
| 468 |
\setbeamercolor{section in sidebar shaded}{fg=gray} |
| 469 |
\setbeamercolor{separation line}{} |
| 470 |
\ifx\beamer@thubar\beamer@thusidebar |
| 471 |
\setbeamercolor{sidebar}{bg=beamer@sidebarcolor!10} |
| 472 |
\else |
| 473 |
\setbeamercolor{sidebar}{bg=beamer@sidebarcolor} |
| 474 |
\fi |
| 475 |
\setbeamercolor{sidebar}{parent=palette primary} |
| 476 |
\setbeamercolor{structure}{fg=beamer@headercolor} |
| 477 |
\setbeamercolor{subsection in sidebar}{fg=beamer@textcolor} |
| 478 |
\setbeamercolor{subsection in sidebar shaded}{fg=gray} |
| 479 |
\setbeamercolor{logo}{bg=beamer@headercolor!20} |
| 480 |
|
| 481 |
\mode<all> |
| 482 |
%</thucolorstyle> |
| 483 |
% \end{macrocode} |
| 484 |
% |
| 485 |
% \subsection{内部主题文件部分} |
| 486 |
% |
| 487 |
% 必要宏包 |
| 488 |
% \begin{macrocode} |
| 489 |
%<*thuinnerstyle> |
| 490 |
\RequirePackage{tikz} |
| 491 |
\usetikzlibrary{external} |
| 492 |
% \end{macrocode} |
| 493 |
% |
| 494 |
% 参数设置 |
| 495 |
% \changes{v1.1.0}{2021/11/15}{add option `en' for preparing beamer in English} |
| 496 |
% \begin{macrocode} |
| 497 |
\DeclareOptionBeamer{en}{\def\beamer@thulang{english}} |
| 498 |
\DeclareOptionBeamer{sectiontoc}{\def\beamer@thusectoc{sectiontoc}} |
| 499 |
\DeclareOptionBeamer{subsectiontoc}{\def\beamer@thusubsectoc{subsectiontoc}} |
| 500 |
\ProcessOptionsBeamer |
| 501 |
|
| 502 |
\def\beamer@thulanguage{english} |
| 503 |
\def\beamer@thusectiontoc{sectiontoc} |
| 504 |
\def\beamer@thusubsectiontoc{subsectiontoc} |
| 505 |
% \end{macrocode} |
| 506 |
% |
| 507 |
% 特殊设置 |
| 508 |
% \begin{macrocode} |
| 509 |
\mode<presentation> |
| 510 |
|
| 511 |
\ifx\beamer@thulang\beamer@thulanguage |
| 512 |
\relax |
| 513 |
\else |
| 514 |
\RequirePackage{ctex} |
| 515 |
\fi |
| 516 |
|
| 517 |
\useinnertheme{circles} |
| 518 |
% \usefonttheme{structurebold} |
| 519 |
\setbeamertemplate{caption}[numbered]{} |
| 520 |
\useinnertheme[shadow]{rounded} |
| 521 |
|
| 522 |
\newcommand\varparallel{% |
| 523 |
\mathrel{% |
| 524 |
\text{% |
| 525 |
\tikz[baseline] \draw (0em,-0.3ex) -- (.4em,1.7ex) (.2em,-0.3ex) -- (.6em,1.7ex); |
| 526 |
}% |
| 527 |
}% |
| 528 |
} |
| 529 |
|
| 530 |
\ifx\beamer@thusectoc\beamer@thusectiontoc |
| 531 |
\AtBeginSection[]{ |
| 532 |
\begin{frame} |
| 533 |
\begin{multicols}{2} |
| 534 |
\tableofcontents[sectionstyle=show/shaded,subsectionstyle=show/shaded/hide,subsubsectionstyle=show/shaded/hide] |
| 535 |
\end{multicols} |
| 536 |
\end{frame} |
| 537 |
} |
| 538 |
\fi |
| 539 |
|
| 540 |
\ifx\beamer@thusubsectoc\beamer@thusubsectiontoc |
| 541 |
\AtBeginSubsection[]{ |
| 542 |
\begin{frame} |
| 543 |
\begin{multicols}{2} |
| 544 |
\tableofcontents[sectionstyle=show/shaded,subsectionstyle=show/shaded/hide,subsubsectionstyle=show/shaded/hide] |
| 545 |
\end{multicols} |
| 546 |
\end{frame} |
| 547 |
} |
| 548 |
\fi |
| 549 |
|
| 550 |
\mode<all> |
| 551 |
%</thuinnerstyle> |
| 552 |
% \end{macrocode} |
| 553 |
% \subsection{外部主题文件部分} |
| 554 |
% |
| 555 |
% \begin{macrocode} |
| 556 |
%<*thuouterstyle> |
| 557 |
% \end{macrocode} |
| 558 |
% |
| 559 |
% 参数设置 |
| 560 |
% \begin{macrocode} |
| 561 |
\DeclareOptionBeamer{smoothbars}{\def\beamer@thubar{smoothbars}} |
| 562 |
\DeclareOptionBeamer{sidebar}{\def\beamer@thubar{sidebar}} |
| 563 |
\ProcessOptionsBeamer |
| 564 |
\def\beamer@thusidebar{sidebar} |
| 565 |
|
| 566 |
\mode<presentation> |
| 567 |
|
| 568 |
% 取消导航符号 |
| 569 |
\setbeamertemplate{navigation symbols}{} |
| 570 |
|
| 571 |
\ifx\beamer@thubar\beamer@thusidebar |
| 572 |
\useoutertheme[width=0.17\linewidth]{sidebar} |
| 573 |
\logo{\includegraphics[width=0.08\linewidth]{thulogo.pdf}} |
| 574 |
\else |
| 575 |
\useoutertheme[footline=authorinstitutetitle,subsection=false]{smoothbars} |
| 576 |
\fi |
| 577 |
|
| 578 |
% set footline |
| 579 |
\makeatletter |
| 580 |
\newcommand{\frameofframes}{/} |
| 581 |
\newcommand{\setframeofframes}[1]{ |
| 582 |
\renewcommand{\frameofframes}{#1} |
| 583 |
} |
| 584 |
\setbeamertemplate{footline}{% |
| 585 |
\begin{beamercolorbox}[colsep=1.5pt]{upper separation line foot} |
| 586 |
\end{beamercolorbox} |
| 587 |
\begin{beamercolorbox}[ht=2.5ex,dp=1.125ex,% |
| 588 |
leftskip=.3cm,rightskip=.3cm plus1fil]{firstbottomline}% |
| 589 |
\leavevmode{\usebeamerfont{author in head/foot}\insertshortauthor}% |
| 590 |
\hfill% |
| 591 |
{\usebeamerfont{institute in head/foot}% |
| 592 |
\usebeamercolor[fg]{frame number}% |
| 593 |
\insertshortinstitute |
| 594 |
}% |
| 595 |
\end{beamercolorbox}% |
| 596 |
\begin{beamercolorbox}[ht=2.5ex,dp=1.125ex,% |
| 597 |
leftskip=.3cm,rightskip=.3cm plus1fil]{secondbottomline}% |
| 598 |
{\usebeamerfont{title in head/foot}\insertshorttitle}% |
| 599 |
\hfill% |
| 600 |
{\usebeamerfont{frame number}\usebeamercolor[fg]{frame number}\insertframenumber~\frameofframes~\inserttotalframenumber} |
| 601 |
\end{beamercolorbox}% |
| 602 |
\begin{beamercolorbox}[colsep=1.5pt]{lower separation line foot} |
| 603 |
\end{beamercolorbox} |
| 604 |
} |
| 605 |
\makeatother |
| 606 |
|
| 607 |
\mode<all> |
| 608 |
%</thuouterstyle> |
| 609 |
% \end{macrocode} |
| 610 |
% |
| 611 |
% \iffalse |
| 612 |
% \begin{macrocode} |
| 613 |
%<*dtx-style> |
| 614 |
\ProvidesPackage{dtx-style} |
| 615 |
\RequirePackage{hypdoc} |
| 616 |
\RequirePackage[UTF8,scheme=chinese,fontset=windowsnew]{ctex} |
| 617 |
\RequirePackage{newpxtext} |
| 618 |
\RequirePackage{newpxmath} |
| 619 |
\RequirePackage[top=2.5cm, bottom=2.5cm, left=3cm, right=2cm, headsep=8mm]{geometry} |
| 620 |
\RequirePackage{array,longtable,booktabs} |
| 621 |
\RequirePackage{listings} |
| 622 |
\RequirePackage{fancyhdr} |
| 623 |
\RequirePackage{xcolor} |
| 624 |
\RequirePackage{enumitem} |
| 625 |
\RequirePackage{etoolbox} |
| 626 |
\RequirePackage{metalogo} |
| 627 |
\RequirePackage{hyperref} |
| 628 |
|
| 629 |
\colorlet{thu@macro}{purple!60!black} |
| 630 |
\colorlet{thu@env}{purple!70!black} |
| 631 |
\colorlet{thu@option}{purple} |
| 632 |
\patchcmd{\PrintMacroName}{\MacroFont}{\MacroFont\bfseries\color{thu@macro}}{}{} |
| 633 |
\patchcmd{\PrintDescribeMacro}{\MacroFont}{\MacroFont\bfseries\color{thu@macro}}{}{} |
| 634 |
\patchcmd{\PrintDescribeEnv}{\MacroFont}{\MacroFont\bfseries\color{thu@env}}{}{} |
| 635 |
\patchcmd{\PrintEnvName}{\MacroFont}{\MacroFont\bfseries\color{thu@env}}{}{} |
| 636 |
|
| 637 |
\def\DescribeOption{% |
| 638 |
\leavevmode\@bsphack\begingroup\MakePrivateLetters% |
| 639 |
\Describe@Option} |
| 640 |
\def\Describe@Option#1{\endgroup |
| 641 |
\marginpar{\raggedleft\PrintDescribeOption{#1}}% |
| 642 |
\thu@special@index{option}{#1}\@esphack\ignorespaces} |
| 643 |
\def\PrintDescribeOption#1{\strut \MacroFont\bfseries\sffamily\color{thu@option} #1\ } |
| 644 |
\def\thu@special@index#1#2{\@bsphack |
| 645 |
\begingroup |
| 646 |
\HD@target |
| 647 |
\let\HDorg@encapchar\encapchar |
| 648 |
\edef\encapchar usage{% |
| 649 |
\HDorg@encapchar hdclindex{\the\c@HD@hypercount}{usage}% |
| 650 |
}% |
| 651 |
\index{#2\actualchar{\string\ttfamily\space#2} |
| 652 |
(#1)\encapchar usage}% |
| 653 |
\index{#1:\levelchar#2\actualchar |
| 654 |
{\string\ttfamily\space#2}\encapchar usage}% |
| 655 |
\endgroup |
| 656 |
\@esphack} |
| 657 |
|
| 658 |
\lstdefinestyle{lstStyleBase}{% |
| 659 |
basicstyle=\small\ttfamily, |
| 660 |
aboveskip=\medskipamount, |
| 661 |
belowskip=\medskipamount, |
| 662 |
lineskip=0pt, |
| 663 |
boxpos=c, |
| 664 |
showlines=false, |
| 665 |
extendedchars=true, |
| 666 |
upquote=true, |
| 667 |
tabsize=2, |
| 668 |
showtabs=false, |
| 669 |
showspaces=false, |
| 670 |
showstringspaces=false, |
| 671 |
numbers=none, |
| 672 |
linewidth=\linewidth, |
| 673 |
xleftmargin=4pt, |
| 674 |
xrightmargin=0pt, |
| 675 |
resetmargins=false, |
| 676 |
breaklines=true, |
| 677 |
breakatwhitespace=false, |
| 678 |
breakindent=0pt, |
| 679 |
breakautoindent=true, |
| 680 |
columns=flexible, |
| 681 |
keepspaces=true, |
| 682 |
gobble=2, |
| 683 |
framesep=3pt, |
| 684 |
rulesep=1pt, |
| 685 |
framerule=1pt, |
| 686 |
backgroundcolor=\color{gray!5}, |
| 687 |
stringstyle=\color{purple!40!black!100}, |
| 688 |
keywordstyle=\bfseries\color{purple!50!black}, |
| 689 |
commentstyle=\slshape\color{black!60}} |
| 690 |
|
| 691 |
\lstdefinestyle{lstStyleShell}{% |
| 692 |
style=lstStyleBase, |
| 693 |
frame=l, |
| 694 |
rulecolor=\color{purple}, |
| 695 |
language=bash} |
| 696 |
|
| 697 |
\definecolor{beamer@headercolor}{RGB}{21,95,130} |
| 698 |
\lstdefinestyle{lstStyleLaTeX}{% |
| 699 |
style=lstStyleBase, |
| 700 |
frame=l, |
| 701 |
rulecolor=\color{beamer@headercolor}, |
| 702 |
language=[LaTeX]TeX} |
| 703 |
|
| 704 |
\lstnewenvironment{latex}{\lstset{style=lstStyleLaTeX}}{} |
| 705 |
\lstnewenvironment{shell}{\lstset{style=lstStyleShell}}{} |
| 706 |
|
| 707 |
\setlist{nosep} |
| 708 |
|
| 709 |
\DeclareDocumentCommand{\option}{m}{\textsf{#1}} |
| 710 |
\DeclareDocumentCommand{\env}{m}{\texttt{#1}} |
| 711 |
\DeclareDocumentCommand{\pkg}{s m}{% |
| 712 |
\texttt{#2}\IfBooleanF#1{\thu@special@index{package}{#2}}} |
| 713 |
\DeclareDocumentCommand{\file}{s m}{% |
| 714 |
\texttt{#2}\IfBooleanF#1{\thu@special@index{file}{#2}}} |
| 715 |
\newcommand{\myentry}[1]{% |
| 716 |
\marginpar{\small\raggedleft\color{purple}\bfseries\strut #1}} |
| 717 |
\newcommand{\note}[2][Note]{{% |
| 718 |
\color{magenta}{\bfseries #1}\emph{#2}}} |
| 719 |
\def\thubeamer{\textsc{Thu}\-\textsc{Beamer}} |
| 720 |
\def\thu{清华大学} |
| 721 |
%</dtx-style> |
| 722 |
% \end{macrocode} |
| 723 |
% \fi |
| 724 |
% |
| 725 |
% \Finale |
| 726 |
% |
| 727 |
\endinput |
| 728 |
% \iffalse |
| 729 |
% Local Variables: |
| 730 |
% mode: doctex |
| 731 |
% TeX-master: t |
| 732 |
% End: |
| 733 |
% \fi |