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-22 17:10:05 +02:00
|
|
|
%
|
2015-06-16 08:13:19 +02:00
|
|
|
% https://github.com/matze/mtheme/graphs/contributors
|
2014-09-22 17:10:05 +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
|
|
|
|
%<*package>
|
2015-06-16 09:00:53 +02:00
|
|
|
\NeedsTeXFormat{LaTeX2e}
|
2017-01-23 12:55:26 +01:00
|
|
|
\ProvidesPackage{beamercolorthememetropolis}[2017/01/23 Metropolis color theme]
|
2015-06-14 20:11:54 +02:00
|
|
|
%</package>
|
|
|
|
% \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 color theme}
|
2015-06-22 23:43:52 +02:00
|
|
|
%
|
2016-02-07 07:26:41 +01:00
|
|
|
%
|
|
|
|
%
|
|
|
|
% \subsubsection{Package dependencies}
|
2015-06-22 23:43:52 +02:00
|
|
|
% \begin{macrocode}
|
|
|
|
\RequirePackage{pgfopts}
|
|
|
|
% \end{macrocode}
|
2015-06-14 20:11:54 +02:00
|
|
|
%
|
|
|
|
%
|
2015-06-15 13:44:06 +02:00
|
|
|
%
|
2015-06-23 14:35:04 +02:00
|
|
|
% \subsubsection{Options}
|
2015-06-22 23:43:52 +02:00
|
|
|
%
|
|
|
|
% \begin{macro}{block}
|
2016-02-22 06:53:09 +01:00
|
|
|
% Optionally adds a light grey background to block environments like
|
|
|
|
% |theorem| and |example|.
|
2015-06-15 13:44:06 +02:00
|
|
|
% \begin{macrocode}
|
2015-06-22 23:43:52 +02:00
|
|
|
\pgfkeys{
|
|
|
|
/metropolis/color/block/.cd,
|
|
|
|
.is choice,
|
2016-02-07 04:24:47 +01:00
|
|
|
transparent/.code=\metropolis@block@transparent,
|
|
|
|
fill/.code=\metropolis@block@fill,
|
2015-06-15 13:44:06 +02:00
|
|
|
}
|
|
|
|
% \end{macrocode}
|
2015-06-22 23:43:52 +02:00
|
|
|
% \end{macro}
|
2015-06-15 13:44:06 +02:00
|
|
|
%
|
2015-06-22 23:43:52 +02:00
|
|
|
% \begin{macro}{colors}
|
2016-02-07 07:26:41 +01:00
|
|
|
% Provides the option to have a dark background and light foreground instead
|
|
|
|
% of the reverse.
|
2015-06-22 23:43:52 +02:00
|
|
|
% \begin{macrocode}
|
|
|
|
\pgfkeys{
|
|
|
|
/metropolis/color/background/.cd,
|
|
|
|
.is choice,
|
2016-02-07 04:24:47 +01:00
|
|
|
dark/.code=\metropolis@colors@dark,
|
|
|
|
light/.code=\metropolis@colors@light,
|
2015-06-22 23:43:52 +02:00
|
|
|
}
|
|
|
|
% \end{macrocode}
|
|
|
|
% \end{macro}
|
2015-06-14 20:11:54 +02:00
|
|
|
%
|
2016-02-07 04:24:47 +01:00
|
|
|
% \begin{macro}{\metropolis@color@setdefaults}
|
2016-02-07 07:26:41 +01:00
|
|
|
% Sets default values for color theme options.
|
2015-06-14 20:11:54 +02:00
|
|
|
% \begin{macrocode}
|
2016-02-07 04:24:47 +01:00
|
|
|
\newcommand{\metropolis@color@setdefaults}{
|
2015-06-22 23:43:52 +02:00
|
|
|
\pgfkeys{/metropolis/color/.cd,
|
|
|
|
background=light,
|
|
|
|
block=transparent,
|
|
|
|
}
|
2015-01-29 05:13:06 +01:00
|
|
|
}
|
2015-06-14 20:11:54 +02:00
|
|
|
% \end{macrocode}
|
2015-06-22 23:43:52 +02:00
|
|
|
% \end{macro}
|
2015-06-10 09:42:12 +02:00
|
|
|
%
|
2015-06-22 07:24:49 +02:00
|
|
|
%
|
|
|
|
%
|
2015-06-23 14:35:04 +02:00
|
|
|
% \subsubsection{Base colors}
|
2015-06-10 09:42:12 +02:00
|
|
|
%
|
2015-06-14 20:11:54 +02:00
|
|
|
% \begin{macrocode}
|
2014-09-22 17:10:05 +02:00
|
|
|
\definecolor{mDarkBrown}{HTML}{604c38}
|
|
|
|
\definecolor{mDarkTeal}{HTML}{23373b}
|
|
|
|
\definecolor{mLightBrown}{HTML}{EB811B}
|
2015-06-10 17:32:27 +02:00
|
|
|
\definecolor{mLightGreen}{HTML}{14B03D}
|
2015-06-14 20:11:54 +02:00
|
|
|
% \end{macrocode}
|
2015-06-10 09:42:12 +02:00
|
|
|
%
|
2015-06-22 07:24:49 +02:00
|
|
|
%
|
|
|
|
%
|
2015-06-23 14:35:04 +02:00
|
|
|
% \subsubsection{Base styles}
|
2015-06-22 07:24:49 +02:00
|
|
|
%
|
2016-02-07 04:07:48 +01:00
|
|
|
% All colors in \themename are derived from the definitions of |normal text|,
|
|
|
|
% |alerted text|, and |example text|.
|
2015-06-10 09:42:12 +02:00
|
|
|
%
|
2015-06-14 20:11:54 +02:00
|
|
|
% \begin{macrocode}
|
2016-02-07 04:24:47 +01:00
|
|
|
\newcommand{\metropolis@colors@dark}{
|
2015-06-15 13:44:06 +02:00
|
|
|
\setbeamercolor{normal text}{%
|
|
|
|
fg=black!2,
|
|
|
|
bg=mDarkTeal
|
|
|
|
}
|
2016-09-17 18:09:36 +02:00
|
|
|
\usebeamercolor[fg]{normal text}
|
2015-06-22 23:43:52 +02:00
|
|
|
}
|
2016-02-07 04:24:47 +01:00
|
|
|
\newcommand{\metropolis@colors@light}{
|
2015-06-15 13:44:06 +02:00
|
|
|
\setbeamercolor{normal text}{%
|
|
|
|
fg=mDarkTeal,
|
|
|
|
bg=black!2
|
|
|
|
}
|
2015-06-22 23:43:52 +02:00
|
|
|
}
|
2015-06-10 09:42:12 +02:00
|
|
|
\setbeamercolor{alerted text}{%
|
|
|
|
fg=mLightBrown
|
|
|
|
}
|
2015-06-10 17:32:27 +02:00
|
|
|
\setbeamercolor{example text}{%
|
|
|
|
fg=mLightGreen
|
|
|
|
}
|
2015-06-14 20:11:54 +02:00
|
|
|
% \end{macrocode}
|
2015-06-11 00:01:00 +02:00
|
|
|
%
|
|
|
|
%
|
2015-06-22 07:24:49 +02:00
|
|
|
%
|
2015-06-23 14:35:04 +02:00
|
|
|
% \subsubsection{Derived colors}
|
2015-06-22 07:24:49 +02:00
|
|
|
%
|
|
|
|
% The titles and structural elements (e.g. |itemize| bullets) are set in the
|
|
|
|
% same color as |normal text|. This would ideally done by setting |normal text|
|
|
|
|
% as a parent style, which we do to set |titlelike|, but this doesn't work for
|
|
|
|
% |structure| as its foreground is set explicitly in
|
|
|
|
% |beamercolorthemedefault.sty|.
|
2015-06-14 20:11:54 +02:00
|
|
|
%
|
|
|
|
% \begin{macrocode}
|
2015-09-27 17:44:47 +02:00
|
|
|
\setbeamercolor{titlelike}{use=normal text, parent=normal text}
|
|
|
|
\setbeamercolor{author}{use=normal text, parent=normal text}
|
2015-09-28 03:25:30 +02:00
|
|
|
\setbeamercolor{date}{use=normal text, parent=normal text}
|
2015-09-27 17:44:47 +02:00
|
|
|
\setbeamercolor{institute}{use=normal text, parent=normal text}
|
|
|
|
\setbeamercolor{structure}{use=normal text, fg=normal text.fg}
|
2015-06-14 20:11:54 +02:00
|
|
|
% \end{macrocode}
|
|
|
|
%
|
|
|
|
% The “primary” palette should be used for the most important navigational
|
2016-02-07 04:07:48 +01:00
|
|
|
% elements, and possibly of other elements. \themename uses it for frame
|
|
|
|
% titles and slides.
|
2015-06-14 20:11:54 +02:00
|
|
|
%
|
|
|
|
% \begin{macrocode}
|
2015-06-10 17:32:27 +02:00
|
|
|
\setbeamercolor{palette primary}{%
|
|
|
|
use=normal text,
|
|
|
|
fg=normal text.bg,
|
|
|
|
bg=normal text.fg
|
2015-06-10 09:42:12 +02:00
|
|
|
}
|
2015-06-22 07:24:49 +02:00
|
|
|
\setbeamercolor{frametitle}{%
|
|
|
|
use=palette primary,
|
|
|
|
parent=palette primary
|
|
|
|
}
|
2015-06-14 20:11:54 +02:00
|
|
|
% \end{macrocode}
|
|
|
|
%
|
2016-02-07 04:07:48 +01:00
|
|
|
% The \themename inner or outer themes optionally display progress
|
2015-06-22 07:24:49 +02:00
|
|
|
% bars in various locations. Their color is set by |progress bar| but the two
|
2015-06-22 23:43:52 +02:00
|
|
|
% different kinds can be customized separately. The horizontal rule on the
|
|
|
|
% title page is also set based on the progress bar color and can be customized
|
|
|
|
% with |title separator|.
|
2015-06-14 20:11:54 +02:00
|
|
|
%
|
|
|
|
% \begin{macrocode}
|
2015-06-22 07:24:49 +02:00
|
|
|
\setbeamercolor{progress bar}{%
|
|
|
|
use=alerted text,
|
|
|
|
fg=alerted text.fg,
|
2015-12-03 13:49:46 +01:00
|
|
|
bg=alerted text.fg!50!black!30
|
2015-06-22 07:24:49 +02:00
|
|
|
}
|
2015-06-18 09:23:33 +02:00
|
|
|
\setbeamercolor{title separator}{
|
|
|
|
use=progress bar,
|
|
|
|
parent=progress bar
|
|
|
|
}
|
|
|
|
\setbeamercolor{progress bar in head/foot}{%
|
|
|
|
use=progress bar,
|
|
|
|
parent=progress bar
|
|
|
|
}
|
|
|
|
\setbeamercolor{progress bar in section page}{
|
|
|
|
use=progress bar,
|
|
|
|
parent=progress bar
|
|
|
|
}
|
2015-06-14 20:11:54 +02:00
|
|
|
% \end{macrocode}
|
|
|
|
%
|
2016-02-22 06:53:09 +01:00
|
|
|
% Block environments such as |theorem| and |example| have no background color
|
|
|
|
% by default. The option |block=fill| sets a background color based on the
|
|
|
|
% background and foreground of |normal text|. The option |block=transparent|
|
|
|
|
% reverts the block environments to an empty background, which can be useful
|
|
|
|
% if changing colors mid-presentation.
|
2015-06-14 20:11:54 +02:00
|
|
|
%
|
|
|
|
% \begin{macrocode}
|
2016-02-07 04:24:47 +01:00
|
|
|
\newcommand{\metropolis@block@transparent}{
|
2016-02-22 06:53:09 +01:00
|
|
|
\setbeamercolor{block title}{%
|
|
|
|
use=normal text,
|
|
|
|
fg=normal text.fg,
|
|
|
|
bg=
|
|
|
|
}
|
|
|
|
\setbeamercolor{block body}{
|
|
|
|
bg=
|
|
|
|
}
|
2015-06-22 23:43:52 +02:00
|
|
|
}
|
2016-02-07 04:24:47 +01:00
|
|
|
\newcommand{\metropolis@block@fill}{
|
2015-06-10 09:42:12 +02:00
|
|
|
\setbeamercolor{block title}{%
|
|
|
|
use=normal text,
|
|
|
|
fg=normal text.fg,
|
|
|
|
bg=normal text.bg!80!fg
|
|
|
|
}
|
2016-02-22 06:53:09 +01:00
|
|
|
\setbeamercolor{block body}{
|
|
|
|
use={block title, normal text},
|
|
|
|
bg=block title.bg!50!normal text.bg
|
|
|
|
}
|
2015-06-22 23:43:52 +02:00
|
|
|
}
|
2015-06-10 09:42:12 +02:00
|
|
|
\setbeamercolor{block title alerted}{%
|
|
|
|
use={block title, alerted text},
|
|
|
|
bg=block title.bg,
|
|
|
|
fg=alerted text.fg
|
|
|
|
}
|
|
|
|
\setbeamercolor{block title example}{%
|
|
|
|
use={block title, example text},
|
|
|
|
bg=block title.bg,
|
|
|
|
fg=example text.fg
|
|
|
|
}
|
2015-06-11 00:01:00 +02:00
|
|
|
\setbeamercolor{block body alerted}{use=block body, parent=block body}
|
|
|
|
\setbeamercolor{block body example}{use=block body, parent=block body}
|
2015-06-14 20:11:54 +02:00
|
|
|
% \end{macrocode}
|
|
|
|
%
|
2015-06-11 00:01:00 +02:00
|
|
|
% Footnotes
|
2015-06-14 20:11:54 +02:00
|
|
|
%
|
|
|
|
% \begin{macrocode}
|
2015-06-11 00:01:00 +02:00
|
|
|
\setbeamercolor{footnote}{fg=normal text.fg!90}
|
|
|
|
\setbeamercolor{footnote mark}{fg=.}
|
2015-06-14 20:11:54 +02:00
|
|
|
% \end{macrocode}
|
2015-06-22 07:24:49 +02:00
|
|
|
%
|
2017-09-26 16:36:41 +02:00
|
|
|
% We also reset the bibliography colors in order to pick up the surrounding
|
|
|
|
% colors at the time of use. This prevents us having to set the correct color in
|
|
|
|
% normal and standout mode.
|
|
|
|
%
|
|
|
|
% \begin{macrocode}
|
|
|
|
\setbeamercolor{bibliography entry author}{fg=, bg=}
|
|
|
|
\setbeamercolor{bibliography entry title}{fg=, bg=}
|
|
|
|
\setbeamercolor{bibliography entry location}{fg=, bg=}
|
|
|
|
\setbeamercolor{bibliography entry note}{fg=, bg=}
|
|
|
|
% \end{macrocode}
|
|
|
|
%
|
2016-02-22 07:41:46 +01:00
|
|
|
%
|
|
|
|
%
|
|
|
|
% \subsubsection{Process package options}
|
2015-06-22 07:24:49 +02:00
|
|
|
%
|
2015-06-22 23:43:52 +02:00
|
|
|
% \begin{macrocode}
|
2016-02-07 04:24:47 +01:00
|
|
|
\metropolis@color@setdefaults
|
2015-06-22 23:43:52 +02:00
|
|
|
\ProcessPgfPackageOptions{/metropolis/color}
|
|
|
|
% \end{macrocode}
|
|
|
|
%
|
|
|
|
% \begin{macrocode}
|
|
|
|
\mode<all>
|
|
|
|
% \end{macrocode}
|
2015-06-14 20:11:54 +02:00
|
|
|
%
|
|
|
|
% \iffalse
|
|
|
|
%</package>
|
|
|
|
% \fi
|
|
|
|
% \Finale
|
|
|
|
\endinput
|