\( \newcommand{\N}{\mathbb{N}} \newcommand{\R}{\mathbb{R}} \newcommand{\C}{\mathbb{C}} \newcommand{\Q}{\mathbb{Q}} \newcommand{\Z}{\mathbb{Z}} \newcommand{\P}{\mathcal P} \newcommand{\B}{\mathcal B} \newcommand{\F}{\mathbb{F}} \newcommand{\E}{\mathcal E} \newcommand{\brac}[1]{\left(#1\right)} \newcommand{\abs}[1]{\left|#1\right|} \newcommand{\matrixx}[1]{\begin{bmatrix}#1\end {bmatrix}} \newcommand{\vmatrixx}[1]{\begin{vmatrix} #1\end{vmatrix}} \newcommand{\lims}{\mathop{\overline{\lim}}} \newcommand{\limi}{\mathop{\underline{\lim}}} \newcommand{\limn}{\lim_{n\to\infty}} \newcommand{\limsn}{\lims_{n\to\infty}} \newcommand{\limin}{\limi_{n\to\infty}} \newcommand{\nul}{\mathop{\mathrm{Nul}}} \newcommand{\col}{\mathop{\mathrm{Col}}} \newcommand{\rank}{\mathop{\mathrm{Rank}}} \newcommand{\dis}{\displaystyle} \newcommand{\spann}{\mathop{\mathrm{span}}} \newcommand{\range}{\mathop{\mathrm{range}}} \newcommand{\inner}[1]{\langle #1 \rangle} \newcommand{\innerr}[1]{\left\langle #1 \right \rangle} \newcommand{\ol}[1]{\overline{#1}} \newcommand{\toto}{\rightrightarrows} \newcommand{\upto}{\nearrow} \newcommand{\downto}{\searrow} \newcommand{\qed}{\quad \blacksquare} \newcommand{\tr}{\mathop{\mathrm{tr}}} \newcommand{\bm}{\boldsymbol} \newcommand{\cupp}{\bigcup} \newcommand{\capp}{\bigcap} \newcommand{\sqcupp}{\bigsqcup} \newcommand{\re}{\mathop{\mathrm{Re}}} \newcommand{\im}{\mathop{\mathrm{Im}}} \newcommand{\comma}{\text{,}} \newcommand{\foot}{\text{。}} \)

Tuesday, June 24, 2014

[Beamer] 有用的小技巧

快要 defense,presentation 決定採用 beamer 形式裝作 power point (原因嘛,簡單方便快捷!)。


技巧 1. 一般人對 beamer 感到最厭煩的就是每一個 \frame{} 裏都要加上 \frametitle{},其作用有點類似文章的 section。漏掉的話會整欄空掉,蠻奇怪的。以下一段 code 能夠在接着的 frame 中不斷承繼上一個 frame 的 title (直至令立 title 為止):
 \makeatletter  
 \def\beamer@checkframetitle{%  
 \begingroup  
  \edef\temp{%  
   \endgroup  
   \noexpand\frametitle  
   [\unexpanded\expandafter{\beamer@savedshortframetitle}]%  
   {\unexpanded\expandafter{\beamer@savedframetitle}}%  
  }  
 \temp  
 \@ifnextchar\bgroup\beamer@inlineframetitle{}}  
 \long\def\beamer@@frametitle[#1]#2{%  
  \beamer@ifempty{#2}{}{%  
   \gdef\insertframetitle{{#2\ifnum\beamer@autobreakcount>0\relax{}\space\usebeamertemplate*{frametitle  
 continuation}\fi}}%  
  \gdef\beamer@frametitle{#2}%  
  \gdef\beamer@shortframetitle{#1}%  
  \global\let\beamer@savedshortframetitle\beamer@shortframetitle  
   \global\let\beamer@savedframetitle\beamer@frametitle  
 }%  
 }  
  \global\let\beamer@savedshortframetitle\@empty  
   \global\let\beamer@savedframetitle\@empty  
 \makeatother  

技巧 2. 若數式以 align/align* environment 進行等號對齊,用家會發現在 "\\" 後加上 \pause 會出現錯誤。beamer 這先天的缺點有以下的 solution:
 \makeatletter  
 \def\pdftex@driver{pdftex.def}  
 \ifx\Gin@driver\pdftex@driver  
  \def\pgfsys@color@unstacked#1{%  
   \pdfliteral{\csname\string\color@#1\endcsname}%  
  }  
 \fi  
 \makeatother  

No comments:

Post a Comment