2015-06-16 08:13:19 +02:00
|
|
|
% \iffalse meta-comment -------------------------------------------------------
|
|
|
|
% Copyright 2015 Matthias Vogelgesang and the LaTeX community. A full list of
|
|
|
|
% contributors can be found at
|
2014-09-19 22:52:31 +02:00
|
|
|
%
|
2015-06-16 08:13:19 +02:00
|
|
|
% https://github.com/matze/mtheme/graphs/contributors
|
2014-09-19 22:52:31 +02:00
|
|
|
%
|
2015-06-16 08:13:19 +02:00
|
|
|
% and the original template was based on the HSRM theme by Benjamin Weiss.
|
2015-06-14 20:11:54 +02:00
|
|
|
%
|
2015-06-16 08:13:19 +02:00
|
|
|
% This work is licensed under a Creative Commons Attribution-ShareAlike 4.0
|
|
|
|
% International License (https://creativecommons.org/licenses/by-sa/4.0/).
|
|
|
|
% ------------------------------------------------------------------------- \fi
|
2015-06-14 20:11:54 +02:00
|
|
|
% \iffalse
|
2015-11-20 09:31:58 +01:00
|
|
|
%<driver> \ProvidesFile{beamerthememetropolis.dtx}
|
2015-06-14 20:11:54 +02:00
|
|
|
%<*package>
|
2015-06-16 09:00:53 +02:00
|
|
|
\NeedsTeXFormat{LaTeX2e}
|
2016-03-03 09:43:32 +01:00
|
|
|
\ProvidesPackage{beamerthememetropolis}
|
|
|
|
[2016/02/21 v1.1 Metropolis Beamer theme]
|
2015-06-14 20:11:54 +02:00
|
|
|
%</package>
|
2015-06-16 09:00:53 +02:00
|
|
|
%<driver> \documentclass{ltxdoc}
|
2015-11-20 09:31:58 +01:00
|
|
|
%<driver> \usepackage{beamerthememetropolis}
|
2015-06-16 09:00:53 +02:00
|
|
|
%<driver> \begin{document}
|
2015-11-20 09:31:58 +01:00
|
|
|
%<driver> \DocInput{beamerthememetropolis.dtx}
|
2015-06-16 09:00:53 +02:00
|
|
|
%<driver> \end{document}
|
2015-06-14 20:11:54 +02:00
|
|
|
% \fi
|
|
|
|
% \CheckSum{0}
|
|
|
|
% \StopEventually{}
|
|
|
|
% \iffalse
|
|
|
|
%<*package>
|
2015-06-16 09:00:53 +02:00
|
|
|
% ------------------------------------------------------------------------- \fi
|
2015-06-22 23:43:52 +02:00
|
|
|
%
|
2016-02-07 04:07:48 +01:00
|
|
|
% \subsection{\themename parent theme}
|
2015-06-16 09:00:53 +02:00
|
|
|
%
|
2015-06-22 07:24:49 +02:00
|
|
|
% The primary job of this package is to load the component sub-packages of the
|
2016-02-07 04:07:48 +01:00
|
|
|
% \themename theme and route the theme options accordingly. It also
|
2015-06-22 07:24:49 +02:00
|
|
|
% provides some custom commands and environments for the user.
|
2015-06-14 20:11:54 +02:00
|
|
|
%
|
2016-02-07 07:26:41 +01:00
|
|
|
%
|
|
|
|
%
|
|
|
|
% \subsubsection{Package dependencies}
|
|
|
|
%
|
2015-06-14 20:11:54 +02:00
|
|
|
% \begin{macrocode}
|
2015-06-22 23:43:52 +02:00
|
|
|
\RequirePackage{etoolbox}
|
|
|
|
\RequirePackage{pgfopts}
|
2015-06-14 20:11:54 +02:00
|
|
|
% \end{macrocode}
|
|
|
|
%
|
|
|
|
%
|
|
|
|
%
|
2016-02-07 07:26:41 +01:00
|
|
|
% \subsubsection{Options}
|
|
|
|
%
|
|
|
|
% Most options are passed off to the component sub-packages.
|
2015-06-14 20:11:54 +02:00
|
|
|
%
|
|
|
|
% \begin{macrocode}
|
2015-06-22 23:43:52 +02:00
|
|
|
\pgfkeys{/metropolis/.cd,
|
|
|
|
.search also={
|
|
|
|
/metropolis/inner,
|
|
|
|
/metropolis/outer,
|
|
|
|
/metropolis/color,
|
2016-02-07 05:43:18 +01:00
|
|
|
/metropolis/font,
|
2016-02-22 06:53:09 +01:00
|
|
|
}
|
2015-06-06 09:41:09 +02:00
|
|
|
}
|
2015-06-14 20:11:54 +02:00
|
|
|
% \end{macrocode}
|
|
|
|
%
|
2016-02-08 18:25:06 +01:00
|
|
|
% \begin{macro}{titleformat plain}
|
2016-02-07 07:26:41 +01:00
|
|
|
% Controls the formatting of the text on standout ``plain'' frames.
|
2015-06-23 14:35:04 +02:00
|
|
|
% \begin{macrocode}
|
|
|
|
\pgfkeys{
|
2016-02-08 18:25:06 +01:00
|
|
|
/metropolis/titleformat plain/.cd,
|
2015-06-23 14:35:04 +02:00
|
|
|
.is choice,
|
2015-12-03 20:53:25 +01:00
|
|
|
regular/.code={%
|
2016-02-07 04:24:47 +01:00
|
|
|
\let\metropolis@plaintitleformat\@empty%
|
2015-12-03 20:53:25 +01:00
|
|
|
\setbeamerfont{plain title}{shape=\normalfont}%
|
2015-06-23 14:35:04 +02:00
|
|
|
},
|
2015-12-03 20:53:25 +01:00
|
|
|
smallcaps/.code={%
|
2016-02-07 04:24:47 +01:00
|
|
|
\let\metropolis@plaintitleformat\@empty%
|
2015-12-03 20:53:25 +01:00
|
|
|
\setbeamerfont{plain title}{shape=\scshape}%
|
|
|
|
},
|
|
|
|
allsmallcaps/.code={%
|
2016-02-07 04:24:47 +01:00
|
|
|
\let\metropolis@plaintitleformat\MakeLowercase%
|
2015-12-03 20:53:25 +01:00
|
|
|
\setbeamerfont{plain title}{shape=\scshape}%
|
|
|
|
\PackageWarning{beamerthememetropolis}{%
|
2016-02-08 18:25:06 +01:00
|
|
|
Be aware that titleformat plain=allsmallcaps can lead to problems%
|
2015-12-03 20:53:25 +01:00
|
|
|
}
|
|
|
|
},
|
|
|
|
allcaps/.code={%
|
2016-02-07 04:24:47 +01:00
|
|
|
\let\metropolis@plaintitleformat\MakeUppercase%
|
2015-12-03 20:53:25 +01:00
|
|
|
\setbeamerfont{plain title}{shape=\normalfont}%
|
|
|
|
\PackageWarning{beamerthememetropolis}{%
|
2016-02-08 18:25:06 +01:00
|
|
|
Be aware that titleformat plain=allcaps can lead to problems%
|
2015-12-03 20:53:25 +01:00
|
|
|
}
|
2015-06-23 14:35:04 +02:00
|
|
|
},
|
|
|
|
}
|
|
|
|
% \end{macrocode}
|
|
|
|
% \end{macro}
|
|
|
|
%
|
2015-12-03 20:53:25 +01:00
|
|
|
% \begin{macro}{titleformat}
|
2016-02-07 07:26:41 +01:00
|
|
|
% Sets a standard format for titles, subtitles, section titles, frame
|
|
|
|
% titles, and the text on standout ``plain'' frames.
|
2015-06-23 14:35:04 +02:00
|
|
|
% \begin{macrocode}
|
|
|
|
\pgfkeys{
|
2015-12-03 20:53:25 +01:00
|
|
|
/metropolis/titleformat/.code=\pgfkeysalso{
|
2016-02-08 18:25:06 +01:00
|
|
|
font/titleformat title=#1,
|
|
|
|
font/titleformat subtitle=#1,
|
|
|
|
font/titleformat section=#1,
|
|
|
|
font/titleformat frame=#1,
|
|
|
|
titleformat plain=#1,
|
2015-06-23 14:35:04 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
% \end{macrocode}
|
|
|
|
% \end{macro}
|
|
|
|
%
|
2015-06-22 23:43:52 +02:00
|
|
|
% For backwards compatibility with earlier betas of the theme, we implement
|
|
|
|
% deprecated option names as aliases to the corresponding |key=value| options.
|
2015-06-14 20:11:54 +02:00
|
|
|
%
|
|
|
|
% \begin{macrocode}
|
2015-06-22 23:43:52 +02:00
|
|
|
\pgfkeys{/metropolis/.cd,
|
2015-06-30 00:00:14 +02:00
|
|
|
usetitleprogressbar/.code=\pgfkeysalso{outer/progressbar=frametitle},
|
2015-06-22 23:43:52 +02:00
|
|
|
noslidenumbers/.code=\pgfkeysalso{outer/numbering=none},
|
|
|
|
usetotalslideindicator/.code=\pgfkeysalso{outer/numbering=fraction},
|
|
|
|
nosectionslide/.code=\pgfkeysalso{inner/sectionpage=none},
|
|
|
|
darkcolors/.code=\pgfkeysalso{color/background=dark},
|
|
|
|
blockbg/.code=\pgfkeysalso{color/block=fill, inner/block=fill},
|
2015-01-29 23:18:55 +01:00
|
|
|
}
|
2015-06-14 20:11:54 +02:00
|
|
|
% \end{macrocode}
|
|
|
|
%
|
2015-06-22 23:43:52 +02:00
|
|
|
% Set default values for options.
|
2015-06-15 13:44:06 +02:00
|
|
|
%
|
|
|
|
% \begin{macrocode}
|
2016-02-07 04:24:47 +01:00
|
|
|
\newcommand{\metropolis@setdefaults}{
|
2015-06-22 23:43:52 +02:00
|
|
|
\pgfkeys{/metropolis/.cd,
|
2016-02-08 18:25:06 +01:00
|
|
|
titleformat plain=regular,
|
2015-06-22 23:43:52 +02:00
|
|
|
}
|
2015-06-15 13:44:06 +02:00
|
|
|
}
|
|
|
|
% \end{macrocode}
|
|
|
|
%
|
2015-06-14 20:11:54 +02:00
|
|
|
%
|
|
|
|
%
|
2015-06-23 14:35:04 +02:00
|
|
|
% \subsubsection{Component sub-packages}
|
2015-06-14 20:11:54 +02:00
|
|
|
%
|
2015-06-22 07:24:49 +02:00
|
|
|
% Having processed the options, we can now load the component sub-packages of
|
|
|
|
% the theme.
|
2016-02-07 07:26:41 +01:00
|
|
|
%
|
2015-06-14 20:11:54 +02:00
|
|
|
% \begin{macrocode}
|
2015-06-22 07:24:49 +02:00
|
|
|
\useinnertheme{metropolis}
|
|
|
|
\useoutertheme{metropolis}
|
|
|
|
\usecolortheme{metropolis}
|
2015-10-24 20:00:48 +02:00
|
|
|
\usefonttheme{metropolis}
|
2015-06-22 07:24:49 +02:00
|
|
|
% \end{macrocode}
|
|
|
|
%
|
|
|
|
% The |tol| theme for |pgfplots| is only loaded if |pgfplots| is used.
|
|
|
|
%
|
|
|
|
% \begin{macrocode}
|
2015-06-17 08:05:14 +02:00
|
|
|
\AtEndPreamble{%
|
|
|
|
\@ifpackageloaded{pgfplots}{%
|
|
|
|
\RequirePackage{pgfplotsthemetol}
|
|
|
|
}{}
|
|
|
|
}
|
2015-06-14 20:11:54 +02:00
|
|
|
% \end{macrocode}
|
|
|
|
%
|
2015-06-22 23:43:52 +02:00
|
|
|
%
|
|
|
|
%
|
2015-06-23 14:35:04 +02:00
|
|
|
% \subsubsection{Custom commands}
|
2015-06-22 07:24:49 +02:00
|
|
|
%
|
2016-02-07 07:26:41 +01:00
|
|
|
% The parent theme defines custom commands as their proper usage may depend
|
2015-06-22 16:38:26 +02:00
|
|
|
% on multiple sub-packages.
|
|
|
|
%
|
2016-02-07 07:26:41 +01:00
|
|
|
% \begin{macro}{\metroset}
|
|
|
|
% Allows the user to change options midway through a presentation.
|
|
|
|
% \begin{macrocode}
|
|
|
|
\newcommand{\metroset}[1]{\pgfkeys{/metropolis/.cd,#1}}
|
|
|
|
% \end{macrocode}
|
|
|
|
% \end{macro}
|
2015-06-14 20:11:54 +02:00
|
|
|
%
|
|
|
|
% \begin{macro}{\plain}
|
2015-06-22 07:24:49 +02:00
|
|
|
% Creates a plain frame with dark background, suitable for displaying images
|
2016-02-07 07:26:41 +01:00
|
|
|
% or a few words. The format of the text can be set with the
|
|
|
|
% |titleformat plain| option.
|
2015-06-14 20:11:54 +02:00
|
|
|
% \begin{macrocode}
|
2016-02-07 04:24:47 +01:00
|
|
|
\def\metropolis@plaintitleformat#1{#1}
|
2014-10-09 15:10:47 +02:00
|
|
|
\newcommand{\plain}[2][]{%
|
2014-08-28 16:05:03 +02:00
|
|
|
\begingroup
|
2016-02-22 06:57:37 +01:00
|
|
|
\ifbeamercolorempty[bg]{palette primary}{
|
|
|
|
\setbeamercolor{background canvas}{
|
|
|
|
use=palette primary,
|
|
|
|
bg=-palette primary.fg
|
|
|
|
}
|
|
|
|
}{
|
|
|
|
\setbeamercolor{background canvas}{
|
|
|
|
use=palette primary,
|
|
|
|
bg=palette primary.bg
|
|
|
|
}
|
2015-06-23 09:13:46 +02:00
|
|
|
}
|
2016-02-23 07:48:01 +01:00
|
|
|
\begin{frame}[c,noframenumbering]{#1}
|
2015-07-17 08:59:03 +02:00
|
|
|
\begin{center}
|
|
|
|
\usebeamercolor[fg]{palette primary}
|
2015-12-03 20:53:25 +01:00
|
|
|
\usebeamerfont{plain title}
|
2016-02-07 04:24:47 +01:00
|
|
|
\metropolis@plaintitleformat{#2}
|
2015-07-17 08:59:03 +02:00
|
|
|
\end{center}
|
2015-06-10 09:42:12 +02:00
|
|
|
\end{frame}
|
2014-08-28 16:05:03 +02:00
|
|
|
\endgroup
|
|
|
|
}
|
2015-06-14 20:11:54 +02:00
|
|
|
% \end{macrocode}
|
|
|
|
% \end{macro}
|
|
|
|
%
|
|
|
|
% \begin{macro}{\mreducelistspacing}
|
|
|
|
% \begin{macrocode}
|
2014-10-27 14:40:44 +01:00
|
|
|
\newcommand{\mreducelistspacing}{\vspace{-\topsep}}
|
2015-06-14 20:11:54 +02:00
|
|
|
% \end{macrocode}
|
|
|
|
% \end{macro}
|
|
|
|
%
|
2016-02-07 07:26:41 +01:00
|
|
|
%
|
|
|
|
%
|
|
|
|
% \subsubsection{Process package options}
|
2015-06-22 23:43:52 +02:00
|
|
|
%
|
|
|
|
% \begin{macrocode}
|
2016-02-07 04:24:47 +01:00
|
|
|
\metropolis@setdefaults
|
2015-06-22 23:43:52 +02:00
|
|
|
\ProcessPgfOptions{/metropolis}
|
|
|
|
% \end{macrocode}
|
|
|
|
%
|
2015-06-14 20:11:54 +02:00
|
|
|
% \iffalse
|
|
|
|
%</package>
|
|
|
|
% \fi
|
|
|
|
% \Finale
|
|
|
|
\endinput
|