プレゼンテーション用の LaTeX クラス Beamer の使い方をメモしておきます。Mac でのプレゼン資料作成のためのアプリは Keynote が有名ですが、LaTeX で文書を作成しているなら、LaTeX 文書を元にしてコピー・アンド・ペーストでプレーンテキストでプレゼン用資料が作れるのは便利です。以前から使い方を知っておきたかったので、この機会に勉強してみます。本日新年の1月6日。本格的な日常がやってくる前に…
環境は Mac OS X El Capitan (10.11.2), LaTeX は Homebrew からインストールしました (Mac OS X El Capitan に LaTeX インストール)。
$ platex -v e-pTeX 3.14159265-p3.6-141210-2.6 (utf8.euc) (TeX Live 2015) kpathsea version 6.2.1 ptexenc version 1.3.3 Copyright 2015 D.E. Knuth. There is NO warranty. Redistribution of this software is covered by the terms of both the e-pTeX copyright and the Lesser GNU General Public License. For more information about these matters, see the file named COPYING and the e-pTeX source. Primary author of e-pTeX: Peter Breitenlohner.
Beamer 文書作成
プリアンブル
documentclass
に beamer
を指定します。 usetheme
で様々なテーマが使用できます (cf. Beamer theme gallery)。ここでは beamerthemeshadow
パッケージを使用することにします。
\documentclass[dvipdfmx]{beamer} \usepackage{pxjahyper} % cf. http://d.hatena.ne.jp/zrbabbler/20120528/1338221936 % \usetheme{Singapore} \usepackage{beamerthemeshadow}
文書スタート
LaTeX の流儀通りです。
\begin{document} \title{Beamer のテスト} \author{澍法雨} \date{\today}
タイトルと目次
Beamer では各スライド内容を \frame
環境に書いていきます。まずは、タイトルと目次。
\frame{\titlepage} \frame{\frametitle{目次}\tableofcontents}
セクション・サブセクション
\section{セクション 1} \frame{\frametitle{セクションのタイトル} セクション内の文章。 } \subsection{サブセクション 1-1} \frame{\frametitle{サブセクションのタイトル} サブセクション内の文章。 }
リスト
番号なしリスト
\itemize
環境で。
\section{セクション 2} \subsection{番号なしのリスト} \frame{\frametitle{四法印} \begin{itemize} \item 諸行無常 \item 諸法無我 \item 一切皆苦 \item 涅槃寂静 \end{itemize} }
- pause を追加
\pause
で指定します。
\frame{\frametitle{四法印 (with pause)} \begin{itemize} \item 諸行無常\pause \item 諸法無我\pause \item 一切皆苦\pause \item 涅槃寂静 \end{itemize} }
番号つきリスト
\enumerate
環境で。
\subsection{番号付きのリスト} \frame{\frametitle{四法印 (with number)} \begin{enumerate} \item 諸行無常 \item 諸法無我 \item 一切皆苦 \item 涅槃寂静 \end{enumerate} }
- pause を追加
\frame{\frametitle{四法印 (with number and pause)} \begin{enumerate} \item 諸行無常\pause \item 諸法無我\pause \item 一切皆苦\pause \item 涅槃寂静 \end{enumerate} }
テーブル
tabular
環境で。
\subsection{テーブル} \frame{\frametitle{三毒} \begin{tabular}{|c|c|c|} \hline \textbf{三毒} & \textbf{Sanskrit} & \textbf{Pāli} \\ \hline 貪 & rāga & lobha \\ \hline 瞋 & dveṣa & dosa \\ \hline 癡 & moha & moha \\ \hline \end{tabular}}
- pause を追加
\frame{\frametitle{ 三毒 (with pause)} \begin{tabular}{c c c} 貪 & rāga & lobha \\ \pause 瞋 & dveṣa & dosa \\ \pause 癡 & moha & moha \\ \end{tabular} }
ブロック
block
環境で。
\section{セクション 4} \subsection{ブロック} \frame{\frametitle{三身 (with pause)} \begin{block}{法身} 真如そのもの。代表 = 毘盧遮那仏 \end{block}\pause \begin{exampleblock}{報身} 真理のはたらき。あるいは修行して成仏する姿。代表 = 阿弥陀仏 \end{exampleblock}\pause \begin{alertblock}{応身} 人々の前に現れる釈迦の姿。代表 = 釈迦牟尼仏 \end{alertblock}\pause }
文書終わり
\end{document}
コンパイル
uplatex
を使用しました。
$ uplatex example.tex $ dvipdfmx example.dvi
このエントリーで使用したファイル: example.pdf example.tex
“プレゼンテーション用 LaTeX クラス Beamer の使い方メモ” への1件の返信