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

Benjamin Mako Hill || Want to submit a patch?