Merge pull request #25 from jdahm/offset

Fix #17 and clean up syntax
This commit is contained in:
Matthias Vogelgesang 2015-01-30 08:02:24 +01:00
commit f3b3e95666
5 changed files with 34 additions and 25 deletions

View File

@ -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 `blockbg` option defines extra colors used in defining the blocks.
The blocks then have a gray background similar to other beamer themes. 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 #### Commands
The `\plain{title=[]}{body}` command sets a slide in plain dark colors which can The `\plain{title=[]}{body}` command sets a slide in plain dark colors
be useful to focus attentation on a single image. which can be useful to focus attentation on a single image.
#### pgfplot styles #### pgfplot styles

View File

@ -69,5 +69,4 @@
\fi \fi
\mode \mode<all>
<all>

View File

@ -9,7 +9,7 @@
\ProvidesPackage{beamerfontthememetropolis} \ProvidesPackage{beamerfontthememetropolis}
\usepackage[no-math]{fontspec} \RequirePackage[no-math]{fontspec}
\defaultfontfeatures{Mapping=tex-text} \defaultfontfeatures{Mapping=tex-text}

View File

@ -12,14 +12,20 @@
%{{{ --- Options ---------------------- %{{{ --- Options ----------------------
\newif\if@useTitleProgressBar \newif\if@useTitleProgressBar
\@useTitleProgressBarfalse
\DeclareOptionBeamer{useTitleProgressBar}{\@useTitleProgressBartrue}
\newif\if@protectFrameTitle \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*{% \DeclareOptionBeamer*{%
\PackageWarning{beamerthemem}{Unknown option `\CurrentOption'}% \PackageWarning{beamerthemem}{Unknown option `\CurrentOption'}%
@ -27,14 +33,16 @@
\ProcessOptionsBeamer \ProcessOptionsBeamer
%}}} %}}}
\mode<presentation>
%{{{ --- Packages --------------------- %{{{ --- Packages ---------------------
\usepackage[no-math]{fontspec} \RequirePackage[no-math]{fontspec}
\usepackage{etoolbox} \RequirePackage{etoolbox}
\usepackage{tikz} \RequirePackage{tikz}
\usepackage{pgfplots} \RequirePackage{pgfplots}
\usetikzlibrary{backgrounds} \usetikzlibrary{backgrounds}
\usetikzlibrary{calc} \usetikzlibrary{calc}
@ -42,7 +50,6 @@
\usecolortheme{metropolis} \usecolortheme{metropolis}
\usefonttheme{metropolis} \usefonttheme{metropolis}
%}}} %}}}
%{{{ --- Titlepage -------------------- %{{{ --- Titlepage --------------------
@ -236,8 +243,9 @@
\progressbar@titleprogressbar \progressbar@titleprogressbar
\end{beamercolorbox} \end{beamercolorbox}
\fi \fi
\vspace{2em} \vspace{\@mtheme@voffset}
} }
%}}} %}}}
%{{{ --- pgfplots --------------------- %{{{ --- pgfplots ---------------------
@ -355,10 +363,7 @@
%}}} %}}}
%}}} \mode<all>
\mode
<all>
%{{{ misc %{{{ misc
\let\otp\titlepage \let\otp\titlepage
@ -366,4 +371,5 @@
\newcommand{\mreducelistspacing}{\vspace{-\topsep}} \newcommand{\mreducelistspacing}{\vspace{-\topsep}}
\linespread{1.15} \linespread{1.15}
%}}} %}}}

BIN
demo.pdf

Binary file not shown.