summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/tuda-ci/beamerouterthemeTUDa.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/tuda-ci/beamerouterthemeTUDa.sty')
-rw-r--r--Master/texmf-dist/tex/latex/tuda-ci/beamerouterthemeTUDa.sty231
1 files changed, 231 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/tuda-ci/beamerouterthemeTUDa.sty b/Master/texmf-dist/tex/latex/tuda-ci/beamerouterthemeTUDa.sty
new file mode 100644
index 00000000000..48f005bef7c
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/tuda-ci/beamerouterthemeTUDa.sty
@@ -0,0 +1,231 @@
+%% This is file `beamerouterthemeTUDa.sty' version 1.00 (2019/07/20),
+%% it is part of
+%% TUDa-CI -- Corporate Design for TU Darmstadt
+%% ----------------------------------------------------------------------------
+%%
+%% Copyright (C) 2018--2019 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.3
+%% 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.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status `maintained'.
+%%
+%% The Current Maintainers of this work are
+%% Marei Peischl <tuda-ci@peitex.de>
+%% Markus Lazanowski <latex@ce.tu-darmstadt.de>
+%%
+%% The development respository can be found at
+%% https://github.com/tudace/tuda_latex_templates
+%% Please use the issue tracker for feedback!
+%%
+%% ============================================================================
+%%
+\def\fileversion{1.00}
+\def\filedate{2019/07/20}
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{beamerouterthemeTUDa}
+ [\filedate\space\fileversion]
+
+\RequirePackage{l3keys2e}
+
+\ExplSyntaxOn
+\keys_define:nn {TUDa/beamer/outer} {
+ logo .bool_gset:N = \g_TUDa_headlinelogo_bool,
+ logo .default:n =true,
+ logo .initial:n =true,
+ logofile .tl_gset:N = \g_TUDa_logofile_tl,
+ logofile .initial:n = tuda_logo,
+}
+
+
+\ProcessKeysOptions{TUDa/beamer/outer}
+
+
+\mode<presentation>
+
+
+\RequirePackage{graphicx}
+\RequirePackage[paper=slide]{tudarules}
+
+\newlength{\TUDa@beamer@sep}
+\setlength{\TUDa@beamer@sep}{1em}
+
+\setbeamersize{text~margin~left=\TUDa@beamer@sep,text~margin~right=\TUDa@beamer@sep}
+
+\newlength{\TUDa@beamer@linewidth}
+\setlength{\TUDa@beamer@linewidth}{\dimexpr\paperwidth-2\TUDa@beamer@sep\relax}
+
+%Logo
+
+\newsavebox{\TUDa@logobox}
+\sbox{\TUDa@logobox}{%
+ \makebox[2.2\c_TUDa_logoheight_dim][l]{\includegraphics[height=\c_TUDa_logoheight_dim]{\g_TUDa_logofile_tl}}%
+}
+
+\newlength{\TUDa@beamer@logosep}
+\setlength{\TUDa@beamer@logosep}{2mm}
+
+\ExplSyntaxOff
+
+%\RequirePackage[paper=slide]{tudarules}
+
+\ExplSyntaxOn
+\TUDa@makeheadrule[color=identbarcolor,width=\TUDa@beamer@linewidth]{TUDa@beamer@headrule}
+\TUDa@makefootrule[width=\TUDa@beamer@linewidth]{TUDa@beamer@rule}
+
+\newlength{\TUDa@beamer@headheight}
+\setlength{\TUDa@beamer@headheight}{
+\dim_eval:n {
+ \ht\TUDa@logobox+
+ \dp\TUDa@logobox +
+ 2\TUDa@beamer@logosep+
+ \box_ht:N \TUDa@beamer@rule_box +
+ \box_dp:N \TUDa@beamer@rule_box
+}}
+
+
+\ExplSyntaxOff
+
+
+\def\tudrule{\TUDa@beamer@rule}
+
+
+\newcommand\insertsmalllogo{\setbeamertemplate{logo}[small]\usebeamertemplate{logo}}
+
+
+\defbeamertemplate*{sidebar left}{TUD theme}{}
+\defbeamertemplate*{sidebar right}{TUD theme}{}
+
+
+\ExplSyntaxOn
+
+\bool_if_exist:NF \l_TUDa_tmpa_bool {\bool_new:N \l_TUDa_tmpa_bool}
+
+\defbeamertemplate*{footline}{TUDa theme}
+{
+ \begin{beamercolorbox}[leftskip=\TUDa@beamer@sep,rightskip=\TUDa@beamer@sep,wd=\TUDa@beamer@linewidth,
+ ht=\csname c_TUDa_smallrule_dim\endcsname,dp=1mm]{footline}
+ \TUDa@beamer@rule
+ \end{beamercolorbox}
+ \begin{beamercolorbox}[
+ leftskip=\TUDa@beamer@sep,
+ rightskip=\TUDa@beamer@sep, ht=2.75mm,dp=2.75mm]{footline}
+ \usebeamerfont{author~ in~ head/foot}%
+ \bool_set_false:N \l_TUDa_tmpa_bool
+ \clist_map_variable:nNn {date, department, institute, author} \l_tmpa_tl {
+ \tl_if_empty:cF {beamer@short\l_tmpa_tl} {
+ \bool_if:NTF \l_TUDa_tmpa_bool {~|~}
+ {\bool_set_true:N \l_TUDa_tmpa_bool}
+ \use:c {insertshort\l_tmpa_tl}
+ }
+ }
+ \bool_if:NT \l_TUDa_tmpa_bool {~|~}
+ \insertframenumber
+ \hfill\raisebox{\dimexpr-.5\height+\dp\strutbox\relax}{\insertlogo}
+ \end{beamercolorbox}
+}
+
+
+
+\RenewDocumentCommand{\logo}{sm}{
+ \IfBooleanTF{#1}{
+ \setbeamertemplate{logo}{\resizebox{!}{.06\beamer@paperheight}{\mbox{#2}}}%TODO change with aspectratio
+ }{
+ \setbeamertemplate{logo}{#2}
+ }
+}
+
+\defbeamertemplate{headline}{TUDa theme.logo} {%
+% \vspace{.75\TUDa@beamer@sep}
+ \begin{beamercolorbox}[
+ leftskip=\TUDa@beamer@sep,rightskip=\TUDa@beamer@sep,wd=\TUDa@beamer@linewidth,ht=.75\TUDa@beamer@sep,dp=\box_dp:N \TUDa@beamer@headrule_box]{headline}
+ \TUDa@beamer@headrule
+ \end{beamercolorbox}
+}
+
+\ExplSyntaxOff
+
+\defbeamertemplate{frametitle}{TUDa theme.logo}{%
+\nointerlineskip%
+\begin{beamercolorbox}[
+ sep=\TUDa@beamer@logosep,wd=\dimexpr\TUDa@beamer@linewidth\relax,
+ rightskip=-\TUDa@beamer@logosep,
+% leftskip=-\TUDa@beamer@logosep
+ ]{frametitle}
+ \parbox[t]{\dimexpr\linewidth- \wd\TUDa@logobox-1em\relax\relax}{%
+ \usebeamerfont{frametitle}\insertframetitle
+ \ifx\insertframesubtitle\@empty
+ \else
+ \par
+ \usebeamercolor[fg]{framesubtitle}
+ \usebeamerfont{framesubtitle}
+ \insertframesubtitle
+ \fi
+ }
+ \hfill%
+ \raisebox{\dimexpr-\height+\ht\strutbox\relax}{\usebox\TUDa@logobox}
+\end{beamercolorbox}
+\nointerlineskip
+\color{black}\TUDa@beamer@rule
+}
+
+\defbeamertemplate*{headline}{TUDa theme.nologo}
+{%
+ \vspace{.75\TUDa@beamer@sep}
+ \begin{beamercolorbox}[
+ leftskip=\TUDa@beamer@sep,rightskip=\TUDa@beamer@sep,wd=\TUDa@beamer@linewidth]{headline}
+ \TUDa@beamer@headrule
+ \end{beamercolorbox}
+}
+\defbeamertemplate*{frametitle}{TUDa theme.nologo}{%
+ \nointerlineskip%
+\begin{beamercolorbox}[
+ sep=\TUDa@beamer@logosep,wd=\dimexpr\TUDa@beamer@linewidth\relax,
+ ]{frametitle}
+ \parbox[t]{\linewidth}{%
+ \usebeamerfont{frametitle}\insertframetitle
+ \ifx\insertframesubtitle\@empty
+ \else
+ \par
+ \usebeamercolor[fg]{framesubtitle}
+ \usebeamerfont{framesubtitle}
+ \insertframesubtitle
+ \fi
+ }%
+% Rule vor voffset similar to logo
+ \rule[\dimexpr-\ht\TUDa@logobox+\ht\strutbox\relax]{0pt}{\dimexpr\ht\TUDa@logobox+\dp\TUDa@logobox\relax}
+\end{beamercolorbox}
+ \nointerlineskip
+\TUDa@beamer@rule
+}
+
+\ExplSyntaxOn
+\cs_new:Nn \TUDa_setup_frame: {
+ \bool_if:NTF \g_TUDa_headlinelogo_bool {
+ \setbeamertemplate{frametitle}[TUDa~ theme.logo]
+ \setbeamertemplate{headline}[TUDa~ theme.logo]
+ }{
+ \setbeamertemplate{frametitle}[TUDa~ theme.nologo]
+ \setbeamertemplate{headline}[TUDa~ theme.nologo]
+ }
+}
+\TUDa_setup_frame:
+
+\newcommand*{\setupTUDaFrame}[1]{
+ \keys_set:nn {TUDa/beamer/outer} {#1}
+ \TUDa_setup_frame:
+}
+
+\ExplSyntaxOff
+
+
+\mode
+<all>
+
+\endinput