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

Benjamin Mako Hill || Want to submit a patch?