Debian Codegraph @

texmf-dist/doc/latex/beamertheme-metropolis/demo.tex

raw
1 \documentclass[10pt]{beamer}
2
3 \usetheme{metropolis}
4 \usepackage{appendixnumberbeamer}
5
6 \usepackage{booktabs}
7 \usepackage[scale=2]{ccicons}
8
9 \usepackage{pgfplots}
10 \usepgfplotslibrary{dateplot}
11
12 \usepackage{xspace}
13 \newcommand{\themename}{\textbf{\textsc{metropolis}}\xspace}
14
15 \title{Metropolis}
16 \subtitle{A modern beamer theme}
17 \date{\today}
18 \author{Matthias Vogelgesang}
19 \institute{Center for modern beamer themes}
20 % \titlegraphic{\hfill\includegraphics[height=1.5cm]{logo.pdf}}
21
22 \begin{document}
23
24 \maketitle
25
26 \begin{frame}{Table of contents}
27 \setbeamertemplate{section in toc}[sections numbered]
28 \tableofcontents[hideallsubsections]
29 \end{frame}
30
31 \section{Introduction}
32
33 \begin{frame}[fragile]{Metropolis}
34
35 The \themename theme is a Beamer theme with minimal visual noise
36 inspired by the \href{https://github.com/hsrmbeamertheme/hsrmbeamertheme}{\textsc{hsrm} Beamer
37 Theme} by Benjamin Weiss.
38
39 Enable the theme by loading
40
41 \begin{verbatim} \documentclass{beamer}
42 \usetheme{metropolis}\end{verbatim}
43
44 Note, that you have to have Mozilla's \emph{Fira Sans} font and XeTeX
45 installed to enjoy this wonderful typography.
46 \end{frame}
47 \begin{frame}[fragile]{Sections}
48 Sections group slides of the same topic
49
50 \begin{verbatim} \section{Elements}\end{verbatim}
51
52 for which \themename provides a nice progress indicator \ldots
53 \end{frame}
54
55 \section{Titleformats}
56
57 \begin{frame}{Metropolis titleformats}
58 \themename supports 4 different titleformats:
59 \begin{itemize}
60 \item Regular
61 \item \textsc{Smallcaps}
62 \item \textsc{allsmallcaps}
63 \item ALLCAPS
64 \end{itemize}
65 They can either be set at once for every title type or individually.
66 \end{frame}
67
68 {
69 \metroset{titleformat frame=smallcaps}
70 \begin{frame}{Small caps}
71 This frame uses the \texttt{smallcaps} titleformat.
72
73 \begin{alertblock}{Potential Problems}
74 Be aware, that not every font supports small caps. If for example you typeset your presentation with pdfTeX and the Computer Modern Sans Serif font, every text in smallcaps will be typeset with the Computer Modern Serif font instead.
75 \end{alertblock}
76 \end{frame}
77 }
78
79 {
80 \metroset{titleformat frame=allsmallcaps}
81 \begin{frame}{All small caps}
82 This frame uses the \texttt{allsmallcaps} titleformat.
83
84 \begin{alertblock}{Potential problems}
85 As this titleformat also uses smallcaps you face the same problems as with the \texttt{smallcaps} titleformat. Additionally this format can cause some other problems. Please refer to the documentation if you consider using it.
86
87 As a rule of thumb: Just use it for plaintext-only titles.
88 \end{alertblock}
89 \end{frame}
90 }
91
92 {
93 \metroset{titleformat frame=allcaps}
94 \begin{frame}{All caps}
95 This frame uses the \texttt{allcaps} titleformat.
96
97 \begin{alertblock}{Potential Problems}
98 This titleformat is not as problematic as the \texttt{allsmallcaps} format, but basically suffers from the same deficiencies. So please have a look at the documentation if you want to use it.
99 \end{alertblock}
100 \end{frame}
101 }
102
103 \section{Elements}
104
105 \begin{frame}[fragile]{Typography}
106 \begin{verbatim}The theme provides sensible defaults to
107 \emph{emphasize} text, \alert{accent} parts
108 or show \textbf{bold} results.\end{verbatim}
109
110 \begin{center}becomes\end{center}
111
112 The theme provides sensible defaults to \emph{emphasize} text,
113 \alert{accent} parts or show \textbf{bold} results.
114 \end{frame}
115
116 \begin{frame}{Font feature test}
117 \begin{itemize}
118 \item Regular
119 \item \textit{Italic}
120 \item \textsc{SmallCaps}
121 \item \textbf{Bold}
122 \item \textbf{\textit{Bold Italic}}
123 \item \textbf{\textsc{Bold SmallCaps}}
124 \item \texttt{Monospace}
125 \item \texttt{\textit{Monospace Italic}}
126 \item \texttt{\textbf{Monospace Bold}}
127 \item \texttt{\textbf{\textit{Monospace Bold Italic}}}
128 \end{itemize}
129 \end{frame}
130
131 \begin{frame}{Lists}
132 \begin{columns}[T,onlytextwidth]
133 \column{0.33\textwidth}
134 Items
135 \begin{itemize}
136 \item Milk \item Eggs \item Potatos
137 \end{itemize}
138
139 \column{0.33\textwidth}
140 Enumerations
141 \begin{enumerate}
142 \item First, \item Second and \item Last.
143 \end{enumerate}
144
145 \column{0.33\textwidth}
146 Descriptions
147 \begin{description}
148 \item[PowerPoint] Meeh. \item[Beamer] Yeeeha.
149 \end{description}
150 \end{columns}
151 \end{frame}
152 \begin{frame}{Animation}
153 \begin{itemize}[<+- | alert@+>]
154 \item \alert<4>{This is\only<4>{ really} important}
155 \item Now this
156 \item And now this
157 \end{itemize}
158 \end{frame}
159 \begin{frame}{Figures}
160 \begin{figure}
161 \newcounter{density}
162 \setcounter{density}{20}
163 \begin{tikzpicture}
164 \def\couleur{alerted text.fg}
165 \path[coordinate] (0,0) coordinate(A)
166 ++( 90:5cm) coordinate(B)
167 ++(0:5cm) coordinate(C)
168 ++(-90:5cm) coordinate(D);
169 \draw[fill=\couleur!\thedensity] (A) -- (B) -- (C) --(D) -- cycle;
170 \foreach \x in {1,...,40}{%
171 \pgfmathsetcounter{density}{\thedensity+20}
172 \setcounter{density}{\thedensity}
173 \path[coordinate] coordinate(X) at (A){};
174 \path[coordinate] (A) -- (B) coordinate[pos=.10](A)
175 -- (C) coordinate[pos=.10](B)
176 -- (D) coordinate[pos=.10](C)
177 -- (X) coordinate[pos=.10](D);
178 \draw[fill=\couleur!\thedensity] (A)--(B)--(C)-- (D) -- cycle;
179 }
180 \end{tikzpicture}
181 \caption{Rotated square from
182 \href{http://www.texample.net/tikz/examples/rotated-polygons/}{texample.net}.}
183 \end{figure}
184 \end{frame}
185 \begin{frame}{Tables}
186 \begin{table}
187 \caption{Largest cities in the world (source: Wikipedia)}
188 \begin{tabular}{@{} lr @{}}
189 \toprule
190 City & Population\\
191 \midrule
192 Mexico City & 20,116,842\\
193 Shanghai & 19,210,000\\
194 Peking & 15,796,450\\
195 Istanbul & 14,160,467\\
196 \bottomrule
197 \end{tabular}
198 \end{table}
199 \end{frame}
200 \begin{frame}{Blocks}
201 Three different block environments are pre-defined and may be styled with an
202 optional background color.
203
204 \begin{columns}[T,onlytextwidth]
205 \column{0.5\textwidth}
206 \begin{block}{Default}
207 Block content.
208 \end{block}
209
210 \begin{alertblock}{Alert}
211 Block content.
212 \end{alertblock}
213
214 \begin{exampleblock}{Example}
215 Block content.
216 \end{exampleblock}
217
218 \column{0.5\textwidth}
219
220 \metroset{block=fill}
221
222 \begin{block}{Default}
223 Block content.
224 \end{block}
225
226 \begin{alertblock}{Alert}
227 Block content.
228 \end{alertblock}
229
230 \begin{exampleblock}{Example}
231 Block content.
232 \end{exampleblock}
233
234 \end{columns}
235 \end{frame}
236 \begin{frame}{Math}
237 \begin{equation*}
238 e = \lim_{n\to \infty} \left(1 + \frac{1}{n}\right)^n
239 \end{equation*}
240 \end{frame}
241 \begin{frame}{Line plots}
242 \begin{figure}
243 \begin{tikzpicture}
244 \begin{axis}[
245 mlineplot,
246 width=0.9\textwidth,
247 height=6cm,
248 ]
249
250 \addplot {sin(deg(x))};
251 \addplot+[samples=100] {sin(deg(2*x))};
252
253 \end{axis}
254 \end{tikzpicture}
255 \end{figure}
256 \end{frame}
257 \begin{frame}{Bar charts}
258 \begin{figure}
259 \begin{tikzpicture}
260 \begin{axis}[
261 mbarplot,
262 xlabel={Foo},
263 ylabel={Bar},
264 width=0.9\textwidth,
265 height=6cm,
266 ]
267
268 \addplot plot coordinates {(1, 20) (2, 25) (3, 22.4) (4, 12.4)};
269 \addplot plot coordinates {(1, 18) (2, 24) (3, 23.5) (4, 13.2)};
270 \addplot plot coordinates {(1, 10) (2, 19) (3, 25) (4, 15.2)};
271
272 \legend{lorem, ipsum, dolor}
273
274 \end{axis}
275 \end{tikzpicture}
276 \end{figure}
277 \end{frame}
278 \begin{frame}{Quotes}
279 \begin{quote}
280 Veni, Vidi, Vici
281 \end{quote}
282 \end{frame}
283
284 {%
285 \setbeamertemplate{frame footer}{My custom footer}
286 \begin{frame}[fragile]{Frame footer}
287 \themename defines a custom beamer template to add a text to the footer. It can be set via
288 \begin{verbatim}\setbeamertemplate{frame footer}{My custom footer}\end{verbatim}
289 \end{frame}
290 }
291
292 \begin{frame}{References}
293 Some references to showcase [allowframebreaks] \cite{knuth92,ConcreteMath,Simpson,Er01,greenwade93}
294 \end{frame}
295
296 \section{Conclusion}
297
298 \begin{frame}{Summary}
299
300 Get the source of this theme and the demo presentation from
301
302 \begin{center}\url{github.com/matze/mtheme}\end{center}
303
304 The theme \emph{itself} is licensed under a
305 \href{http://creativecommons.org/licenses/by-sa/4.0/}{Creative Commons
306 Attribution-ShareAlike 4.0 International License}.
307
308 \begin{center}\ccbysa\end{center}
309
310 \end{frame}
311
312 \begin{frame}[standout]
313 Questions?
314 \end{frame}
315
316 \appendix
317
318 \begin{frame}[fragile]{Backup slides}
319 Sometimes, it is useful to add slides at the end of your presentation to
320 refer to during audience questions.
321
322 The best way to do this is to include the \verb|appendixnumberbeamer|
323 package in your preamble and call \verb|\appendix| before your backup slides.
324
325 \themename will automatically turn off slide numbering and progress bars for
326 slides in the appendix.
327 \end{frame}
328
329 \begin{frame}[allowframebreaks]{References}
330
331 \bibliography{demo}
332 \bibliographystyle{abbrv}
333
334 \end{frame}
335
336 \end{document}