Latex beamer 学习总结

 

Table of Contents

1 基本

 

1.1 编译环境

  1. ctex软件
  2. 文件utf-8编码
  3. xelatex编译

1.2 中文支持

\usepackage{ctex}  % a micro package supporting chinese
\zihao{-4}         % a font size command in ctex: 小四字体
\songti            % a font format in {songti, kaishu, youyuan, heiti}

2 字体

\setCJKfamilyfont{zhya}{[simhei.ttf]}    % in windows fonts folder   
\newcommand*{\simhei}{\CJKfamily{zhya}}  % a new font is defined 
\setCJKmainfont[BoldFont={SimHei},ItalicFont={[simkai.TTF]}]{[simsun.ttf]}% set the format
\simhei % use the new font 

3 主题

  1. 定义一个"灰白色主题":标题为“暗红色”,背景为“灰色”
\usetheme{Darmstadt}
\usecolortheme{beaver}
\beamersetaveragebackground{black!2}

4 表格

\usepackage{colortbl}       % color table
\usepackage{array}          % tabularx 需要事先调用array宏包
\usepackage{tabularx}       % tabularx environment

  1. 固定表格

\begin{tabular}{lr}
\hline \rowcolor{cyan}
name  & email                  \\ \hline
Jone  & jone@gmail.com         \\ \hline
Joel  & joel&sina.com          \\ \hline
\end{tabular}

  2. 自动换行表格(例如一行中的内容很长)

\begin{tabularx}{\textwidth}{|l|X|}
\hline \rowcolor{cyan}
name  & email                  \\ \hline
Jone  & jone@gmail.com         \\ \hline
Joel  & joel&sina.com          \\ \hline
\end{tabularx}

5 图片

\begin{figure}
  \centering
  % Requires \usepackage{graphicx}
  \includegraphics[scale=0.8]{pic/example.pdf}\\
\end{figure}

6 双栏

\begin{columns}[onlytextwidth]
\begin{column}{.45\textwidth}
\begin{center}
\includegraphics[scale = 0.5]{pic/ftp_user.png}
\end{center}
\end{column}
\begin{column}{.45\textwidth}
\includegraphics[scale = 0.5]{pic/ftp_pwd.png}
\end{column}
\end{columns}

7 自定义列表

\usepackage{listings}
\begin{list}{\checkmark}{\itemsep=-2pt\topsep=-2pt}
\item  item01
\item  item02
\end{list}

8 链接

\href{http://example.com/index.html}{Link content}

9 模板

\documentclass[]{beamer}

\begin{document}

%%%% first page %%%%
\title{}
\author{}
\date{}
\frame{\titlepage}

%%%% contents %%%%
\tableofcontents
\clearpage

%%%% section 1 %%%%
\section{}
\begin{frame}
\frametitle{}

\end{frame}

%%%% section 2 %%%%
\section{}
\begin{frame}
\frametitle{}

\end{frame}
\end{document}
%%%% end of file %%%%

10 注意 & 问题点

  1. “代码环境”无法使用?
  2. “保留格式环境”无法使用?

Author: wangsd

Date: 2012-12-09 15:43:22

HTML generated by org-mode 6.35i in emacs 24

posted @ 2012-12-09 15:46  Let it be!  阅读(5510)  评论(0编辑  收藏  举报