A clumsy workaround: Using the catchfilebetweentags
package. However this needs some additional comments in the .sty
files.
\documentclass{beamer}
\usecolortheme{whale}
\useoutertheme{split}
\usepackage{catchfilebetweentags}
\newcommand\fromtheme[2]{\ExecuteMetaData[beamertheme#1.sty]{#2}}
\newcommand\fromcolortheme[2]{\ExecuteMetaData[beamercolortheme#1.sty]{#2}}
\newcommand\fromfonttheme[2]{\ExecuteMetaData[beamerfonttheme#1.sty]{#2}}
\newcommand\fromoutertheme[2]{\ExecuteMetaData[beameroutertheme#1.sty]{#2}}
\newcommand\frominnertheme[2]{\ExecuteMetaData[beamerinnertheme#1.sty]{#2}}
\fromoutertheme{infolines}{footline:infolines}
\begin{document}
\begin{frame}
Test
\end{frame}
\end{document}
The .sty
files would need comments like:
%<*footline:infolines>
\defbeamertemplate*{footline}{infolines theme}
{
\leavevmode%
\hbox{%
\begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}%
\usebeamerfont{author in head/foot}\insertshortauthor\expandafter\beamer@ifempty\expandafter{\beamer@shortinstitute}{}{~~(\insertshortinstitute)}
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}%
\usebeamerfont{title in head/foot}\insertshorttitle
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,right]{date in head/foot}%
\usebeamerfont{date in head/foot}\insertshortdate{}\hspace*{2em}
\insertframenumber{} / \inserttotalframenumber\hspace*{2ex}
\end{beamercolorbox}}%
\vskip0pt%
}
%</footline:infolines>
%<*headline:infolines>
\defbeamertemplate*{headline}{infolines theme}
{
\leavevmode%
\hbox{%
\begin{beamercolorbox}[wd=.5\paperwidth,ht=2.65ex,dp=1.5ex,right]{section in head/foot}%
\usebeamerfont{section in head/foot}\insertsectionhead\hspace*{2ex}
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.5\paperwidth,ht=2.65ex,dp=1.5ex,left]{subsection in head/foot}%
\usebeamerfont{subsection in head/foot}\hspace*{2ex}\insertsubsectionhead
\end{beamercolorbox}}%
\vskip0pt%
}
%</headline:infolines>
Problems of the above Ansatz:
comments of the form %<*footline:infolines>
, %</footline:infolines>
would have to be inserted in the code, custom made themes would probably not do this and user would be confused for which templates it would work and for which ones not.
I know just loading a specific template will break as soon as the template tries to use something defined within the theme, but outside the template, for example things like \pgfdeclareverticalshading{beamer@topshade}{...}
would have to be inside the <*tag>
...</tag>
of course it would be more convenient if one would not have to know in which sub-theme the template is defined, but could just insert the general theme and this command would recursivly search the loaded sub-themes for a given tag.
I have not yet thought about how optional arguments of themes would fit into this...
....
Results of the test cases:
Test 1: simple case
works
Test 2: test if it works with parent theme
fail
Test 3: test if it works with options
fail