首页 > 代码库 > epyt-theme
epyt-theme
效果:
epyt-demo.tex
1 % -*- coding: utf-8 -*- 2 % !TEX program = xelatex 3 4 \documentclass[14pt,notheorems]{beamer} 5 6 \usetheme[color=green]{epyt} % black, blue, green, white 7 \usepackage[UTF8,noindent]{ctex} 8 9 \hypersetup{10 pdfpagemode={FullScreen},11 }12 13 \newtheorem{theorem}{定理}14 \newtheorem{definition}[theorem]{定义}15 \newtheorem{example}[theorem]{例子}16 17 \newtheorem*{theorem*}{定理}18 \newtheorem*{definition*}{定义}19 \newtheorem*{example*}{例子}20 21 \renewcommand{\proofname}{证明}22 23 \title{Epyt, a Simple and Nice Theme for Beamer}24 \author{zoho@bbs.ctex.org}25 26 \begin{document}27 28 \begin{frame}[plain]\transboxout29 \titlepage30 \end{frame}31 32 \begin{frame}\transboxin33 \begin{center}34 \tableofcontents[hideallsubsections]35 \end{center}36 \end{frame}37 38 \section{简要介绍}39 40 \begin{frame}{简要介绍}\transdissolve41 Epyt 是一个简洁美观的 Beamer 演示文稿主题。它有这些特点:\pause42 \begin{itemize}[<+->]43 \item 结构简洁,只有包含必需元素的底栏,没有顶栏和侧栏。44 \item 内容简洁,列表环境和定理环境都使用了简单的形式。45 \item 配色简洁,仅仅用到几种背景色和前景色。46 \end{itemize}47 \end{frame}48 49 \section{列表环境}50 51 \begin{frame}[fragile]{有序列表}\transwipe[direction=270]52 无序列表前面已经看到,现在来看看有序列表。一个 Beamer 的主题由下列四部分组成:\pause53 \begin{enumerate}[<+->]54 \item 外部主题,用 \verb!\usebeameroutertheme! 命令;55 \item 内部主题,用 \verb!\usebeamerinnertheme! 命令;56 \item 颜色主题,用 \verb!\usebeamercolortheme! 命令;57 \item 字体主题,用 \verb!\usebeamerfonttheme! 命令。58 \end{enumerate}59 \end{frame}60 61 \section{数学环境}62 63 \begin{frame}{例子证明}\transglitter[direction=90]64 \begin{example}65 用等价无穷小代换证明下面极限:66 \[ \lim_{x\to0}\frac{\sin 3x}{\ln(1-2x)}=-\frac{3}{2} \]67 \end{example}\pause68 \begin{proof}69 因为$\sin 3x \sim 3x$,$\ln(1-2x) \sim -2x$,所以我们有70 \[ \lim_{x\to0}\frac{\sin 3x}{\ln(1-2x)}=\lim_{x\to0}\frac{3x}{-2x}=-\frac{3}{2}, \]71 即等式成立。72 \end{proof}73 \end{frame}74 75 \section{使用说明}76 77 \begin{frame}[fragile]{使用说明}\transblindsvertical78 \begin{itemize}79 \item 建议在演示文稿中使用大号的字体,例如:80 \begin{verbatim}81 \documentclass[14pt]{beamer}82 \usebeamertheme{epyt}83 \end{verbatim}\pause84 \item 如果要使用中文,可以用 \verb ctex 宏包,例如:85 \begin{verbatim}86 \documentclass[14pt]{beamer}87 \usebeamertheme{epyt}88 \usepacakge[UTF8,noindent]{ctex}89 \end{verbatim}\pause90 \item 在载入主题时有几种配色风格可以选择。91 \end{itemize}92 \end{frame}93 94 \end{document}
beamerthemeepyt.sty
1 %% -*- coding: utf-8 -*- 2 3 %% epyt: a simple and nice theme for beamer 4 %% home: https://github.com/zohooo/epyt 5 6 \ProvidesPackage{beamerthemeepyt}[2014/04/08 v0.5] 7 8 \mode<presentation> 9 10 \DeclareOptionBeamer{color}[black]{\def\beamer@epyt@color{#1}} 11 \ProcessOptionsBeamer 12 13 %% default theme 14 15 \usetheme{default} 16 17 %% color theme 18 19 \def\beamer@epyt@color@black{black} 20 \def\beamer@epyt@color@blue{blue} 21 \def\beamer@epyt@color@green{green} 22 \def\beamer@epyt@color@white{white} 23 24 \definecolor{dgray}{HTML}{202020} 25 \definecolor{lgray}{HTML}{404040} 26 \definecolor{dblue}{HTML}{0000CC} 27 \definecolor{lblue}{HTML}{ABCDEF} 28 \definecolor{dgreen}{HTML}{254535} 29 \definecolor{ggreen}{HTML}{214131} 30 \definecolor{lgreen}{HTML}{A9EFA9} 31 \definecolor{dorange}{HTML}{C07000} 32 33 \ifx\beamer@epyt@color\beamer@epyt@color@white 34 \setbeamertemplate{background canvas}{} 35 \setbeamertemplate{background}{} 36 \setbeamercolor{normal text}{bg=white,fg=black} 37 \setbeamercolor{structure}{fg=blue} 38 \setbeamercolor{local structure}{fg=lgreen} 39 \else\ifx\beamer@epyt@color\beamer@epyt@color@blue 40 \setbeamertemplate{background canvas}[vertical shading][top=black, middle=dblue, bottom=black] 41 \setbeamercolor{normal text}{bg=blue, fg=white} 42 \setbeamercolor{structure}{fg=yellow} 43 \setbeamercolor{local structure}{fg=lblue} 44 \else\ifx\beamer@epyt@color\beamer@epyt@color@green 45 \setbeamercolor{background canvas}{bg=dgreen} 46 \setbeamertemplate{background}[grid][step=1mm,color=ggreen] 47 \setbeamercolor{normal text}{bg=dgreen, fg=white} 48 \setbeamercolor{structure}{fg=yellow} 49 \setbeamercolor{local structure}{fg=lgreen} 50 \setbeamercolor{footline}{bg=dorange} 51 \setbeamercolor{navigation symbols}{bg=dorange} 52 \setbeamercolor{navigation symbols dimmed}{fg=dorange} 53 \else 54 \setbeamertemplate{background canvas}[vertical shading][top=black, middle=dgray, bottom=lgray] 55 \setbeamercolor{normal text}{bg=black,fg=white} 56 \setbeamercolor{structure}{fg=yellow} 57 \setbeamercolor{local structure}{fg=lblue} 58 \fi\fi\fi 59 60 \setbeamercolor{title}{fg=structure.fg} 61 \setbeamercolor{subtitle}{fg=structure.fg!70!normal text.bg} 62 \setbeamercolor{section in toc}{fg=structure.fg!90!normal text.bg} 63 \setbeamercolor{subsection in toc}{fg=structure.fg!80!normal text.bg} 64 \setbeamercolor{frametitle}{fg=structure.fg!70!normal text.bg} 65 \setbeamercolor{theoremname}{fg=structure.fg!60!normal text.bg} 66 \setbeamercolor{proofname}{fg=structure.fg!60!normal text.bg} 67 \setbeamercolor{footline}{fg=normal text.fg} 68 \setbeamercolor{navigation symbols}{fg=normal text.fg} 69 \setbeamercolor{navigation symbols dimmed}{fg=normal text.fg} 70 71 %% font theme 72 73 \setbeamerfont{title}{size=\huge} 74 \setbeamerfont{subtitle}{size=\large} 75 \setbeamerfont{author}{size=\large} 76 \setbeamerfont{institute}{size=\normalsize} 77 \setbeamerfont{date}{size=\large} 78 \setbeamerfont{section in toc}{size=\Large} 79 \setbeamerfont{subsection in toc}{size=\large} 80 \setbeamerfont{frametitle}{size=\large} 81 82 \usefonttheme{professionalfonts} % there is some problem with default math fonts 83 84 %% inner theme 85 86 \setbeamertemplate{itemize items}[default] 87 \setbeamertemplate{enumerate items}[default] 88 89 \setbeamertemplate{section in toc}[sections numbered] 90 \setbeamertemplate{subsection in toc}{} 91 92 % sections and subsections 93 94 \AtBeginSection[]{ 95 \begin{frame} 96 \begin{center} 97 \usebeamerfont{section in toc} 98 \tableofcontents[sectionstyle=show/hide,subsectionstyle=hide] 99 \end{center}100 \end{frame}101 }102 103 \AtBeginSubsection[]{104 \begin{frame}105 \begin{beamercolorbox}[wd=\paperwidth,center]{subsection in toc}%106 \usebeamerfont{subsection in toc}\insertsectionnumber.\insertsubsectionnumber\hspace*{2ex}\insertsubsection%107 \end{beamercolorbox}%108 \end{frame}109 }110 111 % disable block style for theorems112 113 \setbeamertemplate{theorem begin}114 {%115 \bfseries\upshape %\inserttheoremheadfont116 {\usebeamercolor[fg]{theoremname}%117 \inserttheoremname\inserttheoremnumber118 \ifx\inserttheoremaddition\@empty\else\ (\inserttheoremaddition)\fi%119 \inserttheorempunctuation}\quad120 \normalfont121 }122 \setbeamertemplate{theorem end}{}123 124 125 \setbeamertemplate{proof begin}126 {%127 \bfseries {\usebeamercolor[fg]{proofname}%128 \insertproofname}\quad129 \normalfont130 }131 \setbeamertemplate{proof end}{}132 133 %% outer theme134 135 \setbeamertemplate{frametitle}{\noindent\usebeamerfont{frametitle}\insertframetitle\par}136 \setbeamertemplate{navigation symbols}{}137 \setbeamertemplate{footline}138 {139 \hbox{%140 \begin{beamercolorbox}[wd=.2\paperwidth,ht=2.25ex,dp=1ex,left]{footline}%141 \hspace*{1ex}\usebeamerfont{footline}\insertframenumber{}/\inserttotalframenumber142 \end{beamercolorbox}%143 \begin{beamercolorbox}[wd=.6\paperwidth,ht=2.25ex,dp=1ex,center]{footline}%144 \usebeamerfont{footline}\insertshorttitle145 \end{beamercolorbox}%146 \begin{beamercolorbox}[wd=.2\paperwidth,ht=2.25ex,dp=1ex,right]{footline}%147 \usebeamerfont{footline}\hyperlinkframeendprev{$\lhd$}\hspace*{1ex}\hyperlinkframestartnext{$\rhd$}\hspace*{1ex}148 \end{beamercolorbox}%149 }%150 }151 152 \mode<handout>{153 \setbeamertemplate{background canvas}{}154 \setbeamertemplate{background}{}155 \setbeamercolor{normal text}{fg=black, bg=white}156 \setbeamercolor{title}{fg=blue}157 \setbeamercolor{subtitle}{fg=blue!70!gray}158 \setbeamercolor{section in toc}{fg=blue!90!gray}159 \setbeamercolor{subsection in toc}{fg=blue!80!gray}160 \setbeamercolor{frametitle}{fg=blue!70!gray}161 \setbeamercolor{theoremname}{fg=blue!60!gray}162 \setbeamercolor{proofname}{fg=blue!60!gray}163 \setbeamercolor{footline}{bg=white}164 }165 166 \mode<all>
epyt-theme
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。