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

常常看到有人问如何写中文幻灯片. 这里给个例子, 含有几个技术:

  • 中文支持
  • 中文日期
  • 自动生成标题、导航页
  • 重定义下导航条
  • 定理自动编号
  • 对一张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}

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

*

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理