| 1 |
%% --------------------------------------------------------------------------- |
| 2 |
%% Copyright 2015 Matthias Vogelgesang and the LaTeX community. A full list of |
| 3 |
%% contributors can be found at |
| 4 |
%% |
| 5 |
%% https://github.com/matze/mtheme/graphs/contributors |
| 6 |
%% |
| 7 |
%% and the original template was based on the HSRM theme by Benjamin Weiss. |
| 8 |
%% |
| 9 |
%% This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 |
| 10 |
%% International License (https://creativecommons.org/licenses/by-sa/4.0/). |
| 11 |
%% --------------------------------------------------------------------------- |
| 12 |
|
| 13 |
\documentclass{ltxdoc} |
| 14 |
%\OnlyDescription |
| 15 |
|
| 16 |
\usepackage{parskip} |
| 17 |
\usepackage{setspace} |
| 18 |
\usepackage{xspace} |
| 19 |
\onehalfspacing |
| 20 |
|
| 21 |
\usepackage{etoolbox} |
| 22 |
\usepackage{ifxetex} |
| 23 |
\usepackage{ifluatex} |
| 24 |
|
| 25 |
\ifboolexpr{bool {xetex} or bool {luatex}}{ |
| 26 |
\usepackage{fontspec} |
| 27 |
\defaultfontfeatures{Ligatures=TeX} |
| 28 |
|
| 29 |
\newcounter{fontsnotfound} |
| 30 |
\newcommand{\checkfont}[1]{% |
| 31 |
\suppressfontnotfounderror=1% |
| 32 |
\font\x = "#1" at 10pt |
| 33 |
\selectfont |
| 34 |
\ifx\x\nullfont% |
| 35 |
\stepcounter{fontsnotfound}% |
| 36 |
\fi% |
| 37 |
\suppressfontnotfounderror=0% |
| 38 |
} |
| 39 |
|
| 40 |
\newcommand{\iffontsavailable}[3]{% |
| 41 |
\setcounter{fontsnotfound}{0}% |
| 42 |
\expandafter\forcsvlist\expandafter% |
| 43 |
\checkfont\expandafter{#1}% |
| 44 |
\ifnum\value{fontsnotfound}=0% |
| 45 |
#2% |
| 46 |
\else% |
| 47 |
#3% |
| 48 |
\fi% |
| 49 |
} |
| 50 |
\iffontsavailable{Fira Sans Light,% |
| 51 |
Fira Sans Light Italic,% |
| 52 |
Fira Sans,% |
| 53 |
Fira Sans Italic}{% |
| 54 |
\setmainfont[BoldFont={Fira Sans}]{Fira Sans Light}% |
| 55 |
}{% |
| 56 |
\iffontsavailable{Fira Sans Light OT,% |
| 57 |
Fira Sans Light Italic OT,% |
| 58 |
Fira Sans OT,% |
| 59 |
Fira Sans Italic OT}{% |
| 60 |
\setmainfont[BoldFont={Fira Sans OT}]{Fira Sans Light OT}% |
| 61 |
}{% |
| 62 |
\typeout{% |
| 63 |
Could not find Fira Sans fonts. Creating documentation% |
| 64 |
with standard fonts.% |
| 65 |
} |
| 66 |
} |
| 67 |
} |
| 68 |
\iffontsavailable{Fira Mono, Fira Mono Bold}{% |
| 69 |
\setmonofont{Fira Mono}% |
| 70 |
}{% |
| 71 |
\iffontsavailable{Fira Mono OT, Fira Mono Bold OT}{% |
| 72 |
\setmonofont{Fira Mono OT}% |
| 73 |
}{% |
| 74 |
\typeout{% |
| 75 |
Could not find Fira Sans fonts. Creating documentation% |
| 76 |
with standard monospaced fonts.% |
| 77 |
} |
| 78 |
} |
| 79 |
} |
| 80 |
}{ |
| 81 |
\typeout{% |
| 82 |
You need to compile with XeLaTeX or LuaLaTeX to use the Fira fonts.% |
| 83 |
} |
| 84 |
} |
| 85 |
|
| 86 |
\usepackage{enumitem} |
| 87 |
\setlist[itemize]{noitemsep} |
| 88 |
\setlist[enumerate]{noitemsep} |
| 89 |
|
| 90 |
\usepackage{xcolor} |
| 91 |
\definecolor{mDarkBrown}{HTML}{604c38} |
| 92 |
\definecolor{mDarkTeal}{HTML}{23373b} |
| 93 |
\definecolor{mLightBrown}{HTML}{EB811B} |
| 94 |
\definecolor{mLightGreen}{HTML}{14B03D} |
| 95 |
\definecolor{mBackground}{HTML}{FFFFFF} |
| 96 |
|
| 97 |
\usepackage{listings} |
| 98 |
\lstset{% |
| 99 |
language=[LaTeX]{TeX}, |
| 100 |
basicstyle=\ttfamily, |
| 101 |
keywordstyle=\color{mLightBrown}\bfseries, |
| 102 |
commentstyle=\color{mLightGreen}, |
| 103 |
stringstyle=\color{mLightGreen}, |
| 104 |
backgroundcolor=\color{mBackground}, |
| 105 |
numbers=none, |
| 106 |
numberstyle=\tiny\ttfamily, |
| 107 |
stepnumber=2, |
| 108 |
showspaces=false, |
| 109 |
showstringspaces=false, |
| 110 |
showtabs=false, |
| 111 |
frame=none, |
| 112 |
framerule=1pt, |
| 113 |
tabsize=2, |
| 114 |
rulesep=5em, |
| 115 |
captionpos=b, |
| 116 |
breaklines=true, |
| 117 |
breakatwhitespace=false, |
| 118 |
framexleftmargin=0em, |
| 119 |
framexrightmargin=0em, |
| 120 |
xleftmargin=0em, |
| 121 |
xrightmargin=0em, |
| 122 |
aboveskip=1em, |
| 123 |
belowskip=1em, |
| 124 |
morekeywords={usetheme,institute,maketitle,@metropolis@titleformat,% |
| 125 |
plain,setbeamercolor,metroset,setsansfont,setmonofont}, |
| 126 |
} |
| 127 |
\lstMakeShortInline| |
| 128 |
\usepackage{metalogo} |
| 129 |
|
| 130 |
\usepackage[colorlinks=true, |
| 131 |
linkcolor=mLightBrown, |
| 132 |
menucolor=mLightBrown, |
| 133 |
pagecolor=mLightBrown, |
| 134 |
urlcolor=mLightBrown]{hyperref} |
| 135 |
|
| 136 |
\newcommand{\DescribeOption}[4]{ |
| 137 |
\DescribeMacro{#1} |
| 138 |
\begin{minipage}[t]{\textwidth} |
| 139 |
\textit{\textbf{\textcolor{mLightGreen}{#2}}}\dotfill\,#3\par |
| 140 |
\begingroup |
| 141 |
\vspace{0.5em}#4\par |
| 142 |
\endgroup |
| 143 |
\end{minipage} |
| 144 |
} |
| 145 |
|
| 146 |
\newcommand{\themename}{\textbf{\textsc{metropolis}}\xspace} |
| 147 |
|
| 148 |
\usepackage{readprov} |
| 149 |
\ReadPackageInfos{beamerthememetropolis} |
| 150 |
|
| 151 |
\title{Modern Beamer Presentations with the \themename package} |
| 152 |
\author{Matthias Vogelgesang \\ \url{[email protected]}} |
| 153 |
\date{\fileversion~---~\filedate} |
| 154 |
|
| 155 |
\begin{document} |
| 156 |
|
| 157 |
\maketitle |
| 158 |
\tableofcontents |
| 159 |
|
| 160 |
|
| 161 |
\section{Introduction} |
| 162 |
|
| 163 |
Beamer is an awesome way to make presentations with LaTeX, but its theme |
| 164 |
selection is surprisingly sparse. The stock themes share an aesthetic that can |
| 165 |
be a little cluttered, while the few distinctive custom themes available are |
| 166 |
often specialized for a particular corporate or institutional brand. |
| 167 |
|
| 168 |
The goal of \themename is to provide a simple, modern Beamer theme suitable |
| 169 |
for anyone to use. It tries to minimize noise and maximize space for content; |
| 170 |
the only visual flourish it offers is an (optional) progress bar added to each |
| 171 |
slide or to the section slides. |
| 172 |
|
| 173 |
By default, \themename uses |
| 174 |
\href{https://www.mozilla.org/en-US/styleguide/products/firefox-os/typeface/} |
| 175 |
{Fira Sans}, a gorgeous typeface commissioned by Mozilla and designed by |
| 176 |
\href{http://www.carrois.com/fira-3-1/}{Carrois}. For best results, you will |
| 177 |
need the Fira typeface installed and use \XeLaTeX\ to typeset your slides. |
| 178 |
However, \themename can also be used with other typefaces and \LaTeX{} build |
| 179 |
systems. |
| 180 |
|
| 181 |
\themename's codebase is maintained on \href{https://github.com/matze/mtheme} |
| 182 |
{GitHub}. If you have issues, find mistakes in the manual or want to help make |
| 183 |
the theme even better, please get in touch there. The |
| 184 |
\href{https://github.com/matze/mtheme/graphs/contributors} |
| 185 |
{full list of contributors} already contains over a dozen names! |
| 186 |
|
| 187 |
|
| 188 |
\section{Getting Started} |
| 189 |
|
| 190 |
\subsection{Installing from CTAN} |
| 191 |
|
| 192 |
For most users, we recommend installing \themename from |
| 193 |
\href{https://www.ctan.org}{CTAN}. If you keep your \TeX\ distribution |
| 194 |
up-to-date, chances are good that \themename is already installed. If it is |
| 195 |
not, you need to update your packages. If your distribution is \TeX\ Live |
| 196 |
(or Mac\TeX\ on OS X), the following command updates all packages. |
| 197 |
|
| 198 |
\begin{lstlisting} |
| 199 |
tlmgr update --all |
| 200 |
\end{lstlisting} |
| 201 |
|
| 202 |
If this results in an error, you may need to run it with administrative privileges: |
| 203 |
|
| 204 |
\begin{lstlisting} |
| 205 |
sudo tlmgr update --all |
| 206 |
\end{lstlisting} |
| 207 |
|
| 208 |
Mac\TeX\ on OS X also provides a graphical interface for |tlmgr| called |
| 209 |
\TeX\ Live Utility. |
| 210 |
|
| 211 |
For any other distribution please refer to its documentation on how to update |
| 212 |
your packages. |
| 213 |
|
| 214 |
To get the most out of the theme you should also install the |Fira| fonts. |
| 215 |
However, this is not mandatory; \themename also works with the standard fonts. |
| 216 |
|
| 217 |
|
| 218 |
\subsection{Installing from GitHub} |
| 219 |
|
| 220 |
If you want to use the cutting-edge development version of \themename, you can |
| 221 |
install it manually. Like any \LaTeX\ package, this involves four easy steps: |
| 222 |
\begin{description} |
| 223 |
\item[Download the source] with a |git clone| of the |
| 224 |
\href{https://github.com/matze/mtheme}{\themename repository} or as a |
| 225 |
\href{https://github.com/matze/mtheme/archive/master.zip}{zip archive} |
| 226 |
of the latest development version. |
| 227 |
|
| 228 |
\item[Compile the style files] by running |make sty| inside the downloaded |
| 229 |
directory. (Or run \LaTeX{} directly on |source/metropolistheme.ins|.) |
| 230 |
|
| 231 |
\item[Move the resulting |*.sty| files] to the folder containing your |
| 232 |
presentation. To use \themename with many presentations, run |
| 233 |
|make install| or move the |*.sty| files to a folder in your \TeX{} path |
| 234 |
instead. |
| 235 |
|
| 236 |
\item[Use the theme for your presentation] by declaring |
| 237 |
|\usetheme{metropolis}| in the preamble of your Beamer document. |
| 238 |
\end{description} |
| 239 |
|
| 240 |
\themename uses the Make build system to offer the following installation |
| 241 |
options for advanced users: |
| 242 |
|
| 243 |
\begin{description} |
| 244 |
\item[|make sty|] builds the theme style files. |
| 245 |
\item[|make doc|] builds this documentation manual. |
| 246 |
\item[|make demo|] builds a demo presentation to test the features of |
| 247 |
\themename. |
| 248 |
\item[|make all|] builds the theme and manual. |
| 249 |
\item[|make clean|] removes the files generated by |make all|. |
| 250 |
\item[|make install|] installs the theme into your local texmf folder. |
| 251 |
\item[|make uninstall|] removes the theme from your local texmf folder. |
| 252 |
\end{description} |
| 253 |
|
| 254 |
|
| 255 |
\subsection{A Minimal Example} |
| 256 |
|
| 257 |
The following code shows a minimal example of a Beamer presentation using |
| 258 |
\themename. |
| 259 |
|
| 260 |
\begin{lstlisting} |
| 261 |
\documentclass{beamer} |
| 262 |
\usetheme{metropolis} % Use metropolis theme |
| 263 |
\title{A minimal example} |
| 264 |
\date{\today} |
| 265 |
\author{Matthias Vogelgesang} |
| 266 |
\institute{Centre for Modern Beamer Themes} |
| 267 |
\begin{document} |
| 268 |
\maketitle |
| 269 |
\section{First Section} |
| 270 |
\begin{frame}{First Frame} |
| 271 |
Hello, world! |
| 272 |
\end{frame} |
| 273 |
\end{document} |
| 274 |
\end{lstlisting} |
| 275 |
|
| 276 |
|
| 277 |
\subsection{Dependencies} |
| 278 |
|
| 279 |
\themename depends on the |beamer| class and the following standard packages: |
| 280 |
\begin{multicols}{3} |
| 281 |
\begin{itemize} |
| 282 |
\item |tikz| |
| 283 |
\item |pgfopts| |
| 284 |
\item |etoolbox| |
| 285 |
\item |calc| |
| 286 |
\item |ifxetex| |
| 287 |
\item |ifluatex| |
| 288 |
\end{itemize} |
| 289 |
\end{multicols} |
| 290 |
|
| 291 |
For best results, we recommend installing the fonts |
| 292 |
\href{https://github.com/mozilla/Fira}{|Fira Sans|} and |Fira Mono| |
| 293 |
and compiling with \themename using \XeLaTeX\ or \LuaTeX. |
| 294 |
These are optional dependencies; \themename is compatible with (e.g.) |
| 295 |
pdf\LaTeX\ and will fall back to standard fonts if |Fira Sans| or |Fira Mono| |
| 296 |
is not installed. |
| 297 |
|
| 298 |
The packaged name of |Fira Sans| is |Fira Sans OT| in some Linux |
| 299 |
distributions; this case is automatically handled by \themename. |
| 300 |
|
| 301 |
|
| 302 |
\subsection{Pandoc} |
| 303 |
|
| 304 |
To use this theme with \href{http://johnmacfarlane.net/pandoc/}{Pandoc}-based |
| 305 |
presentations, you can run the following command |
| 306 |
|
| 307 |
\begin{lstlisting} |
| 308 |
$ pandoc -t beamer --latex-engine=xelatex -V theme:metropolis -o output.pdf input.md |
| 309 |
\end{lstlisting} |
| 310 |
|
| 311 |
|
| 312 |
\section{Customization} |
| 313 |
|
| 314 |
\subsection{Package options} |
| 315 |
|
| 316 |
The theme provides a number of options, which can be set using a key=value |
| 317 |
interface. The primary way to set options is to provide a comma-separated list |
| 318 |
of option-value pairs when loading \themename in the preamble: |
| 319 |
\begin{lstlisting} |
| 320 |
\usetheme[option1=value1, option2=value2, ...]{metropolis} |
| 321 |
\end{lstlisting} |
| 322 |
|
| 323 |
Options can be changed at any time --- even mid-presentation! --- with the |
| 324 |
|\metroset| macro. |
| 325 |
\begin{lstlisting} |
| 326 |
\metroset{option1=newvalue1, option2=newvalue2, ...} |
| 327 |
\end{lstlisting} |
| 328 |
|
| 329 |
The list of options is structured as shown in the following example. |
| 330 |
|
| 331 |
\DescribeOption{option key}{list of possible values}{default}{ |
| 332 |
A short description of the option. |
| 333 |
} |
| 334 |
|
| 335 |
|
| 336 |
\subsubsection{Main theme} |
| 337 |
|
| 338 |
\DescribeOption{titleformat}% |
| 339 |
{regular, smallcaps, allsmallcaps, allcaps} |
| 340 |
{regular}{ |
| 341 |
Changes the format of titles, subtitles, section titles, frame titles, and |
| 342 |
the text on ``standout'' frames. The available options produce |
| 343 |
Regular, \textsc{SmallCaps}, \textsc{\MakeLowercase{AllSmallCaps}}, or |
| 344 |
\MakeUppercase{AllCaps} titles. Please refer to |
| 345 |
Section~\ref{sec:titleformats} for known issues with these options. |
| 346 |
} |
| 347 |
|
| 348 |
\DescribeOption{titleformat plain}% |
| 349 |
{regular, smallcaps, allsmallcaps, allcaps}% |
| 350 |
{regular}{ |
| 351 |
Changes the format of ``standout'' frames (see |titleformat|, above). |
| 352 |
} |
| 353 |
|
| 354 |
|
| 355 |
\subsubsection{Inner theme} |
| 356 |
|
| 357 |
\DescribeOption{sectionpage}{none, simple, progressbar}{progressbar}{ |
| 358 |
Adds a slide at the start of each section (|simple|) with an optional thin |
| 359 |
progress bar below the section title (|progressbar|). The |none| option |
| 360 |
disables the section page. |
| 361 |
} |
| 362 |
|
| 363 |
\DescribeOption{subsectionpage}{none, simple, progressbar}{none}{ |
| 364 |
Optionally adds a slide at the start of each subsection. If enabled with |
| 365 |
the |simple| or |progressbar| options, the style of the |section page| will |
| 366 |
be updated to match the style of the |subsection page|. Note that section |
| 367 |
slides and subsection slides can appear consecutively if both are enabled; |
| 368 |
you may want to use this option together with |sectionpage=none| depending |
| 369 |
on the section structure of your presentation. |
| 370 |
} |
| 371 |
|
| 372 |
|
| 373 |
\subsubsection{Outer theme} |
| 374 |
|
| 375 |
\DescribeOption{numbering}{none, counter, fraction}{counter}{ |
| 376 |
Controls whether the frame number at the bottom right of each slide is |
| 377 |
omitted (|none|), shown (|counter|) or displayed as a fraction of the total |
| 378 |
number of frames (|fraction|). |
| 379 |
} |
| 380 |
|
| 381 |
\DescribeOption{progressbar}{none, head, frametitle, foot}{none}{ |
| 382 |
Optionally adds a progress bar to the top of each frame (|head|), |
| 383 |
the bottom of each frame (|foot|), or directly below each frame title |
| 384 |
(|frametitle|). |
| 385 |
} |
| 386 |
|
| 387 |
\subsubsection{Color theme} |
| 388 |
\DescribeOption{block}{transparent, fill}{transparent}{ |
| 389 |
Optionally adds a light grey background to block environments like |theorem| |
| 390 |
and |example|. |
| 391 |
} |
| 392 |
|
| 393 |
\DescribeOption{background}{dark, light}{light}{ |
| 394 |
Provides the option to have a dark background and light foreground instead |
| 395 |
of the reverse. |
| 396 |
} |
| 397 |
|
| 398 |
|
| 399 |
\subsubsection{Font theme} |
| 400 |
|
| 401 |
\DescribeMacro{titleformat title} |
| 402 |
\DescribeMacro{titleformat subtitle} |
| 403 |
\DescribeMacro{titleformat section} |
| 404 |
\DescribeOption{titleformat frame}% |
| 405 |
{regular, smallcaps, allsmallcaps, allcaps}% |
| 406 |
{regular}{ |
| 407 |
Individually controls the format of titles, subtitles, section titles, and |
| 408 |
frame titles (see |titleformat|, above). |
| 409 |
} |
| 410 |
|
| 411 |
|
| 412 |
\subsection{Color Customization} |
| 413 |
|
| 414 |
The included \themename color theme is used by default, but its colors can be |
| 415 |
easily changed to suit your tastes. All of the theme's styles are defined in |
| 416 |
terms of three beamer colors: |
| 417 |
\begin{itemize} |
| 418 |
\item |normal text| (dark fg, light bg) |
| 419 |
\item |alerted text| (colored fg, should be visible against dark or light) |
| 420 |
\item |example text| (colored fg, should be visible against dark or light) |
| 421 |
\end{itemize} |
| 422 |
|
| 423 |
An easy way to customize the theme is to redefine these colors using |
| 424 |
|
| 425 |
\begin{lstlisting} |
| 426 |
\setbeamercolor{ ... }{ fg= ... , bg= ... } |
| 427 |
\end{lstlisting} |
| 428 |
in your preamble. For greater customization, you can redefine any of the other |
| 429 |
stock beamer colors. In addition to the stock colors the theme defines a number |
| 430 |
of \themename specific colors, which can also be redefined to your liking. |
| 431 |
|
| 432 |
\begin{lstlisting} |
| 433 |
\setbeamercolor{progress bar}{ ... } |
| 434 |
\setbeamercolor{title separator}{ ... } |
| 435 |
\setbeamercolor{progress bar in head/foot}{ ... } |
| 436 |
\setbeamercolor{progress bar in section page}{ ... } |
| 437 |
\end{lstlisting} |
| 438 |
|
| 439 |
|
| 440 |
\subsection{Font Customization} |
| 441 |
|
| 442 |
The default font for \themename is |Fira|. This can be easily changed using |
| 443 |
the standard font selection commands of the \textsf{fontspec} package. So if |
| 444 |
you prefer, for example, the \href{http://font.ubuntu.com}{|Ubuntu|} font family, just add the following two commands after loading the \themename theme. |
| 445 |
|
| 446 |
\begin{lstlisting} |
| 447 |
\setsansfont{Ubuntu} |
| 448 |
\setmonofont{Ubuntu Mono} |
| 449 |
\end{lstlisting} |
| 450 |
|
| 451 |
If you are expecting to present in a large room or with an underpowered |
| 452 |
projector, you may want to change the font to a heavier weight of Fira to |
| 453 |
maximize readability. |
| 454 |
|
| 455 |
\begin{lstlisting} |
| 456 |
\setsansfont[BoldFont={Fira Sans SemiBold}]{Fira Sans Book} |
| 457 |
\end{lstlisting} |
| 458 |
|
| 459 |
|
| 460 |
\subsubsection{Old style figures} |
| 461 |
|
| 462 |
The regular \textsf{fontspec} mechanism for changing glyph appearance applies |
| 463 |
also to this theme. If you want to have old style figures in the text but |
| 464 |
regular lined figures for math, you could add the following to your preamble: |
| 465 |
|
| 466 |
\begin{lstlisting} |
| 467 |
\usefonttheme{professionalfonts} % required for mathspec |
| 468 |
\usepackage{mathspec} |
| 469 |
\setsansfont[BoldFont={Fira Sans}, |
| 470 |
Numbers={OldStyle}]{Fira Sans Light} |
| 471 |
\setmathsfont(Digits)[Numbers={Lining, Proportional}]{Fira Sans Light} |
| 472 |
\end{lstlisting} |
| 473 |
|
| 474 |
|
| 475 |
\subsection{Commands} |
| 476 |
|
| 477 |
\subsubsection{Standout frames} |
| 478 |
|
| 479 |
The \themename inner theme offers a custom frame format with large, centered |
| 480 |
text and an inverted background --- perfect for focusing attention on |
| 481 |
single sentence or image. To use it, add the key |standout| to the frame: |
| 482 |
|
| 483 |
\begin{lstlisting} |
| 484 |
\begin{frame}[standout] |
| 485 |
Thank you! |
| 486 |
\end{frame} |
| 487 |
\end{lstlisting} |
| 488 |
|
| 489 |
|
| 490 |
|
| 491 |
\section{\texttt{pgfplots} integration} |
| 492 |
|
| 493 |
\themename comes with a set of pre-defined pgfplots styles and a color theme |
| 494 |
based on Paul Tol's color scheme. |
| 495 |
|
| 496 |
|
| 497 |
\subsection{Styles} |
| 498 |
|
| 499 |
Pass the following style keys to the axis environment to get the appropriate |
| 500 |
effect: |
| 501 |
|
| 502 |
\begin{macro}{mlineplot} |
| 503 |
Plot regular line charts with reduced axis frames, less intrusive legend and |
| 504 |
subdued grid. |
| 505 |
\end{macro} |
| 506 |
\begin{macro}{mbarplot} |
| 507 |
Plot vertical bar charts in a similar way as |mlineplot| but reduce grid usage. |
| 508 |
\end{macro} |
| 509 |
\begin{macro}{horizontal mbarplot} |
| 510 |
Plot horizontal bar charts. |
| 511 |
\end{macro} |
| 512 |
\begin{macro}{disable thousands separator} |
| 513 |
Helper style to remove thousands separator. |
| 514 |
\end{macro} |
| 515 |
|
| 516 |
|
| 517 |
\subsection{Paul Tol colors} |
| 518 |
|
| 519 |
A good presentation uses colors that are distinct from each other as much as |
| 520 |
possible as well as from black and white, can be discerned item under different |
| 521 |
lighting and display environments and by color-blind viewers, while matching |
| 522 |
well together. |
| 523 |
|
| 524 |
In a \href{https://personal.sron.nl/~pault/colourschemes.pdf}{technical note} |
| 525 |
for SRON, Paul Tol proposed a palette of colors satisfying these constraints. |
| 526 |
The sub-package |pgfplotsthemetol| defines palettes for |pgfplots| charts |
| 527 |
based on Tol's work. |
| 528 |
|
| 529 |
|
| 530 |
\section{Tips \& Tricks} |
| 531 |
|
| 532 |
\subsection{Backup Slides} |
| 533 |
|
| 534 |
Speakers will often include extra slides at the end of their presentation to |
| 535 |
refer to during audience questions. One easy way to do this is to include the |
| 536 |
\verb|appendixnumberbeamer| package in your preamble and call \verb|\appendix| before your backup slides. |
| 537 |
|
| 538 |
\themename will automatically turn off slide numbering and progress bars for |
| 539 |
slides in the appendix. |
| 540 |
|
| 541 |
|
| 542 |
\section{Known Issues} |
| 543 |
|
| 544 |
\subsection{Title formats} |
| 545 |
\label{sec:titleformats} |
| 546 |
|
| 547 |
Be aware that not every font supports small caps, so the |smallcaps| or |
| 548 |
|allsmallcaps| options may not work if you use a font other than |Fira Sans|. |
| 549 |
In particular, the Computer Modern sans-serif typeface, which is used when |
| 550 |
\themename is compiled with pdf\LaTeX, does not have a small-caps variant. |
| 551 |
|
| 552 |
The title format options |allsmallcaps| and |allcaps| are quite nice from an |
| 553 |
aesthetic point of view, but their use of |\MakeLowercase| and |
| 554 |
|\MakeUppercase| can cause unexpected problems. For example: |
| 555 |
|
| 556 |
\begin{itemize} |
| 557 |
\item Some commands, like |\\|, do not work inside |\MakeLowercase| and |
| 558 |
|\MakeUppercase|. (See \href{https://github.com/matze/mtheme/issues/125} |
| 559 |
{\#125}) |
| 560 |
\item Only alphabetic characters are affected by |\MakeLowercase|, so |
| 561 |
numerals and punctuation remain at full height. This can spoil some of the |
| 562 |
aesthetic benefits of |allsmallcaps|. (See |
| 563 |
\href{https://github.com/matze/mtheme/issues/33}{\#33}) |
| 564 |
\item |\MakeLowercase| and |\MakeUppercase| apply to math mode and |
| 565 |
|\scshape| does not. This can easily introduce mathematical errors that |
| 566 |
are hard to catch. |
| 567 |
\item It is impossible to typeset symbols which are encoded as uppercase |
| 568 |
letters in a different font. In particular, |\mathbb| and |\mathcal| |
| 569 |
letters will be replaced by other math glyphs. (See |
| 570 |
\href{https://github.com/matze/mtheme/issues/153}{\#153}) |
| 571 |
\end{itemize} |
| 572 |
|
| 573 |
The |allsmallcaps| and |allcaps| options are safe to use if your titles contain |
| 574 |
only alphabetic characters and do not require the expansion of any macros. |
| 575 |
|
| 576 |
|
| 577 |
\subsection{Interactions with other color themes} |
| 578 |
|
| 579 |
\themename can be used along with any other Beamer color theme, such as |
| 580 |
|crane| or |seahorse|. If you wish to do this, it is usually best to include |
| 581 |
the \themename subpackages individually so the \themename color theme is |
| 582 |
never loaded. This will prevent conflicts between the \themename color theme |
| 583 |
and your preferred theme. |
| 584 |
|
| 585 |
For example, overriding the color theme as follows may not work as expected because |\usetheme{metropolis}| loads the \themename color theme, which |
| 586 |
defines a relationship between the frametitle background and the primary |
| 587 |
palette of the theme. Since |seahorse| assumes a different relationship |
| 588 |
between its palettes, the result is a grey, rather than periwinkle, |
| 589 |
frametitle background. |
| 590 |
|
| 591 |
\begin{lstlisting} |
| 592 |
\usetheme{metropolis} |
| 593 |
\usecolortheme{seahorse} |
| 594 |
\end{lstlisting} |
| 595 |
|
| 596 |
The correct colors are chosen if the \themename outer, inner, and font themes |
| 597 |
are loaded seperately: |
| 598 |
|
| 599 |
\begin{lstlisting} |
| 600 |
\useoutertheme{metropolis} |
| 601 |
\useinnertheme{metropolis} |
| 602 |
\usefonttheme{metropolis} |
| 603 |
\usecolortheme{seahorse} % or your preferred color theme |
| 604 |
\end{lstlisting} |
| 605 |
|
| 606 |
Please note that \themename may not use all the colors defined in your |
| 607 |
favourite Beamer color theme. In particular, \themename does not set a |
| 608 |
background color for the title; this will cause issues when using color themes |
| 609 |
like |whale| which set a white foreground for the title. |
| 610 |
|
| 611 |
|
| 612 |
\subsection{Notes on second screen} |
| 613 |
|
| 614 |
If you use the |[show notes on second screen]| option built in to Beamer and |
| 615 |
compile with \XeLaTeX, text on slides following the first section slide may |
| 616 |
be rendered in white instead of the regular colour. This is due to |
| 617 |
\href{http://tex.stackexchange.com/questions/288408/}{a bug} in Beamer |
| 618 |
or \XeLaTeX\ itself. You can work around it either by compiling with \LuaTeX\ |
| 619 |
or by adding the following code to your preamble to reset the text color |
| 620 |
on each slide. |
| 621 |
|
| 622 |
\begin{lstlisting} |
| 623 |
\makeatletter |
| 624 |
\def\beamer@framenotesbegin{% at beginning of slide |
| 625 |
\usebeamercolor[fg]{normal text} |
| 626 |
\gdef\beamer@noteitems{}% |
| 627 |
\gdef\beamer@notes{}% |
| 628 |
} |
| 629 |
\makeatother |
| 630 |
\end{lstlisting} |
| 631 |
|
| 632 |
|
| 633 |
\subsection{Standout frames with labels} |
| 634 |
|
| 635 |
Because the |standout| frame option creates a group to restrict the colour |
| 636 |
change to a single slide, labels defined after calling |standout| will stay |
| 637 |
local to the group. In other words, the following may result in a ``label undefined'' error. |
| 638 |
|
| 639 |
\begin{lstlisting} |
| 640 |
\begin{frame}[standout, label=conclusion]{Conclusion} |
| 641 |
Awesome slide |
| 642 |
\end{frame} |
| 643 |
\end{lstlisting} |
| 644 |
|
| 645 |
To fix this problem, change the order of the keys in the frame. |
| 646 |
|
| 647 |
\begin{lstlisting} |
| 648 |
\begin{frame}[label=conclusion, standout]{Conclusion} |
| 649 |
Awesome slide |
| 650 |
\end{frame} |
| 651 |
\end{lstlisting} |
| 652 |
|
| 653 |
This error can be unwittingly triggered if you export your slides from Emacs |
| 654 |
Org mode, which automatically adds labels after frame options. Alex Branham |
| 655 |
\href{https://github.com/matze/mtheme/issues/203}{offers} the following |
| 656 |
solution for Org mode users, using |org-set-property|. |
| 657 |
|
| 658 |
\begin{lstlisting} |
| 659 |
* Start of a frame |
| 660 |
:PROPERTIES: |
| 661 |
:BEAMER_opt: label=conclusion,standout |
| 662 |
:END: |
| 663 |
\end{lstlisting} |
| 664 |
|
| 665 |
|
| 666 |
\subsection{Standout frames with Pandoc} |
| 667 |
|
| 668 |
With Pandoc versions prior 1.17.2 it was not possible to create standout frames |
| 669 |
because Pandoc only supported a specific list of frame attributes thus ignoring |
| 670 |
additional attributes such as |{.standout}|. |
| 671 |
|
| 672 |
|
| 673 |
\section{License} |
| 674 |
|
| 675 |
\themename is licensed under a |
| 676 |
\href{http://creativecommons.org/licenses/by-sa/4.0/}{Creative Commons |
| 677 |
Attribution-ShareAlike 4.0 International License}. |
| 678 |
This means that if you change the theme and re-distribute it, you must retain |
| 679 |
the copyright notice header and license it under the same CC-BY-SA license. |
| 680 |
This does not affect any presentations that you create with the theme. |
| 681 |
|
| 682 |
|
| 683 |
\section{Implementation} |
| 684 |
|
| 685 |
\DocInput{beamerthememetropolis.dtx} |
| 686 |
\DocInput{beamerinnerthememetropolis.dtx} |
| 687 |
\DocInput{beamerouterthememetropolis.dtx} |
| 688 |
\DocInput{beamerfontthememetropolis.dtx} |
| 689 |
\DocInput{beamercolorthememetropolis.dtx} |
| 690 |
\DocInput{pgfplotsthemetol.dtx} |
| 691 |
|
| 692 |
\end{document} |