]> projects.mako.cc - beamer-mako/blob - template/example.tex
5e71068fe3cd13f1b1745a523fd17d106a2f6f14
[beamer-mako] / template / example.tex
1 \documentclass[10pt,xcolor=dvipsnames]{beamer}
2
3 \usetheme{metropolis}
4 \usepackage{appendixnumberbeamer}
5
6 \usepackage{pgfpages}
7 \input{notes.config}
8
9 \usepackage{pgfplots}
10 \usepgfplotslibrary{dateplot}
11
12 \usepackage{booktabs}
13 \usepackage[scale=2]{ccicons}
14
15 % optional metro things
16 \metroset{numbering=fraction} % page numbering format
17 \metroset{progressbar=foot} % progress bar in footer
18 \metroset{sectionpage=none, subsectionpage=none}
19 \metroset{block=fill}
20 % \metroset{background=light}
21
22 \setsansfont{OpenSans}
23 \setmonofont{Roboto}
24
25 \definecolor{makopurple1}{RGB}{57,39,91}
26 \definecolor{makopurple2}{RGB}{137,119,173}
27 \definecolor{makopurple3}{RGB}{29,13,59}
28 \definecolor{makopurple4}{RGB}{124,99,173}
29
30 % \definecolor{makopurple1}{HTML}{3b255b}
31 \definecolor{makogreen1}{HTML}{0b7a75}
32 \definecolor{makovanilla1}{HTML}{d7c9aa}
33 \definecolor{makoumber1}{HTML}{7b2d26}
34 \definecolor{makowhite1}{HTML}{f0f3f5}
35
36 \setbeamercolor{normal text}{fg=black, bg=white}
37 \setbeamercolor{alerted text}{fg=makopurple4}
38 \setbeamercolor{example text}{fg=makoumber1}
39
40 \setbeamercolor{palette primary}{bg=makopurple1, fg=normal text.bg}
41 \setbeamercolor{palette secondary}{bg=makogreen1,fg=normal text.bg}
42 \setbeamercolor{palette tertiary}{bg=makovanilla1,fg=normal text.bg}
43 \setbeamercolor{palette quaternary}{bg=makoumber1,fg=normal text.bg}
44 \setbeamercolor{structure}{fg=makopurple1, bg=normal text.bg} % itemize, enumerate, etc
45 \setbeamercolor{section in toc}{fg=makopurple1, bg=normal text.bg} % TOC sections
46
47 % \setbeamercolor{progress bar}{fg=makopurple1}
48 % \setbeamercolor{title separator}{fg=makopurple1}
49 % \setbeamercolor{progress bar in head/foot}{fg=makopurple1}
50 % \setbeamercolor{progress bar in section page}{fg=makopurple1}
51
52 % this is a fix for a bug with XeTeX and notes pages
53 % see: https://tex.stackexchange.com/questions/232168/normal-text-is-invisible-when-using-beamer-with-notes-and-xelatex
54 \usepackage{ifthen}
55 \makeatletter
56 \def\beamer@framenotesbegin{% at beginning of slide
57   \ifthenelse{\not \boolean{metropolis@standout}}{%
58     \usebeamercolor[fg]{normal text}%
59       \gdef\beamer@noteitems{}% 
60       \gdef\beamer@notes{}%
61       
62     }{\gdef\beamer@noteitems{}%
63       \gdef\beamer@notes{}%
64     }
65 }
66 % redfine the notes type to clear things (working around the same bug)
67 % https://tex.stackexchange.com/questions/28966/change-beamer-notes-list-type-for-in-frame-notes
68 \def\beamer@setupnote{%
69   \gdef\beamer@notesactions{%
70     \beamer@outsideframenote{%
71       \beamer@atbeginnote%
72       {\normalfont%
73        \parskip 0.5em%
74       \usebeamercolor[fg]{normal text}%
75       \beamer@notes%
76       \ifx\beamer@noteitems\@empty\else
77       \beamer@noteitems%
78       \fi%
79       
80       \par}
81       \beamer@atendnote%
82     }%
83     \gdef\beamer@notesactions{}%
84   }
85 }
86 \makeatother
87
88 \usepackage{xspace}
89 \usepackage{relsize}
90
91 % add tikz and a bunch of tikz foo
92 \usepackage{tikz}
93 \usetikzlibrary{shapes,shapes.misc,backgrounds,fit,positioning}
94 \tikzstyle{every picture}+=[overlay,remember picture]
95
96 % add functions to circle parts of slides (e.g., in tables)
97 \newcommand\marktopleft[1]{\tikz \node (marker-#1-a) at (0,1.5ex) {};}
98 \newcommand\markbottomright[1]{%
99   \tikz{\node (marker-#1-b) at (0,0) {};}
100   \tikz[dashed,inner sep=3pt]{\node[violet!75,ultra thick,draw,rounded rectangle,fit=(marker-#1-a.center) (marker-#1-b.center)] {};}}
101
102 % create an empty quotetxt so we can reuse it
103 \newcommand{\quotetxt}{}
104
105 % more flexible non-tikz alternative with no dropshadow 
106 \newlength{\centertxtlen}
107 \makeatletter
108 \newcommand\centertext[2]{%
109   \setlength{\centertxtlen}{#1}%
110   \setlength{\centertxtlen}{0.48\centertxtlen}%
111   {\centering
112     \fontsize{#1}{2\centertxtlen}\selectfont
113     \e{#2}
114
115   }
116 }
117
118 % packages i use in essentially every document
119 \usepackage{graphicx}
120 \usepackage{url}
121 % \usepackage{dcolumn}
122 % \usepackage{booktabs}
123
124 % replace footnotes with symbols instead of numbers
125 \renewcommand*{\thefootnote}{\fnsymbol{footnote}}
126 \usepackage{perpage}
127 \MakePerPage{footnote}
128
129 % \hypersetup{colorlinks=true, linkcolor=Black, citecolor=Black, filecolor=makopurple1,
130 %     urlcolor=Plum, unicode=true}
131
132 % create a new \e{} command to make things purple and bold
133 \newcommand{\e}[1]{\alert{#1}}
134
135 % remove the nagivation symbols
136 \setbeamertemplate{navigation symbols}{}
137
138 \newcommand{\credit}[1]{%
139   \tikz[overlay]{\node at (current page.south west)
140     [anchor=south west, yshift=3pt, xshift=2pt]
141     {\smaller \smaller {[}#1{]}};}}
142
143 \setlength{\parsep}{1em}
144
145 \title{Presentation Title}
146 \subtitle{Presentation Subtitle}
147 \author[Benj. Mako Hill]{\textbf{Benjamin Mako Hill}\\
148   makohill@uw.edu}
149 \institute[UW/Harvard]{\textbf{University of Washington}\\
150   Department of Communication\\
151   \emph{Assistant Professor}\\
152   \hspace{1pt}\\
153   \textbf{Harvard University}\\
154   Berkman Klein Center\\
155   \emph{Faculty Associate}}
156
157 \date{December 2, 1980}
158
159 \begin{document}
160
161 % remove some of the space in the itemize to make it quite compact
162 % \let\olditemize\itemize
163 % \renewcommand\itemize{\olditemize\itemsep-1pt}
164
165 %% SLIDE: Title Slide
166 \begin{frame}
167   \titlepage
168
169   \tikz{\node at (current page.center) [anchor=center, yshift=-0.5in, xshift=1in]
170     {\includegraphics[width=0.35\textwidth]{figures/logo.pdf}};
171   }
172
173   % include version control stuff
174   \input{vc}
175   \credit{Revision:\ \VCRevision\  (\VCDateTEX)}
176 \end{frame}
177
178 \section{Introduction}
179
180 \begin{frame}
181   \sectionpage
182
183   \note{This is an example section page.}
184 \end{frame}
185
186 %% SLIDE: Slide 2
187 \begin{frame}{A sample slide, A sample slide, A sample slide, A sample
188     slide, A sample slide, A sample slide}
189
190 A displayed formula:
191
192 \[
193   \int_{-\infty}^\infty e^{-x^2} \, dx = \sqrt{\pi}
194 \]
195
196 An itemized list:
197
198 \begin{itemize}
199   \item<1-> itemized item 1
200   \item<2-> itemized item 2
201   \item<3-> itemized item 3
202 \end{itemize}
203
204 \visible<2->{
205   \begin{example}
206   \emph{In a right triangle, the square of hypotenuse equals
207   the sum of squares of two other sides.}
208   \end{example}
209 }
210
211   \credit{Image credit: Shaw and Hill, 2099.}
212   \note{These are the slide 2 notes.}
213 \end{frame}
214
215 \begin{frame}
216   \frametitle{Short frame title}
217
218   \e{A first} paragraph.
219   
220   And then \e{a second} paragraph.
221 \end{frame}
222
223 \subsection{Introductory Subsection}
224
225 \begin{frame}
226   \subsectionpage
227
228   \note{This is an example subsection page.}
229 \end{frame}
230
231 \appendix
232
233 \begin{frame}[standout]
234   Example and Data Appendix
235 \end{frame}
236
237 \begin{frame}{A sample slide}
238   Final Sample Slide
239   \note{These are the slide 4 notes.}
240 \end{frame}
241
242
243 \end{document}
244
245 %  LocalWords:  xcolor dvipsnames beamer ugm phv sep pageofpages px
246 %  LocalWords:  titleline alternativetitlepage titlepagelogo Torino
247 %  LocalWords:  watermarkheight watermarkheightmult bg makopurple fg
248 %  LocalWords:  noparskip colback colframe coltext coltitle fonttitle
249 %  LocalWords:  colorlinks linkcolor citecolor filecolor urlcolor
250 %  LocalWords:  unicode frametitle subbody subsubbody

Benjamin Mako Hill || Want to submit a patch?