% \iffalse meta-comment
%
% TUDa-CI -- Corporate Design for TU Darmstadt
% ----------------------------------------------------------------------------
%
%  Copyright (C) 2018--2025 by Marei Peischl <marei@peitex.de>
%
% ============================================================================
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3c
% of this license or (at your option) any later version.
% The latest version of this license is in
% http://www.latex-project.org/lppl.txt
% and version 1.3c or later is part of all distributions of LaTeX
% version 2008/05/04 or later.
%
% This work has the LPPL maintenance status `maintained'.
%
% The Current Maintainer of this work is
%   Marei Peischl <tuda-ci@peitex.de>
%
% The development repository can be found at
% https://github.com/tudace/tuda_latex_templates
% Please use the issue tracker for feedback!
%
% ============================================================================
%
% \fi
%
% \iffalse% no documentation on this
% \iffalse^^A Preparation for real docstrip documentation
%<*driver>
\ProvidesFile{beamerinnerthemeTUDa.dtx}
    [2025-11-13 v4.05 Inner beamer theme of tuda-ci]
\typeout{***********************************************************}
\typeout{No documentation included in this file! Please see tuda-ci.pdf for more information and DEMO-TUDaBeamer.tex/.pdf for an example of use.}
\typeout{***********************************************************}
\stop
%</driver>
%<*package>
%<@@=ptxcd>
\NeedsTeXFormat{LaTeX2e}[2022/06/01]
%<main>\ProvidesExplPackage{beamerinnerthemeTUDa}{2025-11-13}{4.05}{Inner beamer theme of tuda-ci}
%<2023>\ProvidesExplPackage{beamerinnerthemeTUDa2023}{2025-11-13}{4.05}{Inner beamer theme of tuda-ci, Design of 2023}
%<2008>\ProvidesExplPackage{beamerinnerthemeTUDa2008}{2025-11-13}{4.05}{Inner beamer theme of tuda-ci, compatibility for design of 2008}
%</package>
%<*driver>^^A Preparation for real docstrip documentation
\providecommand*{\TUDaDocDTXfiles}{beamerinnerthemeTUDa.dtx}
\input{tuda-ci.dtx}
%</driver>
% \fi
%
% \changes{v4.00}{2025-01-26}{Converted to DTX file}
%
% \MaybeStop{}
%
% \section{Implementation}
%
% \iffalse
%<*package>
%<*main>
% \fi
%    \begin{macrocode}
\int_new:N \g_@@_beamer_toc_col_int
\tl_if_exist:NF \g_@@_design_tl {
	\tl_new:N \g_@@_design_tl
	\keys_define:nn {ptxcd/beamer} {
		design .choice:,
		design / 2023 .code:n = {
			\tl_gset:Nn  \g_@@_design_tl {2023}
			\PassOptionsToClass{aspectratio=169}{beamer}
		},
		design / 2008 .code:n = {
			\tl_gset:Nn  \g_@@_design_tl {2008}
		},
		design .initial:n = 2023,
		design .usage:n = load,
		design2023 .meta:n = {design=2023},
		design2008 .meta:n = {design=2008},
	}
}
\keys_define:nn {ptxcd/beamer/inner} {
	author-on-title .bool_gset:N = \g_ptxcd_authorontitle_bool,
	author-on-title .initial:n = false,
	author-on-title .default:n = true,
	authorontitle .meta:n = {author-on-title=#1},
	toc-columns .choices:nn =  {one,two,auto} {
		\int_gset_eq:NN \g_@@_beamer_toc_col_int  \l_keys_choice_int
	},
	toc-columns / 1 .meta:n = {toc-columns=one},
	toc-columns / 2 .meta:n = {toc-columns=two},
	toc-columns .initial:n = auto,
	design .meta:nn = {ptxcd/beamer} {design=#1}
}
\ProcessKeyOptions[ptxcd/beamer/inner]
\ExplSyntaxOff
\RequirePackage{trimclip}
\ExplSyntaxOn
\box_new:N \l_@@_titlegraphic_box
\box_new:N \l_@@_titlehead_box
\dim_new:N \l_@@_titlegraphic_ht_dim
\dim_new:N \l_@@_titlegraphic_wd_dim
\box_if_exist:NF \g_@@_logo_box {
	\dim_new:N \g_@@_beamer_logosep_dim
	\dim_new:N \l_@@_beamer_extraindent_dim
	\dim_new:N \g_@@_beamer_sep_dim
	\box_new:N \g_@@_logo_box
}
\cs_set:Nn \_@@_block_colorsep: {.75ex}
\RenewDocumentCommand{\titlegraphic}{sm}{
	\IfBooleanTF{#1}{
		\def\inserttitlegraphic{
			\hbox_set:Nn \l_@@_titlegraphic_box {\raisebox{\depth}{#2}}
			\box_resize_to_wd:Nn \l_@@_titlegraphic_box {\width}
			\dim_compare:nTF {\box_ht:N \l_@@_titlegraphic_box - \height> \c_zero_dim}
			{
				\dim_set:Nn \l_tmpa_dim {.5\box_ht:N \l_@@_titlegraphic_box - .5\height}
				\clipbox{0pt~\dim_eval:n{\l_tmpa_dim}~0pt~\dim_eval:n{\l_tmpa_dim}}{\box_use:N \l_@@_titlegraphic_box}
			}{
				\box_resize_to_ht:Nn \l_@@_titlegraphic_box {\height}
				\dim_set:Nn \l_tmpa_dim {(\box_wd:N \l_@@_titlegraphic_box - \width) / 2}
				\clipbox{\dim_eval:n{\l_tmpa_dim}~0pt~\dim_eval:n{\l_tmpa_dim}~0pt}{\box_use:N \l_@@_titlegraphic_box}
			}
		}
	}{
		\def\inserttitlegraphic{#2}
	}
}
\useinnertheme{TUDa\g_@@_design_tl}
%    \end{macrocode}
% Blocks
%    \begin{macrocode}
\defbeamertemplate*{block~begin}{TUDa}{
	\par\vskip\medskipamount%
	\begin{beamercolorbox}[wd=\dimexpr\linewidth+2\l_@@_beamer_extraindent_dim,sep=.5pt,
		leftskip=\dim_eval:n {\dim_compare:nTF {\l_@@_beamer_extraindent_dim>\c_zero_dim} {\l_@@_beamer_extraindent_dim-\beamer@colbox@sep} {\_@@_block_colorsep:}},
	]{block~title}
	\ifx\insertblocktitle\@empty
	\else
	\begin{beamercolorbox}[colsep*=\_@@_block_colorsep:,
		 wd=\dimexpr\linewidth-1pt-1.5ex\relax]{block~title}
		\usebeamerfont*{block title}\insertblocktitle%
	\end{beamercolorbox}%
	\ifbeamercolorempty[bg]{block~title}
	{}
	{\ifbeamercolorempty[bg]{block~body}{}{\par\nointerlineskip\vskip-0.5pt}}%
	\leavevmode
	\fi
	\begin{beamercolorbox}[colsep*=\_@@_block_colorsep:,vmode, wd=\dimexpr\linewidth-1.5ex-1pt\relax]{block~body}%
		\usebeamerfont{block~body}%
		\ifbeamercolorempty[bg]{block~body}{\vskip-.25ex}{\vskip-\_@@_block_colorsep:}\vbox{}%
}
\defbeamertemplate*{block~end}{TUDa}
	{\end{beamercolorbox}\end{beamercolorbox}\vskip\smallskipamount}
\defbeamertemplate*{block~alerted~begin}{TUDa}{
	\par\vskip\medskipamount%
	\begin{beamercolorbox}[
		wd=\dimexpr\linewidth+2\l_@@_beamer_extraindent_dim,
		sep=1.5pt,
		leftskip=\dim_eval:n {\dim_compare:nTF {\l_@@_beamer_extraindent_dim>\c_zero_dim} {\l_@@_beamer_extraindent_dim-\beamer@colbox@sep} {\_@@_block_colorsep:}},
	]{block~frame~alerted}
	\ifx\insertblocktitle\@empty
	\else
	\begin{beamercolorbox}[wd=\dim_eval:n {\linewidth-1.5ex-3pt},colsep*=\_@@_block_colorsep:]{block~title~alerted}
		\usebeamerfont*{block~title~alerted}\insertblocktitle%
	\end{beamercolorbox}%
	\vskip1.5pt\par\nointerlineskip
	\fi
	\leavevmode
	\usebeamerfont{block~body~alerted}%
	\begin{beamercolorbox}[wd=\dim_eval:n {\linewidth-1.5ex-3pt},colsep*=\_@@_block_colorsep:]{block~body~alerted}%
}
\defbeamertemplate*{block~alerted~end}{TUDa}
	{\end{beamercolorbox}\end{beamercolorbox}\vskip\smallskipamount}
\defbeamertemplate*{block~example~begin}{TUDa}{
	\par\vskip\medskipamount%
	\begin{beamercolorbox}[
		wd=\dimexpr\linewidth+2\l_@@_beamer_extraindent_dim,
		sep=1.5pt,
		leftskip=\dim_eval:n {\dim_compare:nTF {\l_@@_beamer_extraindent_dim>\c_zero_dim} {\l_@@_beamer_extraindent_dim-\beamer@colbox@sep} {\_@@_block_colorsep:}},
		]{block~frame~example}
	\ifx\insertblocktitle\@empty
	\else
	\begin{beamercolorbox}[wd=\dim_eval:n {\linewidth-1.5ex-3pt},colsep*=\_@@_block_colorsep:]{block~title~example}
		\usebeamerfont*{block~title~example}\insertblocktitle%
	\end{beamercolorbox}%
\vskip1.5pt\par\nointerlineskip
	\fi
	\leavevmode
	\usebeamerfont{block~body~example}%
	\begin{beamercolorbox}[wd=\dim_eval:n {\linewidth-1.5ex-3pt},colsep*=\_@@_block_colorsep:]{block~body~example}%
}
\defbeamertemplate*{block~example~end}{TUDa}
	{\end{beamercolorbox}\end{beamercolorbox}\vskip\smallskipamount}
%    \end{macrocode}
% \iffalse
%</main>
%<*2023>
% \fi
%    \begin{macrocode}
\mode<presentation>
\RequirePackage{beamerinnerthemeTUDa}
\ExplSyntaxOff
\RequirePackage{multicol}
\ExplSyntaxOn
\AddToHook{begindocument}[ptxcd-titlegraphic]{
	\dim_set:Nn \l_@@_titlegraphic_ht_dim {\paperheight}
	\dim_set:Nn \l_@@_titlegraphic_wd_dim {\paperwidth}
}
\defbeamertemplate*{titlegraphic}{TUDa2023}{{
			\def\width{\l_@@_titlegraphic_wd_dim}
			\def\height{\l_@@_titlegraphic_ht_dim}
			\usebeamercolor[fg]{titlegraphic}\inserttitlegraphic\par
		}}
%    \end{macrocode}
%
% \begin{macro}{\ps@titlegraphic@titlepage}
%    \begin{macrocode}
\def\ps@titlegraphic@titlepage{%
	\setbeamertemplate{background}{\usebeamertemplate{titlegraphic}}
	\@nameuse{ps@navigation}%
}
%    \end{macrocode}
% \end{macro}
%
%    \begin{macrocode}
\defbeamertemplate*{title~page}{TUDa2023}[1][]
{
	\ifbeamer@plainframe
		\skip_vertical:n {\dimexpr\paperheight/38- \beamer@frametopskip}%
		\color{red}
		\hspace*{\fill}
		\raisebox{\dimexpr-\height+.33\c_ptxcd_logoheight_dim}{\includegraphics[height=\dim_use:N \c_ptxcd_logoheight_dim]{tuda_logo}}\hspace*{\dimexpr.7pt-\beamer@rightmargin}
		\par
		\vskip1.39\baselineskip
	\fi
	\vbox{}
	\thispagestyle{titlegraphic@titlepage}
	\vskip.185\paperheight
	\begingroup
	\centering
	\usebeamertemplate{title}
%    \end{macrocode}
%    \vskip1em\par
%    \begin{macrocode}
	\bool_if:NT \g_ptxcd_authorontitle_bool {
		\usebeamertemplate{author}
		\usebeamertemplate{institute}
	}
	\usebeamertemplate{date}
	\endgroup
	\vfill
}
\defbeamertemplate*{title}{TUDa2023}[1][]{%
	\begin{beamercolorbox}[sep=8pt,center,#1]{title}
		\usebeamerfont{title}\text_uppercase:n {\inserttitle}\par%
		\ifx\insertsubtitle\@empty%
		\else%
			\vskip.45em%
			{\usebeamerfont{subtitle}\usebeamercolor[fg]{subtitle}\insertsubtitle\par}%
		\fi%
	\end{beamercolorbox}%
}
\defbeamertemplate{author}{TUDa2023}[1][]{%
	\begin{beamercolorbox}[sep=8pt,center,#1]{author}
		\usebeamerfont{author}\insertauthor
	\end{beamercolorbox}
}
\defbeamertemplate{institute}{TUDa2023}[1][]{%
	\begin{beamercolorbox}[sep=8pt,center,#1]{institute}
		\usebeamerfont{institute}\insertinstitute
	\end{beamercolorbox}
}
\defbeamertemplate{date}{TUDa2023}[1][]{%
	\begin{beamercolorbox}[sep=8pt,center,#1]{date}
		\usebeamerfont{date}\insertdate
	\end{beamercolorbox}
}
%    \end{macrocode}
% partner/sub logo
%    \begin{macrocode}
\box_new:N  \g_@@_partnerlogo_box
\dim_new:N \l_@@_partnerlogo_ht_dim
\dim_gset:Nn \l_@@_partnerlogo_ht_dim {.6\c_ptxcd_logoheight_dim}
\dim_new:N \l_@@_partnerlogo_wd_dim
\dim_gset:Nn \l_@@_partnerlogo_wd_dim {1.6\c_ptxcd_logoheight_dim}
\box_new:N  \g_@@_sublogo_box
\dim_new:N \l_@@_sublogo_wd_dim
\dim_gset:Nn \l_@@_sublogo_wd_dim {2.2\c_ptxcd_logoheight_dim}
\dim_new:N \l_@@_sublogo_ht_dim
\dim_gset:Nn  \l_@@_sublogo_ht_dim {.6\c_ptxcd_logoheight_dim}
\cs_new:Nn \_@@_setup_logo_box:nnn {
	\begingroup
	\def\width{\use:c {l_@@_#2_wd_dim}}
	\def\height{\use:c {l_@@_#2_ht_dim}}
	\IfBooleanTF{#1}{
		\hbox_gset:cn {g_@@_#2_box} {#3}
		\box_gautosize_to_wd_and_ht_plus_dp:cnn  {g_@@_#2_box} {\width} {\height}
	} {
		\hbox_gset:cn {g_@@_#2_box} {
			#3
		}
	}
	\endgroup
}
\NewDocumentCommand{\partnerlogo}{sm}{
	\_@@_setup_logo_box:nnn {#1} {partnerlogo} {#2}
}
\NewDocumentCommand{\sublogo}{sms}{
	\_@@_setup_logo_box:nnn {#1} {sublogo} {#2}
	\IfBooleanT{#3}{
		\hbox_gset:Nn \g_@@_sublogo_box {
			\hbox_unpack_drop:N \g_@@_sublogo_box
			\hskip.6\l_@@_sublogo_ht_dim
		}
	}
}
%    \end{macrocode}
% section page
%    \begin{macrocode}
\defbeamertemplate*{section~page}{TUDa2023}[1][]
{%
	\ifbeamer@inframe
		\begingroup
		\vbox{}
		\vspace{0pt plus 1 filll}
		\begin{beamercolorbox}[#1]{section title}
			\usebeamerfont{section~title}\text_uppercase:n {\secname}\par
		\end{beamercolorbox}
		{\usebeamerfont{section~name}\usebeamercolor[fg]{section~name}\sectionname{}~\insertsectionnumber}
		\par
		\skip_vertical:n {\c_ptxcd_logoheight_dim+\baselineskip}
		\endgroup
	\else
		\begin{frame}[b]
			\begin{beamercolorbox}[#1]{section title}
				\usebeamerfont{section~title}\text_uppercase:n {\secname}\par
			\end{beamercolorbox}
			{\usebeamerfont{section~name}\usebeamercolor[fg]{section~name}\sectionname{}~\insertsectionnumber}
			\skip_vertical:n {\c_ptxcd_logoheight_dim+\baselineskip}
		\end{frame}
	\fi
}
%    \end{macrocode}
% toc
% original definition can be found in beamerbasetoc.sty which is part of the beamer package
% Copyright 2003--2007 by Till Tantau
% Copyright 2010 by Vedran Mileti\'c
% Copyright 2012,2013,2015 by Vedran Mileti\'c, Joseph Wright
% Copyright 2017,2018 by Louis Stuart, Joseph Wright
% Copyright 2021 by Joseph Wright, samcarter
%
% This file may be distributed and/or modified
%
% 1. under the LaTeX Project Public License and/or
% 2. under the GNU Public License.
%
% See the file LICENSE.md for more details.
%    \begin{macrocode}
\ExplSyntaxOn
\cs_new:Nn \_@@_toc_check: {
\int_compare:nNnT {\g_@@_beamer_toc_col_int}  = {3} {
%    \end{macrocode}
% if all subsections/subsubsections are hidden we can have two columns
%    \begin{macrocode}
\str_if_eq:eeTF	{
\beamer@toc@css
\beamer@toc@oss
\beamer@toc@ooss
\beamer@toc@csss
\beamer@toc@osss
\beamer@toc@oosss
\beamer@toc@ooosss
}{
\prg_replicate:nn {7} {hide}
}{
%    \end{macrocode}
% if all subsections/subsubsections are hidden standard twocolumn layout will be choosen
%    \begin{macrocode}
\int_set:Nn \g_@@_beamer_toc_col_int {2}
} {
%    \end{macrocode}
% check if there are subsections/subsubsections
%    \begin{macrocode}
\int_gzero:N \g_tmpa_int
{\makeatletter%%
	\let\babel@toc\use_none:nn
	\let\beamer@sectionintoc \use_none:nnnnn
	\def\beamer@subsectionintoc##1##2##3##4##5##6{\int_gset:Nn  \g_tmpa_int {1}\endinput}
	\def\beamer@subsubsectionintoc##1##2##3##4##5##6##7{\int_gset:Nn  \g_tmpa_int  {1}\endinput}
	\@input{\jobname.toc}%
}
\int_compare:nNnT {\g_tmpa_int} = {1} {\int_set:Nn \g_@@_beamer_toc_col_int {1}}
}
}
}
%    \end{macrocode}
%
% \begin{macro}{\beamer@twocoltableofcontents}
%    \begin{macrocode}
\def\beamer@twocoltableofcontents[#1]{%
	\begin{beamercolorbox}[wd=\paperwidth]{}%
		\def\beamer@toc@cs{show}%
		\def\beamer@toc@os{show}%
		\def\beamer@toc@css{show}%
		\def\beamer@toc@oss{show}%
		\def\beamer@toc@ooss{show}%
		\def\beamer@toc@csss{show}%
		\def\beamer@toc@osss{show}%
		\def\beamer@toc@oosss{show}%
		\def\beamer@toc@ooosss{show}%
		\beamer@showpartnumber=\c@part%
		\beamer@pausesectionsfalse%
		\beamer@pausesubsectionsfalse%
		\def\beamer@tocsections{<*>}%
		\setkeys{beamertoc}{firstsection=1}%
		\setkeys{beamertoc}{#1}%
		\UseName{_@@_toc_check:}
		\int_compare:nNnT {\g_@@_beamer_toc_col_int} > {1} {
				\setlength{\columnsep}{5ex}%
				\raggedcolumns
				\begin{multicols}{2}
					}
					{\makeatletter%
					\pause[0]%
					\@input{\jobname.toc}%
					}%
					\int_compare:nNnT {\g_@@_beamer_toc_col_int} > {1} {
				\end{multicols}%
			}
	\end{beamercolorbox}%
	\vspace*{.68\baselineskip}%}
}
%    \end{macrocode}
% \end{macro}
%
%
% \begin{key}{beamertoc}{columns}
%    \begin{macrocode}
\define@key{beamertoc}{columns}{\keys_set:nn {ptxcd/beamer/inner} {toc-columns=#1}}
%    \end{macrocode}
% \end{key}
%
%
% \begin{macro}{\beamer@tableofcontents}
%    \begin{macrocode}
\def\beamer@tableofcontents[#1]{%
	\ifbeamer@inframe
		\beamer@twocoltableofcontents[#1]
	\else
		\begin{frame}[b]{\contentsname}
			\beamer@twocoltableofcontents[#1]
		\end{frame}
	\fi
}
%    \end{macrocode}
% \end{macro}
%
%    \begin{macrocode}
\defbeamertemplate*{section~in~toc}{TUDa}{%
	\ifvmode\nointerlineskip\fi
	\leavevmode
	\ifnum\beamer@tempcount>\beamer@toclastsection
	\else
		\ifnum\beamer@tempcount>0\relax
			\usebeamertemplate***{toc~section~number}%
		\fi\fi%
	\usebeamertemplate***{section~entry}%
	\par
}
%    \end{macrocode}
% (sub-)section in toc: default
%    \begin{macrocode}
\cs_new:Nn \_@@_toc_sub_level_entry_numbered:n {
	\exp_args:Nc \tl_if_blank:nF {inserttoc#1subsectionnumber}
	{\hphantom{0}\llap{\use:c {inserttoc#1subsectionnumber}}\hspace{.5em}}
}
\cs_new:Nn \_@@_toc_sub_level_entry_itemize:n {
	\strut
	\usebeamertemplate{itemize~#1item}\hspace{.5em}
}
\defbeamertemplate*{subsection~in~toc}{TUDa}[1][false]{\leavevmode
	\leftskip=12.4mm
	\use:c {_@@_toc_sub_level_entry_#1:n} {}
	\inserttocsubsection\par}
\defbeamertemplate*{subsubsection~in~toc}{TUDa}[1][false]{\leavevmode
	\leftskip=\dimexpr12.4mm+.5em\relax
	\use:c {_@@_toc_sub_level_entry_#1:n} {sub}
	\inserttocsubsubsection\par}
\defbeamertemplate*{toc~section~number}{TUDa}{
	\hphantom{00}\llap{\inserttocsectionnumber}\hspace{.5em}
}
\defbeamertemplate*{section~entry}{TUDa}{
	\strut\inserttocsection\strut
}
%    \end{macrocode}
%Itemize Items
%    \begin{macrocode}
\defbeamertemplate*{itemize~item}{TUDa}{\raise.2\baselineskip\hbox{\vrule width .5ex height .5ex}}
\defbeamertemplate*{itemize~subitem}{TUDa}{\raise.2\baselineskip\hbox{\small\vrule width .5ex height .5ex}}
\defbeamertemplate*{itemize~subsubitem}{TUDa}{\raise.2\baselineskip\hbox{\small\vrule width .5ex height 1ex}}
\mode<all>
%    \end{macrocode}
% \iffalse
%</2023>
%<*2008>
% \fi
%    \begin{macrocode}
\mode<presentation>
\RequirePackage{beamerinnerthemeTUDa2008}
\defbeamertemplate*{title~ page}{TUDa}[1][]{
	\nointerlineskip
	\vspace{\dim_eval:n {-\c_ptxcd_largerule_dim}}
	\hbox_set:Nn \l_@@_titlehead_box {
		\parbox{\dimexpr\paperwidth-2\g_@@_beamer_sep_dim}{%
			\begin{beamercolorbox}[
					wd=\linewidth,
					sep=\g_@@_beamer_logosep_dim,
				]{title}
				\raggedright
				\usebeamerfont{title}
				\skip_horizontal:n {1ex}
				\strut\parbox[t]{\dimexpr\linewidth- \box_wd:N \g_@@_logo_box-2ex\relax}{
					\inserttitle
					\par
				}
				\hspace{\fill}\raisebox{\dimexpr-\height+\ht\strutbox\relax}{\box_use:N \g_@@_logo_box}
				\ifx\insertsubtitle\@empty
				\else
					\par\vspace{\c_ptxcd_largerule_dim}
					\skip_horizontal:n {1ex}\parbox[t]{\dimexpr\linewidth- \box_wd:N \g_@@_logo_box-2ex\relax}{
						\usebeamerfont{subtitle}\insertsubtitle
					}
				\fi
			\end{beamercolorbox}
			\bool_if:NT \g_ptxcd_authorontitle_bool {
				\par\nointerlineskip
				\begin{beamercolorbox}[
						wd=\dimexpr\paperwidth-2\g_@@_beamer_sep_dim,ht=\c_ptxcd_smallrule_dim,dp=\z@]{smallrule}
				\end{beamercolorbox}
				\par\nointerlineskip
				\begin{beamercolorbox}[
						wd=\linewidth,
						sep=\c_ptxcd_largerule_dim,
					]{title}
					\raggedright
					\skip_horizontal:n {1ex}
					\parbox[t]{\dimexpr\paperwidth-2\g_@@_beamer_sep_dim-2ex\relax}{
						\ifx\insertauthor\@empty
						\else
							\usebeamercolor[fg]{author}\usebeamerfont{author}\insertauthor\par
						\fi
						\ifx\insertauthor\@empty
						\else
							\usebeamercolor[fg]{institute}\usebeamerfont{institute}\insertinstitute
						\fi
					}
				\end{beamercolorbox}
			}
		}
	}
	\box_use:N \l_@@_titlehead_box
	\nointerlineskip\begin{beamercolorbox}[
			wd=\dimexpr\paperwidth-2\g_@@_beamer_sep_dim,ht=\c_ptxcd_smallrule_dim,dp=\z@]{smallrule}
	\end{beamercolorbox}
	\dim_set:Nn \l_@@_titlegraphic_ht_dim {\textheight-\box_ht:N\l_@@_titlehead_box-\box_dp:N \l_@@_titlehead_box
		+\c_ptxcd_largerule_dim-.5\c_ptxcd_rulesep_dim-\c_ptxcd_smallrule_dim}
	\let\height\l_@@_titlegraphic_ht_dim
	\dim_set:Nn \l_@@_titlegraphic_wd_dim{\dimexpr\paperwidth-2\g_@@_beamer_sep_dim}
	\let\width\l_@@_titlegraphic_wd_dim
	\nointerlineskip
	\begin{beamercolorbox}[wd=\width,center]{titlegraphic}
		\raisebox{-\c_ptxcd_largerule_dim}[\dim_eval:n {\height-\c_ptxcd_largerule_dim}][0pt]{\inserttitlegraphic}
	\end{beamercolorbox}
}
%    \end{macrocode}
%Itemize Items
%    \begin{macrocode}
\defbeamertemplate*{itemize~item}{TUDa}{
	\usebeamerfont*{itemize~item}
	\raise\dimexpr.4\ht\strutbox-.4ex\hbox{\rule{.8ex}{.8ex}}
}
\defbeamertemplate*{itemize~subitem}{TUDa}{
	\usebeamerfont*{itemize~subitem}
	\setlength{\fboxsep}{\z@}\setlength{\fboxrule}{1pt}
	\raise\dimexpr.4\ht\strutbox-.2ex-\fboxrule\hbox{\fbox{\color{bg}\rule{.4ex}{.4ex}}}
}
\defbeamertemplate*{itemize~subsubitem}{TUDa}{\usebeamerfont*{itemize~subsubitem}\hbox{--}}
\mode<all>
%    \end{macrocode}
%
% \iffalse
%</2008>
%</package>
% \fi
%
% \Finale
% \fi^^A No documentation on this
\endinput
