| 1 |
% \iffalse meta-comment |
| 2 |
% |
| 3 |
% TUDa-CI -- Corporate Design for TU Darmstadt |
| 4 |
% ---------------------------------------------------------------------------- |
| 5 |
% |
| 6 |
% Copyright (C) 2018--2025 by Marei Peischl <[email protected]> |
| 7 |
% |
| 8 |
% ============================================================================ |
| 9 |
% This work may be distributed and/or modified under the |
| 10 |
% conditions of the LaTeX Project Public License, either version 1.3c |
| 11 |
% of this license or (at your option) any later version. |
| 12 |
% The latest version of this license is in |
| 13 |
% http://www.latex-project.org/lppl.txt |
| 14 |
% and version 1.3c or later is part of all distributions of LaTeX |
| 15 |
% version 2008/05/04 or later. |
| 16 |
% |
| 17 |
% This work has the LPPL maintenance status `maintained'. |
| 18 |
% |
| 19 |
% The Current Maintainer of this work is |
| 20 |
% Marei Peischl <[email protected]> |
| 21 |
% |
| 22 |
% The development repository can be found at |
| 23 |
% https://github.com/tudace/tuda_latex_templates |
| 24 |
% Please use the issue tracker for feedback! |
| 25 |
% |
| 26 |
% ============================================================================ |
| 27 |
% |
| 28 |
% \fi |
| 29 |
% |
| 30 |
% \iffalse% no documentation on this |
| 31 |
% \iffalse^^A Preparation for real docstrip documentation |
| 32 |
%<*driver> |
| 33 |
\ProvidesFile{tudabeamer.dtx}[2025-11-13 v4.05 Beamer slides using the corporate design of TU Darmstadt] |
| 34 |
\typeout{***********************************************************} |
| 35 |
\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.} |
| 36 |
\typeout{***********************************************************} |
| 37 |
\stop |
| 38 |
%</driver> |
| 39 |
%<*initialize> |
| 40 |
%<@@=ptxcd> |
| 41 |
%<package|class>\NeedsTeXFormat{LaTeX2e}[2022/06/01] |
| 42 |
%<class>\ProvidesClass{tudabeamer} |
| 43 |
%<*class> |
| 44 |
[2025-03-03 4.03-dev Beamer wrapper class for TUDa-CI – Corporate Design Templates for TU Darmstadt] |
| 45 |
%</class> |
| 46 |
%<main>\ProvidesExplPackage{beamerthemeTUDa}{2025-11-13}{4.05}{Beamer theme using the Corporate Design of TU Darmstadt} |
| 47 |
%<2023>\ProvidesExplPackage{beamerthemeTUDa2023}{2025-11-13}{4.05}{Beamer theme using the Corporate Design of TU Darmstadt Design of 2023} |
| 48 |
%<2008>\ProvidesPackage{beamerthemeTUDa2008}[2025-11-13 v4.05 beamer theme using the Corporate Design of TU Darmstadt Design of 2008] |
| 49 |
%</initialize> |
| 50 |
%<*driver>^^A Preparation for real docstrip documentation |
| 51 |
\providecommand*{\TUDaDocDTXfiles}{tudabeamer.dtx} |
| 52 |
\input{tuda-ci.dtx} |
| 53 |
%</driver> |
| 54 |
% \fi |
| 55 |
% |
| 56 |
% \changes{v4.00}{2025-01-26}{Converted to DTX file} |
| 57 |
% |
| 58 |
% \DoNotIndex{\newcommand,\newenvironment} |
| 59 |
% |
| 60 |
% \GetFileInfo{tudabeamer.dtx} |
| 61 |
% \title{The \textsf{tudabeamer} package} |
| 62 |
% \author{Marei Peischl\thanks{Email: \href{mailto:[email protected]}{[email protected]}}} |
| 63 |
% \date{\fileversion~from \filedate} |
| 64 |
% |
| 65 |
% \maketitle |
| 66 |
% |
| 67 |
% \MaybeStop{} |
| 68 |
% |
| 69 |
% \section{Implementation} |
| 70 |
% |
| 71 |
% \iffalse |
| 72 |
%<*initialize> |
| 73 |
%<*class> |
| 74 |
% \fi |
| 75 |
% \begin{macrocode} |
| 76 |
\PassOptionsToClass{10pt}{beamer} |
| 77 |
\ExplSyntaxOn |
| 78 |
\str_new:N \g_ptxcd_department_str |
| 79 |
\str_const:Nn \c_@@_base_str {beamer} |
| 80 |
% \end{macrocode} |
| 81 |
% \iffalse |
| 82 |
%</class> |
| 83 |
%<main>\tl_if_exist:NF \g_@@_design_tl { |
| 84 |
%<*main|class> |
| 85 |
% \fi |
| 86 |
% \begin{macrocode} |
| 87 |
\tl_new:N \g_@@_design_tl |
| 88 |
% \end{macrocode} |
| 89 |
% Because the option passing accross beamer themes is quite annoying and we want to limit the choice of the design to \file{beamerthemeTUDa.sty} and \cls{tudabeamer} the options will be defined to pass to both theme variants. |
| 90 |
% The theme in the end will either do something or send a warning message. |
| 91 |
% \changes{v4.00}{2025-01-26}{Refactor all beamer options to fix passing issues.} |
| 92 |
% \begin{macrocode} |
| 93 |
\cs_new:Nn \_@@_beamer_declare_pass_options:nn { |
| 94 |
\keys_define:nn {ptxcd/beamer} { |
| 95 |
#1 .code:n = \clist_map_inline:nn {#2}{ |
| 96 |
\PassOptionsToPackage{#1=##1}{beamer####1themeTUDa2008} |
| 97 |
\PassOptionsToPackage{#1=##1}{beamer####1themeTUDa} |
| 98 |
}, |
| 99 |
#1 .default:n = true, |
| 100 |
} |
| 101 |
} |
| 102 |
|
| 103 |
\_@@_beamer_declare_pass_options:nn {centerframetitle} {outer} |
| 104 |
\_@@_beamer_declare_pass_options:nn {headsepline} {outer} |
| 105 |
\_@@_beamer_declare_pass_options:nn {logo} {outer} |
| 106 |
\_@@_beamer_declare_pass_options:nn {colortitle} {color} |
| 107 |
\_@@_beamer_declare_pass_options:nn {colorbacktitle} {color} |
| 108 |
\_@@_beamer_declare_pass_options:nn {colorback} {color} |
| 109 |
\_@@_beamer_declare_pass_options:nn {colorframetitle} {outer, color} |
| 110 |
% \iffalse |
| 111 |
%<main>} |
| 112 |
% \fi |
| 113 |
|
| 114 |
\keys_define:nn {ptxcd/beamer} { |
| 115 |
accentcolor .code:n = \PassOptionsToPackage{accentcolor=#1}{tudacolors}, |
| 116 |
% \end{macrocode} |
| 117 |
% \iffalse |
| 118 |
%</main|class> |
| 119 |
%<*options> |
| 120 |
%<*class> |
| 121 |
% \fi |
| 122 |
% \begin{macrocode} |
| 123 |
color .code:n = { |
| 124 |
\tl_if_in:nnTF {#1} {=} { |
| 125 |
\msg_new:nnn {tudabeamer} {color-option-warning} { |
| 126 |
The~color~option~should~no~longer~be~used~to~pass~options~to~the~tudacolors~package.\\ |
| 127 |
Please~use~tudacolors={##1}~instead~of~color={##1}.\\ |
| 128 |
See~the~tudabeamer~documentation~for~more~information. |
| 129 |
} |
| 130 |
\msg_warning:nnn {tudabeamer} {color-option-warning} {#1} |
| 131 |
\PassOptionsToPackage{#1}{tudacolors} |
| 132 |
} { |
| 133 |
\PassOptionsToPackage{color=#1}{tudacolors} |
| 134 |
} |
| 135 |
}, |
| 136 |
tudacolors .code:n = \PassOptionsToPackage{#1}{tudacolors}, |
| 137 |
% \end{macrocode} |
| 138 |
% \iffalse |
| 139 |
%</class> |
| 140 |
%<*!(2023|2008)> |
| 141 |
% \fi |
| 142 |
% \begin{macrocode} |
| 143 |
design .choice:, |
| 144 |
design / 2023 .code:n = { |
| 145 |
\tl_gset:Nn \g_@@_design_tl {2023} |
| 146 |
%<class> \PassOptionsToClass{aspectratio=169}{beamer} |
| 147 |
}, |
| 148 |
design / 2008 .code:n = { |
| 149 |
\tl_gset:Nn \g_@@_design_tl {2008} |
| 150 |
}, |
| 151 |
design / default .code:n = { |
| 152 |
\tl_gset:Nn \g_@@_design_tl {default} |
| 153 |
}, |
| 154 |
design .initial:n = default, |
| 155 |
design2023 .meta:n = {design=2023}, |
| 156 |
design2008 .meta:n = {design=2008}, |
| 157 |
design .usage:n = load, |
| 158 |
%<main>} |
| 159 |
% \end{macrocode} |
| 160 |
% \iffalse |
| 161 |
%</!(2023|2008)> |
| 162 |
% \fi |
| 163 |
% |
| 164 |
% |
| 165 |
% \iffalse |
| 166 |
%</options> |
| 167 |
%</initialize> |
| 168 |
%<*body> |
| 169 |
%<*class> |
| 170 |
% \fi |
| 171 |
% \begin{macrocode} |
| 172 |
\ExplSyntaxOff |
| 173 |
\PassOptionsToPackage{ |
| 174 |
hidelinks, |
| 175 |
unicode, |
| 176 |
pdfpagelabels=false, |
| 177 |
plainpages=false, |
| 178 |
pdfcreator=LaTeX using the TUDa-CI Bundle, |
| 179 |
}{hyperref} |
| 180 |
\PassOptionsToClass{t}{beamer} |
| 181 |
\DeclareOption*{% |
| 182 |
\PassOptionsToClass{\CurrentOption}{beamer} |
| 183 |
} |
| 184 |
%</class> |
| 185 |
%<main|class|wrapper>\ProcessKeyOptions[ptxcd/beamer] |
| 186 |
%<*class> |
| 187 |
\ProcessOptions* |
| 188 |
\ExplSyntaxOn |
| 189 |
\tl_if_eq:NnT \g_@@_design_tl {default} { |
| 190 |
\msg_new:nnn {tudabeamer} {default-design-changed} { |
| 191 |
With~version~4.0~tudabeamer~switched~to~the~new~corporate~design~layout.\\ |
| 192 |
In~case~this~is~not~intended,~it's~possible~switch~back~using~`design=2008`~option.\\ |
| 193 |
`design=2023`~will~disable~this~warning. |
| 194 |
} |
| 195 |
\msg_warning:nn {tudabeamer} {default-design-changed} |
| 196 |
\keys_set:nn {ptxcd/beamer} {design=2023} |
| 197 |
} |
| 198 |
\ExplSyntaxOff |
| 199 |
\LoadClass{beamer} |
| 200 |
\ExplSyntaxOn |
| 201 |
% |
| 202 |
% \begin{macro}{\department} |
| 203 |
% \department command |
| 204 |
% \begin{macrocode} |
| 205 |
\def\department{\@dblarg\ptxcd_beamer_department} |
| 206 |
% \end{macrocode} |
| 207 |
% \end{macro} |
| 208 |
% |
| 209 |
% |
| 210 |
% \begin{macro}{\ptxcd} |
| 211 |
% \begin{macrocode} |
| 212 |
\long\def\ptxcd_beamer_department[#1]#2{% |
| 213 |
\def\beamer@temp{#2}% |
| 214 |
\ifx\beamer@temp\@empty |
| 215 |
\def\insertdepartment{} |
| 216 |
\else |
| 217 |
\def\insertdepartment{\def\inst{\beamer@instinst}\def\and{\qquad}#2}% |
| 218 |
\fi |
| 219 |
\def\beamer@shortdepartment{#1}} |
| 220 |
\department{} |
| 221 |
% \end{macrocode} |
| 222 |
% \end{macro} |
| 223 |
% |
| 224 |
% \begin{macro}{\insertshortdepartment} |
| 225 |
% \begin{macrocode} |
| 226 |
\newcommand\insertshortdepartment[1][]{% |
| 227 |
{% |
| 228 |
\let\thanks=\@gobble% |
| 229 |
\beamer@setupshort{#1}% |
| 230 |
\beamer@insertshort{\beamer@shortdepartment}% |
| 231 |
}% |
| 232 |
} |
| 233 |
% \end{macrocode} |
| 234 |
% end of \department command |
| 235 |
% \changes{v4.00}{2025-01-26}{remove pdfa option} |
| 236 |
% \end{macro} |
| 237 |
% \end{macrocode} |
| 238 |
% Load the TUDa theme |
| 239 |
% \begin{macrocode} |
| 240 |
\usetheme{TUDa\g_@@_design_tl}% |
| 241 |
\let\accentfont\normalfont% |
| 242 |
\file_if_exist:nTF {\g_@@_config_prefix_tl beamerthemeTUDa-\g_ptxcd_department_str.sty} |
| 243 |
{\RequirePackage{\g_@@_config_prefix_tl beamerthemeTUDa-\g_ptxcd_department_str}} |
| 244 |
{ |
| 245 |
\file_if_exist:nT {beamerthemeTUDa-\g_ptxcd_department_str.sty} |
| 246 |
{\RequirePackage{beamerthemeTUDa-\g_ptxcd_department_str}} |
| 247 |
} |
| 248 |
\ExplSyntaxOff |
| 249 |
% \end{macrocode} |
| 250 |
% \iffalse |
| 251 |
%</class> |
| 252 |
% \fi |
| 253 |
% |
| 254 |
% \iffalse |
| 255 |
%<*package> |
| 256 |
% \fi |
| 257 |
% \iffalse |
| 258 |
%<*main> |
| 259 |
% \fi |
| 260 |
% \begin{macrocode} |
| 261 |
\RequirePackageWithOptions{beamerthemeTUDa\g_@@_design_tl} |
| 262 |
% \end{macrocode} |
| 263 |
% \iffalse |
| 264 |
%</main> |
| 265 |
% \fi |
| 266 |
% \subsection{Design specific options} |
| 267 |
% The design for 2023 removed a lot of options as the accentcolor is no longer used within the frames. |
| 268 |
% \iffalse |
| 269 |
%<*2023> |
| 270 |
% \fi |
| 271 |
% \begin{macrocode} |
| 272 |
\msg_new:nnn {tudabeamer} {option-removed} { |
| 273 |
The~design~you~selected~doesn't~support~the~option~`#1`.\\ |
| 274 |
It~will~be~ignored. |
| 275 |
} |
| 276 |
% \end{macrocode} |
| 277 |
% \iffalse |
| 278 |
%</2023> |
| 279 |
%</package> |
| 280 |
%<*options> |
| 281 |
% \fi |
| 282 |
% \begin{macrocode} |
| 283 |
%<2008>\ExplSyntaxOn |
| 284 |
%<2008|2023>\ProcessKeyOptions[ptxcd/beamer] |
| 285 |
%</options> |
| 286 |
%<*package> |
| 287 |
\mode<presentation> |
| 288 |
%<2008>\ExplSyntaxOff |
| 289 |
% \end{macrocode} |
| 290 |
% \subsection{Design 2023} |
| 291 |
% \iffalse |
| 292 |
%<*2023> |
| 293 |
% \fi |
| 294 |
% \begin{macrocode} |
| 295 |
\usefonttheme{TUDa} |
| 296 |
\usecolortheme{TUDa} |
| 297 |
\useoutertheme{TUDa} |
| 298 |
\useinnertheme[design=2023]{TUDa} |
| 299 |
% \end{macrocode} |
| 300 |
% \iffalse |
| 301 |
%</2023> |
| 302 |
% \fi |
| 303 |
% \subsection{Design 2008} |
| 304 |
% \iffalse |
| 305 |
%<*2008> |
| 306 |
% \fi |
| 307 |
% \begin{macrocode} |
| 308 |
\usefonttheme{TUDa2008} |
| 309 |
\usecolortheme{TUDa2008} |
| 310 |
\useoutertheme{TUDa2008} |
| 311 |
\useinnertheme[design=2008]{TUDa} |
| 312 |
% \end{macrocode} |
| 313 |
% \iffalse |
| 314 |
%</2008> |
| 315 |
% \fi |
| 316 |
% \begin{macrocode} |
| 317 |
\setbeamertemplate{navigation symbols}{} |
| 318 |
\mode<all> |
| 319 |
% \end{macrocode} |
| 320 |
% \iffalse |
| 321 |
%</package> |
| 322 |
%</body> |
| 323 |
% \fi |
| 324 |
% \Finale |
| 325 |
% \fi^^A No documentation on this |
| 326 |
\endinput |