diff --git a/README.md b/README.md index 24569a4..d7d21a0 100644 --- a/README.md +++ b/README.md @@ -50,12 +50,16 @@ to protect the title. This can be done automatically with the The `blockbg` option defines extra colors used in defining the blocks. The blocks then have a gray background similar to other beamer themes. +By default, this package adds `\vspace{2em}` after the frametitle to +make content more centered on the frame. If using more content per +slide, this can be turned off at the package-level by passing the +`nooffset` option. + #### Commands -The `\plain{title=[]}{body}` command sets a slide in plain dark colors which can -be useful to focus attentation on a single image. - +The `\plain{title=[]}{body}` command sets a slide in plain dark colors +which can be useful to focus attentation on a single image. #### pgfplot styles diff --git a/beamercolorthememetropolis.sty b/beamercolorthememetropolis.sty index 4641254..9a0fc29 100644 --- a/beamercolorthememetropolis.sty +++ b/beamercolorthememetropolis.sty @@ -69,5 +69,4 @@ \fi -\mode - +\mode diff --git a/beamerfontthememetropolis.sty b/beamerfontthememetropolis.sty index f4d8e5c..07f1030 100644 --- a/beamerfontthememetropolis.sty +++ b/beamerfontthememetropolis.sty @@ -9,7 +9,7 @@ \ProvidesPackage{beamerfontthememetropolis} -\usepackage[no-math]{fontspec} +\RequirePackage[no-math]{fontspec} \defaultfontfeatures{Mapping=tex-text} diff --git a/beamerthemem.sty b/beamerthemem.sty index 19e6277..e44e849 100644 --- a/beamerthemem.sty +++ b/beamerthemem.sty @@ -12,14 +12,20 @@ %{{{ --- Options ---------------------- \newif\if@useTitleProgressBar -\@useTitleProgressBarfalse -\DeclareOptionBeamer{useTitleProgressBar}{\@useTitleProgressBartrue} - \newif\if@protectFrameTitle -\@protectFrameTitlefalse -\DeclareOptionBeamer{protectframetitle}{\@protectFrameTitletrue} -\DeclareOptionBeamer{blockbg}{\PassOptionsToPackage{blockbg}{beamercolorthememetropolis}} +\@useTitleProgressBarfalse +\@protectFrameTitlefalse + +\newlength{\@mtheme@voffset} +\setlength{\@mtheme@voffset}{2em} + +\DeclareOptionBeamer{useTitleProgressBar}{\@useTitleProgressBartrue} +\DeclareOptionBeamer{protectframetitle}{\@protectFrameTitletrue} +\DeclareOptionBeamer{blockbg}{% + \PassOptionsToPackage{blockbg}{beamercolorthememetropolis}% +} +\DeclareOptionBeamer{nooffset}{\setlength{\@mtheme@voffset}{0em}} \DeclareOptionBeamer*{% \PackageWarning{beamerthemem}{Unknown option `\CurrentOption'}% @@ -27,14 +33,16 @@ \ProcessOptionsBeamer - %}}} + +\mode + %{{{ --- Packages --------------------- -\usepackage[no-math]{fontspec} -\usepackage{etoolbox} -\usepackage{tikz} -\usepackage{pgfplots} +\RequirePackage[no-math]{fontspec} +\RequirePackage{etoolbox} +\RequirePackage{tikz} +\RequirePackage{pgfplots} \usetikzlibrary{backgrounds} \usetikzlibrary{calc} @@ -42,7 +50,6 @@ \usecolortheme{metropolis} \usefonttheme{metropolis} - %}}} %{{{ --- Titlepage -------------------- @@ -145,7 +152,7 @@ }% } \fi -% }}} +%}}} %{{{ --- Commands --------------------- \newcommand{\insertsectionHEAD}{% @@ -236,8 +243,9 @@ \progressbar@titleprogressbar \end{beamercolorbox} \fi -\vspace{2em} +\vspace{\@mtheme@voffset} } + %}}} %{{{ --- pgfplots --------------------- @@ -355,15 +363,13 @@ %}}} -%}}} +\mode -\mode - - -% {{{ misc +%{{{ misc \let\otp\titlepage \renewcommand{\titlepage}{\otp\addtocounter{framenumber}{-1}} \newcommand{\mreducelistspacing}{\vspace{-\topsep}} \linespread{1.15} + %}}} diff --git a/demo.pdf b/demo.pdf index d1ef106..bf1923c 100644 Binary files a/demo.pdf and b/demo.pdf differ