From ef61b7197ebd6144694e39bec24fc2e4f4ea0d64 Mon Sep 17 00:00:00 2001 From: Benedikt Kleinmeier Date: Sat, 25 Apr 2015 19:44:14 +0200 Subject: [PATCH] Revised three options: usesmallcapitalsintitle, usesectionslide and nototalslides. README.md: - Added explanation for these three options. beamerthemem: - Renamed all three options: * usesmallcapitalsintitle -> nosmallcapitals * usesectionslide -> nosectionslide * nototalslides -> usetotalslideindicator - Disabled all options by default. I.e., you have to enable them explicitly. --- README.md | 10 ++++++++ beamerthemem.sty | 66 ++++++++++++++++++++++++++++++------------------ 2 files changed, 51 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index 60a2fab..8bafb91 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,16 @@ 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. +With option `nosectionslide`, no dedicated slide is produced when a new section +starts. By default when using the `\section` command, a slide is created with +just the title on it. + +The `nosmallcapitals` option supresses the usage of small capitals on +title page, frame titles and dedicated section slides. + +Option `usetotalslideindicator` creates slide numbering in lower right corner +in following format: #current/#total. By default, just current page number is +printed. #### Commands diff --git a/beamerthemem.sty b/beamerthemem.sty index 6828bcb..ecc0977 100644 --- a/beamerthemem.sty +++ b/beamerthemem.sty @@ -13,15 +13,15 @@ \newif\if@useTitleProgressBar \newif\if@protectFrameTitle -\newif\if@useSmallCapitalsInTitle -\newif\if@useSectionSlide -\newif\if@noTotalSlides +\newif\if@noSmallCapitals +\newif\if@noSectionSlide +\newif\if@useTotalSlideIndicator \@useTitleProgressBarfalse \@protectFrameTitlefalse -\@useSmallCapitalsInTitlefalse -\@useSectionSlidefalse -\@noTotalSlidesfalse +\@noSmallCapitalsfalse +\@noSectionSlidefalse +\@useTotalSlideIndicatorfalse \newlength{\@mtheme@voffset} \setlength{\@mtheme@voffset}{2em} @@ -37,9 +37,9 @@ \PackageWarning{beamerthemem}{Unknown option `\CurrentOption'}% } -\DeclareOptionBeamer{usesmallcapitalsintitle}{\@useSmallCapitalsInTitletrue} -\DeclareOptionBeamer{usesectionslide}{\@useSectionSlidetrue} -\DeclareOptionBeamer{nototalslides}{\@noTotalSlidestrue} +\DeclareOptionBeamer{nosmallcapitals}{\@noSmallCapitalstrue} +\DeclareOptionBeamer{nosectionslide}{\@noSectionSlidetrue} +\DeclareOptionBeamer{usetotalslideindicator}{\@useTotalSlideIndicatortrue} \ProcessOptionsBeamer @@ -86,7 +86,11 @@ \vfill \ifx\inserttitle\@empty% \else% + \if@noSmallCapitals% {\raggedright\linespread{1.0}\usebeamerfont{title}\usebeamercolor[fg]{title}\inserttitle\par}% + \else% + {\raggedright\linespread{1.0}\usebeamerfont{title}\usebeamercolor[fg]{title}\scshape\MakeLowercase{\inserttitle}\par}% + \fi% \vspace*{0.5em} \fi% \ifx\insertsubtitle\@empty% @@ -183,11 +187,12 @@ \newcommand{\insertsectionHEAD}{% \expandafter\insertsectionHEADaux\insertsectionhead} -\if@useSmallCapitalsInTitle -\newcommand{\insertsectionHEADaux}[3]{\textsc{\MakeLowercase{#3}}} -\else -\newcommand{\insertsectionHEADaux}[3]{#3} -\fi + +\if@noSmallCapitals% +\newcommand{\insertsectionHEADaux}[3]{#3}% +\else% +\newcommand{\insertsectionHEADaux}[3]{\textsc{\MakeLowercase{#3}}}% +\fi% \newcommand{\plain}[2][]{% \begingroup @@ -219,9 +224,10 @@ %{{{ --- Sections --------------------- % Insert frame with section title at every section start -\if@useSectionSlide \AtBeginSection[] { + \if@noSectionSlide% + \else% \begingroup \setbeamercolor{background canvas}{parent=palette primary} \begin{frame}[plain] @@ -229,8 +235,8 @@ \progressbar@sectionprogressbar% \end{frame} \endgroup + \fi% } -\fi %}}} %{{{ --- Captions --------------------- @@ -246,11 +252,11 @@ {% \begin{beamercolorbox}[wd=\textwidth,ht=3ex,dp=3ex,leftskip=0.3cm,rightskip=0.3cm]{structure}% \hfill\usebeamerfont{page number in head/foot}% - \if@noTotalSlides - \insertpagenumber% - \else + \if@useTotalSlideIndicator% \insertpagenumber/\insertpresentationendpage% - \fi + \else% + \insertpagenumber% + \fi% \end{beamercolorbox}% } @@ -267,11 +273,21 @@ \setbeamertemplate{frametitle}{% \nointerlineskip \begin{beamercolorbox}[wd=\paperwidth,leftskip=0.3cm,rightskip=0.3cm,ht=2.5ex,dp=1.5ex]{frametitle} -\if@protectFrameTitle - \usebeamerfont{frametitle}\protect\insertframetitle% -\else - \usebeamerfont{frametitle}\insertframetitle% -\fi +\usebeamerfont{frametitle}% +\if@protectFrameTitle% + \protect% + \if@noSmallCapitals% + \insertframetitle% + \else% + \textsc{\MakeLowercase{\insertframetitle}}% + \fi% +\else% + \if@noSmallCapitals% + \insertframetitle% + \else% + \textsc{\MakeLowercase{\insertframetitle}}% + \fi% +\fi% \end{beamercolorbox}% \if@useTitleProgressBar \vspace{-.5em}