├── .gitignore ├── LICENSE ├── README.md ├── figs ├── fig01.png ├── fig02.png ├── fig03.png ├── fig04.png ├── fig05.png ├── fig06.png ├── fig07.png ├── fig08.png ├── harmonysans.png ├── ouc.png └── ouc_gate.png ├── fontawesome.pdf ├── fonts ├── HarmonyOS_Sans_Black.ttf ├── HarmonyOS_Sans_Black_Italic.ttf ├── HarmonyOS_Sans_Bold.ttf ├── HarmonyOS_Sans_Bold_Italic.ttf ├── HarmonyOS_Sans_Light.ttf ├── HarmonyOS_Sans_Light_Italic.ttf ├── HarmonyOS_Sans_Medium.ttf ├── HarmonyOS_Sans_Medium_Italic.ttf ├── HarmonyOS_Sans_Regular.ttf ├── HarmonyOS_Sans_Regular_Italic.ttf ├── HarmonyOS_Sans_SC_Black.ttf ├── HarmonyOS_Sans_SC_Bold.ttf ├── HarmonyOS_Sans_SC_Light.ttf ├── HarmonyOS_Sans_SC_Medium.ttf ├── HarmonyOS_Sans_SC_Regular.ttf ├── HarmonyOS_Sans_SC_Thin.ttf ├── HarmonyOS_Sans_Thin.ttf └── HarmonyOS_Sans_Thin_Italic.ttf ├── logos ├── background.jpg ├── ouc_logo.png ├── ouc_logo_2.png └── ouc_logo_bottom.png ├── oucslide.sty ├── slides.pdf ├── slides.tex └── theme ├── beamercolorthemeOUCSlide.sty ├── beamerfontthemeOUCSlide.sty ├── beamerinnerthemeOUCSlide.sty ├── beamerouterthemeOUCSlide.sty └── beamerthemeOUCSlide.sty /.gitignore: -------------------------------------------------------------------------------- 1 | slides.aux 2 | slides.log 3 | slides.nav 4 | slides.out 5 | slides.snm 6 | slides.synctex.gz 7 | slides.toc 8 | slides.vrb 9 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | BSD 3-Clause License 2 | 3 | Copyright (c) 2020, Helmholtz AI Energy 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 9 | 1. Redistributions of source code must retain the above copyright notice, this 10 | list of conditions and the following disclaimer. 11 | 12 | 2. Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | 16 | 3. Neither the name of the copyright holder nor the names of its 17 | contributors may be used to endorse or promote products derived from 18 | this software without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 中国海洋大学幻灯片Latex模板 2 | 3 | 中国海洋大学幻灯片Latex非官方模板。 4 | 5 | 本模板修改自HelmholtzAI模板。在原有模板基础上进行了大量修改。 6 | 7 | 模板主要使用海大公布的标准色,包括海大蓝、海大天蓝、海大红、樱缤粉、文脉棕、专金、专银。 8 | 9 | 此外,使用了大量的信息框来增加模板的活力。 10 | 11 | # 文件结构 12 | 13 | 模板中的文件主要包括: 14 | 15 | 1. slide.tex:主文件,编写的演示文稿内容主要存放在该文件当中。 16 | 2. oucslide.sty:模板的样式文件。 17 | 3. font:字体文件夹,所有编译需要用到的字体。默认字体使用的是华为鸿蒙字体。 18 | 4. theme:主题文件夹。 19 | 1. beamercolorthemeOUCSlide.sty:颜色定义文件。 20 | 2. beamerfontthemeOUCSlide.sty:字体定义文件。 21 | 3. beamerinnerthemeOUCSlide.sty:内部元素定义文件。 22 | 4. beamerouterthemeOUCSlide.sty:整体布局定义文件。 23 | 5. beamerthemeOUCSlide.sty:主题定义文件。 24 | 5. logos:模板中使用的Logo存放文件夹。 25 | 6. figs:插入的图片文件夹。 26 | 7. fontawesome.pdf:图标使用说明文件。 27 | 28 | # 使用方法 29 | 1. 从git上clone项目到本地。目前,共有多个git库供选择,分别是:GithubGiteeGitlab阿里云Code。这些库都和源库保持一致和同步,从理论上来讲,使用任何一个库都可以。 30 | 2. 安装Tex编译器,推荐使用TexLive,安装成功后,可以使用自带的TeXworks打开目录下的tex文件进行编译。 31 | 3. 可以安装其他的IDE工具进行Tex文件的编写和修改,推荐使用Visual Studio Code。 32 | 4. 编译时,请选择XeLaTex,有时候,可能需要连续编译两次,以得到正确的页码和图表编号。 33 | 34 | # 元素介绍 35 | ## 基本信息 36 | Tex文件的开头,是基本信息部分,可以根据需要添加`\title`{标题}、`\subtitle`{子标题}、`\author`{作者}、`\date`{\today}、`\institute`{所属机构}。 37 | 38 | `\newcommand{\last}{敬请批评指正!}` 的作用是为了制作最后一页致谢页面而单独设置的,可以修改为任何致谢语句。 39 | 40 | ## 特殊页面 41 | 42 | 模板中有三个特殊的页面,分别是:标题页(首页)、目录页和结尾页。这三个页面由于其特殊性,不能使用frame的常规模板,因此,为它们创建了三个命令进行生成: 43 | 44 | ``` 45 | \maketitle 46 | \makeoutline 47 | \makelast 48 | ``` 49 | 使用者三个命令后,将会自动创建首页、目录页和结尾页。 50 | 51 | 首页和结尾页,使用的是基本信息中的数据,而目录页的内容,将根据`\section`进行填充。 52 | 53 | ## 使用分节 54 | 55 | 本模板使用分节进行整体规划,章节共三级,对应的关键字分别是: 56 | ``` 57 | \section 58 | \subsection 59 | \subsubsection 60 | ``` 61 | 其中,`\section` 会有单独的页面进行显示。如下图所示。而且,section还将会出现在目录页面中。 62 | ![section](/figs/fig01.png ) 63 | `\subsection` 和 `\subsubsection`都没有单独的页面相对应,他们会出现在对应章节的frame中,作为标题进行呈现,并且加入了自动编号的效果。需要说明的是,`\subsection`是必须的,而 `\subsubsection` 却可有可无。他们呈现出的最终的效果,如下图所示。 64 | ![subsection](/figs/fig02.png) 65 | **需要注意的是,虽然frame的标题,是由subsection和subsubsection自动生成的,但是frame中的frametitle仍然是必须的,否则没有frametitle这个元素,标题无法自动填充。** 66 | 67 | ## 使用Frame 68 | 章节确定好后,就可以增加Frame来编写幻灯片。使用代码: 69 | ``` 70 | \begin{frame} 71 | \frametitle{测试} 72 | \end{frame} 73 | ``` 74 | 就可以插入一张幻灯片。 75 | 76 | 需要注意的是:如果幻灯片中使用了代码块,则需要加入关键字`fragile`。这样,引入的代码才能保持它们原有的样子,如下所示: 77 | ``` 78 | \begin{frame}[fragile] 79 | \frametitle{测试} 80 | \end{frame} 81 | ``` 82 | 当然,也可以使用定义的特殊的frame模板来达到这种效果。 83 | ``` 84 | \begin{fragileframe} 85 | \frametitle{测试} 86 | \end{fragileframe} 87 | ``` 88 | 他们的效果是一样的。 89 | 90 | ## 字体 91 | 模板使用的默认字体是华为鸿蒙字体 (HarmonyOS Sans)。该字体可以免费商用。 92 | 93 | 如果对字体不满意,可下载其他字体,放入fonts文件夹,并在`beamerfontthemeOUCSlide.sty`文件中修改。 94 | 95 | 推荐的字体包括:思源黑体阿里普惠字体OPPO字体小米字体。这些字体基本上都可以免费商用,并且效果都很不错。关于他们是否能够继续免费商用的政策,请查阅其官方网站以得到最准确的信息。 96 | 97 | ## 颜色 98 | 根据海大公布的标准颜色,定义了相关颜色,主要包括海大蓝、海大天蓝、海大红、樱缤粉、文脉棕、专金、专银。其中文名称和代码如下表所示。 99 | 100 | 当然,也可以使用Latex自带的颜色,例如white、black等。 101 | | 名称 | 中文名 | 102 | |--------------|--------------| 103 | | oucblue | 海大蓝 | 104 | | ouclightblue | 海大天蓝 | 105 | | oucred | 海大红 | 106 | | ouccherry | 樱缤粉 | 107 | | oucbrown | 文脉棕 | 108 | | oucgolden | 专金 | 109 | | oucsilver | 专银 | 110 | 111 | ## 颜色等级 112 | 为了显示更丰富的色彩,定义的海大标准色,每一种颜色,都有十个等级,等级越低,颜色越浅。例如:对于海大蓝,其等级颜色从oucblue90-oucblue10不等,分成10个等级。 113 | 114 | ## 信息框 115 | 信息框使用边框的形式,提升幻灯片的表现力。 116 | 117 | 主要的信息框包括:列表框(`vcolorbox`)、提示框(`notebox`、`importantbox`)、信息框(`titlebox`)、要点框(`pointbox`)、块(`block`、`exampleblock`、`alertblock`)、标题框(`headbox`)和文本框(`textbox`)。它们的效果,如下图所示。 118 | 119 | ![列表框](/figs/fig03.png) 120 | ![提示框](/figs/fig04.png) 121 | ![信息框](/figs/fig05.png) 122 | ![要点框](/figs/fig06.png) 123 | ![块](/figs/fig07.png) 124 | ![标题框和文本框](/figs/fig08.png) 125 | 126 | ## 代码 127 | 128 | 模板可以插入代码块,使用`lstlisting`即可。 129 | 130 | ## 公式 131 | 模板中可以直接插入公式,和LaTex中没有什么区别。 132 | 133 | ## 脚注 134 | 可以在任何地方使用脚注。即便是在各种信息框中也可以。 -------------------------------------------------------------------------------- /figs/fig01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dryangyq/ouc-slide-latex-template/c36d035ebf5ff2b39f14591234df1b31c9490f63/figs/fig01.png -------------------------------------------------------------------------------- /figs/fig02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dryangyq/ouc-slide-latex-template/c36d035ebf5ff2b39f14591234df1b31c9490f63/figs/fig02.png -------------------------------------------------------------------------------- /figs/fig03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dryangyq/ouc-slide-latex-template/c36d035ebf5ff2b39f14591234df1b31c9490f63/figs/fig03.png -------------------------------------------------------------------------------- /figs/fig04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dryangyq/ouc-slide-latex-template/c36d035ebf5ff2b39f14591234df1b31c9490f63/figs/fig04.png -------------------------------------------------------------------------------- /figs/fig05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dryangyq/ouc-slide-latex-template/c36d035ebf5ff2b39f14591234df1b31c9490f63/figs/fig05.png -------------------------------------------------------------------------------- /figs/fig06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dryangyq/ouc-slide-latex-template/c36d035ebf5ff2b39f14591234df1b31c9490f63/figs/fig06.png -------------------------------------------------------------------------------- /figs/fig07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dryangyq/ouc-slide-latex-template/c36d035ebf5ff2b39f14591234df1b31c9490f63/figs/fig07.png -------------------------------------------------------------------------------- /figs/fig08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dryangyq/ouc-slide-latex-template/c36d035ebf5ff2b39f14591234df1b31c9490f63/figs/fig08.png -------------------------------------------------------------------------------- /figs/harmonysans.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dryangyq/ouc-slide-latex-template/c36d035ebf5ff2b39f14591234df1b31c9490f63/figs/harmonysans.png -------------------------------------------------------------------------------- /figs/ouc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dryangyq/ouc-slide-latex-template/c36d035ebf5ff2b39f14591234df1b31c9490f63/figs/ouc.png -------------------------------------------------------------------------------- /figs/ouc_gate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dryangyq/ouc-slide-latex-template/c36d035ebf5ff2b39f14591234df1b31c9490f63/figs/ouc_gate.png -------------------------------------------------------------------------------- /fontawesome.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dryangyq/ouc-slide-latex-template/c36d035ebf5ff2b39f14591234df1b31c9490f63/fontawesome.pdf -------------------------------------------------------------------------------- /fonts/HarmonyOS_Sans_Black.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dryangyq/ouc-slide-latex-template/c36d035ebf5ff2b39f14591234df1b31c9490f63/fonts/HarmonyOS_Sans_Black.ttf -------------------------------------------------------------------------------- /fonts/HarmonyOS_Sans_Black_Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dryangyq/ouc-slide-latex-template/c36d035ebf5ff2b39f14591234df1b31c9490f63/fonts/HarmonyOS_Sans_Black_Italic.ttf -------------------------------------------------------------------------------- /fonts/HarmonyOS_Sans_Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dryangyq/ouc-slide-latex-template/c36d035ebf5ff2b39f14591234df1b31c9490f63/fonts/HarmonyOS_Sans_Bold.ttf -------------------------------------------------------------------------------- /fonts/HarmonyOS_Sans_Bold_Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dryangyq/ouc-slide-latex-template/c36d035ebf5ff2b39f14591234df1b31c9490f63/fonts/HarmonyOS_Sans_Bold_Italic.ttf -------------------------------------------------------------------------------- /fonts/HarmonyOS_Sans_Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dryangyq/ouc-slide-latex-template/c36d035ebf5ff2b39f14591234df1b31c9490f63/fonts/HarmonyOS_Sans_Light.ttf -------------------------------------------------------------------------------- /fonts/HarmonyOS_Sans_Light_Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dryangyq/ouc-slide-latex-template/c36d035ebf5ff2b39f14591234df1b31c9490f63/fonts/HarmonyOS_Sans_Light_Italic.ttf -------------------------------------------------------------------------------- /fonts/HarmonyOS_Sans_Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dryangyq/ouc-slide-latex-template/c36d035ebf5ff2b39f14591234df1b31c9490f63/fonts/HarmonyOS_Sans_Medium.ttf -------------------------------------------------------------------------------- /fonts/HarmonyOS_Sans_Medium_Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dryangyq/ouc-slide-latex-template/c36d035ebf5ff2b39f14591234df1b31c9490f63/fonts/HarmonyOS_Sans_Medium_Italic.ttf -------------------------------------------------------------------------------- /fonts/HarmonyOS_Sans_Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dryangyq/ouc-slide-latex-template/c36d035ebf5ff2b39f14591234df1b31c9490f63/fonts/HarmonyOS_Sans_Regular.ttf -------------------------------------------------------------------------------- /fonts/HarmonyOS_Sans_Regular_Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dryangyq/ouc-slide-latex-template/c36d035ebf5ff2b39f14591234df1b31c9490f63/fonts/HarmonyOS_Sans_Regular_Italic.ttf -------------------------------------------------------------------------------- /fonts/HarmonyOS_Sans_SC_Black.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dryangyq/ouc-slide-latex-template/c36d035ebf5ff2b39f14591234df1b31c9490f63/fonts/HarmonyOS_Sans_SC_Black.ttf -------------------------------------------------------------------------------- /fonts/HarmonyOS_Sans_SC_Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dryangyq/ouc-slide-latex-template/c36d035ebf5ff2b39f14591234df1b31c9490f63/fonts/HarmonyOS_Sans_SC_Bold.ttf -------------------------------------------------------------------------------- /fonts/HarmonyOS_Sans_SC_Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dryangyq/ouc-slide-latex-template/c36d035ebf5ff2b39f14591234df1b31c9490f63/fonts/HarmonyOS_Sans_SC_Light.ttf -------------------------------------------------------------------------------- /fonts/HarmonyOS_Sans_SC_Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dryangyq/ouc-slide-latex-template/c36d035ebf5ff2b39f14591234df1b31c9490f63/fonts/HarmonyOS_Sans_SC_Medium.ttf -------------------------------------------------------------------------------- /fonts/HarmonyOS_Sans_SC_Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dryangyq/ouc-slide-latex-template/c36d035ebf5ff2b39f14591234df1b31c9490f63/fonts/HarmonyOS_Sans_SC_Regular.ttf -------------------------------------------------------------------------------- /fonts/HarmonyOS_Sans_SC_Thin.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dryangyq/ouc-slide-latex-template/c36d035ebf5ff2b39f14591234df1b31c9490f63/fonts/HarmonyOS_Sans_SC_Thin.ttf -------------------------------------------------------------------------------- /fonts/HarmonyOS_Sans_Thin.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dryangyq/ouc-slide-latex-template/c36d035ebf5ff2b39f14591234df1b31c9490f63/fonts/HarmonyOS_Sans_Thin.ttf -------------------------------------------------------------------------------- /fonts/HarmonyOS_Sans_Thin_Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dryangyq/ouc-slide-latex-template/c36d035ebf5ff2b39f14591234df1b31c9490f63/fonts/HarmonyOS_Sans_Thin_Italic.ttf -------------------------------------------------------------------------------- /logos/background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dryangyq/ouc-slide-latex-template/c36d035ebf5ff2b39f14591234df1b31c9490f63/logos/background.jpg -------------------------------------------------------------------------------- /logos/ouc_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dryangyq/ouc-slide-latex-template/c36d035ebf5ff2b39f14591234df1b31c9490f63/logos/ouc_logo.png -------------------------------------------------------------------------------- /logos/ouc_logo_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dryangyq/ouc-slide-latex-template/c36d035ebf5ff2b39f14591234df1b31c9490f63/logos/ouc_logo_2.png -------------------------------------------------------------------------------- /logos/ouc_logo_bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dryangyq/ouc-slide-latex-template/c36d035ebf5ff2b39f14591234df1b31c9490f63/logos/ouc_logo_bottom.png -------------------------------------------------------------------------------- /oucslide.sty: -------------------------------------------------------------------------------- 1 | %!TEX program = xelatex 2 | 3 | %% 版本:1.0 4 | %% 2022-05-07 5 | %% 作者:杨永全 6 | %% 本文件的主要作用,是为了定义基本结构 7 | 8 | %原模板代码 9 | \makeatletter 10 | \def\beamer@calltheme#1#2#3{% 11 | \def\beamer@themelist{#2} 12 | \@for\beamer@themename:=\beamer@themelist\do 13 | {\usepackage[{#1}]{\beamer@themelocation/#3\beamer@themename}}} 14 | 15 | \def\usefolder#1{ 16 | \def\beamer@themelocation{#1} 17 | } 18 | \def\beamer@themelocation{} 19 | 20 | \usefolder{theme} 21 | \usetheme{OUCSlide} 22 | -------------------------------------------------------------------------------- /slides.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dryangyq/ouc-slide-latex-template/c36d035ebf5ff2b39f14591234df1b31c9490f63/slides.pdf -------------------------------------------------------------------------------- /slides.tex: -------------------------------------------------------------------------------- 1 | %!TEX program = xelatex 2 | 3 | %% 版本:1.0 4 | %% 2022-05-07 5 | %% 作者:杨永全 6 | \documentclass[aspectratio=169,UTF8,t]{beamer}%比例是16:9,UTF8编码支持,顶部对齐 7 | \usepackage{oucslide} 8 | \usepackage[UTF8]{ctex} 9 | \usepackage{xeCJK} 10 | \usepackage{fontawesome}%加入图标支持 11 | \usepackage{tcolorbox} 12 | \usepackage{verbatim} 13 | \usepackage{caption} 14 | \usepackage{subcaption} 15 | 16 | \newcommand\crule[3][black]{\textcolor{#1}{\rule{#2}{#3}}} 17 | 18 | %基本信息 19 | \title{中国海洋大学幻灯片Latex模板} 20 | \subtitle{助力你的科研梦想} 21 | \author{杨永全} 22 | \date{\today} 23 | \institute{计算机科学与技术学院} 24 | \newcommand{\last}{敬请批评指正!} %结束语 25 | %\newcommand{\last}{提问与解答环节} 26 | %基本信息结束 27 | 28 | \begin{document} 29 | 30 | \maketitle 31 | 32 | \makeoutline 33 | 34 | \section{简介} 35 | 36 | \subsection{模板简介} 37 | 38 | \begin{frame} 39 | \frametitle{简介} 40 | 中国海洋大学演示文稿Latex非官方模板。 41 | 42 | 本模板修改自HelmholtzAI\footnote{https://github.com/Helmholtz-AI-Energy/beamer-template}模板。在原有模板基础上进行了大量修改。 43 | 44 | 模板主要使用海大公布的标准色,包括海大蓝、海大天蓝、海大红、樱缤粉、文脉棕、专金、专银。 45 | 46 | 此外,使用了大量的信息框来增加模板的活力。 47 | \begin{center} 48 | \begin{figure} 49 | \centering 50 | \includegraphics[width=0.6\textwidth]{figs/ouc.png} 51 | \caption{中国海洋大学} 52 | \label{fig:ouc} 53 | \end{figure} 54 | \end{center} 55 | 56 | 57 | \end{frame} 58 | 59 | \section{模板使用方法} 60 | 61 | \subsection{使用方法} 62 | 63 | \begin{frame} 64 | \frametitle{模板使用方法} 65 | \begin{enumerate} 66 | \item 从git上clone整个文件夹目录\footnote{https://git.yangyq.net/laoyang/ouc-slide-latex-template.git }\footnote{https://github.com/dryangyq/ouc-slide-latex-template.git}\footnote{https://gitee.com/dryangyq/ouc-slide-latex-template.git}\footnote{https://gitlab.com/dryangyq/ouc-slide-latex-template.git}\\~ 67 | \item 编辑tex文件进行修改\\~ 68 | \item 编译tex文件为PDF\\~ 69 | \begin{enumerate} 70 | \item 可以使用VS Code,或者\\~ 71 | \item 使用LaTeX IDE,比如TeXstudio等进行编译\\~ 72 | \end{enumerate} 73 | \item \emph{注意:} 请使用LuaLaTeX 或者 XeLaTeX 进行编译 74 | \end{enumerate} 75 | \end{frame} 76 | 77 | \section{元素} 78 | 79 | \subsection{字体} 80 | 81 | \begin{frame} 82 | \frametitle{字体是啥} 83 | 模板使用的默认字体是鸿蒙字体。 84 | 85 | 如果对字体不满意,可下载其他字体,放入fonts文件夹,并在\textbf{beamerfontthemeOUCSlide.sty}文件中修改。 86 | \begin{center} 87 | \begin{figure} 88 | \centering 89 | \includegraphics[width=0.5\textwidth]{figs/harmonysans.png} 90 | \caption{鸿蒙字体} 91 | \label{fig:harmonysans} 92 | \end{figure} 93 | \end{center} 94 | \end{frame} 95 | 96 | \subsection{颜色} 97 | \subsubsection{基本颜色} 98 | \begin{frame} 99 | \frametitle{颜色} 100 | %\framesubtitle{基本颜色} 101 | 102 | 根据海大公布的标准颜色,定义了相关颜色,主要包括海大蓝、海大天蓝、海大红、樱缤粉、文脉棕、专金、专银。其中文名称和代码如表\ref{table:color}所示。\\ 103 | 当然,也可以使用Latex自带的颜色,例如white、black等。 104 | 105 | \begin{table} 106 | \centering 107 | \small 108 | \caption{基本颜色定义} 109 | \label{table:color} 110 | \begin{tabular}{ccc} 111 | \textbf{颜色} & \textbf{名称} & \textbf{中文名}\\\toprule 112 | \crule[oucblue]{10pt}{10pt} & oucblue & 海大蓝 \\ 113 | \crule[ouclightblue]{10pt}{10pt} & ouclightblue & 海大天蓝 \\ 114 | \crule[oucred]{10pt}{10pt} & oucred & 海大红 \\ 115 | \crule[ouccherry]{10pt}{10pt} & ouccherry & 樱缤粉 \\ 116 | \crule[oucbrown]{10pt}{10pt} & oucbrown & 文脉棕 \\ 117 | \crule[oucgolden]{10pt}{10pt} & oucgolden & 专金 \\ 118 | \crule[oucsilver]{10pt}{10pt} & oucsilver & 专银 \\ 119 | \end{tabular} 120 | \end{table} 121 | \end{frame} 122 | 123 | \subsubsection{颜色等级} 124 | 125 | \begin{frame} 126 | \frametitle{颜色} 127 | %\framesubtitle{颜色等级} 128 | 129 | \emph{定义的海大标准色,每一种颜色,都有十个等级,等级越低,颜色越浅。例如:对于海大蓝,其等级颜色如表\ref{table:colorgrade}所示。}\\ 130 | 131 | \begin{table} 132 | \centering 133 | \small 134 | \caption{颜色等级} 135 | \label{table:colorgrade} 136 | \begin{tabular}{cl} 137 | \textbf{颜色} & \textbf{名称}\\\toprule 138 | \crule[oucblue10]{8pt}{8pt} & oucblue10 \\ 139 | \crule[oucblue20]{8pt}{8pt} & oucblue20 \\ 140 | \crule[oucblue30]{8pt}{8pt} & oucblue30 \\ 141 | \crule[oucblue40]{8pt}{8pt} & oucblue40 \\ 142 | \crule[oucblue50]{8pt}{8pt} & oucblue50 \\ 143 | \crule[oucblue60]{8pt}{8pt} & oucblue60 \\ 144 | \crule[oucblue70]{8pt}{8pt} & oucblue70 \\ 145 | \crule[oucblue80]{8pt}{8pt} & oucblue80 \\ 146 | \crule[oucblue90]{8pt}{8pt} & oucblue90 \\ 147 | \crule[oucblue]{8pt}{8pt} & oucblue \\\bottomrule 148 | \end{tabular} 149 | \end{table} 150 | \end{frame} 151 | 152 | \subsection{副标题和列表} 153 | 154 | \subsubsection{\textbf{副标题}:可以补充更多信息} 155 | 156 | \begin{frame} 157 | \frametitle{副标题和列表} 158 | 副标题,可以展示不同的层级关系,一般用来显示内部章节。\\ 159 | 幻灯片的标题,都使用section进行规划,内部的frametitle中的内容将不再起作用。一级标题,使用单独的幻灯片进行展示,并显示在目录幻灯片中。二级和三级标题,在幻灯片的标题部分进行显示,带有自动编号。\\ 160 | 可以使用内部列表展示幻灯片中的层级关系。这里是无序列表的样子。 161 | \begin{itemize} 162 | \item 这里展示一个列表 163 | \item 列表可以是多级 164 | \begin{itemize} 165 | \item 这里是二级 166 | \begin{itemize} 167 | \item 这里是三级标题 168 | \end{itemize} 169 | \item 顺序是无所谓的 170 | \end{itemize} 171 | \end{itemize} 172 | \end{frame} 173 | 174 | \subsection{列表框} 175 | 176 | \begin{frame} 177 | \frametitle{列表框} 178 | 列表框一般用来展示列表内容,使用vcolorbox,可以使用自定义颜色。 179 | \begin{vcolorbox}[中国海洋大学]{oucred} 180 | 1. 211、985重点高校 181 | 182 | 2. 世界一流大学建设高校(A类)。 183 | \end{vcolorbox} 184 | \begin{vcolorbox}[学校校训]{ouclightblue} 185 | 海纳百川,取则行远 186 | \end{vcolorbox} 187 | \begin{vcolorbox}[学校特色]{oucblue} 188 | 1. 海洋和水产学科特色显著 189 | 190 | 2. 学科门类齐全 191 | \end{vcolorbox} 192 | \end{frame} 193 | 194 | \subsection{提示框} 195 | 196 | \begin{frame} 197 | \frametitle{提示框} 198 | 提示框共两类,一类是笔记提示框(notebox),一般用来提示学生记录笔记;另外一类是重要信息提示框(importantbox),默认使用红色,具有更强的视觉冲击力。 199 | \begin{notebox}[笔记] 200 | 请大家把这里的笔记记录下来,是重点内容。 201 | \end{notebox} 202 | \begin{importantbox}[重要] 203 | 考试时禁止任何形式的作弊行为! 204 | \end{importantbox} 205 | \end{frame} 206 | 207 | \subsection{信息框} 208 | 209 | \begin{frame} 210 | \frametitle{信息框} 211 | 信息框(titlebox)主要用来勾勒一些需要注意的信息,颜色可以自定义。 212 | \begin{titlebox}[提示框]{oucred} 213 | 这里展示的是海大红颜色的提示框。 214 | \end{titlebox} 215 | \begin{titlebox}[颜色展示]{oucblue} 216 | 这里展示海大蓝的颜色。当然,可以使用更多的颜色。 217 | \end{titlebox} 218 | \begin{titlebox}[另外一些颜色的显示]{ouclightblue} 219 | 这里展示海大天蓝的颜色。当然,可以使用更多的颜色。 220 | \end{titlebox} 221 | \end{frame} 222 | 223 | \subsection{要点框} 224 | 225 | \begin{frame} 226 | \frametitle{要点框} 227 | 要点框(pointbox)主要用来展示一些要点,需要和分栏配合使用,颜色可以自定义。 \\ 228 | 高度可以写在参数中。 229 | \begin{columns} 230 | \begin{column}{0.3\textwidth} 231 | \begin{pointbox}[要点一]{oucred}{100pt} 232 | 人文特色\\ 233 | 海洋特色\\ 234 | \end{pointbox} 235 | \end{column} 236 | \begin{column}{0.3\textwidth} 237 | \begin{pointbox}[要点二]{oucblue}{100pt} 238 | 211\\ 239 | 985\\ 240 | 双一流 241 | \end{pointbox} 242 | \end{column} 243 | \begin{column}{0.3\textwidth} 244 | \begin{pointbox}[要点三]{ouclightblue}{100pt} 245 | 院士\\ 246 | 杰青 247 | \end{pointbox} 248 | \end{column} 249 | \end{columns} 250 | \end{frame} 251 | 252 | \subsection{标题框和文本框} 253 | 254 | \begin{frame} 255 | \frametitle{文本框} 256 | 标题框和文本框配合使用,基本上可以满足大部分的内容展示需求。 \\ 257 | \begin{headbox}{oucred} 258 | 中国海洋大学 259 | \end{headbox} 260 | \begin{textbox}{oucblue} 261 | 中国海洋大学是一所海洋和水产学科特色显著、学科门类齐全的教育部直属重点综合性大学,是国家“985工程”和“211工程”重点建设的高校,2017年9月入选国家“世界一流大学建设高校”(A类)。 262 | 263 | 学校校训是“海纳百川,取则行远”。 264 | \end{textbox} 265 | \begin{textbox}{ouclightblue} 266 | 学校创建于1924年,历经私立青岛大学、国立青岛大学、国立山东大学、山东大学等办学时期,于1959年发展成为山东海洋学院,1960年被国家确定为全国13所重点综合性大学之一,1988年更名为青岛海洋大学,2002年更名为中国海洋大学。 267 | \end{textbox} 268 | 269 | \end{frame} 270 | 271 | \subsection{块} 272 | 273 | \begin{frame} 274 | \frametitle{块} 275 | 块(block)共分为三种,分别是默认、example和alert,颜色分别使用海大蓝、专银和海大红。 276 | \begin{block}{默认块} 277 | 一个系统默认的块,是这样的。 278 | \end{block} 279 | 280 | \begin{exampleblock}{例子} 281 | 如果需要放入一些例子,可以用这个颜色的块。 282 | \end{exampleblock} 283 | 284 | \begin{alertblock}{提示块} 285 | 这里展示的是需要额外注意的信息。 286 | \end{alertblock} 287 | \end{frame} 288 | 289 | \subsection{代码} 290 | 291 | \begin{frame}[fragile] 292 | \frametitle{代码} 293 | 294 | 请注意 [fragile] 这个关键字,是必须的。当然,也可使用定义好的另外一种frame,叫做fragileframe,他们的效果是一样的。该关键字的目的,是为了让代码保持它原有的样子。代码段的关键词是lstlisting。\\ 295 | 当前显示的效果还比较一般,后续将加入更多的颜色主题。 296 | 297 | \begin{lstlisting}[language=Java,caption={src/app/app.module.ts}] 298 | import org.sun.com; 299 | public class helloworld{ 300 | public static void main() 301 | { 302 | System.out.println("hello world!"); 303 | } 304 | } 305 | \end{lstlisting} 306 | \end{frame} 307 | 308 | \section{其他细节} 309 | 310 | \subsection{公式} 311 | 312 | \begin{frame} 313 | \frametitle{公式} 314 | 支持Latex原生的公式,当然也可以和文字进行混排。 315 | \begin{equation} 316 | f(x) = \sum_i wx_i^2 + \frac{\beta}{2} \label{eq:simple} 317 | \end{equation} 318 | 这里可以进行文字的说明,如式\eqref{eq:simple}所示。 319 | \end{frame} 320 | 321 | \subsection{栏目和图} 322 | 323 | \begin{frame} 324 | \frametitle{栏目和图} 325 | 326 | \begin{columns} 327 | \begin{column}{0.4\textwidth} 328 | \begin{enumerate} 329 | \item 一个页面可以分为多栏\\~ 330 | \item 栏目的宽度,需要自己进行定义\\~ 331 | \item 可以导入图片\\~ 332 | \item 可以根据情况对图片进行缩放 333 | \end{enumerate} 334 | \end{column} 335 | \begin{column}{0.4\textwidth} 336 | \centering 337 | \begin{figure} 338 | \centering 339 | \includegraphics[width=\textwidth]{figs/ouc_gate.png} 340 | \caption{中国海洋大学校门} 341 | \label{fig1} 342 | \end{figure} 343 | 344 | \end{column} 345 | \end{columns} 346 | \end{frame} 347 | 348 | \subsection{脚注} 349 | 350 | \begin{frame} 351 | \frametitle{脚注} 352 | 可以在任何地方加入脚注,即便是在各种信息框\footnote{信息框包括:提示框、列表框、要点框等。}中也可以。 353 | \begin{notebox}[笔记] 354 | 请大家把这里的笔记记录下来,是重点内容\footnote{考试要考。}。 355 | \end{notebox} 356 | \end{frame} 357 | 358 | %最后一页 359 | \makelast 360 | 361 | \end{document} -------------------------------------------------------------------------------- /theme/beamercolorthemeOUCSlide.sty: -------------------------------------------------------------------------------- 1 | %% 版本:1.0 2 | %% 作者:杨永全 3 | %% 本文件的主要作用,是为了定义海大标准颜色 4 | %% 完成时间:2022-05-09 5 | 6 | \RequirePackage{xcolor} 7 | 8 | % OUC BLue 海大蓝 默认颜色 9 | \definecolor{oucblue}{RGB}{0, 64, 152} 10 | \colorlet{oucblue10}{oucblue!10!white} 11 | \colorlet{oucblue20}{oucblue!20!white} 12 | \colorlet{oucblue30}{oucblue!30!white} 13 | \colorlet{oucblue40}{oucblue!40!white} 14 | \colorlet{oucblue50}{oucblue!50!white} 15 | \colorlet{oucblue60}{oucblue!60!white} 16 | \colorlet{oucblue70}{oucblue!70!white} 17 | \colorlet{oucblue80}{oucblue!80!white} 18 | \colorlet{oucblue90}{oucblue!90!white} 19 | 20 | % OUC Light Blue 海大天蓝 21 | \definecolor{ouclightblue}{RGB}{0, 160, 233} 22 | \colorlet{ouclightblue10}{ouclightblue!10!white} 23 | \colorlet{ouclightblue20}{ouclightblue!20!white} 24 | \colorlet{ouclightblue30}{ouclightblue!30!white} 25 | \colorlet{ouclightblue40}{ouclightblue!40!white} 26 | \colorlet{ouclightblue50}{ouclightblue!50!white} 27 | \colorlet{ouclightblue60}{ouclightblue!60!white} 28 | \colorlet{ouclightblue70}{ouclightblue!70!white} 29 | \colorlet{ouclightblue80}{ouclightblue!80!white} 30 | \colorlet{ouclightblue90}{ouclightblue!90!white} 31 | 32 | % OUC Red 海大红 33 | \definecolor{oucred}{RGB}{200, 21, 40} 34 | \colorlet{oucred10}{oucred!10!white} 35 | \colorlet{oucred20}{oucred!20!white} 36 | \colorlet{oucred30}{oucred!30!white} 37 | \colorlet{oucred40}{oucred!40!white} 38 | \colorlet{oucred50}{oucred!50!white} 39 | \colorlet{oucred60}{oucred!60!white} 40 | \colorlet{oucred70}{oucred!70!white} 41 | \colorlet{oucred80}{oucred!80!white} 42 | \colorlet{oucred90}{oucred!90!white} 43 | 44 | %OUC Cherry 樱缤粉 45 | \definecolor{ouccherry}{RGB}{249, 210, 212} 46 | \colorlet{ouccherry10}{ouccherry!10!white} 47 | \colorlet{ouccherry20}{ouccherry!20!white} 48 | \colorlet{ouccherry30}{ouccherry!30!white} 49 | \colorlet{ouccherry40}{ouccherry!40!white} 50 | \colorlet{ouccherry50}{ouccherry!50!white} 51 | \colorlet{ouccherry60}{ouccherry!60!white} 52 | \colorlet{ouccherry70}{ouccherry!70!white} 53 | \colorlet{ouccherry80}{ouccherry!80!white} 54 | \colorlet{ouccherry90}{ouccherry!90!white} 55 | 56 | %OUC Brown 文脉棕 57 | \definecolor{oucbrown}{RGB}{121, 79, 47} 58 | \colorlet{oucbrown10}{oucbrown!10!white} 59 | \colorlet{oucbrown20}{oucbrown!20!white} 60 | \colorlet{oucbrown30}{oucbrown!30!white} 61 | \colorlet{oucbrown40}{oucbrown!40!white} 62 | \colorlet{oucbrown50}{oucbrown!50!white} 63 | \colorlet{oucbrown60}{oucbrown!60!white} 64 | \colorlet{oucbrown70}{oucbrown!70!white} 65 | \colorlet{oucbrown80}{oucbrown!80!white} 66 | \colorlet{oucbrown90}{oucbrown!90!white} 67 | 68 | %OUC Golden 专金 69 | \definecolor{oucgolden}{RGB}{204, 173, 105} 70 | \colorlet{oucgolden10}{oucgolden!10!white} 71 | \colorlet{oucgolden20}{oucgolden!20!white} 72 | \colorlet{oucgolden30}{oucgolden!30!white} 73 | \colorlet{oucgolden40}{oucgolden!40!white} 74 | \colorlet{oucgolden50}{oucgolden!50!white} 75 | \colorlet{oucgolden60}{oucgolden!60!white} 76 | \colorlet{oucgolden70}{oucgolden!70!white} 77 | \colorlet{oucgolden80}{oucgolden!80!white} 78 | \colorlet{oucgolden90}{oucgolden!90!white} 79 | 80 | % OUC Silver 专银 81 | \definecolor{oucsilver}{RGB}{207, 208, 208} 82 | \colorlet{oucsilver10}{oucsilver!10!white} 83 | \colorlet{oucsilver20}{oucsilver!20!white} 84 | \colorlet{oucsilver30}{oucsilver!30!white} 85 | \colorlet{oucsilver40}{oucsilver!40!white} 86 | \colorlet{oucsilver50}{oucsilver!50!white} 87 | \colorlet{oucsilver60}{oucsilver!60!white} 88 | \colorlet{oucsilver70}{oucsilver!70!white} 89 | \colorlet{oucsilver80}{oucsilver!80!white} 90 | \colorlet{oucsilver90}{oucsilver!90!white} 91 | 92 | %代码注释的颜色 93 | \definecolor{mygreen}{rgb}{0,0.6,0} 94 | 95 | \mode 96 | 97 | % 定义元素基本颜色 98 | \setbeamercolor{structure}{fg=oucblue, bg=}%主颜色。如果没有其他定义,则显示此颜色。 99 | \setbeamercolor{palette primary}{use=structure, fg=oucblue, bg=} 100 | 101 | \setbeamercolor{item}{fg=oucblue70}%item的颜色,是70%的海大蓝。 102 | \setbeamercolor{item projected}{fg=oucblue70} 103 | 104 | \setbeamercolor{enumerate item}{fg=black, bg=} 105 | \setbeamercolor{enumerate subitem}{fg=black, bg=} 106 | \setbeamercolor{enumerate subsubitem}{fg=black, bg=} 107 | 108 | %默认的标题、副标题、作者、单位、日期,都是白色 109 | \setbeamercolor{title}{fg=white,bg=} 110 | \setbeamercolor{subtitle}{fg=white,bg=} 111 | \setbeamercolor{author}{fg=white,bg=} 112 | \setbeamercolor{date}{fg=white,bg=} 113 | 114 | %默认的block,颜色是海大蓝 115 | \setbeamercolor{block title}{bg=oucblue,fg=white} 116 | \setbeamercolor{block body}{bg=oucblue10} 117 | 118 | %example block的颜色,是海大灰 119 | \setbeamercolor{block title example}{bg=oucsilver,fg=white} 120 | \setbeamercolor{block body example}{bg=oucsilver10} 121 | 122 | %提示block,用的是海大红 123 | \setbeamercolor{block title alerted}{bg=oucred,fg=white} 124 | \setbeamercolor{block body alerted}{bg=oucred10} 125 | -------------------------------------------------------------------------------- /theme/beamerfontthemeOUCSlide.sty: -------------------------------------------------------------------------------- 1 | %!TEX program = xelatex 2 | 3 | %% 版本:1.0 4 | %% 作者:杨永全 5 | %% 本文件的主要作用,是定义各种元素的字体 6 | %% 完成日期:2022-05-09 7 | 8 | \usepackage[UTF8]{ctex} 9 | %\usepackage{xeCJK} 10 | 11 | %字体 12 | 13 | %设置英文字体 鸿蒙字体 14 | \setmainfont[ 15 | Path=fonts/, 16 | BoldFont=HarmonyOS_Sans_Bold.ttf, 17 | ItalicFont=HarmonyOS_Sans_Regular_Italic.ttf, 18 | BoldItalicFont=HarmonyOS_Sans_Bold_Italic.ttf, 19 | ]{HarmonyOS_Sans_Regular.ttf} 20 | \setsansfont[ 21 | Path=fonts/, 22 | BoldFont=HarmonyOS_Sans_Bold.ttf, 23 | ItalicFont=HarmonyOS_Sans_Regular_Italic.ttf, 24 | BoldItalicFont=HarmonyOS_Sans_Bold_Italic.ttf, 25 | ]{HarmonyOS_Sans_Regular.ttf} 26 | \setmonofont[ 27 | Path=fonts/ 28 | ]{HarmonyOS_Sans_Regular.ttf} 29 | 30 | %设置中文字体 鸿蒙字体 31 | \setCJKmainfont[ 32 | Path=fonts/, 33 | BoldFont=HarmonyOS_Sans_SC_Bold.ttf, 34 | ItalicFont=HarmonyOS_Sans_SC_Regular.ttf, 35 | BoldItalicFont=HarmonyOS_Sans_SC_Bold.ttf 36 | ]{HarmonyOS_Sans_SC_Regular.ttf} 37 | \setCJKsansfont[ 38 | Path=fonts/, 39 | BoldFont=HarmonyOS_Sans_SC_Bold.ttf, 40 | ItalicFont=HarmonyOS_Sans_SC_Regular.ttf, 41 | BoldItalicFont=HarmonyOS_Sans_SC_Bold.ttf 42 | ]{HarmonyOS_Sans_SC_Regular.ttf} 43 | \setCJKmonofont[ 44 | Path=fonts/ 45 | ]{HarmonyOS_Sans_SC_Regular.ttf} 46 | 47 | %以下为原模板代码,未做改动 48 | 49 | \mode 50 | 51 | \setbeamerfont{sectiontitle}{size*={18pt}{20pt},series=\bfseries} % section标题字体大小 52 | \setbeamerfont{title}{size*={15pt}{16pt},series=\bfseries} % 标题字体大小 53 | 54 | \setbeamerfont{subtitle short}{size*={11pt}{12pt},series=\mdseries} % 副标题 短的 字体大小 55 | \setbeamerfont{subtitle long}{size*={9pt}{9pt},series=\mdseries} % 副标题 长的 字体大小 56 | \setbeamerfont*{subtitle}{parent=subtitle long} % 使用父标题 57 | \setbeamerfont*{subtitle}{parent=subtitle short} % 使用父标题 58 | 59 | %\setbeamerfont{normal text}{size*={8pt}{9pt}} % 14pt, baselineskip 18pt 60 | \setbeamerfont{footline}{size*={6pt}{7pt}} %页脚文字大小 61 | 62 | %\setbeamerfont{frametitle}{size*={16pt}{16pt},series=\bfseries} %30pt, baselineskip 36pt 63 | \setbeamerfont{framesubtitle}{size*={10pt}{11pt},series=\mdseries} % 普通页面,副标题的字体大小 64 | 65 | % 特殊文本域的字体设置 66 | \setbeamerfont{caption}{size=\small} 67 | \setbeamerfont{caption name}{parent={structure,caption}} 68 | 69 | \setbeamerfont{date}{size*={10pt}{10pt}} 70 | 71 | \setbeamerfont{footline}{parent={tiny structure}} 72 | 73 | \setbeamerfont{headline}{parent={tiny structure}} 74 | 75 | \setbeamerfont{institute}{size=\footnotesize, series=\itshape} 76 | \setbeamerfont{navigation symbols}{size*={7pt}{8pt}} 77 | 78 | \setbeamerfont{section in toc}{parent=structure} 79 | \setbeamerfont{section in toc shaded}{parent=section in toc} 80 | 81 | % 列表 82 | \setbeamerfont{item}{parent=structure} 83 | \setbeamerfont{subitem}{parent=item} 84 | \setbeamerfont{subsubitem}{parent=subitem} 85 | 86 | \setbeamerfont{item projected}{size=\tiny, parent={item, projected text}} 87 | \setbeamerfont{subitem projected}{parent=item projected} 88 | \setbeamerfont{subsubitem projected}{parent=subitem projected} 89 | 90 | \setbeamerfont{description item}{parent=item} 91 | 92 | \setbeamerfont{enumerate item}{parent=item} 93 | \setbeamerfont{enumerate subitem}{parent=subitem} 94 | \setbeamerfont{enumerate subsubitem}{parent=subsubitem} 95 | 96 | \setbeamerfont{itemize/enumerate body}{} 97 | \setbeamerfont{itemize/enumerate subbody}{size=\small} 98 | \setbeamerfont{itemize/enumerate subsubbody}{size=\footnotesize} 99 | 100 | \setbeamerfont{itemize item}{parent=item} 101 | \setbeamerfont{itemize subitem}{parent=subitem} 102 | \setbeamerfont{itemize subsubitem}{parent=subsubitem} 103 | 104 | \makeatletter 105 | 106 | %% 字母间距 107 | \providecommand{\emptydummyb}[1]{} % eats argument of \uppercase() and and \addfontfeature{} 108 | \providecommand{\emptydummya}[2][]{#2}{} % eats optional argument of textls and forwards #2 argument 109 | \providecommand{\addfontfeature}[1]{} % defined only if latex or pdflatex is used 110 | \providecommand{\textls}[2][]{#2}{} % defined only if microtype is loaded 111 | 112 | % 定义的一些其他命令 113 | \def\beameroucslide@titleformat#1{#1} 114 | \def\beameroucslide@subtitleformat#1{#1} 115 | \def\beameroucslide@partformat#1{#1} 116 | \def\beameroucslide@frametitleformat#1{#1} 117 | 118 | %% 标题文字定义 119 | \pgfkeys{ 120 | /beameroucslide/font/title/.cd, 121 | .is choice, 122 | .default=regular, 123 | regular/.code={% 124 | \let\beameroucslide@titleformatcaps\emptydummya% 125 | \let\beameroucslide@titleformatspacinga\emptydummya% 126 | \let\beameroucslide@titleformatspacingb\emptydummyb% 127 | }, 128 | allcaps/.code={% 129 | \let\beameroucslide@titleformatcaps\MakeTextUppercase% 130 | \let\beameroucslide@titleformatspacinga\emptydummya% 131 | \let\beameroucslide@titleformatspacingb\emptydummyb% 132 | }, 133 | } 134 | 135 | %% 副标题文字定义 136 | \pgfkeys{ 137 | /beameroucslide/font/subtitle/.cd, 138 | .is choice, 139 | .default=allcaps, 140 | regular/.code={% 141 | \let\beameroucslide@subtitleformatcaps\emptydummya% 142 | \let\beameroucslide@subtitleformatspacinga\emptydummya% 143 | \let\beameroucslide@subtitleformatspacingb\emptydummyb% 144 | \setbeamerfont{subtitle long}{size*={9pt}{11pt},series=\bfseries} % 18pt, baselineskip 22pt 145 | }, 146 | allcaps/.code={% 147 | \let\beameroucslide@subtitleformatcaps\MakeTextUppercase% 148 | \let\beameroucslide@subtitleformatspacinga\emptydummya% 149 | \let\beameroucslide@subtitleformatspacingb\emptydummyb% 150 | \setbeamerfont{title}{size*={16pt}{16pt},series=\bfseries} % 30pt, baselineskip 36pt% 151 | }, 152 | } 153 | 154 | %% 普通页面文字设置 155 | \pgfkeys{ 156 | /beameroucslide/font/frametitle/.cd, 157 | .is choice, 158 | .default=allcaps, 159 | regular/.code={% 160 | \let\beameroucslide@frametitleformatcaps\emptydummya% 161 | \let\beameroucslide@frametitleformatspacinga\emptydummya% 162 | \let\beameroucslide@frametitleformatspacingb\emptydummyb% 163 | \setbeamerfont{frametitle}{size*={14pt}{18pt},series=\bfseries} % 32pt, baselineskip 36pt% 164 | }, 165 | allcaps/.code={% 166 | \let\beameroucslide@frametitleformatcaps\MakeTextUppercase% 167 | \let\beameroucslide@frametitleformatspacinga\emptydummya% 168 | \let\beameroucslide@frametitleformatspacingb\emptydummyb% 169 | \setbeamerfont{frametitle}{size*={14pt}{18pt},series=\bfseries} % 32pt, baselineskip 36pt% 170 | }, 171 | } 172 | 173 | %% 段落文字设置 174 | \pgfkeys{ 175 | /beameroucslide/font/part/.cd, 176 | .is choice, 177 | .default=allcaps, 178 | regular/.code={% 179 | \let\beameroucslide@partformatcaps\emptydummya% 180 | \let\beameroucslide@partformatspacinga\emptydummya% 181 | \let\beameroucslide@partformatspacingb\emptydummyb% 182 | \setbeamerfont{part}{size*={16pt}{18pt},series=\bfseries} % 30pt, baselineskip 36pt% 183 | }, 184 | allcaps/.code={% 185 | \let\beameroucslide@partformatcaps\MakeTextUppercase% 186 | \let\beameroucslide@partformatspacinga\emptydummya% 187 | \let\beameroucslide@partformatspacingb\emptydummyb% 188 | \setbeamerfont{part}{size*={16pt}{18pt},series=\bfseries} % 30pt, baselineskip 36pt% 189 | }, 190 | } 191 | 192 | % redefine beamer title, subtitle, part and frametitle command 193 | \patchcmd{\beamer@title}% 194 | {\def\inserttitle{#2}}% 195 | {\protected\def\inserttitle{{\beameroucslide@titleformatspacingb{LetterSpace=15.0}\beameroucslide@titleformatcaps{\beameroucslide@titleformatspacinga[120]{#2}}}}}% 196 | {}% 197 | {\PackageError{beameroucslide}{Patching original title failed}\@ehc} 198 | \patchcmd{\beamer@subtitle}% 199 | {\def\insertsubtitle{#2}}% 200 | {\protected\def\insertsubtitle{{\beameroucslide@subtitleformatspacingb{LetterSpace=15.0}\beameroucslide@subtitleformatcaps{\beameroucslide@subtitleformatspacinga[120]{#2}}}}}% 201 | {}% 202 | {\PackageError{beameroucslide}{Patching original subtitle failed}\@ehc} 203 | \patchcmd{\beamer@part}% 204 | {\def\insertpart{\expandafter\hyperlink\partlink}}% 205 | {\def\insertpart{{\beameroucslide@partformatspacingb{LetterSpace=15.0}\beameroucslide@partformatcaps{\beameroucslide@partformatspacinga[120]{\expandafter\hyperlink\partlink}}}}}% 206 | {}% 207 | {\PackageError{beameroucslide}{Patching original part failed}\@ehc} 208 | \patchcmd{\beamer@@frametitle} 209 | {{% 210 | \gdef\insertframetitle{{#2\ifnum\beamer@autobreakcount>0\relax{}\space% 211 | \usebeamertemplate*{frametitle continuation}\fi}}% 212 | \gdef\beamer@frametitle{#2}% 213 | \gdef\beamer@shortframetitle{#1}% 214 | }} 215 | {{% 216 | \gdef\insertframetitle{{\beameroucslide@frametitleformatcaps{#2}\ifnum% 217 | \beamer@autobreakcount>0\relax{}\space% 218 | \usebeamertemplate*{frametitle continuation}\fi}}% 219 | \gdef\beamer@frametitle{#2}% 220 | \gdef\beamer@shortframetitle{#1}% 221 | }} 222 | {} 223 | {\PackageError{beameroucslide}{Patching original frame title failed}\@ehc} 224 | \makeatother 225 | -------------------------------------------------------------------------------- /theme/beamerinnerthemeOUCSlide.sty: -------------------------------------------------------------------------------- 1 | %% 版本:1.0 2 | %% 作者:杨永全 3 | %% 本文件的主要目的,是为了定义列表等内部元素的样式 4 | %% 完成时间:2022-05-09 5 | 6 | \RequirePackage{listings,verbatim}%引入代码包 7 | \RequirePackage{caption} 8 | \usepackage{tcolorbox} %引入彩色框 9 | \tcbuselibrary{most} %引入所有包 10 | 11 | %列表样式,使用了fontawesome图标 12 | \setbeamertemplate{itemize item}{\faBookmark} 13 | \setbeamertemplate{itemize subitem}{\faHandORight} 14 | \setbeamertemplate{itemize subsubitem}{\faSquare} 15 | 16 | %超链接的颜色等信息 17 | \hypersetup{ 18 | %colorlinks=true, %超链接颜色,全部使用海大红。 19 | linkcolor=oucred, 20 | urlcolor=oucred, 21 | citecolor=oucred, 22 | anchorcolor=oucred, 23 | } 24 | 25 | %代码块的一些设定,原模板代码 26 | \renewcommand{\ttdefault}{pcr} 27 | \lstset{ 28 | frame=shadowbox, 29 | numbers=left, 30 | numberstyle=\small, 31 | basicstyle=\ttfamily\upshape\small, 32 | breaklines=true, 33 | backgroundcolor=\color{oucsilver10}, 34 | xleftmargin=0.8cm, 35 | framexleftmargin=0em, 36 | keywordstyle=\bfseries\color{oucblue}, 37 | stringstyle=\color{oucblue}, 38 | commentstyle=\color{mygreen}, 39 | rulesepcolor= \color{oucsilver40}, 40 | rulecolor=\color{oucblue}, 41 | deletekeywords={compile}, 42 | escapechar=\&, 43 | escapeinside={<@}{@>} 44 | } 45 | 46 | %% 代码块标题设定 47 | \DeclareCaptionFormat{codecaptionformat}{% 48 | \parbox{\textwidth}{\hspace{2em}\textcolor{violet}\faCode~\textcolor{violet}{#1#2}\hspace{.5em}#3}%代码块caption的设置 49 | } 50 | \captionsetup[lstlisting]{format=codecaptionformat} 51 | 52 | %设置信息框titlebox 53 | \newtcolorbox{titlebox}[2][] 54 | { 55 | title=#1, %标题 56 | colback = white, %标题背景是白色 57 | colframe = #2, %边框颜色 58 | coltitle = #2, %标题颜色 59 | boxrule=.5pt,%边框的粗细,细一点感觉更精致 60 | boxed title style={size=normal,colframe=white,boxrule=0pt},%标题栏没有背景色和边框,只有文字 61 | left=5pt, right=5pt, top=5pt, bottom=0pt,%内部文字边距 62 | boxsep=5pt, 63 | colbacktitle = white, enhanced,%标题的背景,白色 64 | attach boxed title to top center={yshift=-4mm},%把标题放在中间 65 | opacityupper={100}, %上面边框透明度 66 | } 67 | 68 | %设置笔记提示框 69 | \newtcolorbox{notebox}[1][] 70 | { 71 | enhanced, 72 | arc=2pt,%圆角 73 | boxrule=.5pt,%边框 74 | left=5pt, right=5pt, top=0pt, bottom=0pt,%文字边距 75 | boxsep=5pt, 76 | colframe=oucblue, 77 | colback=oucblue10, 78 | colbacktitle=oucblue10, 79 | coltext=oucblue, 80 | title={\textcolor{oucblue}{\faStickyNoteO\hspace{.5em}\bfseries{\textbf{#1}}}}, 81 | halign=left, 82 | } 83 | %设置重要提示框 84 | \newtcolorbox{importantbox}[1][] 85 | { 86 | enhanced, 87 | arc=2pt, 88 | boxrule=.5pt, 89 | left=5pt, right=5pt, top=0pt, bottom=0pt, 90 | boxsep=5pt, 91 | colframe=oucred, 92 | colback=oucred10, 93 | colbacktitle=oucred10, 94 | coltext=oucred, 95 | title={\textcolor{oucred}{\faExclamationCircle\hspace{.5em}\bfseries{\textbf{#1}}}}, 96 | halign=left, 97 | } 98 | %列表框 99 | \newtcolorbox{vcolorbox}[2][] 100 | { 101 | boxrule=0.1pt,%边框,很细 102 | arc=0pt,outer arc=0pt,%不要圆角 103 | left=5pt, right=5pt, top=0pt, bottom=0pt, 104 | leftrule=5pt, %左侧边框的宽度 105 | colframe=#2,%边框的颜色 106 | colback=white, 107 | colbacktitle=white, 108 | coltext=black,%内部文字的颜色,如果要和标题保持一致,可改为#2 109 | title={\textcolor{#2}{\bfseries{\textbf{#1}}}},%标题样式 110 | halign=left, 111 | } 112 | 113 | %要点框 114 | \newtcolorbox{pointbox}[3][] 115 | { 116 | colback = white, %背景是白色 117 | boxrule=0.5pt,%边框的粗细,细一点感觉更精致 118 | colframe = #2, %边框颜色 119 | fonttitle = \bfseries,%标题加粗 120 | colbacktitle = #2, enhanced, 121 | left=2pt, right=2pt, top=5pt, bottom=0pt,%内部文字边距 122 | attach boxed title to top center={yshift=-2mm}, 123 | width=\textwidth, 124 | height=#3, 125 | title=#1 126 | } 127 | 128 | %文本框textbox 129 | \newtcolorbox{textbox}[1]{ 130 | colback=#1!5!white, 131 | colframe=#1, 132 | boxrule=0.5pt, 133 | arc=2pt, 134 | } 135 | 136 | %标题框headbox 137 | \newtcolorbox{headbox}[1]{ 138 | colback=#1, 139 | colframe=#1, 140 | boxrule=0.5pt, 141 | arc=2pt, 142 | coltext=white, 143 | fontupper= \bfseries, 144 | left=0pt, right=0pt, top=0pt, bottom=0pt,%内部文字边距 145 | } 146 | 147 | 148 | %一些元素的中文名称 149 | \renewcommand{\figurename}{图} 150 | \renewcommand{\tablename}{表} 151 | \renewcommand{\lstlistingname}{代码} 152 | \renewcommand{\abstractname}{摘要} -------------------------------------------------------------------------------- /theme/beamerouterthemeOUCSlide.sty: -------------------------------------------------------------------------------- 1 | %% 版本:1.0 2 | %% 作者:杨永全 3 | %% 本文件的主要作用是定义主题的框架结构等模板信息 4 | %% 完成时间:2022-05-09 5 | 6 | \usepackage{dashrule} 7 | 8 | 9 | % 页面整体布局,原模板代码 10 | \setbeamersize{% 11 | text margin left=0.8cm, 12 | text margin right=0.8cm 13 | } 14 | 15 | %% 首页标题背景,原模板代码 16 | \defbeamertemplate{background canvas}{title}{% 17 | \includegraphics[width=\paperwidth, height=\paperheight]{logos/background.jpg} 18 | } 19 | 20 | %% 首页页面顶部元素,原模板代码 21 | \newcommand{\topslider}[1]{% 22 | \begin{tikzpicture}[overlay, remember picture] 23 | \draw [fill=#1, draw=none, rounded corners=2pt] (current page.north east) 24 | [turtle={ 25 | lt, forward=1.1\paperwidth, 26 | lt, forward=.19\paperheight, 27 | lt, forward=.47\paperwidth, 28 | left=45, forward=1.5ex, 29 | right=45, forward=.63\paperwidth, 30 | home 31 | }]; 32 | \end{tikzpicture} 33 | } 34 | 35 | %首页顶栏logo,原模板代码 36 | \newcommand{\banner}{% 37 | \begin{tikzpicture}[overlay, remember picture] 38 | \node[anchor=north west, xshift=0.8cm, yshift=-0.6cm] at (current page.north west) { 39 | \includegraphics[scale=0.02]{logos/ouc_logo.png} 40 | }; 41 | \end{tikzpicture} 42 | } 43 | 44 | %% 底部有弧度的页脚部分,原模板代码 45 | \newcommand{\bottomslider}[1]{% 46 | \begin{tikzpicture}[overlay, remember picture] 47 | \draw [fill=#1, draw=none, rounded corners=2pt] (current page.south east) 48 | [turtle={ 49 | lt, fd=1.1\paperwidth, 50 | rt, fd=0.03\paperheight, 51 | rt, fd=.8375\paperwidth, 52 | lt=45, fd=1.5ex, 53 | rt=45, fd=.25\paperwidth, 54 | home 55 | }]; 56 | \end{tikzpicture} 57 | } 58 | 59 | %首页右下角网址,原模板代码 60 | \newcommand{\oucurl}{% 61 | \begin{tikzpicture}[overlay, remember picture] 62 | \node[anchor=south east, text=oucblue] at (current page.south east) {\tiny www.ouc.edu.cn}; 63 | \end{tikzpicture} 64 | } 65 | 66 | %% 首页背景元素,原模板代码 67 | \defbeamertemplate{background}{title}{% 68 | \topslider{white} 69 | \banner %首页的Logo 70 | \bottomslider{white} %首页底部颜色 71 | \oucurl %首页底部网址 72 | } 73 | 74 | %首页正文部分,原模板代码 75 | \defbeamertemplate{title page}{text}{% 76 | \begin{center} %所有文字居中 77 | \vspace{2.5cm} %标题距离banner的距离 78 | \usebeamercolor[white]{title}\usebeamerfont*{title}\strut{}\inserttitle\par%字体颜色为白色 79 | \vspace{0.5cm}%副标题到主标题的距离 80 | \usebeamercolor[white]{subtitle}\usebeamerfont{subtitle}\strut{}\insertsubtitle\par%字体为白色 81 | \vspace{1.6cm}%作者到副标题的距离 82 | \usebeamercolor[white]{title}\usebeamerfont*{author}\insertauthor\par%字体为白色 83 | \vspace{0.3cm}%作者单位到作者的距离 84 | \usebeamercolor[white]{title}\usebeamerfont*{institute}\insertinstitute%\enspace/字体为白色%\enspace 85 | %\insertdate%如有必要,可再插入日期 86 | \end{center} 87 | } 88 | %设置首页页面模板,原模板代码 89 | \setbeamertemplate{title page}[text] 90 | \pgfkeys{/beameroucslide/outer/.cd, 91 | footline/.initial=empty, 92 | navigation symbols/.initial=empty, 93 | title page/.initial=text 94 | } 95 | 96 | %% 普通页面背景,原模板代码 97 | \defbeamertemplate{background canvas}{empty}{} 98 | \pgfkeys{/beamerhgf/outer/.cd, 99 | background canvas/.initial=empty 100 | } 101 | 102 | %普通页面左下角信息,原模板代码 103 | \setbeamertemplate{footline}{% 104 | \hspace{0.8cm} 105 | \usebeamercolor[fg]{title}\insertauthor\enspace\vrule width0.3pt\enspace\inserttitle%左下角作者信息和标题信息 106 | \vspace{0.04cm} %页脚到底部的距离 107 | } 108 | 109 | % 普通页面右下角Logo,原模板代码 110 | \newcommand{\footerlogo}{% 111 | \begin{tikzpicture}[overlay, remember picture] 112 | \node[anchor=south east, xshift=-1.8cm, yshift=-0.1cm] at (current page.south east) { 113 | \includegraphics[scale=0.008]{logos/ouc_logo_bottom.png} 114 | }; 115 | \end{tikzpicture} 116 | } 117 | 118 | %右下角页码导航,原模板代码 119 | \setbeamertemplate{navigation symbols}{% 120 | \vspace{-6pt} 121 | \usebeamercolor[fg]{title}\usebeamerfont*{navigation symbols}\insertframenumber/\inserttotalframenumber 122 | } 123 | 124 | %% 普通页面frame背景模板,原模板代码 125 | \defbeamertemplate{background}{frame}{%框架 126 | \bottomslider{oucblue} %底部颜色为海大蓝 127 | \footerlogo %右下角logo 128 | } 129 | 130 | \defbeamertemplate{headline}{empty}{ 131 | 132 | }%默认标题为空 133 | 134 | 135 | %普通页面标题设置 136 | \defbeamertemplate{frametitle}{frame}{% 137 | \vspace{10pt}% 138 | \usebeamercolor[oucblue]{frametitle}\usebeamerfont{frametitle} 139 | \thesubsection. \insertsubsection%显示二级标题 140 | \ifx\insertsubsubsection\empty%如果没有三级标题什么都不做 141 | \else 142 | \usebeamercolor[ouclightblue]{framesubtitle}\usebeamerfont{framesubtitle} 143 | \thesubsubsection.\insertsubsubsection 144 | \fi 145 | \vspace{0.5pt}%标题到下面的线之间的距离 146 | {\color{oucblue}\hrule height 1.5pt depth 0pt}%标题下面的线 147 | } 148 | 149 | %因为在frame中引入了section,所以要为目录页面单独设置一个frametitle的模板,去掉了section信息 150 | \defbeamertemplate{frametitle}{outlineframe}{ 151 | \vspace{12pt}% 152 | \usebeamercolor[oucblue]{frametitle}\usebeamerfont{frametitle} 153 | \insertframetitle 154 | \usebeamercolor[ouclightblue]{framesubtitle}\usebeamerfont{framesubtitle} 155 | \insertframesubtitle 156 | \vspace{0.5pt}%标题到下面的线之间的距离 157 | {\color{oucblue}\hrule height 1.5pt depth 0pt}%标题下面的线 158 | } 159 | 160 | %为普通frame设置模板 161 | \setbeamertemplate{background}[frame] 162 | \setbeamertemplate{frametitle}[frame] 163 | 164 | % 定义首页生成命令 165 | \def\maketitle{% 166 | {% 167 | \setbeamertemplate{footline}{} 168 | \setbeamertemplate{navigation symbols}{} 169 | \ifbeamer@inframe% 170 | \titlepage%首页页面 171 | \else% 172 | \setbeamertemplate{frame number}[invisible]% 173 | \setbeamertemplate{date}[invisible]% 174 | \setbeamertemplate{background canvas}[title]% 175 | \setbeamertemplate{background}[title]% 176 | \setbeamertemplate{title page}[title]% 177 | \frame[t, noframenumbering]{\titlepage}% 178 | \fi% 179 | }% 180 | % 将普通的页面模板改回去 181 | \setbeamertemplate{background canvas}[empty] 182 | \setbeamertemplate{background}[frame] 183 | \setbeamertemplate{frametitle}[frame] 184 | } 185 | 186 | %定义目录页生成命令 187 | \def\makeoutline{ 188 | { 189 | \setbeamertemplate{frametitle}[outlineframe] 190 | \begin{frame} 191 | \frametitle{目录} 192 | \tableofcontents[hideallsubsections] 193 | \end{frame} 194 | 195 | } 196 | %再把模板改回去 197 | \setbeamertemplate{frametitle}[frame] 198 | } 199 | 200 | %定义最后一页生成命令 201 | \def\makelast{ 202 | \setbeamertemplate{background}[title] 203 | \setbeamertemplate{background canvas}[title]% 204 | \setbeamertemplate{frame number}[invisible]% 205 | \setbeamertemplate{footline}{} 206 | \setbeamertemplate{navigation symbols}{} 207 | \begin{frame} 208 | \begin{center} %所有文字居中 209 | \vspace{3.5cm} 210 | \huge\textcolor{white}{\textbf{\last}}%致谢词 211 | \end{center} 212 | \end{frame} 213 | } 214 | 215 | % 分节页面 216 | \AtBeginSection[]{ 217 | \begin{frame}% 218 | \begin{center} %所有文字居中 219 | \vspace{2.5cm}% 220 | \huge\textcolor{oucred}{\textbf{\thesection.\insertsectionhead}}% 221 | \end{center} 222 | \end{frame}% 223 | } 224 | 225 | %目录样式 226 | \setbeamertemplate{section in toc}[sections numbered] 227 | \setbeamercolor{section in toc}{bg=white,fg=oucred} 228 | 229 | %设置有代码块的frame 230 | \newenvironment{fragileframe}% 231 | {\begin{frame}[fragile,environment=fragileframe]}% 232 | {\end{frame}} -------------------------------------------------------------------------------- /theme/beamerthemeOUCSlide.sty: -------------------------------------------------------------------------------- 1 | %!TEX program = xelatex 2 | 3 | %% 版本:1.0 4 | %% 2022-05-07 5 | %% 作者:杨永全 6 | %%本文件的主要目的,是为了定义幻灯片主题 7 | 8 | \RequirePackage{booktabs} 9 | \RequirePackage[T1]{fontenc} 10 | \RequirePackage{fontspec} 11 | \RequirePackage{hyperref} 12 | \RequirePackage[utf8x]{inputenc} 13 | \RequirePackage{listings} 14 | \RequirePackage{tikz} 15 | 16 | %原模板代码 17 | \usetikzlibrary{ 18 | calc, 19 | turtle, 20 | positioning 21 | } 22 | %应用额外的主题文件,原模板代码 23 | \usefonttheme{OUCSlide} 24 | \usecolortheme{OUCSlide} 25 | \useinnertheme{OUCSlide} 26 | \useoutertheme{OUCSlide} 27 | 28 | %原模板代码 29 | \pgfkeys{/beameroucslide/.cd, 30 | .search also={ 31 | /beameroucslide/inner, 32 | /beameroucslide/outer, 33 | /beameroucslide/color, 34 | /beameroucslide/font, 35 | }, 36 | title=regular, 37 | subtitle=regular, 38 | part=regular, 39 | frametitle=regular, 40 | } 41 | %设置元素编号 42 | \setbeamertemplate{caption}[numbered] 43 | 44 | %设置footnote在tcolorbox外面 45 | \makeatletter 46 | % restore footnote internals to those in normal page, not minipage 47 | \def\tcb@restore@footnote{% 48 | \def\@mpfn{footnote}% 49 | \def\thempfn{\arabic{footnote}}% 50 | \let\@footnotetext\tcb@footnote@collect 51 | } 52 | 53 | % collect footnote text 54 | \long\def\tcb@footnote@collect#1{% 55 | % expand \@thefnmark before appending before app to \tcb@footnote@acc 56 | \expandafter\gappto\expandafter\tcb@footnote@acc\expandafter{% 57 | \expandafter\footnotetext\expandafter[\@thefnmark]{#1}% 58 | }% 59 | } 60 | 61 | \def\tcb@footnote@use{% 62 | \tcb@footnote@acc 63 | \global\let\tcb@footnote@acc\@empty 64 | } 65 | \global\let\tcb@footnote@acc\@empty 66 | 67 | 68 | \tcbset{ 69 | % restore for every box 70 | every box/.style={ 71 | before upper pre=\tcb@restore@footnote 72 | }, 73 | % use for layer 1 boxes only 74 | every box on layer 1/.append style={ 75 | after app=\tcb@footnote@use 76 | } 77 | } 78 | \makeatother 79 | %设置footnote在tcolorbox外面结束 --------------------------------------------------------------------------------