diff options
author | Karl Berry <karl@freefriends.org> | 2016-03-14 21:25:03 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-03-14 21:25:03 +0000 |
commit | 1cdee1080e0ad8f88624629e00039d9fe89c1b54 (patch) | |
tree | de1ea75b810891ce5bc773022516edfab072ac77 /Master/texmf-dist/source/latex/beamertheme-metropolis/beamercolorthememetropolis.dtx | |
parent | ecc285a4a14716fefbfab61485038eb34dd32a5e (diff) |
beamertheme-metropolis (14mar16)
git-svn-id: svn://tug.org/texlive/trunk@40024 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.dtx | 82 |
1 files changed, 46 insertions, 36 deletions
diff --git a/Master/texmf-dist/source/latex/beamertheme-metropolis/beamercolorthememetropolis.dtx b/Master/texmf-dist/source/latex/beamertheme-metropolis/beamercolorthememetropolis.dtx index 1d5f50e2534..90ba7ef0459 100644 --- a/Master/texmf-dist/source/latex/beamertheme-metropolis/beamercolorthememetropolis.dtx +++ b/Master/texmf-dist/source/latex/beamertheme-metropolis/beamercolorthememetropolis.dtx @@ -10,16 +10,10 @@ % 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] +\ProvidesPackage{beamercolorthememetropolis}[2016/03/14 Metropolis color theme] %</package> -%<driver> \documentclass{ltxdoc} -%<driver> \usepackage{beamercolorthememetropolis} -%<driver> \begin{document} -%<driver> \DocInput{beamercolorthememetropolis.dtx} -%<driver> \end{document} % \fi % \CheckSum{0} % \StopEventually{} @@ -27,9 +21,11 @@ %<*package> % ------------------------------------------------------------------------- \fi % -% \subsection{\textsc{metropolis} color theme} +% \subsection{\themename color theme} % -% Load required packages. +% +% +% \subsubsection{Package dependencies} % \begin{macrocode} \RequirePackage{pgfopts} % \end{macrocode} @@ -39,34 +35,35 @@ % \subsubsection{Options} % % \begin{macro}{block} -% This option controls whether the blocks are filled or transparent. +% Optionally adds a light grey background to block environments like +% |theorem| and |example|. % \begin{macrocode} \pgfkeys{ /metropolis/color/block/.cd, .is choice, - transparent/.code=\@metropolis@block@transparent, - fill/.code=\@metropolis@block@fill, + 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 +% Provides the option to have a dark background and light foreground instead +% of the reverse. % \begin{macrocode} \pgfkeys{ /metropolis/color/background/.cd, .is choice, - dark/.code=\@metropolis@colors@dark, - light/.code=\@metropolis@colors@light, + 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{macro}{\metropolis@color@setdefaults} +% Sets default values for color theme options. % \begin{macrocode} -\newcommand{\@metropolis@color@setdefaults}{ +\newcommand{\metropolis@color@setdefaults}{ \pgfkeys{/metropolis/color/.cd, background=light, block=transparent, @@ -90,17 +87,17 @@ % % \subsubsection{Base styles} % -% All colors in the \textsc{metropolis} theme are derived from the definitions -% of |normal text|, |alerted text|, and |example text|. +% All colors in \themename are derived from the definitions of |normal text|, +% |alerted text|, and |example text|. % % \begin{macrocode} -\newcommand{\@metropolis@colors@dark}{ +\newcommand{\metropolis@colors@dark}{ \setbeamercolor{normal text}{% fg=black!2, bg=mDarkTeal } } -\newcommand{\@metropolis@colors@light}{ +\newcommand{\metropolis@colors@light}{ \setbeamercolor{normal text}{% fg=mDarkTeal, bg=black!2 @@ -133,8 +130,8 @@ % \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. +% elements, and possibly of other elements. \themename uses it for frame +% titles and slides. % % \begin{macrocode} \setbeamercolor{palette primary}{% @@ -148,7 +145,7 @@ } % \end{macrocode} % -% The \textsc{metropolis} inner or outer themes optionally display progress +% The \themename 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 @@ -174,18 +171,33 @@ } % \end{macrocode} % -% Blocks +% 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. % % \begin{macrocode} -\newcommand{\@metropolis@block@transparent}{ - \setbeamercolor{block title}{use=normal text, parent=normal text} +\newcommand{\metropolis@block@transparent}{ + \setbeamercolor{block title}{% + use=normal text, + fg=normal text.fg, + bg= + } + \setbeamercolor{block body}{ + bg= + } } -\newcommand{\@metropolis@block@fill}{ +\newcommand{\metropolis@block@fill}{ \setbeamercolor{block title}{% use=normal text, fg=normal text.fg, bg=normal text.bg!80!fg } + \setbeamercolor{block body}{ + use={block title, normal text}, + bg=block title.bg!50!normal text.bg + } } \setbeamercolor{block title alerted}{% use={block title, alerted text}, @@ -199,10 +211,6 @@ } \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 @@ -212,10 +220,12 @@ \setbeamercolor{footnote mark}{fg=.} % \end{macrocode} % -% Process package options +% +% +% \subsubsection{Process package options} % % \begin{macrocode} -\@metropolis@color@setdefaults +\metropolis@color@setdefaults \ProcessPgfPackageOptions{/metropolis/color} % \end{macrocode} % |