summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/beamertheme-metropolis/beamercolorthememetropolis.dtx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-12-05 23:05:44 +0000
committerKarl Berry <karl@freefriends.org>2015-12-05 23:05:44 +0000
commit85ee8c199f2c14ef10dd75bd71157faa5cb51bf6 (patch)
tree4aa56eb66743945fdf28f15849d291743f359aee /Master/texmf-dist/source/latex/beamertheme-metropolis/beamercolorthememetropolis.dtx
parent5384f92b5a44dd9e84f1bab69420edf32e99c696 (diff)
beamertheme-metropolis (6dec15)
git-svn-id: svn://tug.org/texlive/trunk@39020 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/beamertheme-metropolis/beamercolorthememetropolis.dtx')
-rw-r--r--Master/texmf-dist/source/latex/beamertheme-metropolis/beamercolorthememetropolis.dtx230
1 files changed, 230 insertions, 0 deletions
diff --git a/Master/texmf-dist/source/latex/beamertheme-metropolis/beamercolorthememetropolis.dtx b/Master/texmf-dist/source/latex/beamertheme-metropolis/beamercolorthememetropolis.dtx
new file mode 100644
index 00000000000..1d5f50e2534
--- /dev/null
+++ b/Master/texmf-dist/source/latex/beamertheme-metropolis/beamercolorthememetropolis.dtx
@@ -0,0 +1,230 @@
+% \iffalse meta-comment -------------------------------------------------------
+% Copyright 2015 Matthias Vogelgesang and the LaTeX community. A full list of
+% contributors can be found at
+%
+% https://github.com/matze/mtheme/graphs/contributors
+%
+% and the original template was based on the HSRM theme by Benjamin Weiss.
+%
+% This work is licensed under a Creative Commons Attribution-ShareAlike 4.0
+% International License (https://creativecommons.org/licenses/by-sa/4.0/).
+% ------------------------------------------------------------------------- \fi
+% \iffalse
+%<driver> \ProvidesFile{beamercolorthememetropolis.dtx}
+%<*package>
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{beamercolorthememetropolis}[2015/12/04 Metropolis color theme]
+%</package>
+%<driver> \documentclass{ltxdoc}
+%<driver> \usepackage{beamercolorthememetropolis}
+%<driver> \begin{document}
+%<driver> \DocInput{beamercolorthememetropolis.dtx}
+%<driver> \end{document}
+% \fi
+% \CheckSum{0}
+% \StopEventually{}
+% \iffalse
+%<*package>
+% ------------------------------------------------------------------------- \fi
+%
+% \subsection{\textsc{metropolis} color theme}
+%
+% Load required packages.
+% \begin{macrocode}
+\RequirePackage{pgfopts}
+% \end{macrocode}
+%
+%
+%
+% \subsubsection{Options}
+%
+% \begin{macro}{block}
+% This option controls whether the blocks are filled or transparent.
+% \begin{macrocode}
+\pgfkeys{
+ /metropolis/color/block/.cd,
+ .is choice,
+ transparent/.code=\@metropolis@block@transparent,
+ fill/.code=\@metropolis@block@fill,
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{colors}
+% Defines whether the background shall be dark and the foreground be light or
+% vice versa
+% \begin{macrocode}
+\pgfkeys{
+ /metropolis/color/background/.cd,
+ .is choice,
+ dark/.code=\@metropolis@colors@dark,
+ light/.code=\@metropolis@colors@light,
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@metropolis@color@setdefaults}
+% Set default values for color theme options.
+% \begin{macrocode}
+\newcommand{\@metropolis@color@setdefaults}{
+ \pgfkeys{/metropolis/color/.cd,
+ background=light,
+ block=transparent,
+ }
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \subsubsection{Base colors}
+%
+% \begin{macrocode}
+\definecolor{mDarkBrown}{HTML}{604c38}
+\definecolor{mDarkTeal}{HTML}{23373b}
+\definecolor{mLightBrown}{HTML}{EB811B}
+\definecolor{mLightGreen}{HTML}{14B03D}
+% \end{macrocode}
+%
+%
+%
+% \subsubsection{Base styles}
+%
+% All colors in the \textsc{metropolis} theme are derived from the definitions
+% of |normal text|, |alerted text|, and |example text|.
+%
+% \begin{macrocode}
+\newcommand{\@metropolis@colors@dark}{
+ \setbeamercolor{normal text}{%
+ fg=black!2,
+ bg=mDarkTeal
+ }
+}
+\newcommand{\@metropolis@colors@light}{
+ \setbeamercolor{normal text}{%
+ fg=mDarkTeal,
+ bg=black!2
+ }
+}
+\setbeamercolor{alerted text}{%
+ fg=mLightBrown
+}
+\setbeamercolor{example text}{%
+ fg=mLightGreen
+}
+% \end{macrocode}
+%
+%
+%
+% \subsubsection{Derived colors}
+%
+% 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|.
+%
+% \begin{macrocode}
+\setbeamercolor{titlelike}{use=normal text, parent=normal text}
+\setbeamercolor{author}{use=normal text, parent=normal text}
+\setbeamercolor{date}{use=normal text, parent=normal text}
+\setbeamercolor{institute}{use=normal text, parent=normal text}
+\setbeamercolor{structure}{use=normal text, fg=normal text.fg}
+% \end{macrocode}
+%
+% The “primary” palette should be used for the most important navigational
+% elements, and possibly of other elements. The \textsc{metropolis} theme uses
+% it for frame titles and slides.
+%
+% \begin{macrocode}
+\setbeamercolor{palette primary}{%
+ use=normal text,
+ fg=normal text.bg,
+ bg=normal text.fg
+}
+\setbeamercolor{frametitle}{%
+ use=palette primary,
+ parent=palette primary
+}
+% \end{macrocode}
+%
+% The \textsc{metropolis} inner or outer themes optionally display progress
+% bars in various locations. Their color is set by |progress bar| but the two
+% 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|.
+%
+% \begin{macrocode}
+\setbeamercolor{progress bar}{%
+ use=alerted text,
+ fg=alerted text.fg,
+ bg=alerted text.fg!50!black!30
+}
+\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
+}
+% \end{macrocode}
+%
+% Blocks
+%
+% \begin{macrocode}
+\newcommand{\@metropolis@block@transparent}{
+ \setbeamercolor{block title}{use=normal text, parent=normal text}
+}
+\newcommand{\@metropolis@block@fill}{
+ \setbeamercolor{block title}{%
+ use=normal text,
+ fg=normal text.fg,
+ bg=normal text.bg!80!fg
+ }
+}
+\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
+}
+\setbeamercolor{block body alerted}{use=block body, parent=block body}
+\setbeamercolor{block body example}{use=block body, parent=block body}
+\setbeamercolor{block body}{
+ use={block title, normal text},
+ bg=block title.bg!50!normal text.bg
+}
+% \end{macrocode}
+%
+% Footnotes
+%
+% \begin{macrocode}
+\setbeamercolor{footnote}{fg=normal text.fg!90}
+\setbeamercolor{footnote mark}{fg=.}
+% \end{macrocode}
+%
+% Process package options
+%
+% \begin{macrocode}
+\@metropolis@color@setdefaults
+\ProcessPgfPackageOptions{/metropolis/color}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\mode<all>
+% \end{macrocode}
+%
+% \iffalse
+%</package>
+% \fi
+% \Finale
+\endinput