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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM