-
Notifications
You must be signed in to change notification settings - Fork 1
/
beamerthemem.sty
105 lines (105 loc) · 3.07 KB
/
beamerthemem.sty
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
%%
%% This is file `beamerthemem.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% beamerthemem.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{beamerthemem}[2015/06/12 Metropolis Beamer theme]
\RequirePackage{etoolbox}
\RequirePackage{pgfopts}
\RequirePackage{ifxetex}
\RequirePackage{ifluatex}
\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/plaintitleformat/.cd,
.is choice,
regular/.code=\renewcommand{\@metropolis@plaintitleformat}{#1},
lowercase/.code={%
\renewcommand{\@metropolis@plaintitleformat}{\MakeLowercase{#1}}
},
uppercase/.code={%
\renewcommand{\@metropolis@plaintitleformat}{\MakeUppercase{#1}}
},
}
\pgfkeys{
/metropolis/everytitleformat/.code=\pgfkeysalso{
inner/titleformat=#1,
inner/sectiontitleformat=#1,
outer/frametitleformat=#1,
plaintitleformat=#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,
plaintitleformat=lowercase,
}
}
\useinnertheme{metropolis}
\useoutertheme{metropolis}
\usecolortheme{metropolis}
\ifboolexpr{bool {xetex} or bool {luatex}}{
\usefonttheme{metropolis}
}{
\PackageWarning{beamerthemem}{%
You need to compile with XeLaTeX or LuaLaTeX to use the Fira fonts.
}
}
\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{section title}
\@metropolis@plaintitleformat{#2}
\end{center}
\end{frame}
\endgroup
}
\newcommand{\mreducelistspacing}{\vspace{-\topsep}}
\@metropolis@setdefaults
\ProcessPgfOptions{/metropolis}
\endinput
%%
%% End of file `beamerthemem.sty'.