I'm writing on a .sty - file for a theme, which others will use too.
My aim is to have as less as possible additional (visible) code in the document environment of a corresponding .tex-file using the particular theme.
I run across a obstacle concerning the frametitle - titlepage interaction. I want to avoid that people give the titlepage an additional frame title.
MWE
\documentclass{beamer}
\pgfdeclareimage[width=.5\paperwidth]{mybackground}{beamericononline}
\defbeamertemplate*{title page}{mytitlepage}
{
\begin{picture}(0,0)
\put(-20,-60){%
\pgfuseimage{mybackground}
}
\put(165,0){%
%\colorbox{teal}{
\begin{minipage}[b][10mm][t]{0.5\textwidth}
\usebeamerfont{title}{\inserttitle\par}
\end{minipage}%
%}
}
\end{picture}
}
\title{A proper test title for a test presentation?}
\begin{document}
%%----------------------------------------------------------------------
%% This is how it should look like, even if you uncomment the frametitle
%%----------------------------------------------------------------------
\begin{frame}%{An extra frame title\\[2ex] is not allowed}
\titlepage
\end{frame}
%%----------------------------------------------------------------------
%% This should not be allowed, an error shall stop the compiling
%%----------------------------------------------------------------------
\begin{frame}{An extra frame title\\[2ex] is not allowed}
\titlepage
\end{frame}
%%----------------------------------------------------------------------
%% Frametitle suppressed, but I prefer to handle the added code in the
%% .sty file, i.e. before the document environment
%%----------------------------------------------------------------------
{
\setbeamertemplate{frametitle}{}
\begin{frame}{An extra frame title\\[2ex] is not allowed}
\titlepage
\end{frame}
}
I already tried several stuff shifting the
{
\setbeamertemplate{frametitle}{}
...
}
before the document, e.g. inside the title page template. Other ideas using additional \newif
,\if
,\ifx
or defining a key reacting to the input \titlepage
(as part of the frame body), similar to tex.stackexchange.com/questions/173201 did not work.
Is there a way (next to the given one) to suppress the output of the frame title using (only) a style file?
\begin{frame}\titlepage\end{frame}
?[plain,noframenumbering]
, then according to link we have the original\begin{frame} ... \end{frame}
situation. I know that these additional commands are not really a part of the original question.