I'm trying to adapt an unofficial Beamer template for my university (GitHub, Overleaf). Right now, when I try to compile this MWE:
\documentclass{beamer}
\usetheme[bgphoto]{polimi}
\title[MS thesis]{Thesis title}
\subtitle{Master Thesis in Computer Science and Engineering}
\author[Alessandro Bertulli]{Alessandro Bertulli, matr. xxxxxx}
\date[05/10/2023]{5th October 2023}
\begin{document}
\begin{frame}
\maketitle
\end{frame}
\section{Introduction}
\begin{frame}[plain]{}
\sectionpage
\end{frame}
\end{document}
I get this as the sectionpage
:
I want to get rid of the header, which IIUC should be the effect of using plain
as option. Apparently, this only works if it's not the first slide after the title, as shows the secon MWE:
\documentclass{beamer}
\usetheme[bgphoto]{polimi}
\title[MS thesis]{Thesis title}
\subtitle{Master Thesis in Computer Science and Engineering}
\author[Alessandro Bertulli]{Alessandro Bertulli, matr. xxxxxx}
\date[05/10/2023]{5th October 2023}
\begin{document}
\begin{frame}
\maketitle
\end{frame}
\begin{frame}
\end{frame}
\section{Introduction}
\begin{frame}[plain]{}
\sectionpage
\end{frame}
\end{document}
What can be the reason? Thanks!
For completeness, I post here the style files:
beamerthemepolimi.sty
:
% Pasquale Africa <[email protected]>
% Beamer port of the official PoliMi presentation theme.
\mode<all>
\newif\if@bgphoto
\@bgphotofalse
\DeclareOption{bgphoto}{\@bgphototrue}
\newif\if@nologo
\@nologofalse
\DeclareOption{nologo}{\@nologotrue}
\ProcessOptions
\RequirePackage{tikz}
\usetikzlibrary{calc}
\graphicspath{{beamerthemepolimi_img/}}
\RequirePackage{etoolbox} % \patchcmd
\useinnertheme{polimi}
\useoutertheme{polimi}
\usecolortheme{polimi}
\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{blocks}[rounded][shadow=true]
\setbeamertemplate{itemize items}[square]
\setbeamertemplate{itemize subitem}[triangle]
% Set margins.
\setbeamersize{text margin left=\xshift, text margin right=\xshift}
\setlength{\leftmargini}{\xshift}
\let\oldtoc\tableofcontents
\renewcommand{\tableofcontents}[1][]{%
\hspace*{0.5\xshift}
\begin{minipage}{\textwidth}
\oldtoc[#1]
\end{minipage}
}
beamerouterthemepolimi.sty
\mode<presentation>
\newlength{\xshift}
\setlength{\xshift}{0.05\paperwidth}
% Header.
\defbeamertemplate*{frametitle}{polimi}
{
\begin{tikzpicture}[overlay, remember picture]
\node at ([shift={(\xshift, -0.6)}] current page.north west) [anchor=south west, inner sep=0pt]
{
{\small \insertsectionhead \ifx\insertsubsection\empty\else\ - \insertsubsectionhead\fi\leavevmode}
};
\node at ([shift={(\xshift, -1.25)}] current page.north west) [anchor=south west, inner sep=0pt]
{
\insertframetitle
};
\end{tikzpicture}
\vspace{1.1cm}
}
% Header.
\defbeamertemplate*{frametitle}{plain}{}
% Use frametitle template even if \frametitle is empty.
\patchcmd{\endbeamer@frameslide}{\ifx\beamer@frametitle\@empty}{\iffalse}{}{\errmessage{Failed to patch frametitle.}}
% Footer.
\defbeamertemplate{footline}{polimi}{
\begin{minipage}[b][1cm][c]{\paperwidth}
\ifnum\c@framenumber>0
\begin{tikzpicture}[overlay, remember picture]
\node at ([shift={(\xshift, 0.5)}] current page.south west) [anchor=west, inner sep=0pt]
{
{\scriptsize\color{white} \insertauthor}
};
\node at ([shift={(-0.5\xshift, 0.5)}] current page.south east) [anchor=east, inner sep=0pt]
{
\includegraphics[height=\baselineskip]{logo_bandiera.png}
};
\end{tikzpicture}
\fi
\end{minipage}
}
\setbeamertemplate{footline}[polimi]
% Enable nonumber option.
\BeforeBeginEnvironment{frame}{
\setbeamertemplate{background}[polimi]
\setbeamertemplate{frametitle}[polimi]
\setbeamertemplate{headline}[frame number]
}
\makeatletter
\define@key{beamerframe}{nonumber}[true]{
\setbeamertemplate{headline}{}
\addtocounter{framenumber}{-1}
}
\makeatother
% Enable plain option.
\makeatletter
\define@key{beamerframe}{plain}[true]{
\ifnum\c@framenumber>0
\setbeamertemplate{background}[footer]
\setbeamertemplate{frametitle}[plain]
\setbeamertemplate{headline}{}
\addtocounter{framenumber}{-1}
\fi
}
\makeatother
beamerinnerthemepolimi.sty
\mode<presentation>
% Background.
\defbeamertemplate*{background}{polimi}{
% Titlepage.
\ifnum\c@framenumber=0
\begin{tikzpicture}[overlay, remember picture]
\if@bgphoto
\node at (current page.north) [anchor=north, inner sep=0pt] {\includegraphics[width=\paperwidth]{bgphoto_cut.jpg}};
\fi
\node (foot) at (current page.south) [anchor=south, minimum width=\paperwidth, minimum height=0.4415\paperheight, fill=bluePolimi] {};
\if@nologo\else
\node at (foot.north) [anchor=south, inner sep=0.5cm] {
\if@bgphoto
\includegraphics[width=0.3\paperwidth]{logo_centrato_COL_negativo.png}
\else
\includegraphics[width=0.3\paperwidth]{logo_centrato_COL_positivo.png}
\fi
};
\fi
\node at ([shift={(0, -0.1)}] foot.north) {\includegraphics[width=\paperwidth]{decoration.pdf}};
\end{tikzpicture}
\else
\begin{tikzpicture}[overlay, remember picture]
\node (head) at (current page.north) [anchor=north, minimum width=\paperwidth, minimum height=0.1835\paperheight, fill=bluePolimi] {};
\node at ([shift={(0, 0.1)}] head.south) {\includegraphics[width=\paperwidth]{decoration.pdf}};
\node (foot) at (current page.south) [anchor=south, minimum width=\paperwidth, minimum height=0.105\paperheight, fill=bluePolimi] {};
\end{tikzpicture}
\fi
}
% Only footer background.
\defbeamertemplate*{background}{footer}{
\begin{tikzpicture}[overlay, remember picture]
\node (foot) at (current page.south) [anchor=south, minimum width=\paperwidth, minimum height=0.105\paperheight, fill=bluePolimi] {};
\end{tikzpicture}
}
% Title page.
\defbeamertemplate*{title page}{polimi}[1][]
{
\color{white}
\vspace{4.25cm}
\begin{minipage}[t][\baselineskip]{\paperwidth}
{\Large\bf \inserttitle}
\end{minipage}
\\[\baselineskip]
\begin{minipage}[t][2\baselineskip]{\paperwidth}
{\large \insertsubtitle}
\end{minipage}
\vfill
\begin{minipage}[t][\baselineskip]{\paperwidth}
{\large\bf \insertauthor}
\end{minipage}
\begin{minipage}[t][\baselineskip]{\paperwidth}
\insertdate
\end{minipage}
\vfill
\addtocounter{framenumber}{-1}
}
% Table of Contents.
\setbeamertemplate{section in toc}[circle]
\setbeamertemplate{subsection in toc}{\leavevmode \leftskip=0.7em {\color{bluePolimi} $\bullet$} \hskip1pt \inserttocsubsection\par}
% Section page.
\defbeamertemplate*{section page}{polimi}{
\begin{tikzpicture}[overlay, remember picture]
\node (foot) at (current page.south) [anchor=south, minimum width=\paperwidth, minimum height=0.4415\paperheight, fill=bluePolimi] {};
\node at ([shift={(0, -0.1)}] foot.north) {\includegraphics[width=\paperwidth]{decoration.pdf}};
% \path let \p1 = ([shift={(0, 0.105\paperheight+0.25)}] current page.south west), \p2 = (current page.east) in (\x1, \y1) edge [white, line width=0.5] (\x2, \y1);
\node at ([shift={(\xshift, 3.5)}] current page.south west) [anchor=north west, inner sep=0pt, text width=\textwidth]
{
{\color{white}\Large\bf \insertsection}
};
\end{tikzpicture}
}
\setbeamertemplate{section page}[polimi]
% Subsection page.
\defbeamertemplate*{subsection page}{polimi}{
\begin{tikzpicture}[overlay, remember picture]
\node (foot) at (current page.south) [anchor=south, minimum width=\paperwidth, minimum height=0.4415\paperheight, fill=bluePolimi] {};
\node at ([shift={(0, -0.1)}] foot.north) {\includegraphics[width=\paperwidth]{decoration.pdf}};
% \path let \p1 = ([shift={(0, 0.105\paperheight+0.25)}] current page.south east), \p2 = (current page.west) in (\paperwidth,\y1) edge [white, line width=0.5] (\x2,\y1);
\node at ([shift={(\xshift, 3.5)}] current page.south west) [anchor=north west, inner sep=0pt, text width=\textwidth]
{
{\color{white}\Large\bf \insertsubsection}
};
\end{tikzpicture}
}
\setbeamertemplate{subsection page}[polimi]
EDIT: beamercolorthemepolimi.sty
:
\mode<presentation>
\definecolor{bluePolimi}{RGB}{114, 143, 165}
\definecolor{greenPolimi}{RGB}{0, 110, 0}
\definecolor{redPolimi}{RGB}{180, 0, 0}
\setbeamercolor{frametitle}{fg=white}
\setbeamercolor{normal text}{fg=black,bg=white}
\setbeamercolor{alerted text}{fg=redPolimi}
\setbeamercolor{example text}{fg=greenPolimi}
\setbeamercolor{block title}{bg=bluePolimi, fg=white}
\setbeamercolor{block body}{bg=bluePolimi!10!white, fg=black}
\setbeamercolor{block title alerted}{bg=redPolimi, fg=white}
\setbeamercolor{block body alerted}{bg=redPolimi!10!white, fg=black}
\setbeamercolor{block title example}{bg=greenPolimi, fg=white}
\setbeamercolor{block body example}{bg=greenPolimi!10!white, fg=black}
\setbeamercolor{itemize item}{fg=bluePolimi}
\setbeamercolor{itemize subitem}{fg=bluePolimi}
\setbeamercolor{section in toc}{fg=black}
\setbeamercolor{subsection in toc}{fg=black}
\setbeamercolor{section number projected}{bg=bluePolimi}
\setbeamercolor{page number in head/foot}{fg=white}