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

Benjamin Mako Hill || Want to submit a patch?