From 769943e0276228d2db9a7f89cd057d491eea4716 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Tue, 25 Apr 2023 11:30:48 -0400 Subject: [PATCH] beamerthemeUMBC.sty: allow partless sections. Sometimes having a full Part : Section hierarchy is too much. We can now use only sections, and the part titles (and the colon separators) will be gracefully omitted. --- beamerthemeUMBC.sty | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/beamerthemeUMBC.sty b/beamerthemeUMBC.sty index a376fd5..6824ac8 100644 --- a/beamerthemeUMBC.sty +++ b/beamerthemeUMBC.sty @@ -10,10 +10,21 @@ % Create a slide introducing new sections. \AtBeginSection[]{ \begin{frame} - \frametitle{Part \thepart, Section \thesection} + \frametitle{ + \ifx\insertpart\@empty% + \else% + Part \thepart, % + \fi% + Section \thesection + } \vfill \begin{center} - \usebeamerfont{title}\insertpart: \insertsectionhead\par% + \usebeamerfont{title} + \ifx\insertpart\@empty% + \else% + \insertpart: % + \fi% + \insertsectionhead\par% \end{center} \vfill \end{frame} @@ -21,7 +32,13 @@ % Define a new ``partsecframe'' environment that uses a default frame % title of ``:
'' when no other frame title is given. -\newenvironment{partsecframe}[1][\insertpart: \insertsectionhead] +\newenvironment{partsecframe}[1][% + \ifx\insertpart\@empty% + \else% + \insertpart: % + \fi% + \insertsectionhead% +] {\begin{frame}{#1}} {\end{frame}} -- 2.43.2