]> gitweb.michael.orlitzky.com - beamer-mjo.git/blobdiff - beamerthemeUMBC.sty
beamerthemeUMBC.sty: allow partless sections.
[beamer-mjo.git] / beamerthemeUMBC.sty
index 02be453185f7072b5feecad90f21d3a4269401d5..6824ac8a18928e05e17d11c395b36e069a35246e 100644 (file)
@@ -7,4 +7,52 @@
 \usefonttheme{UMBC}
 \usecolortheme{UMBC}
 
+% Create a slide introducing new sections.
+\AtBeginSection[]{
+  \begin{frame}
+    \frametitle{
+      \ifx\insertpart\@empty%
+      \else%
+      Part \thepart, %
+      \fi%
+      Section \thesection
+    }
+    \vfill
+    \begin{center}
+      \usebeamerfont{title}
+      \ifx\insertpart\@empty%
+      \else%
+      \insertpart: %
+      \fi%
+      \insertsectionhead\par%
+    \end{center}
+    \vfill
+  \end{frame}
+}
+
+% Define a new ``partsecframe'' environment that uses a default frame
+% title of ``<part>: <section>'' when no other frame title is given.
+\newenvironment{partsecframe}[1][%
+  \ifx\insertpart\@empty%
+  \else%
+  \insertpart: %
+  \fi%
+  \insertsectionhead%
+]
+  {\begin{frame}{#1}}
+  {\end{frame}}
+
+% Define a new ``refsframe'' environment for the bibliography.
+% It automatically handles the frame breaks, and fixes the busted
+% vertical spacing on slides >= 2. The extra curly braces ensure that
+% the change to the ``frametitle continuation'' template are only
+% temporary.
+\newenvironment{refsframe}[1][References] {
+    \splittopskip=2.13em % Fixes the vertical spacing of split frames.
+    \setbeamertemplate{frametitle continuation}{} % Same title for all frames.
+    \begin{frame}[allowframebreaks]{#1}
+  }
+  { \end{frame} }
+
+
 \mode<all>