Beamer學習筆記(轉)

http://bbs.ctex.org/viewthread.php?tid=42374
http://www.math-linux.com/spip.php?article77
Beamer相關資料php

Slides和Presentation的重要性就沒必要說了。 
A Beamer Quickstart (推薦) :http://heather.cs.ucdavis.edu/~matloff/beamer.html 
A practical guide to beamer: http://faq.ktug.or.kr/wiki/uploads/beamer_guide.pdf 
黃正華老師的總結: http://bbs.ctex.org/viewthread.php?tid=27695&extra=&page=1 
Beamer的在線教程: http://www.math.umbc.edu/~rouben/beamer/quickstart.html 
Beamer的安裝:http://dsec.math.pku.edu.cn/~yuhj/wiki/TeXSlides.html#sec-1 
一個即刻上手的模板:http://www.bossh.net/forums/index.php?showtopic=1638 
推薦一個好的Beamer模板庫-很是簡潔: http://www.math.sinica.edu.tw/www/tex/beamer_template.jsp 
Beamer Tips: http://xueruini.myipcn.org/publish/TeX/Beamer.html 
用 Beamer 作相冊:  http://linux.cs.nthu.edu.tw/~clark/nb/archives/2008-02-03T23_32_45.phphtml

Beamer的安裝配置 linux

一、下載beamer:http://sourceforge.net/projects/latex-beamer/
下載pgf:http://sourceforge.net/projects/pgf/ 
下載xcolor:http://sourceforge.net/projects/xcolor/
二、解壓到各自文件夾beamer、pgf、xcolor
三、將beamer、pgf、xcolor複製到TeXHOME\ctex\localtextmf\tex\latex,並刪除 TeXHOME/texmf/tex/latex/ 下的beamer、pgf、xcolor 
四、進入TeXHOME\tex\localtextmf\tex\latex\xcolor,用「記事本」打開 xcolor.ins,啓動cmd,定位到這個文件夾 
五、 運行命令: `latex xcolor.ins',`latex xcolor.dtx',`latex xcolor.dtx',`makeindex -s gind.ist xcolor.idx',`latex xcolor.dtx',`latex xcolor.dtx'
(這些命令在xcolor.ins文件裏都寫出來了)
六、測試安裝是否成功,運行命令:`latex xcolor1.tex', `latex xcolor1.tex'
七、而後運行 WinEdt 的 Accessories 菜單下 MikTex options 的 refresh now 便可。shell

注意事項: 當beamer作幻燈片時,須要使用 \usepackage[square, authoryear, comma]{natbib} 和 \citep{xxx} 作文章引用。由於用 natbib 和 citep 才能在beamer下很好的顯示 square bracket。另外,作幻燈時,推薦用 \bibliographystyle{authordate1}。這樣方便經過引用標記(做者+年份)看到該引文的份量。ssh

Beamer Template 使用方式http://www.math.sinica.edu.tw/www/tex/beamer_template.jspjsp

  • Download mathas_theme.zip
    解壓縮到 C:\texmf\tex\latex\beamer\themes 目錄
  • 於 Dos 指令 shell(cmd) 下執行 initexmf --dump 及 initexmf --update-fndb
  • 下載 mathas-template.zip , 解壓縮 (包含 mathas_templates.tex, mathas_4_16.tex, five icons)
  • 增長圖檔時, 按滑鼠右鍵, 儲存 jpg 圖檔(與 math_template.tex 同一目錄)
  • 於文件中選擇 theme 
    \mode 
    {
    %\usetheme{IAS_sidebar} % only a simple left side bar
    \usetheme{IAS_sidebar2_10pt} % only a simple side bar
    %\usetheme{IAS_sidebar2_11pt} % As above only changed to fit 11pt fonts.
    ......
    \setbeamercovered{transparent}
    }
  • 引用圖檔設定(filename.jpg 不需填入副檔名)
    \pgfdeclareimage[height=0.8cm]{institution-logo}{filename}
  • 須要製做 table of contents, 必須 compiler 兩次


在使用beamer 製做PPT時,發現了不少有意思的設置,彙總以下:


1. 默認定理環境是不顯示編號的,經過導言區使用開始使用定理編號ide

  1. \setbeamertemplate{theorems}[numbered]

2.圖和表格的標題顯示標號post

  1. \setbeamertemplate{caption}[numbered]  

3. 取消導航條測試

  1. \setbeamertemplate{navigation symbols}{}

4. 使用 metapost 動畫字體

  1. \usepackage{xmpmulti}
  2. \DeclareGraphicsRule{*}{mps}{*}{}  

5. 經過使用以下命令使得一段不編譯

  1. \iffalse
  2.    ....
  3.     \fi

6.  改變列表標號計數器

  1.   \begin{enumerate}
  2.    \addtocounter{enumi}{3} 改變列表標號計數器
  3.      ......
  4.   \end{enumerate}

7. 項目列表

  1.   \begin{enumerate}
  2.    \item  直接顯示,帶編號
  3.    \item<4->  顯示爲第四張,帶編號
  4.    \item<4->[]  顯示爲第四張,不帶編號
  5.    \item<4->[在這裏輸入你的符號]  顯示爲第四張,帶編號「在這裏輸入你的符號」  %能夠在[]內隨意定義符號
  6.    \item<4->[在這裏輸入你的符號]  顯示爲第四張,帶編號「在這裏輸入你的符號」
  7.    \item<-4>[在這裏輸入你的符號]  顯示爲第四張,帶編號「在這裏輸入你的符號」,而後該條目隱藏
  8.      ......
  9.   \end{enumerate}

8. 如下代碼用以總體縮小表格

  1. \usepackage{graphicx} %Put this in the preamble.
  2. .....
  3. \newsavebox{\tablebox}
  4. \begin{lrbox}{\tablebox}
  5. \begin{tabular}{||l||l||l||l||}
  6.    \hline\hline{\textbf{Geographic Location}} &
  7. {\textbf{Site}} &
  8. {\textbf{IP Address}} &
  9. {\textbf{Top Level Directory}} \\
  10.   \hline\hline
  11. United States & \tt ftp.shsu.edu & 192.92.115.10 & \it /tex-archive\\
  12.   \hline\hline
  13. England & \tt ftp.tex.ac.uk & 131.151.79.32 & \it /tex-archive\\
  14.   \hline\hline
  15. Germany & \tt ftp.uni-stuttgart.de & 129.69.8.13 & \it /tex-archive\\
  16.    \hline\hline
  17. \end{tabular}
  18. \end{lrbox}

而後

  1. \scalebox{0.5}{\usebox{\tablebox}}

或者

  1. \resizebox{0.8\textwidth}{!}{\usebox{\tablebox}}

9 使用beamer製做幻燈片時,若用pdflatex編譯,必定編譯兩次,纔可使得標籤正確顯示;pdflatex支持除eps之外的各類格式的圖片,插圖方式與論文同樣。
10. 將圖、表標題等使用中文(

  1. \renewcommand\contentsname{目\ 錄}
  2. \renewcommand\listfigurename{插圖目錄}
  3. \renewcommand\listtablename{表格目錄}
  4. %\renewcommand\abstractname{摘\ 要}  %err undefined
  5. %\renewcommand\refname{參考文獻}         %article類型
  6. \renewcommand\bibname{參\ 考\ 文\ 獻}    %book類型
  7. \renewcommand\indexname{索\ 引}
  8. \renewcommand\figurename{圖}
  9. \renewcommand\tablename{表}
  10. \renewcommand\partname{部分}

11 使用以下命令定製定理等,顯示「定理」等,編號按照節標題獨立編號

  1. \newtheorem{mythl}{\hei 引理}[section]
  2. \newtheorem{mytht}{\hei 定理}[section]
  3. \newtheorem{mythr}{\hei 注}[section]
  4. \newtheorem{mythc}{\hei 推論}[section]
  5. \newtheorem{mythd}{\hei 定義}[section]
  6. \newtheorem{mytha}{\hei 公理}
  7. \newtheorem{mythp}{\hei 命題}
  8. \newtheorem{mythe}{\hei 練習}
  9. \newtheorem{myli}{\hei 例}[section]

例如定理,代碼爲:

  1. \begin{mytht}
  2. .......
  3. \end{mytht}

12. 定義顏色

  1. \definecolor{beamer@blendedred}{rgb}{0.7,0.2,0.2} % use structure theme to change
  2. \definecolor{beamer@blendedblue}{rgb}{0.2,0.2,0.7} % use structure theme to change

設定 結構 的前景色

  1. \setbeamercolor{structure}{fg=beamer@blendedred}

13.使用繼承方式來批量改變block標題顏色和block主幹顏色,利用「<顏色>!<數字>!<顏色>」來進行混合

  1. \setbeamercolor{block title}{use=structure,fg=structure.fg,bg=structure.fg!20!bg}
  2. \setbeamercolor{block title alerted}{use=alerted text,fg=alerted text.fg,bg=alerted text.fg!20!bg}
  3. \setbeamercolor{block title example}{use=example text,fg=example text.fg,bg=example text.fg!20!bg}
  4. \setbeamercolor{block body}{parent=normal text,use=block title,bg=block title.bg!50!bg}
  5. \setbeamercolor{block body alerted}{parent=normal text,use=block title alerted,bg=block title alerted.bg!50!bg}
  6. \setbeamercolor{block body example}{parent=normal text,use=block title example,bg=block title example.bg!50!bg}
  7. \setbeamercolor{titlelike}{parent=structure,bg=white!90!red}

14.設置使用襯線字體作正文(默認全是無襯線,按這個設置,僅標題是無襯線)

  1. \usefonttheme[stillsansseriflarge,stillsansserifsmall]{serif}

15.設置半透明化還沒有出現的內容(方便提醒本身下面要講什麼)

  1. \setbeamercovered{transparent}

16.取消導航條

  1. \setbeamertemplate{navigation symbols}{}   

17.如下命令中經過選擇show或者hide控制相應節的顯示

  1. \tableofcontents[currentsection,currentsubsection,subsectionstyle=show/show/hide]

18. 同一個位置動態顯示兩個block,用下面方法

  1. \begin{frame}
  2.      \only<1>{\begin{itemize}
  3.      \item item1
  4.      \item item2
  5.      \end{itemize}}
  6.      \only<2>{\begin{itemize}
  7.      \item item3
  8.      \item item4
  9.      \end{itemize}}
  10. \end{frame}

19. 利用\onslide<2-> 能夠將某個段落實如今按順序出現,< >的用法參見 \item< >,呵呵
20.加入動畫的命令,不過還沒試驗,等我試了再說

    1. \begin{frame}{平板壓實的應用\ding{223} 亨特機}
    2. \vskip-.2cm
    3. \includemovie[poster,text=(Hunter Machinery),mouse,repeat]{11cm}{7.4cm}{./image/pro.swf}
    4. \end{frame}
相關文章
相關標籤/搜索