beamer+xeCJK设置

张文泰 posted @ 2010年1月20日 21:26 in Tips on Computer with tags tex , 5509 阅读

 我的模板,比较简单:

\def\version{XXXXXX}

\documentclass[dvipdfmx]{beamer}

\usepackage[CJKtextspaces]{xeCJK}
\input{xecjkfonts}

\newcommand{\roma}[1]{\romannumeral #1}
\newcommand{\Roma}[1]{\expandafter\@slowromancap\romannumeral #1@}

\newcommand{\bbold}[1]{\textbf{#1}}

\newcommand{\aabs}[1]{{ \left| #1 \right| }}
\newcommand{\ffloor}[1]{{ \left\lfloor #1 \right\rfloor }}
\newcommand{\N}{\boldsymbol{N}}
\newcommand{\Z}{\boldsymbol{Z}}

\newtheorem{thrm}{定理}[section]
\newtheorem{prop}{性质}[section]
\newtheorem{exmp}{例题}[section]
\newtheorem{defn}{定义}[section]
\newtheorem{lemm}[thrm]{引理}
\newtheorem{coro}[thrm]{推论}

\renewenvironment{proof}[1][证]{\noindent \textbf{#1.} }{\hfill$\Box$}

\usefonttheme{serif}

\usetheme{Berkeley}
\usecolortheme{seahorse}

\begin{document}
\title{}
\author{}
%\institute{}
\date{\version}

\begin{frame}
\titlepage
\end{frame}

%\begin{frame}{主要内容}
%\tableofcontents[currentsection,currentsubsection,subsectionstyle=show/show/hide]
%\end{frame}

\end{document}

xecjkfonts的内容在《xeCJK的字体配置》里面可以找到。

Overlay Specification就是一个显示的问题,无论是什么命令,\XXX<a-b>都可以控制内容在当前frame的第几个slide上面显示。比如\textbf<2>{TEST}就是在第2张slide上使用\textbf效果。\color<2->{}表示从第2张slide开始,以后的所有slide上面都有\color效果。\texttt<-4>表示内容一直存在到第4张slide为止。\only命令可以帮助显示无效果的内容,比如\only<2-3>{TEST WORDS},表示从第2个slide显示到第3个slide。overlayarea环境也可以帮助显示上面所说的\XXX<a-b>的效果。

\pause命令就是一个暂停的指令,一个\pause可以使得后面的内容推迟一个slide显示。\onslide则是直接显示后面的内容,无视\pause。

下面附送常用设置: 

\setbeamertemplate{theorems}[numbered] %使用定理编号
\setbeamertemplate{caption}[numbered] %图和表格编号
\setbeamertemplate{navigation symbols}{} %取消导航条

%使用MetaPost
\usepackage{xmpmulti}
\DeclareGraphicsRule{*}{mps}{*}{}  

\begin{enumerate}
\addtocounter{enumi}{3} %改变列表标号计数器
\end{enumerate}

%整体缩小表格
\usepackage{graphicx}
\newsavebox{\tablebox}
\begin{lrbox}{\tablebox}
\end{lrbox}
\scalebox{0.5}{\usebox{\tablebox}}
%或者\resizebox{0.8\textwidth}{!}{\usebox{\tablebox}}

%设定“结构”的前景色
\setbeamercolor{structure}{fg=beamer@blendedred}

%批量改变block标题颜色和block主干颜色,利用“<颜色>!<数字>!<颜色>”来进行混合
\setbeamercolor{block title}{use=structure,fg=structure.fg,bg=structure.fg!20!bg}
\setbeamercolor{block title alerted}{use=alerted text,fg=alerted text.fg,bg=alerted text.fg!20!bg}
\setbeamercolor{block title example}{use=example text,fg=example text.fg,bg=example text.fg!20!bg}
\setbeamercolor{block body}{parent=normal text,use=block title,bg=block title.bg!50!bg}
\setbeamercolor{block body alerted}{parent=normal text,use=block title alerted,bg=block title alerted.bg!50!bg}
\setbeamercolor{block body example}{parent=normal text,use=block title example,bg=block title example.bg!50!bg}
\setbeamercolor{titlelike}{parent=structure,bg=white!90!red}

%设置使用衬线字体做正文(默认全是无衬线,按这个设置,仅标题是无衬线)
\usefonttheme[stillsansseriflarge,stillsansserifsmall]{serif}

%设置半透明化尚未出现的内容(方便提醒自己下面要讲什么)
\setbeamercovered{transparent}

%取消导航条
\setbeamertemplate{navigation symbols}{}

%以下命令中通过选择show或者hide控制相应节的显示
\tableofcontents[currentsection,currentsubsection,subsectionstyle=show/show/hide]

本作品遵循“署名-非商业性使用-相同方式共享 3.0 Unported”协议,转载请注明来自richard-desktop
Creative Commons License

登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter