diff options
author | Karl Berry <karl@freefriends.org> | 2015-12-05 23:05:44 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2015-12-05 23:05:44 +0000 |
commit | 85ee8c199f2c14ef10dd75bd71157faa5cb51bf6 (patch) | |
tree | 4aa56eb66743945fdf28f15849d291743f359aee /Master/texmf-dist/tex/latex/beamertheme-metropolis/beamerthememetropolis.sty | |
parent | 5384f92b5a44dd9e84f1bab69420edf32e99c696 (diff) |
beamertheme-metropolis (6dec15)
git-svn-id: svn://tug.org/texlive/trunk@39020 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/beamertheme-metropolis/beamerthememetropolis.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/beamertheme-metropolis/beamerthememetropolis.sty | 113 |
1 files changed, 113 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/beamertheme-metropolis/beamerthememetropolis.sty b/Master/texmf-dist/tex/latex/beamertheme-metropolis/beamerthememetropolis.sty new file mode 100644 index 00000000000..b5bfd43baa4 --- /dev/null +++ b/Master/texmf-dist/tex/latex/beamertheme-metropolis/beamerthememetropolis.sty @@ -0,0 +1,113 @@ +%% +%% This is file `beamerthememetropolis.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% beamerthememetropolis.dtx (with options: `package') +%% --------------------------------------------------------------------------- +%% 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/). +%% --------------------------------------------------------------------------- +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{beamerthememetropolis}[2015/12/04 Metropolis Beamer theme] +\RequirePackage{etoolbox} +\RequirePackage{pgfopts} +\newcommand{\metroset}[1]{\pgfkeys{/metropolis/.cd,#1}} +\pgfkeys{/metropolis/.cd, + .search also={ + /metropolis/inner, + /metropolis/outer, + /metropolis/color, + }, + block/.code=\pgfkeysalso{ + inner/block=#1, + color/block=#1, + }, +} +\pgfkeys{ + /metropolis/titleformat plain/.cd, + .is choice, + regular/.code={% + \let\@metropolis@plaintitleformat\@empty% + \setbeamerfont{plain title}{shape=\normalfont}% + }, + smallcaps/.code={% + \let\@metropolis@plaintitleformat\@empty% + \setbeamerfont{plain title}{shape=\scshape}% + }, + allsmallcaps/.code={% + \let\@metropolis@plaintitleformat\MakeLowercase% + \setbeamerfont{plain title}{shape=\scshape}% + \PackageWarning{beamerthememetropolis}{% + Be aware that titleformat plain=allsmallcaps can lead to problems% + } + }, + allcaps/.code={% + \let\@metropolis@plaintitleformat\MakeUppercase% + \setbeamerfont{plain title}{shape=\normalfont}% + \PackageWarning{beamerthememetropolis}{% + Be aware that titleformat plain=allcaps can lead to problems% + } + }, +} +\pgfkeys{ + /metropolis/titleformat/.code=\pgfkeysalso{ + inner/titleformat title=#1, + inner/titleformat subtitle=#1, + inner/titleformat section=#1, + outer/titleformat frame=#1, + titleformat plain=#1, + } +} +\pgfkeys{/metropolis/.cd, + usetitleprogressbar/.code=\pgfkeysalso{outer/progressbar=frametitle}, + 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}, +} +\newcommand{\@metropolis@setdefaults}{ + \pgfkeys{/metropolis/.cd, + titleformat plain=regular, + } +} +\useinnertheme{metropolis} +\useoutertheme{metropolis} +\usecolortheme{metropolis} +\usefonttheme{metropolis} +\AtEndPreamble{% + \@ifpackageloaded{pgfplots}{% + \RequirePackage{pgfplotsthemetol} + }{} +} +\def\@metropolis@plaintitleformat#1{#1} +\newcommand{\plain}[2][]{% + \begingroup + \setbeamercolor{background canvas}{ + use=palette primary, + parent=palette primary + } + \begin{frame}[c]{#1} + \begin{center} + \usebeamercolor[fg]{palette primary} + \usebeamerfont{plain title} + \@metropolis@plaintitleformat{#2} + \end{center} + \end{frame} + \endgroup +} +\newcommand{\mreducelistspacing}{\vspace{-\topsep}} +\@metropolis@setdefaults +\ProcessPgfOptions{/metropolis} +\endinput +%% +%% End of file `beamerthememetropolis.sty'. |