| 1 |
% -*- coding: utf-8 -*- |
| 2 |
% !TEX program = xelatex |
| 3 |
|
| 4 |
\documentclass[14pt,notheorems]{beamer} |
| 5 |
|
| 6 |
\usetheme[style=beta]{epyt} % alpha, beta, delta, gamma, zeta |
| 7 |
|
| 8 |
\usepackage[UTF8,noindent]{ctex} |
| 9 |
|
| 10 |
\usepackage{listings} |
| 11 |
\lstset{ |
| 12 |
basicstyle=\ttfamily,xleftmargin=0em, |
| 13 |
commentstyle=\color{teal},keywordstyle=\color{acolor4}, |
| 14 |
language=[LaTeX]{TeX},morekeywords={usetheme,epytsetup} |
| 15 |
} |
| 16 |
|
| 17 |
\newcommand{\mylead}[1]{\textcolor{acolor1}{#1}} |
| 18 |
\newcommand{\mybold}[1]{\textcolor{acolor2}{#1}} |
| 19 |
\newcommand{\mywarn}[1]{\textcolor{acolor3}{#1}} |
| 20 |
|
| 21 |
\newtheorem{theorem}{定理} |
| 22 |
\newtheorem{definition}[theorem]{定义} |
| 23 |
\newtheorem{example}[theorem]{例子} |
| 24 |
|
| 25 |
\newtheorem*{theorem*}{定理} |
| 26 |
\newtheorem*{definition*}{定义} |
| 27 |
\newtheorem*{example*}{例子} |
| 28 |
|
| 29 |
\renewcommand{\proofname}{证明} |
| 30 |
|
| 31 |
\begin{document} |
| 32 |
|
| 33 |
\title{简洁美观的幻灯片主题} |
| 34 |
\author{无名小卒} |
| 35 |
|
| 36 |
\begin{frame}[plain]\transboxout |
| 37 |
\titlepage |
| 38 |
\end{frame} |
| 39 |
|
| 40 |
%\begin{frame}\transboxin |
| 41 |
%\begin{center} |
| 42 |
%\tableofcontents[hideallsubsections] |
| 43 |
%\end{center} |
| 44 |
%\end{frame} |
| 45 |
|
| 46 |
\section{黑色文字白色背景} |
| 47 |
|
| 48 |
\begin{frame}{简要介绍} |
| 49 |
\mylead{Epyt} 是一个简洁美观的 Beamer 演示主题。它有这些特点:\pause |
| 50 |
\begin{itemize}[<+->] |
| 51 |
\item 结构简洁,只有包含必需元素的底栏,没有顶栏和侧栏。 |
| 52 |
\item 内容简洁,列表环境和定理环境可以使用简单形式。 |
| 53 |
\item 配色简洁,仅仅用到几种背景色和前景色。 |
| 54 |
\end{itemize} |
| 55 |
\end{frame} |
| 56 |
|
| 57 |
\begin{frame}{下载安装} |
| 58 |
\mylead{Epyt} 主题已经包含在主要的 TeX 发行版中。 |
| 59 |
\begin{itemize} |
| 60 |
\item 在 MiKTeX 中作为 \mybold{beamertheme-epyt} 宏包。 |
| 61 |
\item 在 TeXLive 中作为 \mybold{beamertheme-epyt} 宏包。 |
| 62 |
\end{itemize} |
| 63 |
你可以在包管理器中安装它。当然也可以直接从 |
| 64 |
\href{https://www.ctan.org/pkg/beamertheme-epyt}{CTAN} 中下载并安装。 |
| 65 |
\end{frame} |
| 66 |
|
| 67 |
\begin{frame}[fragile]{开始使用} |
| 68 |
要使用 \mylead{epyt} 主题,可以在导言区中加入下面一行。 |
| 69 |
\begin{lstlisting} |
| 70 |
\usetheme{epyt} |
| 71 |
\end{lstlisting}\pause |
| 72 |
如果要使用中文,可以添加 \verb ctex 宏包,例如: |
| 73 |
\begin{lstlisting} |
| 74 |
\usepackage[UTF8,noindent]{ctex} |
| 75 |
\end{lstlisting} |
| 76 |
\end{frame} |
| 77 |
|
| 78 |
\begin{frame}[fragile]{样式选用} |
| 79 |
\mylead{Epyt} 主题中包含了多种样式,可以在载入该主题时选用。 |
| 80 |
\begin{lstlisting} |
| 81 |
\usetheme[style=gamma]{epyt} |
| 82 |
\end{lstlisting} |
| 83 |
\pause 在文档中间可以用下面命令切换到另一个样式。 |
| 84 |
\begin{lstlisting} |
| 85 |
\epytsetup{style=beta} |
| 86 |
\end{lstlisting} |
| 87 |
\end{frame} |
| 88 |
|
| 89 |
\begin{frame}{可用的样式} |
| 90 |
\mylead{Epyt} 主题中所有可用的样式如下所列。 |
| 91 |
\begin{description} |
| 92 |
\item[alpha] 白色文字,黑色背景 |
| 93 |
\item[beta] 黑色文字,白色背景 |
| 94 |
\item[delta] 白色文字,蓝色背景 |
| 95 |
\item[gamma] 白色文字,绿色背景 |
| 96 |
\item[zeta] 白色文字,红色背景 |
| 97 |
\end{description} |
| 98 |
\pause |
| 99 |
其中默认样式为 \mybold{beta}。这也是此文档当前正在使用的样式。 |
| 100 |
\end{frame} |
| 101 |
|
| 102 |
\begin{frame}{预定义的颜色} |
| 103 |
每种样式都预先定义了五种强调颜色。当前样式的强调颜色如下所示。 |
| 104 |
\begin{flushleft} |
| 105 |
\textcolor{acolor1}{acolor1} |
| 106 |
\textcolor{acolor2}{acolor2} |
| 107 |
\textcolor{acolor3}{acolor3} |
| 108 |
\textcolor{acolor4}{acolor4} |
| 109 |
\textcolor{acolor5}{acolor5} |
| 110 |
\end{flushleft} |
| 111 |
\pause 每种样式也预先定义了五种填充颜色,如下所示。 |
| 112 |
\begin{flushleft} |
| 113 |
\colorbox{fcolor1}{fcolor1} |
| 114 |
\colorbox{fcolor2}{fcolor2} |
| 115 |
\colorbox{fcolor3}{fcolor3} |
| 116 |
\colorbox{fcolor4}{fcolor4} |
| 117 |
\colorbox{fcolor5}{fcolor5} |
| 118 |
\end{flushleft} |
| 119 |
\pause 用 tikz 绘图时可以使用这些预先定义的颜色。 |
| 120 |
\end{frame} |
| 121 |
|
| 122 |
\epytsetup{style=gamma} |
| 123 |
|
| 124 |
\begin{frame}[plain]\transboxout |
| 125 |
\titlepage |
| 126 |
\end{frame} |
| 127 |
|
| 128 |
\section{白色文字绿色背景} |
| 129 |
|
| 130 |
\begin{frame}{预定义的颜色} |
| 131 |
当前样式预先定义了五种强调颜色,如下所示。 |
| 132 |
\begin{flushleft} |
| 133 |
\textcolor{acolor1}{acolor1} |
| 134 |
\textcolor{acolor2}{acolor2} |
| 135 |
\textcolor{acolor3}{acolor3} |
| 136 |
\textcolor{acolor4}{acolor4} |
| 137 |
\textcolor{acolor5}{acolor5} |
| 138 |
\end{flushleft} |
| 139 |
当前样式预先定义了五种填充颜色,如下所示。 |
| 140 |
\begin{flushleft} |
| 141 |
\colorbox{fcolor1}{fcolor1} |
| 142 |
\colorbox{fcolor2}{fcolor2} |
| 143 |
\colorbox{fcolor3}{fcolor3} |
| 144 |
\colorbox{fcolor4}{fcolor4} |
| 145 |
\colorbox{fcolor5}{fcolor5} |
| 146 |
\end{flushleft} |
| 147 |
\end{frame} |
| 148 |
|
| 149 |
\begin{frame}[fragile]{有序列表} |
| 150 |
无序列表前面已经看到,现在来看看有序列表。一个 Beamer 的主题由下列四部分组成:\pause |
| 151 |
\begin{enumerate}[<+->] |
| 152 |
\item 外部主题,用 \verb!\usebeameroutertheme! 命令; |
| 153 |
\item 内部主题,用 \verb!\usebeamerinnertheme! 命令; |
| 154 |
\item 颜色主题,用 \verb!\usebeamercolortheme! 命令; |
| 155 |
\item 字体主题,用 \verb!\usebeamerfonttheme! 命令。 |
| 156 |
\end{enumerate} |
| 157 |
\end{frame} |
| 158 |
|
| 159 |
\epytsetup{style=delta} |
| 160 |
|
| 161 |
\begin{frame}[plain]\transboxout |
| 162 |
\titlepage |
| 163 |
\end{frame} |
| 164 |
|
| 165 |
\section{白色文字蓝色背景} |
| 166 |
|
| 167 |
\begin{frame}{预定义的颜色} |
| 168 |
当前样式预先定义了五种强调颜色,如下所示。 |
| 169 |
\begin{flushleft} |
| 170 |
\textcolor{acolor1}{acolor1} |
| 171 |
\textcolor{acolor2}{acolor2} |
| 172 |
\textcolor{acolor3}{acolor3} |
| 173 |
\textcolor{acolor4}{acolor4} |
| 174 |
\textcolor{acolor5}{acolor5} |
| 175 |
\end{flushleft} |
| 176 |
当前样式预先定义了五种填充颜色,如下所示。 |
| 177 |
\begin{flushleft} |
| 178 |
\colorbox{fcolor1}{fcolor1} |
| 179 |
\colorbox{fcolor2}{fcolor2} |
| 180 |
\colorbox{fcolor3}{fcolor3} |
| 181 |
\colorbox{fcolor4}{fcolor4} |
| 182 |
\colorbox{fcolor5}{fcolor5} |
| 183 |
\end{flushleft} |
| 184 |
\end{frame} |
| 185 |
|
| 186 |
\epytsetup{style=alpha} |
| 187 |
|
| 188 |
\begin{frame}[plain]\transboxout |
| 189 |
\titlepage |
| 190 |
\end{frame} |
| 191 |
|
| 192 |
\section{白色文字黑色背景} |
| 193 |
|
| 194 |
\begin{frame}{预定义的颜色} |
| 195 |
当前样式预先定义了五种强调颜色,如下所示。 |
| 196 |
\begin{flushleft} |
| 197 |
\textcolor{acolor1}{acolor1} |
| 198 |
\textcolor{acolor2}{acolor2} |
| 199 |
\textcolor{acolor3}{acolor3} |
| 200 |
\textcolor{acolor4}{acolor4} |
| 201 |
\textcolor{acolor5}{acolor5} |
| 202 |
\end{flushleft} |
| 203 |
当前样式预先定义了五种填充颜色,如下所示。 |
| 204 |
\begin{flushleft} |
| 205 |
\colorbox{fcolor1}{fcolor1} |
| 206 |
\colorbox{fcolor2}{fcolor2} |
| 207 |
\colorbox{fcolor3}{fcolor3} |
| 208 |
\colorbox{fcolor4}{fcolor4} |
| 209 |
\colorbox{fcolor5}{fcolor5} |
| 210 |
\end{flushleft} |
| 211 |
\end{frame} |
| 212 |
|
| 213 |
\begin{frame}{例子证明} |
| 214 |
\begin{example} |
| 215 |
证明当$x>0$时不等式$\mathrm{e}^x>1+x$成立。 |
| 216 |
\end{example}\pause |
| 217 |
\begin{proof} |
| 218 |
令$f(x)=\mathrm{e}^x-x-1$。则当$x>0$时有 |
| 219 |
$$f'(x)=\mathrm{e}^x-1>0.$$ |
| 220 |
因此,当$x>0$时$f(x)>f(0)=0$。得证。 |
| 221 |
\end{proof} |
| 222 |
\end{frame} |
| 223 |
|
| 224 |
\epytsetup{style=zeta} |
| 225 |
|
| 226 |
\begin{frame}[plain]\transboxout |
| 227 |
\titlepage |
| 228 |
\end{frame} |
| 229 |
|
| 230 |
\section{白色文字红色背景} |
| 231 |
|
| 232 |
\begin{frame}{预定义的颜色} |
| 233 |
当前样式预先定义了五种强调颜色,如下所示。 |
| 234 |
\begin{flushleft} |
| 235 |
\textcolor{acolor1}{acolor1} |
| 236 |
\textcolor{acolor2}{acolor2} |
| 237 |
\textcolor{acolor3}{acolor3} |
| 238 |
\textcolor{acolor4}{acolor4} |
| 239 |
\textcolor{acolor5}{acolor5} |
| 240 |
\end{flushleft} |
| 241 |
当前样式预先定义了五种填充颜色,如下所示。 |
| 242 |
\begin{flushleft} |
| 243 |
\colorbox{fcolor1}{fcolor1} |
| 244 |
\colorbox{fcolor2}{fcolor2} |
| 245 |
\colorbox{fcolor3}{fcolor3} |
| 246 |
\colorbox{fcolor4}{fcolor4} |
| 247 |
\colorbox{fcolor5}{fcolor5} |
| 248 |
\end{flushleft} |
| 249 |
\end{frame} |
| 250 |
|
| 251 |
\end{document} |