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

Benjamin Mako Hill || Want to submit a patch?