2 %% This is file `beamerinnerthememetropolis.sty',
3 %% generated with the docstrip utility.
5 %% The original source files were:
7 %% beamerinnerthememetropolis.dtx (with options: `package')
8 %% ---------------------------------------------------------------------------
9 %% Copyright 2015 Matthias Vogelgesang and the LaTeX community. A full list of
10 %% contributors can be found at
12 %% https://github.com/matze/mtheme/graphs/contributors
14 %% and the original template was based on the HSRM theme by Benjamin Weiss.
16 %% This work is licensed under a Creative Commons Attribution-ShareAlike 4.0
17 %% International License (https://creativecommons.org/licenses/by-sa/4.0/).
18 %% ---------------------------------------------------------------------------
19 \NeedsTeXFormat{LaTeX2e}
20 \ProvidesPackage{beamerinnerthememetropolis}[2017/01/23 Metropolis inner theme]
21 \RequirePackage{etoolbox}
22 \RequirePackage{keyval}
24 \RequirePackage{pgfopts}
27 /metropolis/inner/sectionpage/.cd,
29 none/.code=\metropolis@disablesectionpage,
30 simple/.code={\metropolis@enablesectionpage
31 \setbeamertemplate{section page}[simple]},
32 progressbar/.code={\metropolis@enablesectionpage
33 \setbeamertemplate{section page}[progressbar]},
36 /metropolis/inner/subsectionpage/.cd,
38 none/.code=\metropolis@disablesubsectionpage,
39 simple/.code={\metropolis@enablesubsectionpage
40 \setbeamertemplate{section page}[simple]},
41 progressbar/.code={\metropolis@enablesubsectionpage
42 \setbeamertemplate{section page}[progressbar]},
44 \newcommand{\metropolis@inner@setdefaults}{
45 \pgfkeys{/metropolis/inner/.cd,
46 sectionpage=progressbar,
50 \setbeamertemplate{title page}{
51 \begin{minipage}[b][\paperheight]{\textwidth}
52 \ifx\inserttitlegraphic\@empty\else\usebeamertemplate*{title graphic}\fi
54 \ifx\inserttitle\@empty\else\usebeamertemplate*{title}\fi
55 \ifx\insertsubtitle\@empty\else\usebeamertemplate*{subtitle}\fi
56 \usebeamertemplate*{title separator}
57 \ifx\beamer@shortauthor\@empty\else\usebeamertemplate*{author}\fi
58 \ifx\insertdate\@empty\else\usebeamertemplate*{date}\fi
59 \ifx\insertinstitute\@empty\else\usebeamertemplate*{institute}\fi
68 \frame[plain,noframenumbering]{\titlepage}
72 \usebeamertemplate{title page}
74 \setbeamertemplate{title graphic}{
81 \setbeamertemplate{title}{
88 \setbeamertemplate{subtitle}{
94 \newlength{\metropolis@titleseparator@linewidth}
95 \setlength{\metropolis@titleseparator@linewidth}{0.4pt}
96 \setbeamertemplate{title separator}{
99 \fill[fg] (0,0) rectangle (\textwidth, \metropolis@titleseparator@linewidth);
104 \setbeamertemplate{author}{
110 \setbeamertemplate{date}{
114 \setbeamertemplate{institute}{
119 \defbeamertemplate{section page}{simple}{
121 \usebeamercolor[fg]{section title}
122 \usebeamerfont{section title}
123 \insertsectionhead\par
124 \ifx\insertsubsectionhead\@empty\else
125 \usebeamercolor[fg]{subsection title}
126 \usebeamerfont{subsection title}
127 \insertsubsectionhead
131 \defbeamertemplate{section page}{progressbar}{
133 \begin{minipage}{22em}
135 \usebeamercolor[fg]{section title}
136 \usebeamerfont{section title}
137 \insertsectionhead\\[-1ex]
138 \usebeamertemplate*{progress bar in section page}
140 \ifx\insertsubsectionhead\@empty\else%
141 \usebeamercolor[fg]{subsection title}%
142 \usebeamerfont{subsection title}%
143 \insertsubsectionhead
147 \vspace{\baselineskip}
149 \newcommand{\metropolis@disablesectionpage}{
151 % intentionally empty
154 \newcommand{\metropolis@enablesectionpage}{
159 \frame[plain,c,noframenumbering]{\sectionpage}
163 \setbeamertemplate{subsection page}{%
164 \usebeamertemplate*{section page}
166 \newcommand{\metropolis@disablesubsectionpage}{
168 % intentionally empty
171 \newcommand{\metropolis@enablesubsectionpage}{
176 \frame[plain,c,noframenumbering]{\subsectionpage}
180 \newlength{\metropolis@progressonsectionpage}
181 \newlength{\metropolis@progressonsectionpage@linewidth}
182 \setlength{\metropolis@progressonsectionpage@linewidth}{0.4pt}
183 \setbeamertemplate{progress bar in section page}{
184 \setlength{\metropolis@progressonsectionpage}{%
185 \textwidth * \ratio{\insertframenumber pt}{\inserttotalframenumber pt}%
187 \tikzexternaldisable%
189 \fill[bg] (0,0) rectangle (\textwidth, \metropolis@progressonsectionpage@linewidth);
190 \fill[fg] (0,0) rectangle (\metropolis@progressonsectionpage, \metropolis@progressonsectionpage@linewidth);
194 \def\inserttotalframenumber{100}
195 \newlength{\metropolis@blocksep}
196 \newlength{\metropolis@blockadjust}
197 \setlength{\metropolis@blocksep}{0.75ex}
198 \setlength{\metropolis@blockadjust}{0.25ex}
199 \providecommand{\metropolis@strut}{%
200 \vphantom{ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz()}%
202 \newcommand{\metropolis@block}[1]{
203 \par\vskip\medskipamount%
204 \setlength{\parskip}{0pt}
205 \ifbeamercolorempty[bg]{block title#1}{%
206 \begin{beamercolorbox}[rightskip=0pt plus 4em]{block title#1}}{%
207 \ifbeamercolorempty[bg]{block title}{%
208 \begin{beamercolorbox}[rightskip=0pt plus 4em]{block title#1}%
211 \begin{beamercolorbox}[
212 sep=\dimexpr\metropolis@blocksep-\metropolis@blockadjust\relax,
213 leftskip=\metropolis@blockadjust,
214 rightskip=\dimexpr\metropolis@blockadjust plus 4em\relax
217 \usebeamerfont*{block title#1}%
221 \end{beamercolorbox}%
223 \ifbeamercolorempty[bg]{block body#1}{%
224 \begin{beamercolorbox}[vmode]{block body#1}}{
225 \ifbeamercolorempty[bg]{block body}{%
226 \begin{beamercolorbox}[vmode]{block body#1}%
228 \begin{beamercolorbox}[sep=\metropolis@blocksep, vmode]{block body#1}%
229 \vspace{-\metropolis@parskip}
231 \usebeamerfont{block body#1}%
232 \setlength{\parskip}{\metropolis@parskip}%
234 \setbeamertemplate{block begin}{\metropolis@block{}}
235 \setbeamertemplate{block alerted begin}{\metropolis@block{ alerted}}
236 \setbeamertemplate{block example begin}{\metropolis@block{ example}}
237 \setbeamertemplate{block end}{\end{beamercolorbox}\vspace*{0.2ex}}
238 \setbeamertemplate{block alerted end}{\end{beamercolorbox}\vspace*{0.2ex}}
239 \setbeamertemplate{block example end}{\end{beamercolorbox}\vspace*{0.2ex}}
240 \setbeamertemplate{itemize items}{\textbullet}
241 \setbeamertemplate{caption label separator}{: }
242 \setbeamertemplate{caption}[numbered]
243 \setbeamertemplate{footnote}{%
244 \parindent 0em\noindent%
246 \usebeamercolor{footnote}\hbox to 0.8em{\hfil\insertfootnotemark}\insertfootnotetext\par%
248 \newlength{\metropolis@parskip}
249 \setlength{\metropolis@parskip}{0.5em}
250 \setlength{\parskip}{\metropolis@parskip}
252 \define@key{beamerframe}{c}[true]{% centered
253 \beamer@frametopskip=0pt plus 1fill\relax%
254 \beamer@framebottomskip=0pt plus 1fill\relax%
255 \beamer@frametopskipautobreak=0pt plus .4\paperheight\relax%
256 \beamer@framebottomskipautobreak=0pt plus .6\paperheight\relax%
257 \def\beamer@initfirstlineunskip{}%
259 \providebool{metropolis@standout}
260 \define@key{beamerframe}{standout}[true]{%
261 \booltrue{metropolis@standout}
263 \setkeys{beamerframe}{c}
264 \setkeys{beamerframe}{noframenumbering}
265 \ifbeamercolorempty[bg]{palette primary}{
266 \setbeamercolor{background canvas}{
268 bg=-palette primary.fg
271 \setbeamercolor{background canvas}{
273 bg=palette primary.bg
276 \setbeamercolor{local structure}{
277 fg=palette primary.fg
280 \usebeamercolor[fg]{palette primary}
281 \usebeamerfont{standout}
283 \apptocmd{\beamer@reseteecodes}{%
284 \ifbool{metropolis@standout}{
286 \boolfalse{metropolis@standout}
289 \metropolis@inner@setdefaults
290 \ProcessPgfPackageOptions{/metropolis/inner}
293 %% End of file `beamerinnerthememetropolis.sty'.