]> projects.mako.cc - beamer-mako/blob - template/example.tex
7a7ea1d7a45bcec5a27c216fd4be38af38863b55
[beamer-mako] / template / example.tex
1 \documentclass[xcolor=dvipsnames]{beamer}
2
3 % set up the file to create notes in the output PDFs
4 \usepackage{pgfpages}
5 \input{notes.config}
6
7 \renewcommand{\rmdefault}{ugm}
8 \usepackage[garamond]{mathdesign}
9
10 \renewcommand{\sfdefault}{phv}
11 \usepackage{relsize}
12
13 \usepackage{ucs}
14 \usepackage[utf8x]{inputenc}
15 \usepackage[T1]{fontenc}
16 \usepackage{textcomp}
17
18 % add tikz and a bunch of tikz foo
19 \usepackage{tikz}
20 \usetikzlibrary{shapes,shapes.misc,backgrounds,fit,positioning}
21 \tikzstyle{every picture}+=[remember picture]
22
23 % add functions to circle parts of slides (e.g., in tables)
24 \newcommand\marktopleft[1]{%
25     \tikz[overlay,remember picture] 
26         \node (marker-#1-a) at (0,1.5ex) {};%
27 }
28 \newcommand\markbottomright[1]{%
29     \tikz[overlay,remember picture] 
30         \node (marker-#1-b) at (0,0) {};%
31     \tikz[overlay,remember picture,dashed,inner sep=3pt]
32         \node[violet!75,ultra thick,draw,rounded rectangle,fit=(marker-#1-a.center) (marker-#1-b.center)] {};%
33 }
34
35 % add function to build a huge centered dropshadow
36 \newcommand\dropshadow[3]{%
37   \node[black!30!white] at (#1+0.1,#2-0.1) {
38     \scalebox{2}{\Huge \textbf{#3}}
39   };
40   \node at (#1,#2) {
41     \scalebox{2}{\Huge \e{#3}}
42   };
43 }
44
45 % add function to stop numbering appendix slides
46 \newcommand{\backupbegin}{
47    \newcounter{framenumberappendix}
48    \setcounter{framenumberappendix}{\value{framenumber}}
49 }
50 \newcommand{\backupend}{
51    \addtocounter{framenumberappendix}{-\value{framenumber}}
52    \addtocounter{framenumber}{\value{framenumberappendix}} 
53 }
54
55 % packages i use in essentially every document
56 \usepackage{graphicx}
57 \usepackage{url}
58 % \usepackage{dcolumn}
59 % \usepackage{booktabs}
60
61 % replace footnotes with symbols instead of numbers
62 \renewcommand*{\thefootnote}{\fnsymbol{footnote}}
63 \usepackage{perpage}
64 \MakePerPage{footnote}
65
66 %% BEAMER THEME STUFF
67 \usetheme[pageofpages=/,% String used between the current page and the
68                          % total page count.
69           bullet=default,% Use circles instead of squares for bullets.
70           titleline=false,% Show a line below the frame title.
71           alternativetitlepage=true,% Use the fancy title page.
72           titlepagelogo=figures/logo.pdf,% Logo for the first page.
73           %watermark=watermark-polito,% Watermark used in every page.
74           watermarkheight=100px,% Height of the watermark.
75           watermarkheightmult=4,% The watermark image is 4 times bigger
76                                 % than watermarkheight.
77           ]{Torino}
78
79 \usecolortheme{mako}
80 \useinnertheme{rectangles}
81 %\setbeamertemplate{blocks}[rounded][]
82 \setbeamercolor{block title}{bg=makopurple3, fg=White}
83
84 \setbeamertemplate{items}[default] 
85 \setbeamertemplate{blocks}[shadow=true] 
86
87 \usepackage{tcolorbox}
88 % These options will be applied to all `tcolorboxes`
89 \tcbset{%
90     noparskip,
91     colback=makopurple5, %background color of the box
92     colframe=makopurple1, %color of frame and title background
93     coltext=black, %color of body text
94     coltitle=white, %color of title text 
95     arc=0em,
96     left=0.1em,
97     right=0.1em,
98     fonttitle=\bfseries,
99     alerted/.style={coltitle=red, 
100                      colframe=gray!40},
101     example/.style={coltitle=black, 
102                      colframe=green!20,             
103                      colback=green!5},
104     }
105
106
107 %\useoutertheme{infolines}
108 %\usepackage[breaklinks]{hyperref}
109
110 \hypersetup{colorlinks=true, linkcolor=Black, citecolor=Black, filecolor=makopurple1,
111     urlcolor=Plum, unicode=true}
112
113 % create a boldface version of the header
114 \setbeamerfont{frametitle}{series=\bfseries}
115 \setbeamerfont{title}{series=\bfseries}
116
117 % tweak the beamer font to make it a bit lists a bit smaller
118 \setbeamerfont*{itemize/enumerate body}{size=\small}
119 \setbeamerfont*{itemize/enumerate subbody}{size=\footnotesize}
120 \setbeamerfont*{itemize/enumerate subsubbody}{size=\footnotesize}
121
122 % indent the margins of the itemize lists a little bit
123 \setlength{\leftmargin}{0pt}
124 \setlength{\leftmargini}{0.7cm}
125 \setlength{\leftmarginii}{0.7cm}
126
127 % create a new \e{} command to make things purple and bold
128 \newcommand{\e}[1]{\textcolor{makopurple1}{\textbf{#1}}}
129
130 % remove the nagivation symbols
131 \setbeamertemplate{navigation symbols}{}
132
133 \title{Presentation Title}
134 % \subtitle{Presentation Subtitle}
135 \author[Benj. Mako Hill]{\textbf{Benjamin Mako Hill}\\ mako@mit.edu}
136
137 \institute[MIT/Harvard]{\textbf{Massachusetts Institute of Technology}\\
138   Sloan School of Management\\
139   MIT Media Lab\\
140   \hspace{1pt}\\
141   \textbf{Harvard University}\\
142   Berkman Center for Internet and Society}
143
144 \date{December 2, 1980}
145
146 \begin{document}
147
148 % remove some of the space in the itemize to make it quite compact
149 \let\olditemize\itemize
150 \renewcommand\itemize{\olditemize\itemsep-1pt}
151
152 %% SLIDE: Title Slide
153 \begin{frame}[plain]
154   \titlepage
155
156 % include version control stuff
157 \input{vc}
158 \tikz[overlay,shift=(current page.south west)]{\node [xshift=5.6em,yshift=0.5em]{\colorbox{makopurple1}{\color{white} \tt \smaller \smaller \smaller revision:\ \VCRevision\  (\VCDateTEX)}};} 
159 \end{frame}
160
161 %% SLIDE: Slide 2
162 \begin{frame}{A sample slide, A sample slide, A sample slide, A sample
163     slide, A sample slide, A sample slide}
164
165 A displayed formula:
166
167 \[
168   \int_{-\infty}^\infty e^{-x^2} \, dx = \sqrt{\pi}
169 \]
170
171 An itemized list:
172
173 \begin{itemize}
174   \item<1-> itemized item 1
175   \item<2-> itemized item 2
176   \item<3-> itemized item 3
177 \end{itemize}
178
179 \visible<2->{
180 \begin{tcolorbox}[title={Foo, Bar, Baz}]
181   \emph{In a right triangle, the square of hypotenuse equals
182   the sum of squares of two other sides.}
183 \end{tcolorbox}
184 }
185
186 % pdfpc:begin
187 % This is the slide 2 notes.
188 % pdfpc:end
189
190 \end{frame}
191
192 \appendix
193 \backupbegin
194
195 \begin{frame}[plain]
196 \begin{tikzpicture}[remember picture,overlay,shift={(current page.center)}]
197 \dropshadow{0}{0.7}{Example and}
198 \dropshadow{0}{-.7}{Data Appendix}
199 \end{tikzpicture}
200 \end{frame}
201
202 \begin{frame}{A sample slide}
203
204 Final Sample Slide
205 % pdfpc:begin
206 % This is the slide 3 notes.
207 % pdfpc:end
208 \end{frame}
209 \backupend
210
211 \end{document}

Benjamin Mako Hill || Want to submit a patch?