Saturday, October 4, 2014

CJK+Beamer中文幻灯片的一个简单例子

如果不愿使用Ctex宏包的话,可以使用CJK宏包达到相似的结果。这个模板实现:

  • 中文支持
  • 中文日期
  • 自动生成标题、导航页
  • 重定义下导航条
  • 定理自动编号
  • 对一张slide顶端对齐, 而非居中

不过还是建议先从官方的模板入手,一步一步慢慢添加宏包,这样你才知道每个宏包的具体的功能。

\documentclass[CJK]{beamer} %幻灯片宏包

\usepackage{CJK,CJKnumb}
%%主题样式
\usetheme{Madrid}
%%定理编号
\setbeamertemplate{theorems}[numbered]
%%重定义下导航条
\useoutertheme[footline=authortitle]{miniframes}

\begin{document}
\begin{CJK*}{GBK}{song}
%%中文日期方式
\renewcommand{\today}{\number\year 年 \number\month 月 \number\day 日}
%%自动编号定理
\newtheorem{thm}{定理}[section]

\title[\LaTeX~Beamer]{\LaTeX~制作幻灯片}
\author{作者}
\date{\today}

\frame{\titlepage}
\frame{\tableofcontents}

\section{一个例子}
\begin{frame}[t]{测试标题中文}
\begin{thm}
  假设 $f(x)\in C[a,b]$, 那么 $\int_a^n ¦f(x)¦\mathrm{d}x<+\infty$.
\end{thm}
\end{frame}

\begin{frame}{另一张slide}% 不加[t]看看效果
  这是另一个内容.
\end{frame}
\end{CJK*}
\end{document}

转自:博客小小泪

via Chu's Space http://bit.ly/1vnJQym

Powered by Blogger Skins. Theme: TheBuckmaker | Free Wordpress Templates. Presents HD TV Futurama Streaming. Featured on Wedding Dresses.