From 1cdee1080e0ad8f88624629e00039d9fe89c1b54 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 14 Mar 2016 21:25:03 +0000 Subject: beamertheme-metropolis (14mar16) git-svn-id: svn://tug.org/texlive/trunk@40024 c570f23f-e606-0410-a88d-b1316a301751 --- .../beamercolorthememetropolis.sty | 39 ++- .../beamerfontthememetropolis.sty | 207 +++++++++++-- .../beamerinnerthememetropolis.sty | 330 +++++++++------------ .../beamerouterthememetropolis.sty | 94 ++---- .../beamerthememetropolis.sty | 62 ++-- .../beamertheme-metropolis/pgfplotsthemetol.sty | 2 +- 6 files changed, 404 insertions(+), 330 deletions(-) (limited to 'Master/texmf-dist/tex/latex/beamertheme-metropolis') diff --git a/Master/texmf-dist/tex/latex/beamertheme-metropolis/beamercolorthememetropolis.sty b/Master/texmf-dist/tex/latex/beamertheme-metropolis/beamercolorthememetropolis.sty index 6badc65c135..6b23f8dec99 100644 --- a/Master/texmf-dist/tex/latex/beamertheme-metropolis/beamercolorthememetropolis.sty +++ b/Master/texmf-dist/tex/latex/beamertheme-metropolis/beamercolorthememetropolis.sty @@ -17,21 +17,21 @@ %% International License (https://creativecommons.org/licenses/by-sa/4.0/). %% --------------------------------------------------------------------------- \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{beamercolorthememetropolis}[2015/12/04 Metropolis color theme] +\ProvidesPackage{beamercolorthememetropolis}[2016/03/14 Metropolis color theme] \RequirePackage{pgfopts} \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, } \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, } -\newcommand{\@metropolis@color@setdefaults}{ +\newcommand{\metropolis@color@setdefaults}{ \pgfkeys{/metropolis/color/.cd, background=light, block=transparent, @@ -41,13 +41,13 @@ \definecolor{mDarkTeal}{HTML}{23373b} \definecolor{mLightBrown}{HTML}{EB811B} \definecolor{mLightGreen}{HTML}{14B03D} -\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 @@ -90,15 +90,26 @@ use=progress bar, parent=progress bar } -\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}, @@ -112,13 +123,9 @@ } \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 -} \setbeamercolor{footnote}{fg=normal text.fg!90} \setbeamercolor{footnote mark}{fg=.} -\@metropolis@color@setdefaults +\metropolis@color@setdefaults \ProcessPgfPackageOptions{/metropolis/color} \mode \endinput diff --git a/Master/texmf-dist/tex/latex/beamertheme-metropolis/beamerfontthememetropolis.sty b/Master/texmf-dist/tex/latex/beamertheme-metropolis/beamerfontthememetropolis.sty index c85a41a9746..8ecd1677ce4 100644 --- a/Master/texmf-dist/tex/latex/beamertheme-metropolis/beamerfontthememetropolis.sty +++ b/Master/texmf-dist/tex/latex/beamertheme-metropolis/beamerfontthememetropolis.sty @@ -17,10 +17,11 @@ %% International License (https://creativecommons.org/licenses/by-sa/4.0/). %% --------------------------------------------------------------------------- \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{beamerfontthememetropolis}[2015/12/04 Metropolis font theme] +\ProvidesPackage{beamerfontthememetropolis}[2016/03/14 Metropolis font theme] \RequirePackage{etoolbox} \RequirePackage{ifxetex} \RequirePackage{ifluatex} +\RequirePackage{pgfopts} \ifboolexpr{bool {xetex} or bool {luatex}}{ \RequirePackage[no-math]{fontspec} \newcounter{fontsnotfound} @@ -34,7 +35,7 @@ \suppressfontnotfounderror=0% } - \newcommand{\iffontsexist}[3]{% + \newcommand{\iffontsavailable}[3]{% \setcounter{fontsnotfound}{0}% \expandafter\forcsvlist\expandafter% \checkfont\expandafter{#1}% @@ -44,28 +45,36 @@ #3% \fi% } - \iffontsexist{Fira Sans Light,% - Fira Sans Light Italic,% - Fira Sans,% - Fira Sans Italic}{% - \setsansfont[BoldFont={Fira Sans}]{Fira Sans Light}% + \iffontsavailable{Fira Sans Light,% + Fira Sans Light Italic,% + Fira Sans,% + Fira Sans Italic}% + {% + \setsansfont[ItalicFont={Fira Sans Light Italic},% + BoldFont={Fira Sans},% + BoldItalicFont={Fira Sans Italic}]% + {Fira Sans Light}% }{% - \iffontsexist{Fira Sans Light OT,% - Fira Sans Light Italic OT,% - Fira Sans OT,% - Fira Sans Italic OT}{% - \setsansfont[BoldFont={Fira Sans OT}]{Fira Sans Light OT}% + \iffontsavailable{Fira Sans Light OT,% + Fira Sans Light Italic OT,% + Fira Sans OT,% + Fira Sans Italic OT}% + {% + \setsansfont[ItalicFont={Fira Sans Light Italic OT},% + BoldFont={Fira Sans OT},% + BoldItalicFont={Fira Sans Italic OT}]% + {Fira Sans Light OT}% }{% \PackageWarning{beamerthememetropolis}{% Could not find Fira Sans fonts% } } } - \iffontsexist{Fira Mono, Fira Mono Bold}{% - \setmonofont{Fira Mono}% + \iffontsavailable{Fira Mono, Fira Mono Bold}{% + \setmonofont[BoldFont={Fira Mono Medium}]{Fira Mono}% }{% - \iffontsexist{Fira Mono OT, Fira Mono Bold OT}{% - \setmonofont{Fira Mono OT}% + \iffontsavailable{Fira Mono OT, Fira Mono Bold OT}{% + \setmonofont[BoldFont={Fira Mono Medium OT}]{Fira Mono OT}% }{% \PackageWarning{beamerthememetropolis}{% Could not find Fira Mono fonts% @@ -86,8 +95,6 @@ \setbeamerfont{date}{size=\small} \setbeamerfont{section title}{size=\Large,% series=\bfseries} -\setbeamerfont{plain title}{size=\Large,% - series=\bfseries} \setbeamerfont{block title}{size=\normalsize,% series=\bfseries} \setbeamerfont{block title alerted}{size=\normalsize,% @@ -107,6 +114,170 @@ series=\normalfont} \setbeamerfont{bibliography entry note}{size=\small,% series=\normalfont} +\setbeamerfont{standout}{size=\Large,% + series=\bfseries} +\pgfkeys{ + /metropolis/font/titleformat title/.cd, + .is choice, + regular/.code={% + \let\metropolis@titleformat\@empty% + \setbeamerfont{title}{shape=\normalfont}% + }, + smallcaps/.code={% + \let\metropolis@titleformat\@empty% + \setbeamerfont{title}{shape=\scshape}% + }, + allsmallcaps/.code={% + \let\metropolis@titleformat\lowercase% + \setbeamerfont{title}{shape=\scshape}% + \PackageWarning{beamerthememetropolis}{% + Be aware that titleformat title=allsmallcaps can lead to problems% + } + }, + allcaps/.code={% + \let\metropolis@titleformat\uppercase% + \setbeamerfont{title}{shape=\normalfont} + \PackageWarning{beamerthememetropolis}{% + Be aware that titleformat title=allcaps can lead to problems% + } + }, +} +\pgfkeys{ + /metropolis/font/titleformat subtitle/.cd, + .is choice, + regular/.code={% + \let\metropolis@subtitleformat\@empty% + \setbeamerfont{subtitle}{shape=\normalfont}% + }, + smallcaps/.code={% + \let\metropolis@subtitleformat\@empty% + \setbeamerfont{subtitle}{shape=\scshape}% + }, + allsmallcaps/.code={% + \let\metropolis@subtitleformat\lowercase% + \setbeamerfont{subtitle}{shape=\scshape}% + \PackageWarning{beamerthememetropolis}{% + Be aware that titleformat subtitle=allsmallcaps can lead to problems% + } + }, + allcaps/.code={% + \let\metropolis@subtitleformat\uppercase% + \setbeamerfont{subtitle}{shape=\normalfont}% + \PackageWarning{beamerthememetropolis}{% + Be aware that titleformat subtitle=allcaps can lead to problems% + } + }, +} +\pgfkeys{ + /metropolis/font/titleformat section/.cd, + .is choice, + regular/.code={% + \let\metropolis@sectiontitleformat\@empty% + \setbeamerfont{section title}{shape=\normalfont}% + }, + smallcaps/.code={% + \let\metropolis@sectiontitleformat\@empty% + \setbeamerfont{section title}{shape=\scshape}% + }, + allsmallcaps/.code={% + \let\metropolis@sectiontitleformat\MakeLowercase% + \setbeamerfont{section title}{shape=\scshape}% + \PackageWarning{beamerthememetropolis}{% + Be aware that titleformat section=allsmallcaps can lead to problems% + } + }, + allcaps/.code={% + \let\metropolis@sectiontitleformat\MakeUppercase% + \setbeamerfont{section title}{shape=\normalfont}% + \PackageWarning{beamerthememetropolis}{% + Be aware that titleformat section=allcaps can lead to problems% + } + }, +} +\pgfkeys{ + /metropolis/font/titleformat frame/.cd, + .is choice, + regular/.code={% + \let\metropolis@frametitleformat\@empty% + \setbeamerfont{frametitle}{shape=\normalfont}% + }, + smallcaps/.code={% + \let\metropolis@frametitleformat\@empty% + \setbeamerfont{frametitle}{shape=\scshape}% + }, + allsmallcaps/.code={% + \let\metropolis@frametitleformat\MakeLowercase% + \setbeamerfont{frametitle}{shape=\scshape}% + \PackageWarning{beamerthememetropolis}{% + Be aware that titleformat frame=allsmallcaps can lead to problems% + } + }, + allcaps/.code={% + \let\metropolis@frametitleformat\MakeUppercase% + \setbeamerfont{frametitle}{shape=\normalfont} + \PackageWarning{beamerthememetropolis}{% + Be aware that titleformat frame=allcaps can lead to problems% + } + }, +} +\pgfkeys{ + /metropolis/font/.cd, + titleformattitle/.code=\pgfkeysalso{titleformat title=#1}, + titleformatsubtitle/.code=\pgfkeysalso{titleformat subtitle=#1}, + titleformatsection/.code=\pgfkeysalso{titleformat section=#1}, + titleformatframe/.code=\pgfkeysalso{titleformat frame=#1}, +} +\newcommand{\metropolis@font@setdefaults}{ + \pgfkeys{/metropolis/font/.cd, + titleformat title=regular, + titleformat subtitle=regular, + titleformat section=regular, + titleformat frame=regular, + } +} +\def\metropolis@titleformat#1{#1} +\def\metropolis@subtitleformat#1{#1} +\def\metropolis@sectiontitleformat#1{#1} +\def\metropolis@frametitleformat#1{#1} +\patchcmd{\beamer@title}% + {\def\inserttitle{#2}}% + {\def\inserttitle{\metropolis@titleformat{#2}}}% + {}% + {\PackageError{beamerfontthememetropolis}{Patching title failed}} +\patchcmd{\beamer@subtitle}% + {\def\insertsubtitle{#2}}% + {\def\insertsubtitle{\metropolis@subtitleformat{#2}}}% + {}% + {\PackageError{beamerfontthememetropolis}{Patching subtitle failed}} +\patchcmd{\sectionentry} + {\def\insertsectionhead{#2}} + {\def\insertsectionhead{\metropolis@sectiontitleformat{#2}}} + {} + {\PackageError{beamerfontthememetropolis}{Patching section title failed}} +\patchcmd{\beamer@section} + {\def\insertsectionhead{\hyperlink{Navigation\the\c@page}{#1}}} + {\def\insertsectionhead{\hyperlink{Navigation\the\c@page}{% + \metropolis@sectiontitleformat{#1}}}} + {} + {\PackageError{beamerfontthememetropolis}{Patching section title failed}} +\patchcmd{\beamer@@frametitle} + {\beamer@ifempty{#2}{}{% + \gdef\insertframetitle{{#2\ifnum\beamer@autobreakcount>0\relax{}\space% + \usebeamertemplate*{frametitle continuation}\fi}}% + \gdef\beamer@frametitle{#2}% + \gdef\beamer@shortframetitle{#1}% + }} + {\beamer@ifempty{#2}{}{% + \gdef\insertframetitle{{\metropolis@frametitleformat{#2}\ifnum% + \beamer@autobreakcount>0\relax{}\space% + \usebeamertemplate*{frametitle continuation}\fi}}% + \gdef\beamer@frametitle{#2}% + \gdef\beamer@shortframetitle{#1}% + }} + {} + {\PackageError{beamerfontthememetropolis}{Patching frame title failed}} +\metropolis@font@setdefaults +\ProcessPgfPackageOptions{/metropolis/font} \endinput %% %% End of file `beamerfontthememetropolis.sty'. diff --git a/Master/texmf-dist/tex/latex/beamertheme-metropolis/beamerinnerthememetropolis.sty b/Master/texmf-dist/tex/latex/beamertheme-metropolis/beamerinnerthememetropolis.sty index 982e50e7f56..84431f025ba 100644 --- a/Master/texmf-dist/tex/latex/beamertheme-metropolis/beamerinnerthememetropolis.sty +++ b/Master/texmf-dist/tex/latex/beamertheme-metropolis/beamerinnerthememetropolis.sty @@ -17,125 +17,36 @@ %% International License (https://creativecommons.org/licenses/by-sa/4.0/). %% --------------------------------------------------------------------------- \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{beamerinnerthememetropolis}[2015/12/04 Metropolis inner theme] +\ProvidesPackage{beamerinnerthememetropolis}[2016/03/14 Metropolis inner theme] \RequirePackage{etoolbox} +\RequirePackage{keyval} \RequirePackage{calc} \RequirePackage{pgfopts} \RequirePackage{tikz} \pgfkeys{ - /metropolis/inner/block/.cd, - .is choice, - transparent/.code=\setlength{\@metropolis@blockskip}{0ex}, - fill/.code=\setlength{\@metropolis@blockskip}{1ex}, -} -\pgfkeys{ - /metropolis/inner/titleformat title/.cd, - .is choice, - regular/.code={% - \let\@metropolis@titleformat\@empty% - \setbeamerfont{title}{shape=\normalfont}% - }, - smallcaps/.code={% - \let\@metropolis@titleformat\@empty% - \setbeamerfont{title}{shape=\scshape}% - }, - allsmallcaps/.code={% - \let\@metropolis@titleformat\MakeLowercase% - \setbeamerfont{title}{shape=\scshape}% - \PackageWarning{beamerthememetropolis}{% - Be aware that titleformat title=allsmallcaps can lead to problems% - } - }, - allcaps/.code={% - \let\@metropolis@titleformat\MakeUppercase% - \setbeamerfont{title}{shape=\normalfont} - \PackageWarning{beamerthememetropolis}{% - Be aware that titleformat title=allcaps can lead to problems% - } - }, -} -\pgfkeys{ - /metropolis/inner/titleformat subtitle/.cd, + /metropolis/inner/sectionpage/.cd, .is choice, - regular/.code={% - \let\@metropolis@subtitleformat\@empty% - \setbeamerfont{subtitle}{shape=\normalfont}% - }, - smallcaps/.code={% - \let\@metropolis@subtitleformat\@empty% - \setbeamerfont{subtitle}{shape=\scshape}% - }, - allsmallcaps/.code={% - \let\@metropolis@subtitleformat\MakeLowercase% - \setbeamerfont{subtitle}{shape=\scshape}% - \PackageWarning{beamerthememetropolis}{% - Be aware that titleformat subtitle=allsmallcaps can lead to problems% - } - }, - allcaps/.code={% - \let\@metropolis@subtitleformat\MakeUppercase% - \setbeamerfont{subtitle}{shape=\normalfont}% - \PackageWarning{beamerthememetropolis}{% - Be aware that titleformat subtitle=allcaps can lead to problems% - } - }, + none/.code=\metropolis@disablesectionpage, + simple/.code={\metropolis@enablesectionpage + \setbeamertemplate{section page}[simple]}, + progressbar/.code={\metropolis@enablesectionpage + \setbeamertemplate{section page}[progressbar]}, } \pgfkeys{ - /metropolis/inner/titleformat section/.cd, + /metropolis/inner/subsectionpage/.cd, .is choice, - regular/.code={% - \let\@metropolis@sectiontitleformat\@empty% - \setbeamerfont{section title}{shape=\normalfont}% - }, - smallcaps/.code={% - \let\@metropolis@sectiontitleformat\@empty% - \setbeamerfont{section title}{shape=\scshape}% - }, - allsmallcaps/.code={% - \let\@metropolis@sectiontitleformat\MakeLowercase% - \setbeamerfont{section title}{shape=\scshape}% - \PackageWarning{beamerthememetropolis}{% - Be aware that titleformat section=allsmallcaps can lead to problems% - } - }, - allcaps/.code={% - \let\@metropolis@sectiontitleformat\MakeUppercase% - \setbeamerfont{section title}{shape=\normalfont}% - \PackageWarning{beamerthememetropolis}{% - Be aware that titleformat section=allcaps can lead to problems% - } - }, + none/.code=\metropolis@disablesubsectionpage, + simple/.code={\metropolis@enablesubsectionpage + \setbeamertemplate{section page}[simple]}, + progressbar/.code={\metropolis@enablesubsectionpage + \setbeamertemplate{section page}[progressbar]}, } -\pgfkeys{ - /metropolis/inner/sectionpage/.cd, - .is choice, - none/.code=\@metropolis@sectionpage@none, - simple/.code=\@metropolis@sectionpage@simple, - progressbar/.code=\@metropolis@sectionpage@progressbar, -} -\newcommand{\@metropolis@inner@setdefaults}{ +\newcommand{\metropolis@inner@setdefaults}{ \pgfkeys{/metropolis/inner/.cd, sectionpage=progressbar, - block=transparent, - titleformat title=regular, - titleformat subtitle=regular, - titleformat section=regular, + subsectionpage=none } } -\def\@metropolis@titleformat#1{#1} -\def\@metropolis@subtitleformat#1{#1} -\def\@metropolis@sectiontitleformat#1{#1} -\patchcmd{\sectionentry} - {\def\insertsectionhead{#2}} - {\def\insertsectionhead{\@metropolis@sectiontitleformat{#2}}} - {} - {\PackageError{beamerinnerthememetropolis}{Patching section title failed}} -\patchcmd{\beamer@section} - {\def\insertsectionhead{\hyperlink{Navigation\the\c@page}{#1}}} - {\def\insertsectionhead{\hyperlink{Navigation\the\c@page}{% - \@metropolis@sectiontitleformat{#1}}}} - {} - {\PackageError{beamerinnerthememetropolis}{Patching section title failed}} \setbeamertemplate{title page}{ \begin{minipage}[b][\paperheight]{\textwidth} \ifx\inserttitlegraphic\@empty\else\usebeamertemplate*{title graphic}\fi @@ -154,7 +65,7 @@ \ifbeamer@inframe \titlepage \else - \frame[plain]{\titlepage} + \frame[plain,noframenumbering]{\titlepage} \fi } \def\titlepage{% @@ -170,12 +81,12 @@ \setbeamertemplate{title}{ \raggedright% \linespread{1.0}% - \@metropolis@titleformat{\inserttitle}% + \inserttitle% \par% \vspace*{0.5em} } \setbeamertemplate{subtitle}{ - \@metropolis@subtitleformat{\insertsubtitle}% + \insertsubtitle% \par% \vspace*{0.5em} } @@ -200,44 +111,64 @@ \insertinstitute% \par% } -\newcommand{\@metropolis@sectionpage@none}{ - \AtBeginSection{ - % intenionally empty - } -} \defbeamertemplate{section page}{simple}{ - \centering - \usebeamercolor[fg]{section title} - \usebeamerfont{section title} - \insertsectionhead\\ -} -\newcommand{\@metropolis@sectionpage@simple}{ - \setbeamertemplate{section page}[simple] - \AtBeginSection{ - \ifbeamer@inframe - \sectionpage - \else - \frame[plain,c]{\sectionpage} + \begin{center} + \usebeamercolor[fg]{section title} + \usebeamerfont{section title} + \insertsectionhead\par + \ifx\insertsubsection\@empty\else + \usebeamercolor[fg]{subsection title} + \usebeamerfont{subsection title} + \insertsubsection \fi - } + \end{center} } \defbeamertemplate{section page}{progressbar}{ \centering \begin{minipage}{22em} + \raggedright \usebeamercolor[fg]{section title} \usebeamerfont{section title} \insertsectionhead\\[-1ex] \usebeamertemplate*{progress bar in section page} + \par + \ifx\insertsubsection\@empty\else% + \usebeamercolor[fg]{subsection title}% + \usebeamerfont{subsection title}% + \insertsubsection + \fi \end{minipage} \par + \vspace{\baselineskip} } -\newcommand{\@metropolis@sectionpage@progressbar}{ - \setbeamertemplate{section page}[progressbar] +\newcommand{\metropolis@disablesectionpage}{ + \AtBeginSection{ + % intentionally empty + } +} +\newcommand{\metropolis@enablesectionpage}{ \AtBeginSection{ \ifbeamer@inframe \sectionpage \else - \frame[plain,c]{\sectionpage} + \frame[plain,c,noframenumbering]{\sectionpage} + \fi + } +} +\setbeamertemplate{subsection page}{% + \usebeamertemplate*{section page} +} +\newcommand{\metropolis@disablesubsectionpage}{ + \AtBeginSubsection{ + % intentionally empty + } +} +\newcommand{\metropolis@enablesubsectionpage}{ + \AtBeginSubsection{ + \ifbeamer@inframe + \subsectionpage + \else + \frame[plain,c,noframenumbering]{\subsectionpage} \fi } } @@ -252,73 +183,51 @@ \end{tikzpicture}% } \def\inserttotalframenumber{100} -\newlength{\@metropolis@blockskip} -\setbeamertemplate{block begin}{% - \setlength{\parskip}{\@metropolis@parskip} - \vspace*{1ex} - \begin{beamercolorbox}[% - ht=2.4ex, - dp=1ex, - leftskip=\@metropolis@blockskip, - rightskip=\@metropolis@blockskip]{block title} - \usebeamerfont*{block title}\insertblocktitle% - \end{beamercolorbox}% - \vspace*{-1pt} - \usebeamerfont{block body}% - \begin{beamercolorbox}[% - dp=1ex, - leftskip=\@metropolis@blockskip, - rightskip=\@metropolis@blockskip, - vmode]{block body}% +\newlength{\metropolis@blocksep} +\newlength{\metropolis@blockadjust} +\setlength{\metropolis@blocksep}{0.75ex} +\setlength{\metropolis@blockadjust}{0.25ex} +\providecommand{\metropolis@strut}{% + \vphantom{ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz()}% } -\setbeamertemplate{block end}{% - \end{beamercolorbox} - \vspace*{0.2ex} -} -\setbeamertemplate{block alerted begin}{% - \setlength{\parskip}{\@metropolis@parskip} - \vspace*{1ex} - \begin{beamercolorbox}[% - ht=2.4ex, - dp=1ex, - leftskip=\@metropolis@blockskip, - rightskip=\@metropolis@blockskip]{block title alerted} - \usebeamerfont*{block title alerted}\insertblocktitle% - \end{beamercolorbox}% - \vspace*{-1pt} - \usebeamerfont{block body alerted}% - \begin{beamercolorbox}[% - dp=1ex, - leftskip=\@metropolis@blockskip, - rightskip=\@metropolis@blockskip, - vmode]{block body alerted}% -} -\setbeamertemplate{block alerted end}{% - \end{beamercolorbox} - \vspace*{0.2ex} -} -\setbeamertemplate{block example begin}{% - \setlength{\parskip}{\@metropolis@parskip} - \vspace*{1ex} - \begin{beamercolorbox}[% - ht=2.4ex, - dp=1ex, - leftskip=\@metropolis@blockskip, - rightskip=\@metropolis@blockskip]{block title example} - \usebeamerfont*{block title example}\insertblocktitle% +\newcommand{\metropolis@block}[1]{ + \par\vskip\medskipamount% + \setlength{\parskip}{0pt} + \ifbeamercolorempty[bg]{block title#1}{% + \begin{beamercolorbox}[rightskip=0pt plus 4em]{block title#1}}{% + \ifbeamercolorempty[bg]{block title}{% + \begin{beamercolorbox}[rightskip=0pt plus 4em]{block title#1}% + }% + {% + \begin{beamercolorbox}[ + sep=\dimexpr\metropolis@blocksep-\metropolis@blockadjust\relax, + leftskip=\metropolis@blockadjust, + rightskip=\dimexpr\metropolis@blockadjust plus 4em\relax + ]{block title#1}% + }}% + \usebeamerfont*{block title#1}% + \metropolis@strut% + \insertblocktitle% + \metropolis@strut% \end{beamercolorbox}% - \vspace*{-1pt} - \usebeamerfont{block body example}% - \begin{beamercolorbox}[% - dp=1ex, - leftskip=\@metropolis@blockskip, - rightskip=\@metropolis@blockskip, - vmode]{block body example}% -} -\setbeamertemplate{block example end}{% - \end{beamercolorbox} - \vspace*{0.2ex} + \nointerlineskip% + \ifbeamercolorempty[bg]{block body#1}{% + \begin{beamercolorbox}[vmode]{block body#1}}{ + \ifbeamercolorempty[bg]{block body}{% + \begin{beamercolorbox}[vmode]{block body#1}% + }{% + \begin{beamercolorbox}[sep=\metropolis@blocksep, vmode]{block body#1}% + \vspace{-\metropolis@parskip} + }}% + \usebeamerfont{block body#1}% + \setlength{\parskip}{\metropolis@parskip}% } +\setbeamertemplate{block begin}{\metropolis@block{}} +\setbeamertemplate{block alerted begin}{\metropolis@block{ alerted}} +\setbeamertemplate{block example begin}{\metropolis@block{ example}} +\setbeamertemplate{block end}{\end{beamercolorbox}\vspace*{0.2ex}} +\setbeamertemplate{block alerted end}{\end{beamercolorbox}\vspace*{0.2ex}} +\setbeamertemplate{block example end}{\end{beamercolorbox}\vspace*{0.2ex}} \setbeamertemplate{itemize items}{\textbullet} \setbeamertemplate{caption label separator}{: } \setbeamertemplate{caption}[numbered] @@ -327,9 +236,9 @@ \raggedright \usebeamercolor{footnote}\hbox to 0.8em{\hfil\insertfootnotemark}\insertfootnotetext\par% } -\newlength{\@metropolis@parskip} -\setlength{\@metropolis@parskip}{0.5em} -\setlength{\parskip}{\@metropolis@parskip} +\newlength{\metropolis@parskip} +\setlength{\metropolis@parskip}{0.5em} +\setlength{\parskip}{\metropolis@parskip} \linespread{1.15} \define@key{beamerframe}{c}[true]{% centered \beamer@frametopskip=0pt plus 1fill\relax% @@ -338,7 +247,34 @@ \beamer@framebottomskipautobreak=0pt plus .6\paperheight\relax% \def\beamer@initfirstlineunskip{}% } -\@metropolis@inner@setdefaults +\providebool{metropolis@standout} +\define@key{beamerframe}{standout}[true]{% + \booltrue{metropolis@standout} + \begingroup + \setkeys{beamerframe}{c} + \setkeys{beamerframe}{noframenumbering} + \ifbeamercolorempty[bg]{palette primary}{ + \setbeamercolor{background canvas}{ + use=palette primary, + bg=-palette primary.fg + } + }{ + \setbeamercolor{background canvas}{ + use=palette primary, + bg=palette primary.bg + } + } + \centering + \usebeamercolor[fg]{palette primary} + \usebeamerfont{standout} +} + \apptocmd{\beamer@reseteecodes}{% + \ifbool{metropolis@standout}{ + \endgroup + \boolfalse{metropolis@standout} + }{} + }{}{} +\metropolis@inner@setdefaults \ProcessPgfPackageOptions{/metropolis/inner} \endinput %% diff --git a/Master/texmf-dist/tex/latex/beamertheme-metropolis/beamerouterthememetropolis.sty b/Master/texmf-dist/tex/latex/beamertheme-metropolis/beamerouterthememetropolis.sty index 5115715e72e..e4d359ae916 100644 --- a/Master/texmf-dist/tex/latex/beamertheme-metropolis/beamerouterthememetropolis.sty +++ b/Master/texmf-dist/tex/latex/beamertheme-metropolis/beamerouterthememetropolis.sty @@ -17,7 +17,7 @@ %% International License (https://creativecommons.org/licenses/by-sa/4.0/). %% --------------------------------------------------------------------------- \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{beamerouterthememetropolis}[2015/12/04 Metropolis outer theme] +\ProvidesPackage{beamerouterthememetropolis}[2016/03/14 Metropolis outer theme] \RequirePackage{etoolbox} \RequirePackage{calc} \RequirePackage{pgfopts} @@ -52,52 +52,15 @@ } }, } -\pgfkeys{ - /metropolis/outer/titleformat frame/.cd, - .is choice, - regular/.code={% - \let\@metropolis@frametitleformat\@empty% - \setbeamerfont{frametitle}{shape=\normalfont}% - \renewcommand{\@metropolis@frametitlestrut}{% - \vphantom{ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz}% - } - }, - smallcaps/.code={% - \let\@metropolis@frametitleformat\@empty% - \setbeamerfont{frametitle}{shape=\scshape}% - \renewcommand{\@metropolis@frametitlestrut}{% - \vphantom{ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz}% - } - }, - allsmallcaps/.code={% - \let\@metropolis@frametitleformat\MakeLowercase% - \setbeamerfont{frametitle}{shape=\scshape}% - \renewcommand{\@metropolis@frametitlestrut}{% - \vphantom{abcdefghijklmnopqrstuvwxyz}% - } - \PackageWarning{beamerthememetropolis}{% - Be aware that titleformat frame=allsmallcaps can lead to problems% - } - }, - allcaps/.code={% - \let\@metropolis@frametitleformat\MakeUppercase% - \setbeamerfont{frametitle}{shape=\normalfont} - \renewcommand{\@metropolis@frametitlestrut}{% - \vphantom{ABCDEFGHIJKLMNOPQRSTUVWXYZ}% - } - \PackageWarning{beamerthememetropolis}{% - Be aware that titleformat frame=allcaps can lead to problems% - } - }, -} -\newcommand{\@metropolis@outer@setdefaults}{ +\newcommand{\metropolis@outer@setdefaults}{ \pgfkeys{/metropolis/outer/.cd, numbering=counter, progressbar=none, - titleformat frame=regular, } } \setbeamertemplate{navigation symbols}{} +\defbeamertemplate{frame footer}{none}{} +\defbeamertemplate{frame footer}{custom}[1]{ #1 } \defbeamertemplate{frame numbering}{none}{} \defbeamertemplate{frame numbering}{counter}{\insertframenumber} \defbeamertemplate{frame numbering}{fraction}{ @@ -106,36 +69,33 @@ \defbeamertemplate{headline}{plain}{} \defbeamertemplate{footline}{plain}{% \begin{beamercolorbox}[wd=\textwidth, sep=3ex]{footline}% - \hfill% \usebeamerfont{page number in head/foot}% + \usebeamertemplate*{frame footer} + \hfill% \usebeamertemplate*{frame numbering} \end{beamercolorbox}% } -\def\@metropolis@frametitleformat#1{#1} -\patchcmd{\beamer@@frametitle} - {\beamer@ifempty{#2}{}{% - \gdef\insertframetitle{{#2\ifnum\beamer@autobreakcount>0\relax{}\space% - \usebeamertemplate*{frametitle continuation}\fi}}% - \gdef\beamer@frametitle{#2}% - \gdef\beamer@shortframetitle{#1}% - }} - {\beamer@ifempty{#2}{}{% - \gdef\insertframetitle{{\@metropolis@frametitleformat{#2}\ifnum% - \beamer@autobreakcount>0\relax{}\space% - \usebeamertemplate*{frametitle continuation}\fi}}% - \gdef\beamer@frametitle{#2}% - \gdef\beamer@shortframetitle{#1}% - }} - {} - {\PackageError{beamerouterthememetropolis}{Patching frame title failed}} -\newlength{\@metropolis@frametitlestrut} +\newlength{\metropolis@frametitle@padding} +\setlength{\metropolis@frametitle@padding}{2.2ex} +\newcommand{\metropolis@frametitlestrut@start}{ + \rule{0pt}{\metropolis@frametitle@padding +% + \totalheightof{% + \ifcsdef{metropolis@frametitleformat}{\metropolis@frametitleformat X}{X}% + }% + }% +} +\newcommand{\metropolis@frametitlestrut@end}{ + \rule[-\metropolis@frametitle@padding]{0pt}{\metropolis@frametitle@padding} +} \defbeamertemplate{frametitle}{plain}{% \nointerlineskip% \begin{beamercolorbox}[% wd=\paperwidth,% - sep=1.5ex,% + sep=0pt,% + leftskip=\metropolis@frametitle@padding,% + rightskip=\metropolis@frametitle@padding,% ]{frametitle}% - \@metropolis@frametitlestrut\insertframetitle\@metropolis@frametitlestrut% + \metropolis@frametitlestrut@start\insertframetitle\metropolis@frametitlestrut@end% \end{beamercolorbox}% } \newlength{\metropolis@progressinheadfoot} @@ -151,7 +111,15 @@ \end{tikzpicture}% \end{beamercolorbox} } -\@metropolis@outer@setdefaults +\AtBeginDocument{% + \apptocmd{\appendix}{% + \pgfkeys{% + /metropolis/outer/.cd, + numbering=none, + progressbar=none} + }{}{} +} +\metropolis@outer@setdefaults \ProcessPgfPackageOptions{/metropolis/outer} \endinput %% diff --git a/Master/texmf-dist/tex/latex/beamertheme-metropolis/beamerthememetropolis.sty b/Master/texmf-dist/tex/latex/beamertheme-metropolis/beamerthememetropolis.sty index b5bfd43baa4..740cb887cf5 100644 --- a/Master/texmf-dist/tex/latex/beamertheme-metropolis/beamerthememetropolis.sty +++ b/Master/texmf-dist/tex/latex/beamertheme-metropolis/beamerthememetropolis.sty @@ -17,42 +17,39 @@ %% International License (https://creativecommons.org/licenses/by-sa/4.0/). %% --------------------------------------------------------------------------- \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{beamerthememetropolis}[2015/12/04 Metropolis Beamer theme] +\ProvidesPackage{beamerthememetropolis} + [2016/03/14 v1.1 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, - }, + /metropolis/font, + } } \pgfkeys{ /metropolis/titleformat plain/.cd, .is choice, regular/.code={% - \let\@metropolis@plaintitleformat\@empty% - \setbeamerfont{plain title}{shape=\normalfont}% + \let\metropolis@plaintitleformat\@empty% + \setbeamerfont{standout}{shape=\normalfont}% }, smallcaps/.code={% - \let\@metropolis@plaintitleformat\@empty% - \setbeamerfont{plain title}{shape=\scshape}% + \let\metropolis@plaintitleformat\@empty% + \setbeamerfont{standout}{shape=\scshape}% }, allsmallcaps/.code={% - \let\@metropolis@plaintitleformat\MakeLowercase% - \setbeamerfont{plain title}{shape=\scshape}% + \let\metropolis@plaintitleformat\MakeLowercase% + \setbeamerfont{standout}{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}% + \let\metropolis@plaintitleformat\MakeUppercase% + \setbeamerfont{standout}{shape=\normalfont}% \PackageWarning{beamerthememetropolis}{% Be aware that titleformat plain=allcaps can lead to problems% } @@ -60,10 +57,10 @@ } \pgfkeys{ /metropolis/titleformat/.code=\pgfkeysalso{ - inner/titleformat title=#1, - inner/titleformat subtitle=#1, - inner/titleformat section=#1, - outer/titleformat frame=#1, + font/titleformat title=#1, + font/titleformat subtitle=#1, + font/titleformat section=#1, + font/titleformat frame=#1, titleformat plain=#1, } } @@ -75,7 +72,7 @@ darkcolors/.code=\pgfkeysalso{color/background=dark}, blockbg/.code=\pgfkeysalso{color/block=fill, inner/block=fill}, } -\newcommand{\@metropolis@setdefaults}{ +\newcommand{\metropolis@setdefaults}{ \pgfkeys{/metropolis/.cd, titleformat plain=regular, } @@ -89,24 +86,19 @@ \RequirePackage{pgfplotsthemetol} }{} } -\def\@metropolis@plaintitleformat#1{#1} +\newcommand{\metroset}[1]{\pgfkeys{/metropolis/.cd,#1}} +\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 + \PackageWarning{beamerthememetropolis}{% + The syntax `\plain' may be deprecated in a future version of Metropolis. + Please use a frame with [standout] instead. + } + \begin{frame}[standout]{#1} + \metropolis@plaintitleformat{#2} + \end{frame} } \newcommand{\mreducelistspacing}{\vspace{-\topsep}} -\@metropolis@setdefaults +\metropolis@setdefaults \ProcessPgfOptions{/metropolis} \endinput %% diff --git a/Master/texmf-dist/tex/latex/beamertheme-metropolis/pgfplotsthemetol.sty b/Master/texmf-dist/tex/latex/beamertheme-metropolis/pgfplotsthemetol.sty index 05f4383de2a..9405e103f46 100644 --- a/Master/texmf-dist/tex/latex/beamertheme-metropolis/pgfplotsthemetol.sty +++ b/Master/texmf-dist/tex/latex/beamertheme-metropolis/pgfplotsthemetol.sty @@ -18,7 +18,7 @@ %% --------------------------------------------------------------------------- \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{pgfplotsthemetol} - [2015/06/16 PGFplots colors based on Paul Tol's SRON technical note] + [2016/03/14 PGFplots colors based on Paul Tol's SRON technical note] \definecolor{TolDarkPurple}{HTML}{332288} \definecolor{TolDarkBlue}{HTML}{6699CC} \definecolor{TolLightBlue}{HTML}{88CCEE} -- cgit v1.2.3