274d5036b739251f579507cb7f3c836ae11a7dfd
[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=makopurple1}
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 }
63 \makeatother
64
65 \usepackage{xspace}
66 \usepackage{relsize}
67
68 % add tikz and a bunch of tikz foo
69 \usepackage{tikz}
70 \usetikzlibrary{shapes,shapes.misc,backgrounds,fit,positioning}
71 \tikzstyle{every picture}+=[overlay,remember picture]
72
73 % add functions to circle parts of slides (e.g., in tables)
74 \newcommand\marktopleft[1]{\tikz \node (marker-#1-a) at (0,1.5ex) {};}
75 \newcommand\markbottomright[1]{%
76   \tikz{\node (marker-#1-b) at (0,0) {};}
77   \tikz[dashed,inner sep=3pt]{\node[violet!75,ultra thick,draw,rounded rectangle,fit=(marker-#1-a.center) (marker-#1-b.center)] {};}}
78
79 % create an empty quotetxt so we can reuse it
80 \newcommand{\quotetxt}{}
81
82 % more flexible non-tikz alternative with no dropshadow 
83 \newlength{\centertxtlen}
84 \makeatletter
85 \newcommand\centertext[2]{%
86   \setlength{\centertxtlen}{#1}%
87   \setlength{\centertxtlen}{0.48\centertxtlen}%
88   {\centering
89     \fontsize{#1}{2\centertxtlen}\selectfont
90     \e{#2}
91
92   }
93 }
94
95 % packages i use in essentially every document
96 \usepackage{graphicx}
97 \usepackage{url}
98 % \usepackage{dcolumn}
99 % \usepackage{booktabs}
100
101 % replace footnotes with symbols instead of numbers
102 \renewcommand*{\thefootnote}{\fnsymbol{footnote}}
103 \usepackage{perpage}
104 \MakePerPage{footnote}
105
106 % \hypersetup{colorlinks=true, linkcolor=Black, citecolor=Black, filecolor=makopurple1,
107 %     urlcolor=Plum, unicode=true}
108
109 % create a new \e{} command to make things purple and bold
110 \newcommand{\e}[1]{\alert{#1}}
111
112 % remove the nagivation symbols
113 \setbeamertemplate{navigation symbols}{}
114
115 \newcommand{\credit}[1]{%
116   \tikz[overlay]{\node at (current page.south west)
117     [anchor=south west, yshift=3pt, xshift=2pt]
118     {\smaller \smaller {[}#1{]}};}}
119
120 \setlength{\parsep}{1em}
121
122 \title{Presentation Title}
123 \subtitle{Presentation Subtitle}
124 \author[Benj. Mako Hill]{\textbf{Benjamin Mako Hill}\\
125   makohill@uw.edu}
126 \institute[UW/Harvard]{\textbf{University of Washington}\\
127   Department of Communication\\
128   \emph{Assistant Professor}\\
129   \hspace{1pt}\\
130   \textbf{Harvard University}\\
131   Berkman Klein Center\\
132   \emph{Faculty Associate}}
133
134 \date{December 2, 1980}
135
136 \begin{document}
137
138 % remove some of the space in the itemize to make it quite compact
139 % \let\olditemize\itemize
140 % \renewcommand\itemize{\olditemize\itemsep-1pt}
141
142 %% SLIDE: Title Slide
143 \begin{frame}
144   \titlepage
145
146   \tikz{\node at (current page.center) [anchor=center, yshift=-0.5in, xshift=1in]
147     {\includegraphics[width=0.35\textwidth]{figures/logo.pdf}};
148   }
149
150   % include version control stuff
151   \input{vc}
152   \credit{Revision:\ \VCRevision\  (\VCDateTEX)}
153 \end{frame}
154
155 \section{Introduction}
156
157 %% SLIDE: Slide 2
158 \begin{frame}{A sample slide, A sample slide, A sample slide, A sample
159     slide, A sample slide, A sample slide}
160
161 A displayed formula:
162
163 \[
164   \int_{-\infty}^\infty e^{-x^2} \, dx = \sqrt{\pi}
165 \]
166
167 An itemized list:
168
169 \begin{itemize}
170   \item<1-> itemized item 1
171   \item<2-> itemized item 2
172   \item<3-> itemized item 3
173 \end{itemize}
174
175 \visible<2->{
176   \begin{example}
177   \emph{In a right triangle, the square of hypotenuse equals
178   the sum of squares of two other sides.}
179   \end{example}
180 }
181
182   \credit{Image credit: Shaw and Hill, 2099.}
183   \note{These are the slide 2 notes.}
184 \end{frame}
185
186 \begin{frame}
187   \frametitle{Short frame title}
188
189   \e{A first} paragraph.
190   
191   And then \e{a second} paragraph.
192 \end{frame}
193
194 \appendix
195
196 \begin{frame}[standout]
197   Example and Data Appendix
198 \end{frame}
199
200 \begin{frame}{A sample slide}
201   Final Sample Slide
202   \note{These are the slide 4 notes.}
203 \end{frame}
204
205
206 \end{document}
207
208 %  LocalWords:  xcolor dvipsnames beamer ugm phv sep pageofpages px
209 %  LocalWords:  titleline alternativetitlepage titlepagelogo Torino
210 %  LocalWords:  watermarkheight watermarkheightmult bg makopurple fg
211 %  LocalWords:  noparskip colback colframe coltext coltitle fonttitle
212 %  LocalWords:  colorlinks linkcolor citecolor filecolor urlcolor
213 %  LocalWords:  unicode frametitle subbody subsubbody

Benjamin Mako Hill || Want to submit a patch?