Showing posts with label Beamer. Show all posts
Showing posts with label Beamer. Show all posts

Monday, October 19, 2009

Beamer初学小记

Beamer是专业的幻灯片制作工具, 基于LaTeX, 因此学习Beamer你需要首先具备一点LaTeX的知识. 最近要弄一个幻灯片, 遂折腾之, 小记一下.

Beamer其实就是LaTeX的一个文档类 (documentclass), 和普通LaTeX文件一样, 最需要折腾的就是导言区 (preamble), 不过对于中文用户来说, 还有一个额外的东西需要考虑: 怎样才能输出中文. CCT、CJK和xeCJK都行, 不过我们现在有了更方便的选择: CTeXKit, 关于CTeXKit的详细介绍, 可以参考我以前的文章[CTeXKit: 尽情享受中文排版]. 由于Beamer已经占用了文档类, 所以就只能用直接调用宏包的方式了.

建议先从别人的模板开始练习, 这里是Beamer官方提供的几个模板. 然后参考官方文档学习, 我觉得那个文档很不错, 看着很有意思, 其中用一个生动的例子把Beamer的一些要点都介绍了. Beamer不同于普通LaTeX文档的一点就是它可以设置主题, 访问这个网站, 上面有Beamer所有默认主题 (theme) 和颜色主题 (colortheme) 的截图, 方便大家的选择, 另外网上也有很多非官方的主题.

我在使用的时候还遇到一个小问题, 由于我用的是Emacs + AUCTeX, 在每次打开Beamer文件时, AUCTeX会很"贴心"地根据inputenc宏包的编码设置自动改变Emacs的编码, 而我一开始用的是Beamer的官方模板, 其中inputenc的编码配置为latin1, 直接导致我每次重新打开Emacs的时候都会发现其中的中文变成了火星文... 为了解决这个问题, 在网上找了很久, 最后才想到老外可能和天朝人民有点不同, 于是发现刚才说的问题.

相对于广泛使用的PowerPoint, Beamer显得朴素很多, 没有绚丽的动画, 没有五彩的背景, 但Beamer想要表达的是一段演讲的精彩不在于使用的幻灯片有多么得华丽, 幻灯片只是一个用来展示的辅助工具而已, 一切还在于演讲的人, 正如和菜头所说"PPT的流行意味着两件事:一、人们的听力理解能力下降了。二、人们的口头表达能力下降了。"

附上我的Beamer模板:
\documentclass[utf8]{beamer}    % Be care of 'utf8', change it depend on your system.

\mode<presentation>
{
  \usetheme{Darmstadt}
  \usecolortheme{seahorse}
  \setbeamercovered{transparent}
}

\usepackage[english]{babel}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{amssymb}

\usepackage{ctex}

% Title Page
\title{\textbf{For Alist}}
% \subtitle{\textbf{}}
\author{Dreamseeker \\ \texttt{gaochangjian@gmail.com}}
\institute{反GFW小组}
\date{2007年12月1日}

% This is only inserted into the PDF information catalog.
% Can be left out. 
\subject{Talks}

% Logo
\pgfdeclareimage[height=1cm]{logo}{pic/logo.jpg}
\logo{\pgfuseimage{logo}}

% For LaN
\newcommand{\LaN}{L{\scriptsize\hspace{-0.47em}\raisebox{0.23em}{A}}\hspace{-0.1em}N}

% Delete this, if you do not want the table of contents
% to pop up at the beginning of each section and subsection:
\AtBeginSection[]
{
  \begin{frame}<beamer>{Outline}
    \tableofcontents[currentsection]
  \end{frame}
}
% \AtBeginSubsection[]
% {
%   \begin{frame}<beamer>{Outline}
%     \tableofcontents[currentsection,currentsubsection]
%   \end{frame}
% }

% % If you wish to uncover everything in a step-wise fashion,
% % uncomment the following command: 
% \beamerdefaultoverlayspecification{<+->}

\begin{document}

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

\begin{frame}{Outline}
  \tableofcontents
\end{frame}

\end{document}