diff options
Diffstat (limited to 'Master/texmf-dist/source/latex')
17 files changed, 10866 insertions, 0 deletions
diff --git a/Master/texmf-dist/source/latex/tuda-ci/beamercolorthemeTUDa.dtx b/Master/texmf-dist/source/latex/tuda-ci/beamercolorthemeTUDa.dtx new file mode 100644 index 00000000000..4c57a7583d8 --- /dev/null +++ b/Master/texmf-dist/source/latex/tuda-ci/beamercolorthemeTUDa.dtx @@ -0,0 +1,214 @@ +% \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{beamercolorthemeTUDa.dtx}[2025-01-26 v4.00 Beamer color 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] +%</package> +%<!2008>\ProvidesExplPackage{beamercolorthemeTUDa}{2025-01-26}{4.00}{Beamer color theme of tuda-ci} +%<2008>\ProvidesExplPackage{beamercolorthemeTUDa2008}{2025-01-26}{4.00}{Beamer color theme of tuda-ci, compatibility for design of 2008} +%<*driver>^^A Preparation for real docstrip documentation +\providecommand*{\TUDaDocDTXfiles}{beamercolorthemeTUDa.dtx} +\input{tuda-ci.dtx} +%</driver> +% \fi +% +% \changes{v4.00}{2025-01-26}{Converted to DTX file} +% +% \DoNotIndex{\newcommand,\newenvironment} +% +% \GetFileInfo{beamercolorthemeTUDa.dtx} +% \title{The \textsf{beamercolorthemeTUDa} package} +% \author{Marei Peischl\thanks{Email: \href{mailto:tuda-ci@peitex.de}{tuda-ci@peitex.de}}} +% \date{\fileversion~from \filedate} +% +% \maketitle +% + +% +% \MaybeStop{} +% +% \section{Implementation} +% +% \iffalse +%<*package> +%<*main> +% \fi +% \begin{macrocode} +\clist_map_inline:nn { + colortitle, + colorbacktitle, + colorframetitle, + colorback +} { + \keys_define:nn {ptxcd/beamer/color} {#1 .code:n = \msg_warning:nnn {tudabeamer} {option-removed} {#1}} +} +% \end{macrocode} +% \iffalse +%</main> +%<*2008> +% \fi +% \begin{macrocode} +\bool_if_exist:NF \g_@@_colorframetitle_bool {\bool_new:N \g_@@_colorframetitle_bool} +\keys_define:nn {ptxcd/beamer/color} { + colortitle .bool_gset:N = \g_ptxcd_beamer_colortitle_bool, + colortitle .default:n = true, + colortitle .initial:n = true, + colorbacktitle .meta:n = {colortitle=#1}, + colorframetitle .choices:nn = {true, false} { + \use:c {bool_gset_ \l_keys_choice_tl :N} \g_@@_colorframetitle_bool + \cs_if_exist_use:N \_@@_setup_frametitle_color: + }, + colorframetitle .default:n = true, + colorback .meta:n = {colorframetitle=#1} +} +%</2008> +\ExplSyntaxOff +\ProcessKeyOptions[ptxcd/beamer/color] +\mode<presentation>{\PassOptionsToPackage{RGB}{tudacolors}} +\RequirePackage{tudacolors} +% \end{macrocode} +% \iffalse +%<*main> +% \fi +% \begin{macrocode} +\definecolorset{HTML}{TUDa-}{}{% + dark1,000000;% + dark2,44546A;% + light1,FFFFFF;% + light2,E7E6E6;% + accent1,E6001A;% + accent2,004E8A;% + accent3,009CDA;% + accent4,00689D;% + accent5,B5B5B5;% + accent5,535353;% + hyperlink,243572% +} +\mode<presentation> +\setbeamercolor*{title}{parent=normal text} +\setbeamercolor{subtitle}{parent=title} +\setbeamercolor{author}{parent=title} +\setbeamercolor{institute}{parent=title} +\setbeamercolor{date}{parent=title} +\setbeamercolor{titlelike}{parent=title} +% \end{macrocode} +% \iffalse +%</main> +% \fi +% \begin{macrocode} +%<2008>\setbeamercolor{titlelike}{fg=textaccentcolor,bg=white} +\setbeamercolor*{author}{parent=title} +\setbeamercolor*{institute}{parent=title} +\setbeamercolor*{normal text}{bg=,fg=black} +\setbeamercolor*{background canvas}{parent=normal text} +\setbeamercolor*{section in toc}{parent=normal text} +\setbeamercolor*{footline}{ +%<2008>parent=normal text +%<main>fg=black!50 +} +\setbeamercolor*{alerted text}{fg=textaccentcolor} +%<main>\setbeamercolor*{structure}{fg=black} +%<2008>\setbeamercolor*{structure}{fg=textaccentcolor} +\setbeamercolor{bibliography item}{parent=item} +\setbeamercolor{bibliography entry author}{use=structure,fg=structure.fg} +\setbeamercolor{bibliography entry title}{use=normal text,fg=normal text.fg} +\setbeamercolor{bibliography entry location}{use=structure,fg=structure.fg} +\setbeamercolor{bibliography entry note}{use=structure,fg=normal text.fg} +\setbeamercolor*{block title}{fg=textonaccentcolor,bg=accentcolor} +\setbeamercolor*{block body}{fg=black,bg=black!15} +\setbeamercolor*{block title alerted}{ +%<main>fg=TUDa-accent1,bg=TUDa-light2 +%<2008>fg=TUDa-9b,bg=black!15 +} +\setbeamercolor*{block body alerted}{use=normal text, bg=white} +\setbeamercolor*{block frame alerted}{ +%<main>bg=TUDa-accent1 +%<2008>bg=TUDa-9b +} +\setbeamercolor*{block title example}{ +%<main>fg=TUDa-accent2,bg=TUDa-light2 +%<2008>fg=TUDa-4d,bg=black!15 +} +\setbeamercolor*{block body example}{use=normal text, bg=white} +\setbeamercolor*{block frame example}{ +%<main>bg=TUDa-accent2 +%<2008>bg=TUDa-4d +} +% \end{macrocode} +% \iffalse +%<*2008> +% \fi +% \begin{macrocode} +\setbeamercolor*{smallrule}{bg=black} +\setbeamercolor*{identbar}{bg=identbarcolor} +% \end{macrocode} +% \iffalse +%</2008> +% \fi +% \begin{macrocode} +\ExplSyntaxOn +% \end{macrocode} +% \iffalse +%<*2008> +% \fi +% \begin{macrocode} +\bool_if:NTF \g_ptxcd_beamer_colortitle_bool { + \setbeamercolor*{title}{fg=textonaccentcolor,bg=accentcolor} +}{ + \setbeamercolor*{title}{parent=normal~text} +} +\cs_new:Nn \_@@_setup_frametitle_color: { + \bool_if:NTF \g_@@_colorframetitle_bool { + \setbeamercolor*{frametitle}{fg=textonaccentcolor,bg=accentcolor} + } { + \setbeamercolor*{frametitle}{use=normal~text,fg=normal~text.fg,bg=} + } +} +\_@@_setup_frametitle_color: +% \end{macrocode} +% +% \iffalse +%</2008> +\mode<all> +%</package> +% \fi +% +% \Finale +% \fi^^A No documentation on this +\endinput diff --git a/Master/texmf-dist/source/latex/tuda-ci/beamerfontthemeTUDa.dtx b/Master/texmf-dist/source/latex/tuda-ci/beamerfontthemeTUDa.dtx new file mode 100644 index 00000000000..1fc43a53e06 --- /dev/null +++ b/Master/texmf-dist/source/latex/tuda-ci/beamerfontthemeTUDa.dtx @@ -0,0 +1,121 @@ +% \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{beamerfontthemeTUDa.dtx} + [2025-01-26 v4.00 Beamer font 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] +%</package> +%<!2008>\ProvidesExplPackage{beamerfontthemeTUDa}{2025-01-26}{4.00}{Beamer font theme of tuda-ci} +%<2008>\ProvidesExplPackage{beamerfontthemeTUDa2008}{2025-01-26}{4.00}{Beamer font theme of tuda-ci, compatibility for design of 2008} +% +%<*driver>^^A Preparation for real docstrip documentation +\providecommand*{\TUDaDocDTXfiles}{beamerfontthemeTUDa.dtx} +\input{tuda-ci.dtx} +%</driver> +% \fi +% +% \changes{v4.00}{2025-01-26}{Converted to DTX file} +% +% \MaybeStop{} +% +% \section{Implementation} +% +% \iffalse +%<*package> +% \fi +% \begin{macrocode} +\RequirePackage{tudafonts} +\keys_define:nn {ptxcd/beamer/fonts} { + serif .bool_gset:N = \g_ptxcd_serif_bool, + serif .default:n = true, + serif .initial:n = false, + sans-serif .bool_gset_inverse:N = \g_ptxcd_serif_bool, + sans-serif .default:n = true, +} +\ProcessKeyOptions[ptxcd/beamer/fonts] +\mode<presentation> +\bool_if:NTF \g_ptxcd_serif_bool + {\usefonttheme{serif}} + {\renewcommand*{\familydefault}{\sfdefault}} +\setbeamerfont{author}{size=\footnotesize, series=\bfseries} +\setbeamerfont{institute}{size=\footnotesize, series=\mdseries} +% \end{macrocode} +% \iffalse +%<*main> +% \fi +% \begin{macrocode} +\ExplSyntaxOff +\setbeamerfont{title}{family=\robotoblack,size=\huge} +\setbeamerfont*{subtitle}{family=\normalfont,size=\small} +\setbeamerfont*{frametitle}{size*={20}{20},family=\robotoblack} +\setbeamerfont{footline}{size*={3.8}{5}} +\setbeamerfont{author in head/foot}{parent=footline} +\setbeamerfont{title in head/foot}{family=\robotoblackspaced} +\setbeamerfont*{section title}{size=\huge,family=\robotoblack} +\setbeamerfont*{section name}{size=\small} +\setbeamerfont{section entry}{size=\footnotesize} +\setbeamerfont{toc section number}{family=\robotoblack,size=\huge} +\setbeamerfont{section entry}{size=\footnotesize} +\setbeamerfont{subsection in toc}{parent=section entry} +\setbeamerfont{subsubsection in toc}{parent=section entry} +\ExplSyntaxOn +% \end{macrocode} +% \iffalse +%</main> +%<*2008> +% \fi +% \begin{macrocode} +\setbeamerfont{title}{size=\large,series=\bfseries} +\setbeamerfont{subtitle}{size=\normalsize,series=\bfseries} +\setbeamerfont{frametitle}{size=\large,series=\bfseries} +\setbeamerfont{author~in~head/foot}{size=\tiny} +% \end{macrocode} +% \iffalse +%</2008> +%<*package> +% \fi +% \begin{macrocode} +\mode<all> +% \end{macrocode} +% \iffalse +%</package> +% \fi +% \Finale +% \fi^^A No documentation on this +\endinput diff --git a/Master/texmf-dist/source/latex/tuda-ci/beamerinnerthemeTUDa.dtx b/Master/texmf-dist/source/latex/tuda-ci/beamerinnerthemeTUDa.dtx new file mode 100644 index 00000000000..f8d3e23cc66 --- /dev/null +++ b/Master/texmf-dist/source/latex/tuda-ci/beamerinnerthemeTUDa.dtx @@ -0,0 +1,599 @@ +% \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-01-26 v4.00 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-01-26}{4.00}{Inner beamer theme of tuda-ci} +%<2023>\ProvidesExplPackage{beamerinnerthemeTUDa2023}{2025-01-26}{4.00}{Inner beamer theme of tuda-ci, Design of 2023} +%<2008>\ProvidesExplPackage{beamerinnerthemeTUDa2008}{2025-01-26}{4.00}{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 diff --git a/Master/texmf-dist/source/latex/tuda-ci/beamerouterthemeTUDa.dtx b/Master/texmf-dist/source/latex/tuda-ci/beamerouterthemeTUDa.dtx new file mode 100644 index 00000000000..7e4dd231529 --- /dev/null +++ b/Master/texmf-dist/source/latex/tuda-ci/beamerouterthemeTUDa.dtx @@ -0,0 +1,404 @@ +% \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{beamerouterthemeTUDa.dtx} + [2025-01-26 v4.00 Outer~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> +%<*initialize&package> +%<@@=ptxcd> +\NeedsTeXFormat{LaTeX2e}[2022/06/01] +%<!2008>\ProvidesExplPackage{beamerouterthemeTUDa}{2025-01-26}{4.00}{Outer beamer theme of tuda-ci design of 2023} +%<2008>\ProvidesExplPackage{beamerouterthemeTUDa2008}{2025-01-26}{4.00}{Outer beamer theme of tuda-ci, compatibility for design of 2008} +%</initialize&package> +% +%<*driver>^^A Preparation for real docstrip documentation +\providecommand*{\TUDaDocDTXfiles}{beamerouterthemeTUDa.dtx} +\input{tuda-ci.dtx} +%</driver> +% \fi +% +% \changes{v4.00}{2025-01-26}{Converted to DTX file} +% +% \DoNotIndex{\newcommand,\newenvironment} +% +% \DescribeKey{\beamerframe}{\bgcolor} +% +% +% \DescribeKey{\beamerframe}{\uppercase} +% +% +% \DescribeMacro{\setupTUDaFrame} +% +% +% \DescribeKey{\beamerframe}{\bgcolor} + +% +% \MaybeStop{} +% +% \section{Implementation} +% +% \iffalse +%<*package> +%<*initialize> +% \fi +% \begin{macrocode} +\PassOptionsToPackage{paper=slide}{tudarules} +\RequirePackage{tudarules} +\bool_if_exist:NF \l_ptxcd_tmpa_bool {\bool_new:N \l_ptxcd_tmpa_bool} +\dim_new:N \l_@@_beamer_extraindent_dim +\dim_new:N {\g_@@_beamer_sep_dim} +\dim_gset:Nn \g_@@_beamer_sep_dim {.3\c_ptxcd_logoheight_dim} +\dim_new:N \g_@@_beamer_logosep_dim +\dim_gset:Nn \g_@@_beamer_logosep_dim{2mm} +\cs_if_exist:NF \g_@@_colorframetitle_bool {\bool_new:N \g_@@_colorframetitle_bool} +\keys_define:nn {ptxcd/beamer/outer} { + logo .bool_gset:N = \g_ptxcd_headlinelogo_bool, + logo .default:n =true, + logo .initial:n =true, +%<main> colorframetitle .code:n = \msg_warning:nnn {tudabeamer} {option-removed} {colorframetitle}, +%<*2008> + colorframetitle .choices:nn = {true, false} { + \use:c {bool_gset_ \l_keys_choice_tl :N} \g_@@_colorframetitle_bool + \cs_if_exist_use:N \_@@_setup_frametitle_color: + }, + colorframetitle .default:n = true, +% \end{macrocode} +% \iffalse +%</2008> +% \fi +% \begin{macrocode} + centerframetitle +%<main> .code:n = \msg_warning:nnn {tudabeamer} {option-removed}, +% \end{macrocode} +% \iffalse +%<*2008> +% \fi +% \begin{macrocode} + .bool_gset:N = \g_ptxcd_centerframetitle_bool, + centerframetitle .initial:n = false, + centerframetitle .default:n = true, +% \end{macrocode} +% \iffalse +%</2008> +% \fi +% \begin{macrocode} + framebgcolor +%<main> .code:n = \msg_warning:nnn {tudabeamer} {option-removed} {framebgcolor}, +% \end{macrocode} +% \iffalse +%<*2008> +% \fi +% \begin{macrocode} + .choice:, + framebgcolor / reset .code:n = + \_@@_reset_framebgcolor: + , + framebgcolor / unknown .code:n = { + \_@@_set_framebgcolor:n {#1} + }, +% \end{macrocode} +% \iffalse +%</2008> +% \fi +% \begin{macrocode} + singleframebgcolor .code:n = +%<main> \msg_warning:nnn {tudabeamer} {option-removed} {singleframebgcolor}, +%<*2008> + \cs_gset_eq:Nc \_@@_save_background_canvas: {beamer@thcbg@normal~text} + \keys_set:nn {ptxcd/beamer/outer} { + framebgcolor = #1 + }, +% \end{macrocode} +% \iffalse +%</2008> +% \fi +% \begin{macrocode} + headsepline +%<main> .code:n = \msg_warning:nnn {tudabeamer} {option-removed} {headsepline}, +%<*2008> + .bool_gset:N = \g_ptxcd_headsepline_bool, + headsepline .initial:n = true, + headsepline .default:n = true, +% \end{macrocode} +% \iffalse +%</2008> +%<*main> +% \fi +% \begin{macrocode} + extendedspace .bool_gset:N = \g_@@_extended_space_bool, + headrule .bool_gset:N = \g_@@_headrule_bool, + uppercase-frametitle .bool_gset:N = \g_@@_uppercase_frametitle_bool, + uppercase-frametitle .default:n = true, + uppercase-frametitle .initial:n = true, +%</main> +% \end{macrocode} +% \iffalse +%</initialize> +%<*body> +% \fi +% General options +% \begin{macrocode} +%<gobble>} +% \end{macrocode} +% \iffalse +%<*main> +% \fi +% \begin{key}{beamerframe}{uppercase} +% \begin{macrocode} +\define@key{beamerframe}{uppercase}{ + \keys_set:nn {ptxcd/beamer/outer} { + uppercase-frametitle=#1 + } +} +% \end{macrocode} +% \iffalse +%</main> +% \fi +% \end{key} +% \begin{key}{beamerframe}{bgcolor} +% \iffalse +%<*2008> +% \fi +% \begin{macrocode} +\define@key{beamerframe}{bgcolor}{ + \keys_set:nn {ptxcd/beamer/outer} { + singleframebgcolor=#1 + } +} +% \end{macrocode} +% \end{key} +% +% \begin{macrocode} +\cs_new:Nn \_@@_reset_framebgcolor: { + \cs_gset_eq:cN {beamer@thcbg@normal~text} \_@@_save_background_canvas: + \cs_undefine:N \_@@_save_background_canvas: +} + +\cs_new:Nn \_@@_set_framebgcolor:n { + \cs_if_exist:cTF {\string\color@#1} + {\setbeamercolor{normal~text}{bg=#1}} + {\setbeamercolor{normal~text}{bg=TUDa-#1}} +} + +\BeforeBeginEnvironment{frame}{ + \cs_if_exist:NT \_@@_save_background_canvas: { + \_@@_reset_framebgcolor: + } +} +% \end{macrocode} +% \iffalse +%</2008> +% \fi +% \begin{macrocode} +\ProcessKeyOptions[ptxcd/beamer/outer] +\mode<presentation> +\RequirePackage{graphicx} +% \end{macrocode} +% \iffalse +%<*2008> +% \fi +% \begin{macrocode} +\bool_if:NT \g_@@_colorframetitle_bool + + {\dim_set:Nn \l_@@_beamer_extraindent_dim {\g_@@_beamer_logosep_dim}} +% \end{macrocode} +% \iffalse +%</2008> +% \fi +% \begin{macrocode} +\setbeamersize{ + + text~margin~left=\dim_eval:n { +%<main> \paperwidth/34 +%<2008> \g_@@_beamer_sep_dim+\l_@@_beamer_extraindent_dim +}, + text~margin~right=\dim_eval:n { +%<main> \paperwidth/38 +%<2008> \g_@@_beamer_sep_dim+\l_@@_beamer_extraindent_dim + } +} +\cs_new:Nn \_@@_beamer_linewidth: {\dim_eval:n {\paperwidth-\beamer@leftmargin-\beamer@rightmargin}} +% \end{macrocode} +%Logo +% +% \begin{macrocode} +\box_new:N \g_@@_logo_box +\hbox_gset:Nn \g_@@_logo_box {% +%<main> \raisebox{\dim_eval:n {-\height+.33\c_ptxcd_logoheight_dim}} +%<2008> \makebox[\_@@_logowidth:][l] + {\_@@_insert_logo:}% +} +% \begin{macro}{\logo} +% \begin{macrocode} +\RenewDocumentCommand{\logo}{sm}{ +\IfBooleanTF{#1}{ +\setbeamertemplate{logo}{\resizebox{!}{.06\beamer@paperheight}{\mbox{#2}}} +}{ +\setbeamertemplate{logo}{#2} +} +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\setupTUDaFrame} +% \begin{macrocode} +\newcommand*{\setupTUDaFrame}[1]{ + \keys_set:nn {ptxcd/beamer/outer} {#1} +%<2008> \ptxcd_setup_frame: +} +% \end{macrocode} +% \end{macro} +% \iffalse +%<*main> +% \fi +% \begin{macrocode} +\defbeamertemplate*{footline}{TUDa2023}{ + \begin{beamercolorbox}[leftskip=\beamer@leftmargin,rightskip=\beamer@rightmargin]{footline} + \usebeamerfont{footline} + \rlap{\insertshortdate} + \hfill + \makebox[0pt][c]{ + \bool_set_false:N \l_ptxcd_separate_bool + \clist_map_variable:nNn {department, institute, author} \l_tmpa_tl { + \tl_if_empty:cF {beamer@short\l_tmpa_tl} { + \bool_if:NTF \l_ptxcd_separate_bool + {\usebeamertemplate{footline~sep}} + {\bool_set_true:N \l_ptxcd_separate_bool} + \use:c {insertshort\l_tmpa_tl} + } + } + } + \hfill + \llap{\insertframenumber} + \par\vspace{-\dp\strutbox} + \end{beamercolorbox} + \skip_vertical:n {\dimexpr\paperheight/32-\dp\strutbox} +} +\setbeamertemplate{footline~sep}{\space\smash{\rule[-.5\dp\strutbox]{.25pt}{\ht\strutbox}}\space} +\defbeamertemplate*{headline}{TUDa2023}{ + \bool_if:NT \g_@@_headrule_bool { + \cs_if_exist:NF \ptxcd_beamer_headrule { + \ptxcd_makeheadrule[color=identbarcolor,width=\paperwidth]{ptxcd_beamer_headrule} + } + \ptxcd_beamer_headrule\par\nointerlineskip + } + \bool_if:NTF \g_@@_extended_space_bool { + \bool_if:NTF \g_@@_headrule_bool { + \skip_vertical:n {\dim_eval:n {+\paperheight/38}} + \strut + } { + \skip_vertical:n {\dim_eval:n {\paperheight/16}} + } + }{ + \skip_vertical:n {\dimexpr\paperheight/38} + \hspace*{\beamer@leftmargin}\rlap{\usebeamertemplate***{title~in~head/foot}} + } + \hspace*{\fill} + \bool_if:NT \g_ptxcd_headlinelogo_bool { + %partnerlogo + \bool_if:NT \g_@@_extended_space_bool \smash { + \raisebox{\dimexpr-\height+\ht\strutbox}{ + \box_use:N \g_@@_partnerlogo_box + } + } + \skip_horizontal:n {\dimexpr\paperheight/38} + %logo + \bool_if:NTF \g_@@_headrule_bool { + \raisebox{2mm}[0pt][0pt]{\setlength{\fboxsep}{\z@}\colorbox{white}{\rule{\z@}{\dim_eval:n {\box_ht:N \g_@@_logo_box+\box_ht:N \ptxcd_beamer_headrule_box + \box_dp:N \ptxcd_beamer_headrule_box+1pt}}\box_use:N \g_@@_logo_box}} + \hspace*{10pt} + } { + \bool_if:NT \g_@@_extended_space_bool \smash {\box_use:N \g_@@_logo_box} + \hspace*{.7pt} + } + } + \par +} +\setbeamertemplate{title~in~head/foot}{ + \bool_set_false:N \l_ptxcd_separate_bool + \tl_if_empty:NF {\beamer@shorttitle} { + \bool_set_true:N \l_ptxcd_separate_bool + \text_uppercase:n {\beamer@shorttitle} + } + \tl_if_empty:NF {\beamer@shortauthor} { + \bool_if:NT \l_ptxcd_separate_bool { + \space/\space + } + \text_uppercase:n {\beamer@shortauthor} + } +} +\defbeamertemplate*{sidebar~right}{TUDa2023}{ + \bool_if:NT \g_ptxcd_headlinelogo_bool { + \vspace{\c_ptxcd_logoheight_dim} + \llap{\box_use:N \g_@@_sublogo_box} + } +} +\defbeamertemplate*{frametitle}{TUDa2023}[1][left]{% + \nointerlineskip% + \bool_if:NF \g_@@_extended_space_bool + {\vskip.55ex} + \begin{beamercolorbox}[ + wd=\dim_eval:n {\bool_if:NT \g_@@_extended_space_bool {-\box_wd:N \g_@@_logo_box } \box_if_empty:NF \g_@@_sublogo_box {-\box_wd:N \g_@@_sublogo_box - 1em}+ \textwidth}, + ]{frametitle} + \usebeamerfont{frametitle}% + \if@tempswa\else\csname beamer@fte#1\endcsname\fi% + \vphantom{Ü} + \bool_if:NT \g_@@_uppercase_frametitle_bool \text_uppercase:n {\insertframetitle}\strut + \par% + {% + \ifx\insertframesubtitle\@empty% + \else% + {\usebeamerfont{framesubtitle}\usebeamercolor[fg]{framesubtitle}\strut\text_uppercase:n {\insertframesubtitle}\strut\par}% + \fi + }% + \if@tempswa\else\vskip-.3cm\fi% set inside beamercolorbox... evil here... + \end{beamercolorbox} + \vskip.5ex +} +% \end{macrocode} +% +% +% \begin{macrocode} +\mode +<all> +% \end{macrocode} +% \iffalse +%</main> +%</body> +%</package> +% \fi +% +% \Finale +% \fi^^A No documentation on this +\endinput diff --git a/Master/texmf-dist/source/latex/tuda-ci/beamerthemeTUDa2008.dtx b/Master/texmf-dist/source/latex/tuda-ci/beamerthemeTUDa2008.dtx new file mode 100644 index 00000000000..cfb9a20f723 --- /dev/null +++ b/Master/texmf-dist/source/latex/tuda-ci/beamerthemeTUDa2008.dtx @@ -0,0 +1,214 @@ +% \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{beamerthemeTUDa2008.dtx}[2025-01-26 v4.00 Compatibility mode for the design=2008 of tudabeamer] +\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 of the current theme as well as DEMO-TUDaBeamer2008-de for the compatibility example.} +\typeout{***********************************************************} +\stop +%</driver> +%<*driver>^^A Preparation for real docstrip documentation +\providecommand*{\TUDaDocDTXfiles}{beamerthemeTUDa2008.dtx} +\input{tuda-ci.dtx} +%</driver> +% \fi +%<*outer> +%<@@=ptxcd> +% \fi +% \begin{macrocode} +\ptxcd_makeheadrule[color=identbarcolor,width=\paperwidth-2\g_@@_beamer_sep_dim]{ptxcd_beamer_headrule} +\ptxcd_makefootrule[width=\paperwidth-2\g_@@_beamer_sep_dim]{ptxcd_beamer_rule} +% \end{macrocode} +% \begin{macrocode} +\defbeamertemplate*{sidebar~left}{TUDa}{} +\defbeamertemplate*{sidebar~right}{TUDa}{} +\bool_if_exist:NF \l_ptxcd_tmpa_bool {\bool_new:N \l_ptxcd_tmpa_bool} +\defbeamertemplate*{footline}{TUDa} +{ + \begin{beamercolorbox}[leftskip=\g_@@_beamer_sep_dim,rightskip=\g_@@_beamer_sep_dim, + ht=\csname c_ptxcd_smallrule_dim\endcsname,dp=1mm]{footline} + \ptxcd_beamer_rule + \end{beamercolorbox} + \begin{beamercolorbox}[ + leftskip=\g_@@_beamer_sep_dim, + rightskip=\g_@@_beamer_sep_dim, ht=2.75mm,dp=2.75mm]{footline} + \usebeamerfont{author~ in~ head/foot}% + \bool_set_false:N \l_ptxcd_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_ptxcd_tmpa_bool {~|~} + {\bool_set_true:N \l_ptxcd_tmpa_bool} + \use:c {insertshort\l_tmpa_tl} + } + } + \bool_if:NT \l_ptxcd_tmpa_bool {~|~} + \insertframenumber + \hfill\raisebox{\dimexpr-.5\height+\dp\strutbox\relax}{\insertlogo} + \end{beamercolorbox} +} + +\defbeamertemplate{headline}{TUDa.logo} {% + \begin{beamercolorbox}[ + leftskip=\g_@@_beamer_sep_dim,rightskip=\g_@@_beamer_sep_dim, + ht=.75\g_@@_beamer_sep_dim,dp=\box_dp:N \ptxcd_beamer_headrule_box]{headline} + \ptxcd_beamer_headrule + \end{beamercolorbox} +} +\box_new:N \l_@@_frametitle_box +\defbeamertemplate{frametitle}{TUDa.logo}{% +\nointerlineskip% +\begin{beamercolorbox}[ + sep=\g_@@_beamer_logosep_dim, + wd=\dim_eval:n {\_@@_beamer_linewidth:+2\l_@@_beamer_extraindent_dim}, + rightskip=-\g_@@_beamer_logosep_dim, + leftskip=\dim_eval:n {-\g_@@_beamer_logosep_dim+\l_@@_beamer_extraindent_dim}, + ]{frametitle} + \hbox_set:Nn \l_@@_frametitle_box { + \parbox[t] + {\dim_eval:n {\linewidth- \box_wd:N \g_@@_logo_box-1em}}{% + \usebeamerfont{frametitle}\strut\insertframetitle + \ifx\insertframesubtitle\@empty + \else + \par + \usebeamercolor[fg]{framesubtitle} + \usebeamerfont{framesubtitle} + \insertframesubtitle + \fi + }} + \leavevmode + \bool_if:NTF \g_ptxcd_centerframetitle_bool + {\raisebox{\dimexpr-.5\height+.5\depth}} + {\use:n} + {\box_use:N \l_@@_frametitle_box} + \hfill% + \bool_if:NTF \g_ptxcd_centerframetitle_bool + {\raisebox{\dimexpr-.5\height+.5\depth}} + {\raisebox{\dimexpr-\height+\ht\strutbox}} + {\box_use:N \g_@@_logo_box} +\end{beamercolorbox}% +\bool_if:NT \g_ptxcd_headsepline_bool { + \nointerlineskip + \begin{beamercolorbox}[ + wd=\dim_eval:n {\textwidth+2\l_@@_beamer_extraindent_dim}, + ht=\c_ptxcd_smallrule_dim, + dp=0pt + ]{smallrule} + \end{beamercolorbox} +} +} +\defbeamertemplate*{headline}{TUDa.nologo} +{% + \vspace{.75\g_@@_beamer_sep_dim} + \begin{beamercolorbox}[ + leftskip=\g_@@_beamer_sep_dim,rightskip=\g_@@_beamer_sep_dim]{headline} + \ptxcd_beamer_headrule + \end{beamercolorbox} + } +\defbeamertemplate*{headline}{TUDa.simple} +{ + \ifbeamercolorempty[bg]{background~canvas}{ + \vspace{\dimexpr.5\c_ptxcd_logoheight_dim-\c_ptxcd_rulesep_dim} + \skip_horizontal:n {\beamer@leftmargin} + \color{identbarcolor} + \vrule width\dimexpr\textwidth-\beamer@leftmargin-\beamer@rightmargin height\c_ptxcd_rulesep_dim + }{ + \vspace{\dimexpr.5\c_ptxcd_logoheight_dim} + } +} +\defbeamertemplate*{frametitle}{TUDa.nologo}{% + \nointerlineskip% +\begin{beamercolorbox}[ + sep=\g_@@_beamer_logosep_dim, + wd=\dim_eval:n {\_@@_beamer_linewidth:+2\l_@@_beamer_extraindent_dim}, + leftskip=\dim_eval:n {-\g_@@_beamer_logosep_dim+\l_@@_beamer_extraindent_dim}, + ]{frametitle} + \hbox_set:Nn \l_@@_frametitle_box { + \parbox[t] + {\dimexpr\linewidth- \box_wd:N \g_@@_logo_box-1em\relax\relax}{% + \usebeamerfont{frametitle}\strut\insertframetitle + \ifx\insertframesubtitle\@empty + \else + \par + \usebeamercolor[fg]{framesubtitle} + \usebeamerfont{framesubtitle} + \insertframesubtitle + \fi +}} +\leavevmode +\bool_if:NTF \g_ptxcd_centerframetitle_bool +{\raisebox{\dimexpr-.5\height+.5\depth}} +{\use:n} +{\box_use:N \l_@@_frametitle_box} +% \end{macrocode} +% Rule for voffset similar to logo +% \begin{macrocode} + \rule[\dim_eval:n { + \bool_if:NTF \g_ptxcd_centerframetitle_bool + {-.5\box_ht:N \g_@@_logo_box+.5\box_dp:N \g_@@_logo_box} + {-\box_ht:N \g_@@_logo_box+\ht\strutbox} + }]{0pt}{\dim_eval:n { + \box_ht:N \g_@@_logo_box+\box_dp:N \g_@@_logo_box + }} +\end{beamercolorbox} +\bool_if:NT \g_ptxcd_headsepline_bool { + \nointerlineskip + \begin{beamercolorbox}[ + wd=\dimexpr\linewidth+2\l_@@_beamer_extraindent_dim \relax, + ht=\c_ptxcd_smallrule_dim, + dp=0pt + ]{smallrule} + \end{beamercolorbox} +} +} +\cs_new:Nn \ptxcd_setup_frame: { + \bool_if:NTF \g_ptxcd_headlinelogo_bool { + \setbeamertemplate{frametitle}[TUDa.logo] + \setbeamertemplate{headline}[TUDa.logo] + }{ + \setbeamertemplate{frametitle}[TUDa.nologo] + \setbeamertemplate{headline}[TUDa.nologo] + } +} +\ptxcd_setup_frame: +% \end{macrocode} +% +% +% \begin{macrocode} +\mode +<all> +% \end{macrocode} +% \iffalse +%</outer> +% \fi +% \Finale +% \fi^^A No documentation on this +\endinput diff --git a/Master/texmf-dist/source/latex/tuda-ci/tuda-ci.dtx b/Master/texmf-dist/source/latex/tuda-ci/tuda-ci.dtx new file mode 100644 index 00000000000..190483e12a7 --- /dev/null +++ b/Master/texmf-dist/source/latex/tuda-ci/tuda-ci.dtx @@ -0,0 +1,3775 @@ +% \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 +%<*driver> +\ProvidesFile{tuda-ci.dtx}[2025-01-26 v4.00 The TUDa-CI Bundle – LaTeX using the Corporate Design of TU Darmstadt] +%</driver> +%<*package|class> +%<@@=ptxcd> +\NeedsTeXFormat{LaTeX2e}[2022-06-01] +%<tudapub>\ProvidesExplClass{tudapub}{2025-01-26}{4.00}{Publications using TU Darmstadt's Corporate Design (TUDa-CI)} +%<tudathesis>\ProvidesExplFile{tudathesis.cfg}{2025-01-26}{4.00}{Special Features for publication type 'thesis' using TU Darmstadt's Corporate Design (tuda-ci)} +%</package|class> +%<*driver> +\PassOptionsToPackage{hyperindex=false}{hyperref} +\documentclass[ + pdfa=false, + titlepage=true, + custommargins=geometry, + parskip=half-, + textaccentcolor=black, + class=report, + IMRAD=false, + accept-missing-logos=true, +]{tudapub} +\let\tudamaketitle\maketitle% avoid issues due to catcode changes +\newcommand*\file[1]{\texttt{#1}} +% by default doc.sty would define this to be used as a wrapper for the index code reference numbers +\newcommand*\code[1]{\texttt{#1}} +\newcommand*\tbs{\textbackslash} +\newcommand*\pkg[1]{\textsf{#1}} +\newcommand*\cls[1]{\textsf{#1}} +\usepackage[german,english]{babel} +\usepackage{doc} +\let\maketitle\tudamaketitle% restore +\usepackage{tabularx} +\usepackage{booktabs} +\usepackage{verbatim}% for \comment +\usepackage{minted} +\usepackage[autostyle]{csquotes} +\usepackage{hologo} + +\usepackage{xspace} +\AddToHook{cmd/KOMAScript/after}{\xspace} + +\providecommand*{\codefamily}{\ttfamily} +\DeclareTextFontCommand{\codefont}{\codefamily} +\ProvideDocElement[idxtype = option, idxgroup = options]{Option}{optionenv} +\makeatletter +\ExplSyntaxOn +\newcommand{\PrintDescribeKeyOption}[1]{\parbox[b]{\linewidth}{\raggedleft\MacroFont #1}\rlap{=}} + +\cs_new:Npn \__ptxtools_parse_key_option:w #1 #2 #3 #4 = #5 \q_stop { + \noindent{\let\PrintDescribeOption\PrintDescribeKeyOption\DescribeOption{#4}}\makebox[\linewidth]{ + \IfBooleanTF{#3}{\textsf{#5}}{\textsf{(#5)}} + \hfill + \IfBooleanTF{#1} + {#2} + {(default:~\codefont{#2})} + } +} + +\cs_new:Npn \__ptxtools_parse_key_option_item:w #1 #2 #3 #4 = #5 \q_stop { + \item[\let\MacroFont\codefamily\DescribeOption{#4=}\IfBooleanTF{#3}{\textsf{#5}}{\textsf{(#5)}}] + \hfill + \IfBooleanTF{#1} + {#2} + {(default:~\codefont{#2})}\newline +} + +\NewDocumentCommand{\DescribeKeyOption}{smms}{ + \__ptxtools_parse_key_option:w #1 {#3} #4 #2 \q_stop +} + +\NewDocumentCommand{\KeyOptionItem}{smms}{ + \__ptxtools_parse_key_option_item:w #1 {#3} #4 #2 \q_stop +} + +%%%%%%%%% +%% Implementation matching the implementtion of documentation/implementation like in +%% l3doc.dtx version of 2024-12-25 +%% Copyright (C) 1990-2024 The LaTeX Project +%%%%%%%%% + +\bool_new:N \l__ptxtools_in_implementation_bool +\bool_new:N \g__ptxtools_typeset_documentation_bool +\bool_new:N \g__ptxtools_typeset_implementation_bool +\bool_set_true:N \g__ptxtools_typeset_documentation_bool +\bool_set_true:N \g__ptxtools_typeset_implementation_bool +\NewDocumentCommand \EnableDocumentation { } + { \bool_gset_true:N \g__ptxtools_typeset_documentation_bool } +\NewDocumentCommand \EnableImplementation { } + { \bool_gset_true:N \g__ptxtools_typeset_implementation_bool } +\NewDocumentCommand \DisableDocumentation { } + { \bool_gset_false:N \g__ptxtools_typeset_documentation_bool } +\NewDocumentCommand \DisableImplementation { } + { \bool_gset_false:N \g__ptxtools_typeset_implementation_bool } +\NewDocumentEnvironment { documentation } { } + { + \bool_if:NTF \g__ptxtools_typeset_documentation_bool + { \bool_set_false:N \l__ptxtools_in_implementation_bool } + { \comment } + } + { \bool_if:NF \g__ptxtools_typeset_documentation_bool { \endcomment } } +\NewDocumentEnvironment { implementation } { } + { + \bool_if:NTF \g__ptxtools_typeset_implementation_bool + { \bool_set_true:N \l__ptxtools_in_implementation_bool } + { \comment } + } + { \bool_if:NF \g__ptxtools_typeset_implementation_bool { \endcomment } } +\let\saved_macrocode\macrocode +\let\saved_endmacrocode\endmacrocode +\def\macrocode{ +\bool_if:NTF \g__ptxtools_typeset_implementation_bool +\saved_macrocode +\comment +} +\def\endmacrocode{ +\bool_if:NTF \g__ptxtools_typeset_implementation_bool +\saved_endmacrocode +\endcomment +} + +%%%%%%%%% +%% end of the snippet adapted from l3doc.dtx +%%%%%%%%% + +\usepackage{minted} +\newminted[Syntax]{latex}{gobble=2, tabsize=4} +\newminted[example]{latex}{gobble=2, tabsize=4} +\setminted{escapeinside=||} + +\geometry{ + top=\g_ptxcd_topMargin_dim, + inner=\g_ptxcd_innerMargin_dim, + outer=\dim_eval:n {\g_ptxcd_outerMargin_dim}, + bottom=\g_ptxcd_bottomMargin_dim, + columnsep= \g_ptxcd_columnSep_dim, + includehead, + includefoot, + includemp, + nomarginpar, + includemp, marginpar=\g_ptxcd_marginpar_dim, marginparsep=\g_ptxcd_columnSep_dim, + headheight=\g_ptxcd_headheight_dim, + reversemp +} + +% Loader for dtx files so the preamble is only necessary once +\NewDocumentCommand{\TUDaLoadDocDTX}{m}{ + \exp_args:No \clist_map_inline:nn {#1} {\DocInput{##1}} +} + +\ExplSyntaxOff +\newcommand{\docmarginpar}[1]{\frame{#1}} + +\makeatother + +\providecommand*{\sarg}{\codefont{*}} +\providecommand*\marg[1]{% + {\codefamily\char`\{}\meta{#1}{\codefamily\char`\}}} +\providecommand*\oarg[1]{% + {\codefamily[}\meta{#1}{\codefamily]}} +\providecommand*\parg[1]{% + {\codefamily(}\meta{#1}{\codefamily)}} + +\usepackage{biblatex} +\addbibresource{DEMO-TUDaBibliography.bib} + +\hypersetup{hidelinks} + +\usepackage{pifont}% Zapf-Dingbats Symbols +\newcommand*{\FeatureTrue}{\ding{52}} +\newcommand*{\FeatureFalse}{\ding{56}} +\EnableCrossrefs + +\CodelineIndex +\RecordChanges + +\providecommand*{\TUDaDocDTXfiles}{tuda-ci.dtx,tudacolors.dtx} + +\begin{document} +\OnlyDescription +\DisableImplementation +\TUDaLoadDocDTX{\TUDaDocDTXfiles} +\PrintChanges +\printbibliography +% Restore \code to be a wrapper for index numbers +\begingroup +\renewcommand*\code[1]{#1} +\PrintIndex +\endgroup +\end{document} +%</driver> +% \fi +% +% \changes{v3.90}{2024-02-01}{Converted to DTX file} +% +% \DoNotIndex{\newcommand,\newenvironment} +% \GetFileInfo{tuda-ci.dtx} +% \title{TUDa-CI – Corporate Design for TU Darmstadt using \LaTeX} +% \subtitle{Documentation for the TUDa-CI bundle} +% \author{Marei Peischl\thanks{Email: \href{mailto:tuda-ci@peitex.de}{tuda-ci@peitex.de}}} +% \date{\fileversion~from \filedate} +% \maketitle +% +% \begin{abstract} +% The TUDa-CI-Bundle provides a possibility to use the Corporate Design of TU Darmstadt with \LaTeX. +% Therefore, it contains document classes as well as some helper packages and config files together with some templates for user documentation. +% Up to Version 4.00 the documentation was only included in the demo files. +% This document now sums up all features and includes references to other package documentations if required. +% +% This process is not yet finished and will probably last some more time. +% So there will be more documentation as soon as possible and we try to gather everything within this document. +% There are possibilities to help with the documentation especially the translation of the descriptions already aailable in German. +% In case you want to help feel free to provide a pull-request via the GitHub repository or contact the author for other options of contributing. +% \end{abstract} +% +% \tableofcontents +% +% \chapter{Contents of the TUDa-CI Bundle} +% The TUDa-CI Bundle currently contains template files for the following document types: +% +% \begin{description} +% \item[Print publications] generic document class which provides modes for more specific documents. +% The basic documentation applies to all types and can be found in \autoref{sec:tudapub}. +% \begin{itemize} +% \item \file{DEMO-TUDaPub.tex}: default document matching the CI guideline +% \item minimal Template for internal reports \file{DEMO-TUDaReport.tex} using \option{type=intern} (see description of \option{type} in \autoref{sec:options} on \pageref{option:type}) +% \item (PhD) theses, using \option{type=thesis}. This also extends the functionality and adds some thesis specific mechanisms, see \autoref{sec:theses} \file{DEMO-TUDaThesis.tex} and \file{DEMO-TUDaPhD.tex} +% \end{itemize} +% \item[Scientific Posters] based on the \pkg{tcolorbox} poster library, \cite{TUDaSciPoster} +% \item[Presentation Slides] beamer theme. This includes the old design of 2008 as well as the redesign of 2023, \cite{TUDaBeamer} +% \item[Announcement Posters] for event or job announcements, \cite{TUDaPoster} +% \item[Leaflets] \cite{TUDaLeaflet} +% \item[Exercise Sheets/Exams] \cite{TUDaExercise} +% \item[Letters] \cite{TUDaLetter} +% \end{description} +% +% The document classes use internal auxiliary packages to simplify the usage and reduce the maintenance effort. +% These are called by the elements they define: +% \pkg{tudacolors}, \pkg{tudafonts}, \pkg{tudarules} as well as the \pkg{pgfplots} color schemes defined by \pkg{tuda-pgfplots}. +% +% Additionally, the setup is defined to support department specific configuration files. +% Officially we currently only support the setup of the department of mechanical engineering, see \autoref{sec:mecheng}. +% There may be unofficial custom setups within the departments. +% Those are not officially supported. +% In case you want to provide your own and add it to TUDa-CI, please have a look at \autoref{sec:department-config}. +% +% \chapter{Getting Started} +% The TUDa-CI bundle is available via CTAN\cite{ctan-tuda-ci} and therefore no manual installation should be required. +% For TUDa members the HRZ also provides an on-premise Overleaf instance which also contains a release including all necessary files. +% In case you are a member of TU Darmstadt you can access the server via \url{https://sharelatex.tu-darmstadt.de/}. +% +% \section{Logo installation} +% Sadly the logo files may not be published together with this template. +% So it is necessary to either disable the loading or install the files. +% The easiest way to do so is by placing a copy of the required logos in your working directory. +% But this will be required for every document you want to use these templates for. +% +% A better alternative would be a local installation of the logo file. +% This can be done by moving the file info your \verb+TEXMFHOME+ directory. +% On standard \TeX{} Live Installations this would be called \path{texmf/} in your users home directory. +% Inside this one the logo files have to be placed according to the TDS (\TeX{} Directory Structure), which means it has to be copied into +% \path{texmf/tex/latex/tuda-ci-logos}. +% +% Alternatively there are scripts to be run inside a terminal to automatically detect the correct location. +% These can be found inside the \path{tools} directory of TUDa-CI's GitHub Repository (\citeurl{tuda-ci-github}). +% +% \chapter{\cls{tudapub} – generic class for articles and theses} +% \label{sec:tudapub} +% The TUDa-CI bundle uses a generic document class to be more flexible with the layout adjustments. +% The setup is based on \KOMAScript and this section is listing the features. +% Afterwards there will be specific information on the thesis modes. +% +% \section{Usage and class options} +% \label{sec:options} +% \begin{table} +% \captionabove[Differences between the demo files based on \cls{tudapub}]{ +% Differences between the demo files based on \cls{tudapub}. +% The template files use different options depending on the actual purpose. +% This tabular gives an overview of the Features shown inside the tempaltes as well as the initial settings. +% } +% \label{tab:demo-options} +% \begin{addmargin}[\dimexpr-\marginparwidth-\marginparsep]{0pt} +% \begin{tabularx}{\linewidth}{@{}p{.25\linewidth}c>{\centering\arraybackslash}Xcc@{}} +% \toprule +% Option & DEMO-TUDaThesis & DEMO-TUDaPhD & DEMO-TUDapub & DEMO-TUDaReport \\ +% \midrule +% twoside & \FeatureFalse & \FeatureTrue & \FeatureFalse & \FeatureFalse \\\midrule +% parskip & \FeatureTrue & \FeatureFalse & \FeatureTrue & \FeatureFalse \\\midrule +% colophone & \FeatureFalse & \FeatureTrue & \FeatureFalse & \FeatureFalse \\\midrule +% dedication & \FeatureFalse & \FeatureTrue & \FeatureFalse & \FeatureFalse \\\midrule +% font size & 11pt & 11pt & 9pt & 9pt \\\midrule +% ruledheaders & section & chapter & all & all \\\midrule +% class & scrreprt & scrbook & scrartcl & scrartcl \\\midrule +% thesis & \ttfamily thesistype=bachelor & \ttfamily thesistype=dr, dr=rernat & \FeatureFalse & \FeatureFalse \\\midrule +% marginpar & \FeatureFalse & \FeatureFalse & \FeatureTrue & \FeatureFalse \\\midrule +% Affidavit\newline +% \rlap{(\enquote{Selbstständigkeitserklärung})} & \FeatureTrue & \FeatureTrue & \FeatureFalse & \FeatureFalse \\\midrule +% abstract & \FeatureFalse & \FeatureTrue & \FeatureTrue & \FeatureFalse \\\midrule +% custommargins & \FeatureTrue & \FeatureTrue & \FeatureFalse & \FeatureFalse \\ +% \bottomrule +% \end{tabularx} +% \end{addmargin} +% \end{table} +% The class is loaded using +% \begin{Syntax} +% \documentclass[|\meta{Options}|]{tudapub} +% \end{Syntax} +% \noindent TUDa-CI defines some additional options to be used. These are described below. +% The shown default values apply only for the document class itself. The template files may use different settings. +% An overview of these differences are shown in \autoref{tab:demo-options}. +% +% \DescribeKeyOption{class=article/report/book}{article} +% This option selects the base document class. +% The values load the corresponding \KOMAScript class \cite{scrguide-en}. +% The article value thus loads \cls{scrartcl}. +% +% \KOMAScript is a collection of classes and packages for \LaTeX{} which, in addition to the typographical adaptations to the European area, also greatly extends the configuration options. +% The documentation is also available in German \cite{scrguide-de}. +% +% \DescribeKeyOption{accentcolor=\meta{Color}}{0b}* +% Selects the spot color for use within the identity bar. In addition to these colors, any defined can be used. +% See \autoref{sec:color} for the list of predefined colors as well as additional options for a more detailed selection. +% The Options \option{accentcolor}, \option{textaccentcolor} and \option{identbarcolor} will be passed to tudacolors. +% Using those, the colors can even be set independently of each other. +% +% \DescribeKeyOption{custommargins=\meta{Boolean}/geometry}{false} +% According to the corporate design, the line lengths are too long from a typographical point of view. +% This is why the custommargins class option exists. +% Details are described within \autoref{sec:margins}. +% +% \DescribeKeyOption{marginpar=true/false/auto}{auto} +% Controlls the marginpar. The default setting is auto. +% This means that the marginpar column runs across the fifth column of the layout grid \cite{TUDaGuideline}. +%^^A\marginpar{Marginpar example} +% Above this, the option also accepts boolean values. False would set width of the column to 0. +% The mechanism itself is not deactivated. +% +% The font inside the marginpars are controlled using the komafont mechanism \cite{scrguide-en} using the \code{marginpar} element. +% It is defined as +% \begin{example} +% \setkomafont{marginpar}{\accentfont} +% \end{example} +% to extend this setting, e.\,g. by adding a color one can add +% \begin{example} +% \addtokomafont{marginpar}{\color{textaccentcolor}} +% \end{example} +% to the preamble. +%^^A \marginline{ +%^^A \includegraphics[width=\marginparwidth]{example-image}\\ +%^^A Marginpar example using ragged text made with \KOMAScript's marginline +%^^A } +% +% \DescribeKeyOption{twocolumn=\meta{Boolean}}{false}* +% Activates the two-column mode globally. +% In this case, however, two margin columns are created due to their nature. +% Use in combination with \code{marginpar=auto} is therefore questionable in most cases. +% If the two-column mode is only activated locally, that behavior does not apply, but the margin notes are deactivated. +% +% \DescribeKeyOption{ruledheaders=all/none/chapter/section}{all} +% Selects the style of the headings. +% \code{ruledheaders=all} selects the style framed with rules for all up to \cs{subsubsection}. +% This style is limited accordingly for chapter or section. +% False loads the \KOMAScript{} default setup instead. +% +% \DescribeKeyOption{title=default/small}{default} +% The relatively large font size of the title can lead to spacing issues, especially with long titles for theses. +% The \code{title} option prevents this by loading the font sizes set defined for the paper 1 size smaller (e.\,g. a5 font size if a4 paper is used). +% +% \DescribeKeyOption{type=publication/thesis/intern}{publication} +% \label{option:type}% +% Is used to load specific configuration for theses (\autoref{sec:thesis}) or internal documents (\autoref{sec:report}). +% +% \DescribeKeyOption{headline=true/false/automark}{false} +% The CI guideline \cite{TUDaGuideline} allows headers to be used ruled below the identbar. +% That may be confusing as the headers are typeset larger than subsection headings. +% Because of that it's switched off by default, but users can enable this setting using the \code{headline} option. +% \code{automark} will also be passed to \pkg{scrlayer-scrpage} and switch to running headers. +% +% \DescribeKeyOption{logo=head/body}{body} +% Sets the position of the logo on the title page, see \autoref{sec:title-options}. +% +% \DescribeKeyOption{colorback=true/false/title/body/head}{true} +% Change the color setup of the title page, see \autoref{sec:title-options}. +% +% \DescribeKeyOption{IMRAD=\meta{Boolean}}{true}* +% Toggles the check for IMRAD labels, see \autoref{sec:IMRAD}. +% +% \DescribeKeyOption{logofile=\meta{file name/path}}{tuda\_logo}* +% Allows an alternative logo to be used. +% This option is available so that the templates can also be used without the TUDa logo. +% The logos are reserved to be used by TUDa members and may therefore not be published with this template. +% In case you want to install the logo files locally you can find further information at \citeurl{TUDa-CI-Info}. +% +% \noindent Additionally all \KOMAScript{} options can be used. These are described within the documentation. Some more notes on the interaction between \KOMAScript{} and TUDa-CI can be found in \autoref{sec:KOMA}. +% +% \section{Title}\label{sec:title} +% +% The title page is generated automatically by \cls{tudapub}. +% The structure for this corresponds largely to the classic method using \cs{maketitle}. +% +% The \KOMAScript{} option \code{titlepage}\cite{scrguide-en} is supported to switch between separate title pages and an in-page title block. +% Due to the implementation, \code{titlepage=true} is treated identically to \code{titlepage=\allowbreak firstiscover}. +% +% \DescribeMacro{\titlehead}\DescribeMacro{\title}\DescribeMacro{\subtitle}\DescribeMacro{\subject}\DescribeMacro{\author}\DescribeMacro{\and}\DescribeMacro{\thanks}\DescribeMacro{\date}\DescribeMacro{\publishers} +% These macros are used to set the title data. +% If not mentioned differently all need one mandatory argument which contains the data. +% They are used as with standard \LaTeX{}, but there were a few added to support the additional features of the title page design. +% \begin{Syntax} +% \title{|\meta{title}|} +% \author{|\meta{Author1}|\thanks{Affiliation of Author1} \and |\meta{Author2}|} +% % |\textnormal{[…other elements…]}| +% \maketitle +% \end{Syntax} +% +% \subsection{TUDa-CI specific title elements} +% \DescribeMacro{\titlegraphic} +% Accepts any \LaTeX{} content, does not have to be an image. +% This is placed flush with the top corner in the main part of the title page. +% This macro is usually used to place a graphic: +% \begin{example} +% \titlegraphic{\includegraphics[width=\width]{example-image}} +% \end{example} +% \DescribeMacro{\width}\DescribeMacro{\height} +% \cs{width} and \cs{height} can be used to select the appropriate size of the image. +% From version 3.19, there also is a starred variant \cs{titlegraphic*}. +% With this, scaling and any necessary cropping to fill the reserved area is done automatically using \pkg{trimclip}. +% \begin{example} +% \titlegraphic*{\includegraphics{example-image}} +% \end{example} +% +% \DescribeMacro{\addTitleBox}% +% \DescribeMacro{\addTitleBoxLogo} +% \begin{Syntax} +% \addTitleBox{|\meta{Box Content}|} +% \addTitleBoxLogo*{|\meta{Logo}|} +% \end{Syntax} +% The TUDa CI design is using white boxes to place additional Information or logos on the title page. +% These can be added using \cs{addTitleBox} or \cs{addTitleBoxLogo}. +% +% All title boxes are placed below each other with a specified distance and use a white background. +% Text or an institute logo may appear here. The background hast to be white. +% +% Whereas \cs{addTitleBox} will set the box to the same width and horizontal alignment as the TUDa logo the logo variants of this macro don't have a fixed width. +% Here the default is to place scale the logo automtically and maual scaling has to be enforced using the starred variant: +% +% \begin{example} +% \addTitleBox{Text, e.\,g. Institute} +% \addTitleBoxLogo{example-image} +% \addTitleBoxLogo*{\includegraphics[width=.3\linewidth]{example-image}} +% \end{example} +% +% \DescribeMacro{\AddSponsor} +% As of version 3.0, the sponsor mechanism of \cls{tudaleaflet} is also available in \cls{tudapub}. +% This makes it possible to place sponsor logos below the title graphic. +% Sponsor logos or names can be added using \cs{AddSponsor} +% \begin{Syntax} +% \AddSponsor{|\meta{Code to insert the Logo or just the name}|} +% \end{Syntax} +% \DescribeMacro{\height} \cs{height} is defined within the argument. +% All sponsors added this way are aligned at their baseline. +% This can be used to scale multiple logos to the same height. +% The space between the sponsors will be horizontally filled. +% +% \DescribeMacro{\sponsors} +% The second variant enables manual placement with vertical alignment, as may be necessary for logos with different heights. +% In this case, only the spacing and seperation rules are added around the logos: +% \begin{Syntax} +% \sponsors{|\meta{logo1}\meta{logo2}|} +% \end{Syntax} +% +% For theses there exist additional data fields \cs{birthplace}, \cs{group}, \cs{examdate}, \cs{submissiondate}, \cs{tuprints}, \cs{urn} and \cs{reviewer}. +% To use these and also learn about other specials of the title mechanism within theses, please refer to \autoref{sec:theses-title}. +% +% \subsection{Options for titlepage modification} +% \label{sec:title-options} +% \DescribeKeyOption{logo=head/body}{body} +% The position of the logo can be switched. This is done via the class option \option{logo}; +% \begin{description} +% \item[logo=head] +% The logo is placed in the header directly next to the title, which is reduced in width. +% The background of the title is colored in the color of the identity bar. +% This setting also will move the boxes below the logo to the page head. +% +% \item[logo=body] The logo including the info boxes is placed in the body of the front page. +% \end{description} +% +% \DescribeKeyOption{colorback=\meta{Boolean}/title/head/body}{true} +% Similar to the logo position the color structure can be adjusted. +% \option{colorback} toggles between the colored block on the title page and the white background. +% +% The other values will enable the colored area but allow switching between positions. +% \begin{description} +% \item[colorback=title] Only the title background (without subtitle) is colored. +% \item[colorback=head] Background of the total title block including subtitles is colored. +% \item[colorback=body] Only the background of the area used for the \cs{titlegraphic} is colored. +% \end{description} +% +% \subsection{Extra title material for theses} +% For \option{mode=thesis} the title page works a little different. +% Here some data elements are used to provide an interface to be overwritten and are prefilled using additional data fields. +% The fields only existing in \option{thesis} mode are: \cs{birthplace}, \cs{group}, \cs{examdate}, \cs{submissiondate}, \cs{tuprints}, \cs{urn} and \cs{reviewer}. +% For more information on their use and other settings for theses have a look at \autoref{sec:theses}. +% +% \subsection{Abstract} +% \cls{tudapub} extends the availability of the \environment{abstract} environment to \cls{scrbook}. +% Additionally, it adds an optional argument to select the language. +% This should be used to use multiple abstracts of different languages within one document. +% +% \begin{example} +% \begin{abstract} +% Abstract using the document main language (here English) +% \end{abstract} +% +% \begin{abstract}[german] +% Weitere Zusammenfassung in einer anderen Sprache (hier Deutsch), +% sofern benötigt. +% \end{abstract} +% \end{example} +% +% It is important that all languages used in the document are loaded. +% In the case of the example, both options, \option{english} and \option{german} must be passed to the babel package. +% +% \section{PDF/A} +% +% The university library requires submissions to be compliant to the PDF/A standard. +% \DescribeKeyOption{pdfa=\meta{Boolean}}{true} +% The TUDaPub class supports the PDF/A 2b standard. +% PDF/A mode is automatically activated within \cls{tudapub}. +% Depending on the document it's using an implementation via the \pkg{pdfx} package or the \LaTeX{} kernels own PDF management. +% +% \LaTeX{} is not validating the file in any way, it is just using compatible settings for all elements processed by the compiler. +% As \LaTeX{} is not doing any processing on image files the user has to ensure the font settings match the requirements for PDF/A. +% +% \DescribeKeyOption{pdfx=\meta{Boolean}}{true} +% \cls{tudapub} will try to automatically select the best method. +% This is done using \option{pdfx} option. +% This should only be toggled manually if the user is totally sure to understand the impact. +% +% \subsection{Creating PDF/A using the PDF management} +% \label{sec:pdfmanagement} +% The template files which use PDF/A by default now include the settings for the PDF management: +% \begin{example} +% \DocumentMetadata{ +% pdfstandard=a-2b, +% pdfversion=1.7, +% lang=en,% or de or … +% } +% \end{example} +% This can also be used within other documents. More Information on this structure can be found in the documentation of the \pkg{pdfmangement-testphase} \cite{pdfmanagement-testphase} as well as \pkg{l3pdfmeta} \cite{l3pdfmeta}. +% +% If this setting is used \cls{tudapub} will automatically disable the loading for \pkg{pdfx}. +% \cls{tudapub} will automatically try to pass the title data to the metadata. +% In case the title contains more complex material which can not be expanded into text it's possible to overwrite these settings using \pkg{hyperref}'s \cs{hypersetup}. +% The demo files include examples. +% +% \subsection{Creating PDF/A using the pdfx} +% In older versions of this bundle we used \pkg{pdfx} to create PDF/A compliant output files. +% If the PDF management using \cs{DocumentMetadata} is not detected to be active, \cls{tudapub} will still try to use this mechanism. +% The metadata setup for the XMP data then works completely different. +% +% The compiler is creating an additional \file{\cs{jobname}.xmpdata} file. +% It is tried to insert the title data directly. The title data is usually transferred directly. +% However, this can lead to problems if there are macros used within title material. +% For example, the subtitle for this document contains the \LaTeX{} macro, but only text elements can be used. +% Similar to the link labels within the PDF bookmarks. +% +% \DescribeMacro{\Metadata}To avoid this issue, \cls{tudapub} provides the macro \cs{Metadata}. +% All variables that can be processed by \pkg{pdfx} can be set here according to the key=value structure. +% \begin{example} +% \Metadata{ +% author=Marei Peischl (peiTeX), +% title=LaTeX im Corporate Design der TU Darmstadt, +% } +% \end{example} +% Please note that this macro only works if PDF/A output is activated, and no PDF management is used. +% If this is not the case, \cls{tudapub} issues a corresponding error message or warning. +% +% For a full list of the available metadata fields have a look at the \pkg{pdfx} documentation \cite{pdfx}. +% +% \subsection{Additional metadata as requested by the university library} +% \label{sec:IMRAD} +% There is a mechanism for identifying the IMRaD \cite{imrad} structuring model. +% In the style of the individual sub-areas, the call of +% \begin{example} +% \IMRADlabel{introduction} +% \IMRADlabel{methods} +% \IMRADlabel{results} +% \IMRADlabel{discussion} +% \end{example} +% would generate the corresponding labels. +% They have the name \codefont{IMRAD:\meta{key}}. +% +% \DescribeKeyOption{IMRAD=\meta{boolean}}{true}* +% The check mechanism is activated by default at the request of the library. +% If you are not planning to use these labels or this structure just don't match your document, the warning can be deactivated using the \option{IMRAD=false}. +% +% \subsection{Colors conversion and profile} +% \label{sec:pdfa-color} +% PDF/A can only use one color model within a document. +% By default, if no specific profile is selected TUDa-CI will convert the colors to RGB. +% However, as there is no clear conversion, CMYK elements should not be used in \option{pdfa=true} mode. +% +% This mode is not suitable for print output. +% There will be a warning if the conversion is triggered. +% To use CMYK colors with PDF/A it's necessary to use PDF/A via the PDF management (\autoref{sec:pdfmanagement}) and select a specific color profile \cite[see][]{l3pdfmeta}. +% +% \section{(PhD) Theses – Special options and elements used in these templates} +% \label{sec:theses} +% +% As mentioned before the these templates \file{DEMO-TUDaThesis} and \file{DEMO-TUDaPhD} are based on \cls{tudapub}. +% Therefore, they support all options as described before but provide some additional mechanisms. +% To load the thesis specific config the option \option{type=thesis} has to be used. +% As there are additional thesis specific options it's also possible to use the \option{thesis} key directly and add the specific options within braces: +% +% \begin{example} +% \documentclass[ +% english, +% class=report, +% thesis={type=master} +% |[…]| +% ]{tudapub} +% \end{example} +% +% \DescribeKeyOption{thesis/type=bachelor/pp/master/dr/drfinal/\meta{text}}{initially unset}* +% Selection of the type. +% This is printed on the title page and also selects which data is mandatory. +% Possible values are listed below including their impact. The items in parentheses list the required data for that type. +% \begin{description} +% \item[sta] \enquote{Studienarbeit}: Student research project. (\cs{title}, \cs{author}, \cs{date}) +% \item[bachelor] \enquote{Bachelor thesis}. (\cs{title}, \cs{author}, \cs{submissiondate}, \cs{department}, \cs{reviewer}) +% \item[master] \enquote{Master thesis}. (\cs{title}, \cs{author}, \cs{submissiondate}, \cs{department}, \cs{reviewer}) +% \item[pp] \enquote{Project proposal}. (\cs{title}, \cs{author}, \cs{date}, \cs{department}) +% \item[dr] submitted Doctoral thesis (\cs{title}, \cs{author}, \cs{submissiondate}, \cs{department}, \cs{reviewer}) +% \item[drfinal] accepted Doctoral thesis (\cs{title}, \cs{author}, \cs{submissiondate}, \cs{examdate}, \cs{department}, \cs{reviewer}) +% \end{description} +% If a type is specified that was not listed the text is directly used as type. +% In this case, there are no mandatory title fields except the title. +% +% \DescribeKeyOption{dr=rernat/rerpol/ing/phil}{initially unset} +% Loads one of the predefined texts for the title page. +% +% For example, the value phil would use: +% \foreignquote{german}{Zur Erlangung des Grades eines Doktor der Philosophie (Dr.\,phil.)} +% Please be aware that the titlepage is enforced to use German. +% +% \DescribeMacro{\drtext}If none of these values correspond to the desired title, a text can be transferred directly. +% \begin{example} +% \drtext{To obtain the degree …} +% \end{example} +% +% +% \DescribeKeyOption{department=\meta{shorthand or text}}{initially unset} +% The departments are permanently stored as text modules in German and English. +% This option enables selection as a document class option. +% For compatibility reasons, however, the department macro can also be used for this. +% The following shorthands are predefined: +% +% \begin{tabular}{@{}l@{${}\to{}$}l@{}} +% arch & Architecture \\ +% bauing & Civil and environmental engineering \\ +% bio & Biology \\ +% chem & Chemistry \\ +% etit & Electrical Engineering and Information Technology \\ +% gugw & History and Social Sciences \\ +% humanw & Human Sciences \\ +% inf & Computer Science \\ +% mb & Mechanical Engineering \\ +% matgeo & Materials and Earth Sciences \\ +% math & Mathematics \\ +% phys & Physics \\ +% wi & Law and Economics +% \end{tabular} +% +% In addition to the departments, there are also \enquote{fields or study}. +% These are not available for doctoral theses. +% If the given value is not found in the departments the fields of study will be checked afterwards. +% The study areas have the following shorthands: +% +% \begin{tabular}{@{}l@{${}\to{}$}l@{}} +% ce & Computational Engineering \\ +% ese & Energy Science and Engineering \\ +% ist & Information Systems Engineering \\ +% mech & Mechanics \\ +% metro & Mechatronics +% \end{tabular} +% +% If anything other than one of these shorthands is found, the provided text is used directly and a corresponding warning is issued. +% +% \subsection{Thesis specific title page settings and customization} +% \label{sec:theses-title} +% \DescribeKeyOption{instbox=\meta{Boolean}}{true}* +% Selecting the department also creates a box on the title page below the logo. +% In some cases this setting does not match the requirements. +% Therefore, the option \option{instbox} can be deactivated. +% +% \DescribeKeyOption{ignore-missing-data=\meta{Boolean}}{false} +% This option is a switch that makes it possible to disable the error message about title data that has not been transferred. +% In this case, only a warning is created if the specified data does not match the requirements. +% +% \DescribeMacro{\publishers} +% Is used here for the location and is preset with \foreignquote{german}{Darmstadt} or \foreignquote{german}{Darmstadt, Technische Universität Darmstadt} (for PhD theses). +% +% \DescribeMacro{\subject} +% Will be placed below the \cs{subtitle} as for the normal title page, but will hold all the additional information which can be provided using the data fields described in this section. +% +% \DescribeMacro{\birthplace} Place of birth. +% \DescribeMacro{\department} +% Subject/field of study. It's preferred to set it via the class option. +% However, the argument is processed in the same way. +% This macro also provides the functionality of specifying entries that differ from the default entries. +% Especially if a different text to the default \enquote{in the department of} and its variants is required. +% For this purpose, \cs{department} provides an optional argument: +% \begin{Syntax} +% \department[|\meta{replacement text}|]{|\meta{abbreviation/name}|} +% \end{Syntax} +% In addition, from version 2.01 there is also the option of replacing the entire text \enquote{in the department \meta{department name}} as well as the information in the info box on the title page. This is done using the starred variant: +% \begin{example} +% \department*[text for the box]{text between type and author} +% \end{example} +% \DescribeMacro{\examdate}% \DescribeMacro{\submissiondate} Will be added within the description block \cs{subject}. +% +% \DescribeMacro{\institution}\DescribeMacro{\department}\DescribeMacro{\institute}\DescribeMacro{\group} +% Will be added inside a title box as was described in \autoref{sec:title} below each other. +% +% \DescribeMacro{\reviewer} Reviewers. +% Multiple reviewers are separated by \cs{and} as for authors. +% The numbering runs from left to right. +% +% \minisec{Adjusting the reviewer labels} +% The identifier can be changed using an optional argument: +% \begin{Syntax} +% \reviewer[|\meta{replacement identifier}|]{|\meta{name1}| \and |\meta{name2}|} +% \end{Syntax} +% To change the numerical designation, a comma list is used instead of a single label: +% \begin{example} +% \reviewer*[identifier1, identifier2]{name1 \and name2} +% \end{example} +% In this case, the automatic numbering before the identifier is omitted. +% If, for example, the wording of the doctoral regulations is to be complied with, the following applies: +% \begin{example} +% \reviewer[Erstreferent\_in,Koreferent\_in]{Name1 \and Name2} +% \end{example} +% +% \DescribeMacro{\setupReviewName}There is also a macro for creating department-specific templates. +% This allows changes to be made without calling \cs{reviewer}. +% \begin{Syntax} +% \setupReviewName{|\meta{Alternative label to replace \enquote{Review}}|} +% \setupReviewName[1]{|\meta{Erstreferent}|} +% \setupReviewName*{|\meta{label1}|,|\meta{label2}|} +% \end{Syntax} +% +% \DescribeKeyOption{reviewer-on-uppertitleback=\meta{Boolean}}{false}* +% As of version 3.26, the reviewers are no longer named on the back of the title page. +% This can be controlled using the thesis option \option{reviewer-on-uppertitleback}. +% +% \DescribeMacro{\studentID} Matriculation number. According to the template specifications, this information is always optional. +% +% \DescribeMacro{\titleintro}\DescribeMacro{\titleaddendum} From version 2.03, these hooks can be used to add any text directly in front or after the automatic generated subject block holding the thesis data. +% +% \DescribeMacro{\tuprints}\label{page:tuprints} Publication via TUprints requires this setting. +% The data should be provided by the TUprints submission process. +% \begin{example} +% \tuprints{ +% printid=12345, +% urn=123456, +% year=2022 +% } +% \end{example} +% +% \DescribeKeyOption{printid=\meta{TUprints print ID}}{\meta{initially unset}}* +% \DescribeKeyOption{urn=\meta{TUprints URN}}{\meta{initially unset}}* +% If the argument does not contain an equals sign, the value is set as \option{printid} and no \option{urn} is specified. +% +% \option{printid} is the ID number of the TUprints entry. The urn is a permanently unique resource identifier for the document. In TUprints, the number corresponds to the \option{printid} with the addition of a check digit. +% Both dates can be found in the details of the TUprints entry. +% +% \minisec{License information} +% \DescribeKeyOption{license=\meta{License key or license text}}{cc-by-4.0}* +% From version 3.08 there are predefined values for \option{license} simplify customization. These are as follows: +% +% \parbox[t]{.5\linewidth}{% +% \codefamily +% \href{https://creativecommons.org/licenses/by/4.0/}{cc-by-4.0} \textnormal{default since version 4.0}\par +% \href{https://creativecommons.org/licenses/by-sa/4.0/}{cc-by-sa-4.0}\par +% \href{https://creativecommons.org/licenses/by-nc-sa/4.0/}{cc-by-nc-sa-4.0}\par +% \href{https://creativecommons.org/licenses/by-nc-/4.0/}{cc-by-nc-4.0}\par +% }%^^A +% \parbox[t]{.5\linewidth}{ +% \codefamily +% \href{https://creativecommons.org/licenses/by-nd/4.0/}{cc-by-nd-4.0}\par +% \href{https://creativecommons.org/licenses/by-nc-nd/4.0/}{cc-by-nc-nd-4.0}\par +% \href{https://rightsstatements.org/page/InC/1.0/}{inc-1.0}\textnormal{ (From version 3.36)}\par +% \href{https://creativecommons.org/licenses/by-nc-nd/2.0/}{cc-by-nc-nd-2.0-en}\par +% } +% +% The introduction of this option was part of the preparation for adapting the standard license. +% The corresponding discussion can be found at \url{https://github.com/tudace/tuda_latex_templates/issues/251}. +% The adjustment of the default setting for TUDa-CI was made with version 4.0. +% +% The ULB of TUDa offers support in choosing a suitable Creative Commons license at \url{https://www.ulb.tu-darmstadt.de/dpub} or the CC project itself via its license finder at \url{http://creativecommons.org/choose/}. +% TU Darmstadt recommends use of the open CC BY 4.0 license in its Publication Guidelines and Open Access Policy. +% +% If a value different from the keys listed above is found, this value is used directly in place of the license text. +% If it itself contains an equals signs or commas, grouping is necessary. +% +% \subsection{Affidavit} +% \DescribeMacro{\affidavit} +% The macro \cs{affidavit} creates a declaration of authorship with a signature line. +% The name/signature could be set via options or the Information provided with \cs{author} is used. +% In the demo documents, the affidavit is located directly after the title. +% +% \DescribeKeyOption{hide-architecture-note=\meta{Boolean}}{false}* +% The class option \option{hide-architecture-note} allows to disable the note specifically tagetting theses of the architecture department. +% For compatibility reasons it's false by default. So the note will be printed. +% It's also possible to set this directly as an affidavit option if it's not a PhD theses. +% +% \minisec{Disclaimer:} +% The \cs{affidavit} command is using the current version (as of 2025-01-22) of the text provided at +% {\small\url{https://www.tu-darmstadt.de/studieren/studierende_tu/studienorganisation_und_tucan/hilfe_und_faq/artikel_details_de_en_37824.de.jsp}}. +% +% According to the department II, the legally binding text can always be found there. +% The docx file should be used, printed out, signed, scanned and then integrated. +% The easiest way to do this is to use the pdfpages package. +% Please ensure to check which regulations apply to your thesis before submission. +% TUDa-CI can not ensure the text is up to date or matches your submission type. +% +% From version 3.32, the distinction between an affidavit for digital or printed submissions, which has been supported since version 3.06, no longer applies. +% For compatibility reasons, the options are still available, but have the same effect. +% It is imperative that students check whether the text corresponds to the required version before submitting a thesis. +% +% PhD theses use a different text here; the affidavit option \option{affidavit=dr} is used internally to differentiate between them. +% +% Version 3.20 also allows the transfer of further options for the signature name, a signature image or the location. +% The extent to which these options may be used must be clarified by the user before submission. +% TUDa-CI cannot make a reliable statement on this. +% \begin{example} +% \affidavit[ +% signature=Signature name, +% signature-image={\includegraphics[width=\width]{signatureimage}} +% ] +% \end{example} +% A vertical shift of the signature image is not implemented directly, but is easily possible by using the \LaTeX macro \cs{raisebox}\marg{shift}\marg{content}. +% +% It is also possible to print an affidavit in another language as a supplement. +% In order to handle the structure and any necessary language switching, there is an environment: +% \begin{Syntax} +% \begin{affidavit*}[|\meta{Babel language option}]|{|\meta{heading}|} +% \meta{Text} +% \end{affidavit*} +% \end{Syntax} +% This version deliberately does not have a signature line, as the developers do not consider this version to be legally binding. +% However, the environment can also be used for special forms of explanation. +% In this case, an additional signature line can be added: +% \DescribeMacro{\AffidavitSignature}\DescribeKeyOption{signature-location=\meta{Location}}{Darmstadt}* +% \begin{Syntax} +% \AffidavitSignature[|\meta{city}|] +% \end{Syntax} +% +% +% \section{Further configuration options} +% +% \subsection{Select the color model} +% Color vision depends on the way colors are presented. +% For professional printing there usually is a color profile required by the printer to be used. +% For use in documents, it is therefore important to know which output medium is to be used primarily. +% Technically, this difference is reflected in color mixing models. +% In accordance with the guidelines, TUDa-CI supports both a color model for print output (cmyk) and for screen display (RGB). +% The implementation is done via the \pkg{xcolor} package, whereby the corresponding color values for both models are stored withing \pkg{tudacolors}. +% +% Normally, TUDa-CI automatically selects a suitable model. +% The default setting of \option{pdfa=true} ensures a conversion to RGB (vgl.~\ref{sec:pdfa-color}) if no manual setting was found. +% +% If a specific color profile should be used, the \pkg{xcolor} options \option{cmyk} or \option{RGB} can be transmitted directly to \cls{tudapub}. +% They are passed on to the package and will be processed according to the \pkg{xcolor} documentation \cite{xcolor}. +% +% \section{Customizations that deviate from the corporate design guidelines} +% +% \subsection{Font size} +% \DescribeKeyOption{fontsize=\meta{length}}{9pt} +% Contrary to the corporate design guidelines, \cls{tudapub} can also process other font sizes. +% The \option{fontsize} option of \KOMAScript is supported (e.\,g. \option{fontsize=11pt}). +% If no special font size configuration file is available for TUDa-CI, the file supplied with KOMA- Script is selected. +% Examples of deviations for typographical reasons are also shown in the demo files for theses. +% +% \subsection{Margins} +% \label{sec:margins} +% \DescribeKeyOption{custommargins=true/false/geometry}{false} +% According to the corporate design, the line lengths are too long from a typographical point of view. +% This is why the \option{custommargins} class option exists. +% +% \begin{description} +% \item[custommargins=false] +% Default setting of \cls{tudapub}. +% The margins correspond to the specifications of the Corporate Design Guidelines \cite{TUDaGuideline}. +% The setting is made using \pkg{geometry}. +% Customizations are overwritten by executing \cs{maketitle}. +% To allow personal adjustments one of the other settings is required. +% +% \item[custommargins=true] The settings of the Corporate Design Guidelines are not activated. +% pkg{geometry} is not loaded. +% This mode corresponds to the default setting of \KOMAScript. +% The margins are not explicitly defined, but calculated on the basis of the typearea package \cite[see][]{scrguide-en}. +% +% \item[custommargins=geometry] +% This variant was created based on user requests. +% It allows using \cls{tudapub} with support for manual adjustments. +% \pkg{geometry} is loaded and preconfigured as with \option{custommargins=false}. +% However, it is possible to make minor adjustments by using the \cs{geometry} command. +% The settings that apply at the start of the document are saved and restored after the title pages. +% +% Please note that the settings use the preset type area as a starting point (with or without a margin column, depending on the option). +% It is possible to reset all options before adding your own: +% \begin{Syntax} +% \geometry{ +% reset, +% |\meta{Adjustments starting from geometry's defaults}| +% } +% \end{Syntax} +% This applies in particular to the options \code{includehead}, \code{includefoot} and \code{includemp}. +% \end{description} +% +% \minisec{Remark on the headers/footers} +% If the option \option{marginpar=true} remains set, the header and footer protrude beyond the margin column. +% For aesthetic reasons, it is therefore recommended in this case to limit the header and footer to the text area with \option{marginpar=false}. +% +% The standard layout of the column titles is also not very advantageous, as the column titles can be locally larger than the actual headline. (\option{headline=automark}) +% +% For this reason, \cls{tudapub} provides a simpler page style, which considerably simplifies use with living column titles. +% The structure is realized using \pkg{scrlayer-scrpage} and can be adapted according to the \KOMAScript documentation \cite{scrguide-en}. +% \begin{example} +% \pagestyle{TUDa.headings} +% \end{example} +% +% \minisec{Remark on binding correction} +% \DescribeKeyOption{BCOR=\meta{length}}{0pt} +% \DescribeKeyOption{BCORtitlepage=\meta{Boolean}}{false} +% If a binding correction (\option{BCOR=\meta{length}}) is used, this is not automatically inserted on the title page. +% For this case, the \option{BCORtitlepage} option was added with version 3.0. If this is activated, the title page uses the value of the \pkg{typearea} option \option{BCOR} on the first page as an addition to the left margin. +% +% \subsection{Frontmatter/Mainmatter/Backmatter} +% The macros \cs{frontmatter}, \cs{mainmatter} and \cs{backmatter} are usually only available for the class \cls{scrbook}. +% On request, these macros have also been provided as a basis for \cls{scrartcl} and \cls{scrreprt}. +% It is therefore possible to switch to Roman numerals for the opening credits. +% Arabic numerals are then used from \cs{mainmatter}. +% +% \subsection{Math fonts} +% As there is no compiler-independent universal math font and the corporate design guidelines do not take any recommendations into account, several possible variants were discussed. +% The default setting always corresponds to the installation standard. +% No specific settings are loaded. +% The discussion on this can be found at: +% \url{https://github.com/tudace/tuda_latex_templates/issues/19} +% +% A few example configurations are shown below. +% In principle, however, the math type is freely selectable – apart from the restrictions of the compiler. +% In many cases, the \enquote{\TeX{} Font Catalogue} is helpful for selection and use: \url{https://tug.org/FontCatalogue/mathfonts.html} +% +% \subsubsection{\hologo{pdfLaTeX}} +% For \hologo{pdfLaTeX} there is a solution which combines the letters of the default Text font (Charter) with math symbols of different fonts. +% +% \begin{example} +% \usepackage[charter,expert]{mathdesign} +% \end{example} +% +% There are similar approaches for a few other combinations. +% Some examples can be found in the XCharter documentation \cite{xcharter}. +% \url{http://mirrors.ctan.org/fonts/xcharter/doc/xcharter-doc.pdf} +% +% \section{Customization using \KOMAScript} +% \label{sec:KOMA} +% As the class is fully \KOMAScript-compatible apart from a few forced settings that affect the layout, a look at the \KOMAScript documentation \cite{scrguide-en} is helpful for any kind of modifications. +% For most of the possible modifications \KOMAScript offers its own solutions, which often makes supplementary packages superfluous. +% Examples of typical modifications that are also permitted as part of the corporate design: +% \begin{itemize} +% \item Change paragraphs to use a skip instead of an indent of the first line (option \option{parskip}) +% \item Element numbering with or without end dot (option \option{numbers=enddot/noenddot}) +% \item Caption positioning, alignment and spacing (The macros \cs{captionabove}, \cs{captionbelow}, \cs{captionof} and the \option{captions} option) +% \end{itemize} +% +% \section{Known issues and incompatibilities} +% +% \subsection{\texorpdfstring{\hologo{XeLaTeX}}{XeLaTeX} and PDF/A} +% If the \pkg{pdfx} package is used together with \hologo{XeLaTeX} for the creation of PDF/A the support is limited. +% There will be a corresponding warning. +% With some \hologo{XeLaTeX} versions it's possible that there even may be errors. +% \hologo{LuaLaTeX} should be preferred, but in the worst case switching to the \pkg{pdfmanagement} mechanism could also help. +% +% \subsection{DVI Output} +% Due to the default setting for creating a PDF/A file, it is not possible to use TUDa-CI in standard settings to create a DVI file. +% However, a large part of the functionality can be used when \option{pdfa} mode is deactivated. +% +% \subsection{Possible option clash for microtype} +% The \pkg{microtype} package is loaded automatically if \hologo{pdfLaTeX} is used, as the ligatures for small caps must be deactivated in the font to avoid problems (see \url{https://github.com/tudace/tuda_ latex_templates/issues/144}). +% It is possible to pass further options to \pkg{microtype} before loading the document class: +% \begin{Syntax} +% \PassOptionsToPackage{|\meta{microtype options}|}{microtype} +% \documentclass{tudapub} +% \end{Syntax} +% +% +% \chapter{Department-specific adaptations} +% \label{sec:department-config} +% Some departments have special requirements. +% TUDa-CI includes an interface to be extended in that way. +% Currently the only official extension is the one for the department of mechanical engineering. +% However, the mechanism can be expanded. +% +% \section{Department of Mechanical Engineering} +% \label{sec:mecheng} +% The corresponding mode is activated via the option \option{department=mecheng}. +% Coloring is adjusted automatically and additional layout elements like the \foreignquote{german}{Zeitstrahl} are introduced. +% The modifications exist for all document types provided by TUDa-CI. +% +% \DescribeMacro{\SetPaperID} +% In addition, some documents require the placement of document identifier on the titlepage. +% For this purpose \cs{SetPaperID} was introduced. +% \begin{Syntax} +% \SetPaperID{|\meta{Letter}|}{|\meta{ID}|} +% \end{Syntax} +% This also works without activating \option{mecheng} mode. +% However, the option adds some additional parameters for customized distances. +% +% The mode also sets the options: \option{colorback=false} and \option{ruledheaders=section}. +% +% \subsubsection{Department logo} +% \DescribeKeyOption{departmentlogofile=\meta{filename}}{tuda\_maschinenbau\_logo}* +% The department logo can be downloaded and installed the same way as the TUDa logo. +% A different file can also be selected using the option. +% If the value remains empty, no image is inserted. +% +% \subsubsection{Colors} +% \label{sec:mecheng-color} +% The department subdivides the colors described in the corporate design manual. +% Therefore, if \option{department=mecheng} has been activated, the following color names also exist: +% +% \begin{example} +% \colorlet{TUDa-Primary1}{TUDa-6b} +% \colorlet{TUDa-Primary2}{TUDa-2d} +% \colorlet{TUDa-Secondary1}{TUDa-9a} +% \colorlet{TUDa-Secondary2}{TUDa-8a} +% \colorlet{TUDa-Secondary3}{TUDa-6a} +% \colorlet{TUDa-Secondary4}{TUDa-3a} +% \colorlet{TUDa-Secondary5}{TUDa-4a} +% \colorlet{TUDa-Secondary6}{TUDa-5a} +% \colorlet{TUDa-Arrow}{TUDa-Primary2} +% \end{example} +% +% \minisec{\foreignquote{german}{Zeitstrahl} arrow} +% \DescribeMacro{\MechEngArrow} +% The design element of the timeline can be created using the macro \cs{MechEngArrow\marg{length}}. +% The color corresponds to the color \code{TUDaArrow}, which is pre-assigned with the second primary color (blue). +% +% +% +% \MaybeStop{} +% +% \section{Implementation} +% +% \iffalse +%<*class> +% \fi +% +% +% \begin{macrocode} +\RequirePackage{URspecialopts} +\Define@specialopt@Module[ptxcd/pub] + +\str_const:Nn \c_@@_base_str {pub} +\tl_new:N \g_ptxcd_pub_class_tl +\tl_new:N \g_ptxcd_thesis_options_tl + +\prop_new:N \g_ptxcd_clsopts_prop +\prop_new:N \g_ptxcd_unknown_clsopts_prop +\prop_gput:Nnn \g_ptxcd_clsopts_prop {titlepage} {firstiscover} +\prop_gput:Nnn \g_ptxcd_clsopts_prop {captions} {nooneline} + +\int_new:N \g_ptxcd_ruledheaders_int +\int_new:N \g_ptxcd_paper_int +\msg_new:nnn {tudapub} {compatibility-only} { + You~used~the~outdated~#1~option.\\ + This~option~has~been~removed~with~tuda-ci~version~3.08.\\ + See~documentation~for~the~updated~implementation. +} + +\bool_new:N \g_ptxcd_geometry_bool +\bool_new:N \g_ptxcd_custommargins_bool + +\keys_define:nn {ptxcd/pub} { +% \end{macrocode} +% \iffalse +%</class> +%<*options|body> +%<*!beamer>%^^A logo file and accept missing logos +% \fi +% \begin{macrocode} + logofile .tl_gset:N = \g_ptxcd_logofile_tl, + logofile .initial:n = tuda_logo, +% \end{macrocode} +% \iffalse +%</!beamer>%^^A Logo +% \fi +% \changes{v4.00}{2025-01-26}{Added accept-missing-logos option for public testing workflows.} +% \begin{macrocode} + accept-missing-logos .bool_gset:N = \g_ptxcd_logo_workaround_bool, + accept-missing-logos .initial:n = false, + accept-missing-logos .usage:n = load, + accept-missing-logos .default:n = true, +% \end{macrocode} +% \iffalse +%<*beamer|class|print> +% \fi +% \begin{macrocode} + department .choice:, + department / default .code:n = \str_gset:Nn \g_ptxcd_department_str {default}, + department / mecheng .code:n = { + \str_gset:Nn \g_ptxcd_department_str {mecheng} +% \end{macrocode} +% \iffalse +%<*tudapub|print|letter> +% \fi +% \begin{macrocode} + \exp_args:Ne \keys_set:ne { + +%<!sciposter> ptxcd / \c_@@_base_str +%<sciposter> ptxcd / poster + }{ +%<!letter> colorback=false, +%<tudapub> ruledheaders=section, + departmentlogofile=tuda_maschinenbau_logo, +%<exercise> color=Primary1, +%<sciposter> titlesepline=false +% \end{macrocode} +% \iffalse +%<*letter> +% \fi +% \begin{macrocode} + headrule=false, + logo=false, + textwidth=narrow, +% \end{macrocode} +% \iffalse +%</letter> +% \fi +% \begin{macrocode} + } +% \end{macrocode} +% \iffalse +%</tudapub|print|letter> +%<*tudabeamer> +% \fi +% \begin{macrocode} + \keys_set:nn {ptxcd/beamer} { + design=2008, + colorframetitle=false, + centerframetitle=true, + headsepline=false, + } +% \end{macrocode} +% \iffalse +%</tudabeamer> +% \fi +% \begin{macrocode} +%<letter> \PassOptionsToPackage{identbar=Primary1,accent=Primary2}{tudacolors} + }, + + department .initial:n = default, + department / unknown .code:n = { + \str_gset:Nx \g_ptxcd_department_str {\l_keys_value_tl} + }, +% + departmentconfigprefix .tl_gset:N = \g_@@_config_prefix_tl, + departmentconfigprefix .initial:n = tuda, +% + departmentlogofile .tl_gset:N = \g_ptxcd_departmentlogo_tl, + departmentlogofile .initial:n =, +% predefined department configs + mecheng .meta:n = {department=mecheng}, +% \end{macrocode} +% \iffalse +%</beamer|class|print> +% %^^A Logo pdfa / pdfx +%<*beamer|class|letter|sciposter> +%<*!beamer> +% \fi +% \begin{macrocode} + pdfa .bool_gset:N = \g_ptxcd_pdfa_bool, + pdfa .initial:n = +%<!sciposter> true, +%<sciposter> false, +%</!beamer> +%<*beamer> + pdfa .code:n = { + \msg_error:nn {tuda\c_@@_base_str} {pdfa-option-removed} + }, +%</beamer> + pdfx .bool_gset:N = \g_ptxcd_pdfx_bool, + pdfx .initial:n = true, +% \end{macrocode} +% \iffalse +%</beamer|class|letter|sciposter> +%<*class|poster> +% \fi +% \begin{macrocode} + logo .choice:, + logo / head .code:n = { + \bool_gset_true:N \g_@@_logo_head_bool +%<class> \bool_gset_true:N \g_ptxcd_colorbacktitle_bool + }, + logo / body .code:n = { + \bool_gset_false:N \g_@@_logo_head_bool +%<class> \bool_gset_false:N \g_ptxcd_colorbacktitle_bool + }, + logo / top .meta:n = {logo=head}, + logo / bottom .code:n = {\bool_gset_false:N \g_@@_logo_head_bool}, +%<class> logo .initial:n = {body}, +%<poster> logo .initial:n = {head}, +% \end{macrocode} +% \iffalse +%</class|poster> +%% color options +%<*class> +% \fi +% \begin{macrocode} +% twoside -> geometry + class + class .choice:, + class/report .meta:n = {class=scrreprt}, + class/scrreprt .code:n = \tl_gset:Nn \g_ptxcd_pub_class_tl {scrreprt}, + class/article .meta:n = {class=scrartcl}, + class/scrartcl .code:n = \tl_gset:Nn \g_ptxcd_pub_class_tl {scrartcl}, + class/book .meta:n = {class=scrbook}, + class/scrbook .code:n = \tl_gset:Nn \g_ptxcd_pub_class_tl {scrbook}, + class .initial:n = scrartcl, +% \end{macrocode} +% \iffalse +%</class> +%% color options +%<*class|print> +% \fi +% \begin{macrocode} + color .meta:n = {accentcolor=#1}, + accentcolor .code:n = {\PassOptionsToPackage{accentcolor=#1}{tudacolors}}, + textaccentcolor .code:n = {\PassOptionsToPackage{textaccentcolor=#1}{tudacolors}}, + identbarcolor .code:n = {\PassOptionsToPackage{identbarcolor=#1}{tudacolors}}, +% \end{macrocode} +% \iffalse +%</class|print> +%<*class|(print&!letter)> +% \fi +% \begin{macrocode} + colorback .bool_gset:N = \g_ptxcd_colorback_bool, + colorback .default:n = true, + colorback .initial:n = true, +% \end{macrocode} +% \iffalse +%</class|(print&!letter)> +%<*class|leaflet> +% \fi +% \begin{macrocode} + colorbacktitle .bool_gset:N = \g_ptxcd_colorbacktitle_bool, + colorbacktitle .initial:n = false, + colorbacktitle .default:n = true, + colorbacksubtitle .bool_set:N = \g_ptxcd_colorbacksubtitle_bool, + colorbacksubtitle .initial:n = false, + colorbacksubtitle .default:n = true, + colorback / title .code:n = + \bool_gset_true:N \g_ptxcd_colorbacktitle_bool + \bool_gset_true:N \g_ptxcd_colorback_bool + \bool_gset_false:N \g_ptxcd_colorbacksubtitle_bool, + colorback / body .code:n = + \bool_gset_false:N \g_ptxcd_colorbacktitle_bool + \bool_gset_false:N \g_ptxcd_colorbacksubtitle_bool + \bool_gset_true:N \g_ptxcd_colorback_bool, + colorback / head .code:n = + \bool_gset_true:N \g_ptxcd_colorbacktitle_bool + \bool_gset_true:N \g_ptxcd_colorback_bool + \bool_gset_true:N \g_ptxcd_colorbacksubtitle_bool, +%<tudapub> colortitleback .code:n = \msg_error:nnx {tudapub} {compatibility-only} {\l_keys_key_tl}, +% \end{macrocode} +% \iffalse +%</class|leaflet> +%<*class|poster> +% \fi +% \begin{macrocode} + marginpar +%<!poster> .tl_gset:N = \g_ptxcd_marginpar_tl, +%<poster> .bool_gset:N = \g_ptxcd_marginpar_bool, +%<poster> marginpar / auto .meta:n = {marginpar = true} , + marginpar .default:n = auto, +%<!poster> marginpar .initial:n = auto, +%<poster> marginpar .initial:n = false, +% \end{macrocode} +% \iffalse +%</class|poster> +% color options +% *coloroptions> +%<*class|(print&!(leaflet|letter|sciposter|poster))> +% /coloroptions> +% \fi +% margin +% \begin{macrocode} + custommargins .choice:, + custommargins / true .code:n ={ + \bool_gset_true:N \g_ptxcd_custommargins_bool + \bool_gset_false:N \g_ptxcd_geometry_bool + }, + custommargins / false .code:n ={ + \bool_gset_false:N \g_ptxcd_custommargins_bool + \bool_gset_true:N \g_ptxcd_geometry_bool + }, + custommargins / geometry .code:n = { + \bool_gset_true:N \g_ptxcd_custommargins_bool + \bool_gset_true:N \g_ptxcd_geometry_bool + }, + custommargins .initial:n = false, + custommargins .default:n = true, +% \end{macrocode} +% print document specific options +% \begin{macrocode} + fontsize .code:n = \prop_gput:Nnn \g_ptxcd_clsopts_prop {fontsize} {#1}, + fontsize .initial:n = +%<!exercise> {9pt}, +%<exercise> {10pt}, +% \end{macrocode} +% \iffalse +%</class|(print&!(leaflet|letter|sciposter|poster))> +% color options +% *coloroptions> +%<*class> +% /coloroptions> +% \fi +% margin +% \begin{macrocode} + ruledheaders .choices:nn = {false, none, chapter, section, true, all}{ + \int_gset:Nn \g_ptxcd_ruledheaders_int {\l_keys_choice_int} + }, + ruledheaders .initial:n = all, + type .choices:nn = {publication, thesis} {\tl_gset_eq:NN \g_ptxcd_pubType_tl \l_keys_choice_tl}, + type / intern .code:n = {\keys_set:nn {ptxcd/pub} {titlepage=false, pdfa=false, IMRAD=false}}, + type .initial:n = publication, + unknown .code:n = {\prop_gput:NVn \g_ptxcd_unknown_clsopts_prop \l_keys_key_tl {#1}}, + headline .choice:, + headline / true .code:n = \bool_gset_true:N \g_ptxcd_headline_bool, + headline / false .code:n = \bool_gset_false:N \g_ptxcd_headline_bool, + headline / automark .code:n = {\bool_gset_true:N \g_ptxcd_headline_bool \PassOptionsToPackage{automark}{scrlayer-scrpage}}, + automark .meta:n = {headline=automark}, + headline .initial:n =false, + twocolumn .bool_gset:N = \g_ptxcd_twocolumn_bool, + twocolumn .default:n = true, + twocolumn .initial:n = false, +% \end{macrocode} +% \iffalse +%</class> +%<*class|exercise> +% \fi +% \begin{macrocode} + BCOR .code:n = \PassOptionsToPackage{bindingoffset=#1}{geometry}, + bindingoffset .meta:n = {BCOR=#1}, + captions .code:n = {\prop_gput:Nnx \g_ptxcd_clsopts_prop {captions} { + \use:n {\prop_item:Nn \g_ptxcd_clsopts_prop {captions}}, #1} + }, +% \end{macrocode} +% \iffalse +%</class|exercise> +%<*class> +% \fi +% \begin{macrocode} + abstract .code:n = \prop_gput:Nnn \g_ptxcd_unknown_clsopts_prop {abstract} {#1}, + abstract .initial:n =true, +% \end{macrocode} +% \iffalse +%</class> +%<*class|exercise|sciposter|poster> +% \fi +% \begin{macrocode} + paper .choices:nn = { +%<sciposter> a0,a1,a2,a3 +%<poster> a0,a1,a2,a3,a4 +%<!(sciposter|poster)> a0,a1,a2,a3,a4,a5,a6 + }{ + \int_gset_eq:NN \g_ptxcd_paper_int \l_keys_choice_int + \exp_args:Nx \PassOptionsToPackage{paper=\l_keys_choice_tl}{tudarules} +%<!(sciposter|poster)> \exp_args:Nx \PassOptionsToPackage{paper=\l_keys_choice_tl}{typearea} + \exp_args:Nx \PassOptionsToPackage{\l_keys_choice_tl paper}{geometry} + }, +% \end{macrocode} +% \iffalse +%<*sciposter> +% \fi +% \begin{macrocode} + paper / landscape .code:n = \PassOptionsToPackage{landscape}{geometry}, + + paper / portrait .code:n = \PassOptionsToPackage{portrait}{geometry}, +% \end{macrocode} +% \iffalse +%</sciposter> +% \fi +% \begin{macrocode} + paper .initial:n = + +%<!(sciposter|poster)> a4, +%<sciposter|poster> a0, +% \end{macrocode} +% \iffalse +%</class|exercise|sciposter|poster> +%<*class> +% \fi +% \begin{macrocode} + IMRAD .bool_gset:N = \g_ptxcd_IMRAD_bool, + IMRAD .initial:n = true, + IMRAD .default:n = true, + instbox .code:n = {\tl_gput_right:Nn \g_ptxcd_thesis_options_tl {,instbox=#1}}, + noinstbox .code:n = {\tl_gput_right:Nn \g_ptxcd_thesis_options_tl {,noinstbox=#1}}, +% \end{macrocode} +% \iffalse +%</class> +%<*class|exercise|sciposter|poster> +% \fi +% \begin{macrocode} + title .choice:, + title / default .meta:n = {title=large}, + title / large .code:n = \bool_gset_false:N \g_ptxcd_smalltitle_bool, + title / small .code:n = \bool_gset_true:N \g_ptxcd_smalltitle_bool, + title .initial:n = default, +% \end{macrocode} +% \iffalse +%</class|exercise|sciposter|poster> +%<*class> +% \fi +% \begin{macrocode} + BCORtitlepage .bool_gset:N = \g_ptxcd_BCOR_titlepage_bool, + + BCORtitlepage .initial:n = false, + BCORtitlepage .default:n = true, +%</class> +} +% \end{macrocode} +% \iffalse +%<*beamer> +% \fi +% \changes{v4.00}{2025-01-26}{Remove pdfa option from tudabeamer.} +% As beamer is loading hyperref with with options by default it's not really worth maintaining this option here. +% Especially since beamer did not require this to be enabled by default. +% A comment including the information on how to set up the PDF/A within beamer using the pdfmanagement has been added to the templates. +% \begin{macrocode} +\msg_new:nnn {tuda\c_@@_base_str} {pdfa-option-removed} { + The~option~"pdfa"~was~removed~for~this~document~class.\\ + In~case~you~need~it,~please~use~the~mechanism~provided~by~the~pdfmanagement~instead.\\ + See~TUDa-CI~documentation~for~details. +} +% \end{macrocode}^^A End of options declarations +% \iffalse +%</beamer> +% \fi +% Allow to add options via l3build |typesetcmds|. +% Be aware that in this case also the group has to be expanded. +% \begin{macrocode} +\cs_if_exist:NT \TUDaDefaultBuildOptions { + \exp_args:Ne \keys_set:ne { ptxcd / +%<!(beamer-outer|sciposter)> \c_@@_base_str +%<beamer-outer> beamer/outer +%<sciposter> poster + } { + \TUDaDefaultBuildOptions + } +} +% \end{macrocode} +% \iffalse +%<*!beamer> +% \fi +% Define a macro to insert the logo workaround to only need this definition once. +% \begin{macrocode} +\cs_new:Nn \_@@_insert_logo: { + \bool_if:NTF \g_ptxcd_logo_workaround_bool { + \file_if_exist:nTF {\g_ptxcd_logofile_tl.pdf} + \use_ii:nn + \use_i:nn + } { + \use_ii:nn + } + {\rule{0pt}{\c_ptxcd_logoheight_dim}\makebox[2.5\c_ptxcd_logoheight_dim][c]{\rule[.1\c_ptxcd_logoheight_dim]{2.05\c_ptxcd_logoheight_dim}{.8\c_ptxcd_logoheight_dim}}} + {\includegraphics[height=\c_ptxcd_logoheight_dim]{\g_ptxcd_logofile_tl}} +} +% \end{macrocode} +% \iffalse +%</!beamer> +%</options|body> +%<*class> +% \fi +% \begin{macrocode} +% special option handling grouped values +% \begin{macrocode} +\Module@DefineSpecialKey[ptxcd/pub]{thesis}{ + \keys_set:nn {ptxcd/pub}{type=thesis} + \tl_gput_right:No \g_ptxcd_thesis_options_tl {#1} +} + +\Module@Process@SpecialOptions[ptxcd/pub] + +% \end{macrocode} +% Wrapper around the old implementation of pdfx + support for pdfmanagement. +% \iffalse +%</class> +%<*class|process-options> +% \fi +% \begin{macrocode} + +\ProcessKeyOptions[ptxcd/\c_@@_base_str] +% \end{macrocode} +% Wrapper around the old implementation of pdfx + support for pdfmanagement. +% \iffalse +%</class|process-options> +%<*class|pdfa> +% \fi +% \begin{macrocode} + +\bool_if:NF \g_ptxcd_pdfa_bool {\bool_gset_false:N \g_ptxcd_pdfx_bool} + +\bool_if:NT \g_ptxcd_pdfa_bool { + \msg_new:nnn {tudapub} {colors-to-rgb} { + You~did~not~add~a~color~profile.\\ + I~will~use~the~default~one~and~automatically~try~to~convert~internal~colors~to~RGB.\\ + This~is~required~to~be~able~to~create~PDF/A~compliance. + } + + \cs_if_exist:NT \pdfmeta_standard_get:nN { + \pdfmeta_standard_get:nN {outputintent_A} \l_tmpa_tl + \quark_if_no_value:NF \l_tmpa_tl { + \bool_gset_false:N \g_ptxcd_pdfx_bool + \msg_new:nnn{tudapub} {prefer-lualatex} { + I~detected~usage~of~l3pdfmeta~(\DocumentMetadata)~to~create~PDF/A.\\ + tudapub~will~not~load~pdfx~to~avoid~conflicts.\\ + To~disable~this~message~use~pdfx=false. + } + \msg_info:nn {tudapub} {prefer-lualatex} + } + \prop_if_in:NnF \g__pdfmeta_outputintents_prop {GTS_PDFA1} { + \use_iii:nnn + } + } + \bool_if:NT \g_ptxcd_pdfx_bool { + \PassOptionsToPackage{RGB}{xcolor} + \msg_info:nn {tudapub} {colors-to-rgb} + } +} + +% \end{macrocode} +% \iffalse +%</class|pdfa> +%<*class> +% \fi +% \begin{macrocode} + +\exp_args:Nx \tl_if_eq:nnT {\prop_item:Nn \g_ptxcd_clsopts_prop {fontsize}} {9pt} +{ + \prop_if_in:NnF \g_ptxcd_unknown_clsopts_prop {DIV} + {\PassOptionsToPackage{DIV=calc}{typearea}} +} + +\prop_gput:Nnx \g_ptxcd_clsopts_prop {twocolumn} { + \bool_if:NTF \g_ptxcd_twocolumn_bool {true} {false} +} + +\prop_map_inline:Nn \g_ptxcd_clsopts_prop { + \tl_if_empty:nTF {#2} + {\PassOptionsToClass {#1} {\g_ptxcd_pub_class_tl}} + { + \clist_map_inline:nn {#2} {\PassOptionsToClass {#1=##1} {\g_ptxcd_pub_class_tl}} + } +} +% \end{macrocode} +% Load tudasize clo file if available +% \begin{macrocode} +\file_if_exist:nT {tudasize\prop_item:Nn \g_ptxcd_clsopts_prop {fontsize}.clo} +{\providecommand*{\@fontsizefilebase}{tudasize}} +% \end{macrocode} +% Disable typearea warnings if geometry is used for the margins. +% \begin{macrocode} +\bool_if:NT \g_ptxcd_geometry_bool {\PassOptionsToPackage{typeareawarninfolimit=-1}{typearea}} +\LoadClass{\g_ptxcd_pub_class_tl} + +% \end{macrocode} +% \changes{v3.41}{2024-07-02}{Change package order to be more strict about the loading time of pdfx to avoid conflicts.} +% \begin{macrocode} +\RequirePackage{tudafonts} +\RequirePackage{tudacolors} +\RequirePackage[draft=false]{scrlayer-scrpage} +\RequirePackage{graphicx} +% \end{macrocode} +% \iffalse +%</class> +%<*class|pdfx> +% \fi +% \changes{v4.00}{2025-01-26}{Unify pdfx/pdfa mechanism structure over all document types} +% \begin{macrocode} +\PassOptionsToPackage{hidelinks, unicode}{hyperref} +\bool_if:NTF \g_ptxcd_pdfx_bool { +%% only apply the hack if pdfx is older than the working version + \PassOptionsToPackage{a-2b}{pdfx} +%% Workaround posted by David Carlisle on tex.stackexchange +%% Thanks to Ulrike Fischer for mentioning it in #472 + \let \_@@_grouplevel_before_pdfx: \currentgrouplevel + \chardef\currentgrouplevel0 + \ExplSyntaxOff + \RequirePackage{pdfx} + \ExplSyntaxOn + \let \currentgrouplevel \_@@_grouplevel_before_pdfx: + \cs_undefine:N \_@@_grouplevel_before_pdfx: +%% end of the workaround + + \msg_new:nnn{tuda-ci} {prefer-lualatex} { + You~use~pdfa-mode~in~#1.\\ + This~can~lead~to~incompatiblities~especially~with~older~compiler~versions.\\ + You~should~prefer~using~lualatex. + } + \msg_new:nnnn{tuda-ci} {outdated-package-pdfa} { + Your~Version~of~the~#1-package~is~too~old~to~support~all~methods~required~by~tudapubs~pdfa-mode.\\ + Either~update~your~TeX-distribution~or~switch~to~pdfa=false. + }{See~DEMO-tudapub~for~further~information.} + + \sys_if_engine_pdftex:T { + \msg_warning:nnn{tuda-ci} {prefer-lualatex} {PDFTeX} + } + + \sys_if_engine_xetex:T { + \msg_warning:nnn{tuda-ci} {prefer-lualatex} {XeTeX} + } + + \@ifpackagelater{xmpincl}{2021/09/22}{ + }{ + \msg_error:nn{tuda-ci} {outdated-package-pdfa} {xmpincl} + } + +} { + \RequirePackage{hyperref} +} +% \end{macrocode} +% \iffalse +%</class|pdfx> +%<*class> +% \fi +% \begin{macrocode} + +\RequirePackage{bookmark} +\RequirePackage{tudarules} +\RequirePackage{trimclip} +\RequirePackage{bookmark} + + +\prop_map_inline:Nn \g_ptxcd_unknown_clsopts_prop { + \cs_if_exist:cT {KV@KOMA.\g_ptxcd_pub_class_tl.cls@#1} { + \tl_if_empty:nTF {#2} + {\KOMAoptions{#1}} + {\KOMAoption{#1}{#2}} + } +} +% \end{macrocode} +% ruled headers +% \begin{macrocode} +\int_compare:nT {\g_ptxcd_ruledheaders_int>=3} { + \cs_if_exist:NT \chapterlinesformat { + \renewcommand*{\chapterlinesformat}[3]{% + \@hangfrom{#2}{#3} + \smash{\raisebox{\depth}{\rule[\dp\strutbox]{\linewidth}{\g_ptxcd_titlerule_dim}}} + } + } +} +\int_compare:nT {\g_ptxcd_ruledheaders_int =4 }{ + \renewcommand*\sectionlinesformat[4]{% + \tl_if_eq:nnTF {#1} {section} + { + \parbox{\linewidth}{ + \rule[5\g_ptxcd_titlerule_dim]{\linewidth}{\g_ptxcd_titlerule_dim}\par\nointerlineskip + \@hangfrom{% + \hskip #2#3\strut}{#4\rule[-\dp\strutbox]{0pt}{\dp\strutbox}\par}\nointerlineskip + \skip_vertical:n {\ptxcd_titlerule_sep: -\dp\strutbox} + \smash{\rule{\linewidth}{\g_ptxcd_titlerule_dim}}} + }{ + \@hangfrom{\hskip #2#3}{#4} + } + } +} +\int_compare:nT {\g_ptxcd_ruledheaders_int>4} { + \renewcommand*\sectionlinesformat[4]{% + \parbox{\linewidth}{ + \rule[5\g_ptxcd_titlerule_dim]{\linewidth}{\g_ptxcd_titlerule_dim}\par\nointerlineskip + \@hangfrom{% + \hskip #2#3\strut}{#4\rule[-\dp\strutbox]{0pt}{\dp\strutbox}\par}\nointerlineskip + \skip_vertical:n {\ptxcd_titlerule_sep: -\dp\strutbox} + \smash{\rule{\linewidth}{\g_ptxcd_titlerule_dim}} + }} +} +% \end{macrocode} +% Margin \& titlefontsize setup setup +% \begin{macrocode} +\bool_new:N \g_ptxcd_marginpar_bool +\dim_new:N \g_ptxcd_marginpar_dim +% \end{macrocode} +% \iffalse +%</class> +%<*class|margin> +% \fi +% \begin{macrocode} +\dim_new:N \g_ptxcd_innerMargin_dim +\dim_new:N \g_ptxcd_outerMargin_dim +\dim_new:N \g_ptxcd_bottomMargin_dim +\dim_new:N \g_ptxcd_topMargin_dim + +% a3,a4 +\int_compare:nTF {4<=\g_ptxcd_paper_int<=5} + { + \dim_gset:Nn \g_ptxcd_bottomMargin_dim {20mm} + \dim_gset:Nn \g_ptxcd_outerMargin_dim {15mm} + \dim_gset_eq:NN \g_ptxcd_innerMargin_dim \g_ptxcd_outerMargin_dim + \dim_gset_eq:NN \g_ptxcd_topMargin_dim \g_ptxcd_outerMargin_dim + }{ +% a0, a1, a2 + \int_compare:nT {1<=\g_ptxcd_paper_int<=3} + { + \dim_gset:Nn \g_ptxcd_bottomMargin_dim {35mm} + \dim_gset:Nn \g_ptxcd_outerMargin_dim {30mm} + \dim_gset_eq:NN \g_ptxcd_innerMargin_dim \g_ptxcd_outerMargin_dim + \dim_gset_eq:NN \g_ptxcd_topMargin_dim \g_ptxcd_outerMargin_dim + } +% a5 + \int_compare:nT {\g_ptxcd_paper_int<=6} + { + \dim_gset:Nn \g_ptxcd_bottomMargin_dim {16mm} + \dim_gset:Nn \g_ptxcd_outerMargin_dim {12mm} + \dim_gset_eq:NN \g_ptxcd_innerMargin_dim \g_ptxcd_outerMargin_dim + \dim_gset_eq:NN \g_ptxcd_topMargin_dim \g_ptxcd_outerMargin_dim + } +% a6 + \int_compare:nT {\g_ptxcd_paper_int<=7} + { + \dim_gset:Nn \g_ptxcd_bottomMargin_dim {15mm} + \dim_gset:Nn \g_ptxcd_outerMargin_dim {10mm} + \dim_gset_eq:NN \g_ptxcd_innerMargin_dim \g_ptxcd_outerMargin_dim + \dim_gset_eq:NN \g_ptxcd_topMargin_dim \g_ptxcd_outerMargin_dim + } + } + +\dim_new:N \g_ptxcd_columnSep_dim +\dim_gset:Nn \g_ptxcd_columnSep_dim {10pt} +% \end{macrocode} +% \iffalse +%</class|margin> +%<*class> +% \fi +% \begin{macro}{\coverpageleftmargin} +% coverpage +% \begin{macrocode} +\edef\coverpageleftmargin{\dim_eval:n {\g_ptxcd_outerMargin_dim}} +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\coverpagetopmargin} +% \begin{macrocode} +\renewcommand*{\coverpagetopmargin}{\g_ptxcd_outerMargin_dim} +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\coverpagerightmargin} +% \begin{macrocode} +\edef\coverpagerightmargin{\dim_eval:n {\g_ptxcd_outerMargin_dim}} +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\coverpagebottommargin} +% \begin{macrocode} +\renewcommand*{\coverpagebottommargin}{\g_ptxcd_outerMargin_dim} +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +\str_case:onTF {\g_ptxcd_marginpar_tl} { + {true} {\bool_gset_true:N \g_ptxcd_marginpar_bool} + {false} {\bool_gset_false:N \g_ptxcd_marginpar_bool} + {auto} {\bool_gset_true:N \g_ptxcd_marginpar_bool} +} { + \bool_if:NT \g_ptxcd_marginpar_bool { + \msg_new:nnnn {tudapub} {marginpar-auto} {Setting~up~marginpar~consistent~with~layout~guidelines.} + {To~turn~this~off~use~marginpar=false~option.} + \msg_info:nn {tudapub} {marginpar-auto} + \dim_gset:Nn \g_ptxcd_marginpar_dim {(\paperwidth - \g_ptxcd_innerMargin_dim -\g_ptxcd_outerMargin_dim - 4 \g_ptxcd_columnSep_dim)/5} + } +} { + \msg_new:nnn {tudapub} {marginpar-no-key} {I~did~not~find~a~text~key~for~marginpar~setup~will~use~the~value~#1~as~width.} + \msg_info:nnx {tudapub} {marginpar-no-key} {\g_ptxcd_marginpar_tl} + \bool_gset_true:N \g_ptxcd_marginpar_bool + \dim_gset:Nn \g_ptxcd_marginpar_dim {\g_ptxcd_marginpar_tl} +} + +\dim_new:N \g_ptxcd_headwidth_dim +% \end{macrocode} +% \iffalse +%</class> +%<*class|(geometry&exercise)> +% \fi +% \begin{macrocode} +\dim_new:N \g_ptxcd_headheight_dim +\dim_gset:Nn \g_ptxcd_headheight_dim {\c_ptxcd_largerule_dim +\c_ptxcd_rulesep_dim +\c_ptxcd_smallrule_dim} +% \end{macrocode} +% \iffalse +%<*class> +% \fi +% \begin{macrocode} +\bool_if:NTF \g_ptxcd_headline_bool + {\dim_gadd:Nn \g_ptxcd_headheight_dim {20pt}} + {\dim_gadd:Nn \g_ptxcd_headheight_dim {1.25\baselineskip}} +% \end{macrocode} +% \iffalse +%</class> +% \fi +% Geometry margin configuration +% Has to be loaded here due to headwidth options for pagestyles. +% \begin{macrocode} +\bool_if:NTF \g_ptxcd_geometry_bool { + \RequirePackage{geometry} + \geometry{ + top=\g_ptxcd_topMargin_dim, + inner=\g_ptxcd_innerMargin_dim, + outer=\dim_eval:n {\g_ptxcd_outerMargin_dim}, + bottom=\g_ptxcd_bottomMargin_dim, + columnsep= \g_ptxcd_columnSep_dim, + includehead, + includefoot, +%<class> includemp, +%<class> nomarginpar, + headheight=\g_ptxcd_headheight_dim + } +% \end{macrocode} +% \iffalse +%<*class> +% \fi +% \begin{macrocode} + \savegeometry{TUDa-nomarginpar} + \geometry{includemp, marginpar=\g_ptxcd_marginpar_dim, marginparsep=\g_ptxcd_columnSep_dim} + \KOMAoptions{mpinclude} + \savegeometry{TUDa-marginpar} + + \bool_if:NTF \g_ptxcd_custommargins_bool { + \AddToHook{begindocument}[tudapub:custommargins]{ + \savegeometry{TUDa-default} + \bool_if:NTF \g_ptxcd_marginpar_bool { + \dim_gset:Nn \g_ptxcd_headwidth_dim {\textwidth+\marginparwidth+\marginparsep} + }{ + \dim_gset:Nn \g_ptxcd_headwidth_dim {\textwidth} + } + } + \tl_const:Nn \c_ptxcd_default_geometry_tl {TUDa-default} + }{ + \bool_if:NTF \g_ptxcd_marginpar_bool { + \tl_const:Nn \c_ptxcd_default_geometry_tl {TUDa-marginpar} + } { + \tl_const:Nn \c_ptxcd_default_geometry_tl {TUDa-nomarginpar} + } + \AddToHook{begindocument}[tudapub:custommargins-geometry]{ + \loadgeometry{\c_ptxcd_default_geometry_tl} + } + } + + \dim_gset:Nn \g_ptxcd_headwidth_dim {\paperwidth-\g_ptxcd_innerMargin_dim-\g_ptxcd_outerMargin_dim-\Gm@bindingoffset} + + \cs_set:Nn \ptxcd_disable_marginpar: {\loadgeometry{TUDa-nomarginpar}} + \cs_set:Nn \ptxcd_restore_typearea: {\loadgeometry{\c_ptxcd_default_geometry_tl}} + + \AddToHook{cmd/Gm@changelayout/after}[tudapub-restore-headwidth]{ + \bool_if:NTF \g_ptxcd_marginpar_bool + {\KOMAoptions{headwidth=textwithmarginpar,footwidth=textwithmarginpar}} + {\KOMAoptions{headwidth=text,footwidth=text}} + } +% \end{macrocode} +% \iffalse +%</class> +% \fi +% \begin{macrocode} +}{ +% \end{macrocode} +% \iffalse +%<*class> +% \fi +% \begin{macrocode} + \let\ptxcd_disable_marginpar:\relax + \def\ptxcd_restore_typearea:{ +% \end{macrocode} +% \iffalse +%</class> +% \fi +% \begin{macrocode} + \KOMAoptions{headinclude, footinclude} +% \end{macrocode} +% \iffalse +%<*class> +% \fi +% \begin{macrocode} + \bool_if:NTF \g_ptxcd_marginpar_bool { + \KOMAoptions{headwidth=textwithmarginpar,footwidth=textwithmarginpar} + } { +% \end{macrocode} +% \iffalse +%</class> +% \fi +% \begin{macrocode} + \KOMAoptions{headwidth=text,footwidth=text} +% \end{macrocode} +% \iffalse +%<*class> +% \fi +% \begin{macrocode} + } + \bool_if:NT \g_ptxcd_headline_bool {\KOMAoptions{headheight=\g_ptxcd_headheight_dim}} + \recalctypearea + } + \ptxcd_restore_typearea: +% \end{macrocode} +% \iffalse +%</class> +% \fi +% \begin{macrocode} +} +% \end{macrocode} +% \iffalse +%</class|(geometry&exercise)> +%<*class> +% \fi +% \begin{macrocode} +\AddToHook{begindocument}[tudapub:BCOR-titlepage]{ + \bool_if:NT \g_ptxcd_BCOR_titlepage_bool + {\xdef\coverpageleftmargin{\the\dimexpr\coverpageleftmargin+\the\ta@bcor}} +} +% \end{macrocode} +% +% End of margin setup +% +% \begin{macro}{\institution} +% \begin{macrocode} +\newcommand*{\institution}[1]{ + \def\ptxcd_institution{#1} +} +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +\cs_new:Nn \ptxcd_titlerule_sep: {\the\dp\strutbox} +\setkomafont{disposition}{\sffamily\bfseries} +\setkomafont{pageheadfoot}{\sffamily\small} +\setkomafont{pagenumber}{} +\addtokomafont{captionlabel}{\sffamily} +\addtokomafont{caption}{\sffamily} + + +\KOMAoptions{footsepline=.5\c_ptxcd_smallrule_dim} +\setlength{\footheight}{\dimexpr\baselineskip+\c_ptxcd_rulesep_dim} +\bool_if:NT \g_ptxcd_headline_bool {\KOMAoptions{headsepline=.5\c_ptxcd_smallrule_dim}} +% \end{macrocode} +% Adjust headheight +% \begin{macrocode} +\AddToHook{begindocument}[tudapub:adjust-headheight]{ +\bool_if:NTF \g_ptxcd_marginpar_bool + { + \KOMAoptions { + headwidth=textwithmarginpar, + footwidth=textwithmarginpar + } + }{ + \KOMAoptions { + headwidth=text, + footwidth=text + } + } +\box_if_exist:NF \ptxcd_headrule_box { + \ptxcd_makeheadrule[color=identbarcolor, width=\sls@headwidth]{ptxcd_headrule} +} +} + +\newpairofpagestyles[scrheadings]{TUDa.headings}{ + \KOMAoptions{headsepline, headlines=1.25} + \setkomafont{pagehead}{} + \chead{} + \ohead{\headmark} +} + +\newpairofpagestyles{TUDa.pub}{ + \KOMAoptions{plainfootsepline} + + \bool_if:NTF \g_ptxcd_marginpar_bool + { + \KOMAoptions { + headwidth=textwithmarginpar, + footwidth=textwithmarginpar + } + }{ + \KOMAoptions { + headwidth=text, + footwidth=text + } + } + \bool_if:NT \g_ptxcd_headline_bool { + \setkomafont{pagehead}{\Large\bfseries} + \KOMAoptions{headlines=2} + \clist_map_variable:nNn {oneside, even, odd} \l_tmpa_tl { + \ModifyLayer[pretocontents={\rule[-6pt]{0pt}{\layerheight}}]{TUDa.pub.head.\l_tmpa_tl} + } + \lehead{\headmark} + \lohead{\headmark} + } + \ofoot[\pagemark]{\pagemark} +} + +\RedeclareLayer[ + clone=scrheadings.head.above.line, + background, + contents={ + \dim_compare:nF {\box_wd:N \ptxcd_headrule_box=\layerwidth} { + \ptxcd_makeheadrule[color=identbarcolor, width=\layerwidth]{ptxcd_headrule} + } + \smash{\ptxcd_headrule} + } +]{TUDa.pub.head.above.line} + +\RedeclareLayer[ + clone=plain.scrheadings.head.above.line, + background, + contents={ + \dim_compare:nF {\box_wd:N \ptxcd_headrule_box=\layerwidth} { + \ptxcd_makeheadrule[color=identbarcolor, width=\layerwidth]{ptxcd_headrule} + } + \smash{\ptxcd_headrule} + } +]{plain.TUDa.pub.head.above.line} + +\ModifyLayer[addvoffset=\c_ptxcd_rulesep_dim]{TUDa.pub.foot.even} +\ModifyLayer[addvoffset=\c_ptxcd_rulesep_dim]{TUDa.pub.foot.odd} +\ModifyLayer[addvoffset=\c_ptxcd_rulesep_dim]{TUDa.pub.foot.oneside} +\ModifyLayer[addvoffset=\c_ptxcd_rulesep_dim]{plain.TUDa.pub.foot.even} +\ModifyLayer[addvoffset=\c_ptxcd_rulesep_dim]{plain.TUDa.pub.foot.odd} +\ModifyLayer[addvoffset=\c_ptxcd_rulesep_dim]{plain.TUDa.pub.foot.oneside} + + +\DeclarePageStyleAlias{TUDa}{TUDa.pub} +\DeclarePageStyleAlias{plain.TUDa}{plain.TUDa.pub} +\pagestyle{TUDa} +% \end{macrocode} +% +% \begin{macro}{\titlepagestyle} +% \begin{macrocode} +\renewcommand*{\titlepagestyle}{plain.TUDa} +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +\cs_new:Nn \ptxcd_sls@leftmargin: {% + \dimexpr + \if@twoside + \ifodd\value{page} + \oddsidemargin + \else + \evensidemargin + \fi + \else + \oddsidemargin + \fi + \bool_if:NT \g_ptxcd_twocolumn_bool { + -\marginparwidth-\marginparsep + } + +1in\relax +} +% \end{macrocode} +% Titelseite +% \begin{macrocode} +\tl_new:N \g_ptxcd_titleimage_code_tl +\tl_gset_eq:NN \g_ptxcd_titleimage_code_tl \c_empty_tl +% \end{macrocode} +% +% \begin{macro}{\titleimage} +% \begin{macrocode} +\newcommand{\titleimage}[1]{\tl_gset:Nn \g_ptxcd_titleimage_code_tl {#1}} +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +\box_new:N \l_@@_titlegraphic_box +\NewDocumentCommand{\titlegraphic}{sm}{ + \IfBooleanTF{#1}{ + \tl_gset:Nn \g_ptxcd_titleimage_code_tl { + \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} +} +} +}{ +\tl_gset:Nn \g_ptxcd_titleimage_code_tl {#2} +} +} + +\let\titleimage\titlegraphic%for backwards compatbility + +\box_new:N \g_ptxcd_title_box +\skip_new:N \g_ptxcd_title_fill_skip + +\seq_new:N \g_ptxcd_author_seq +% \end{macrocode} +% +% \begin{macro}{\author} +% \begin{macrocode} +\renewcommand*\author[1]{ + \seq_gset_split:Nnn \g_ptxcd_author_seq {\and} {#1} +} +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +\msg_new:nnn{tudapub} {unknown-language} { + You~selected~an~unknown~language~#1.\\ + The~Variable~#2~does~not~have~a~predefined~value.\\ + Ensure~to~redefine~#2~to~match~your~language.\\ + Otherwise~the~german~vaue~#3~will~be~used. +} + +\cs_new:Nn \ptxcd_define_captionFallback:Nn { + \providecommand*#1{ + \msg_warning:nnxxx{tudapub} {unknown-language} + {\languagename} {\exp_not:N #1} {#2} + \def#1{#2} + } +} + +\cs_new:Nn \ptxcd_declare_caption:Nnnn { + \ptxcd_define_captionFallback:Nn #1 {#2} + \defcaptionname{ngerman, german}{#1}{#2} + \defcaptionname{english, USenglish, american}{#1}{#3} + \defcaptionname{UKenglish, british}{#1}{#4} +} + +\cs_new:Nn \ptxcd_declare_caption:Nnn { + \ptxcd_declare_caption:Nnnn #1 {#2} {#3} {#3} +} +% \end{macrocode} +% +% \begin{macro}{\@author} +% \begin{macrocode} +\renewcommand*{\@author}{ + \begingroup + \hyphenpenalty=100000 + \seq_use:Nnnn \g_ptxcd_author_seq {~\authorandname{}~} {,~} {~\&~} + \endgroup +} +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +\msg_new:nnn{tudapub} {infobox-too-high} { + The~height~of~your~Infobox~exeeds~the~space~reserved~in~the~title~block.\\ + You~should~probably~switch~to~logo=bottom~or~reduce~the~number/size~of~InfoBoxes. +} + +\cs_set:Nn \ptxcd_adjust_titlepage_style: { + \dim_set:Nn \l_tmpa_dim {\fp_to_dim:n {\expandafter \use_ii:nn\ptxcd_title_fontsize: *2.8}} + \dim_compare:nT {\box_ht:N \g_ptxcd_title_box < \l_tmpa_dim} { + \skip_set:Nn \g_ptxcd_title_fill_skip {\dim_eval:n {\l_tmpa_dim - \box_ht:N \g_ptxcd_title_box}} + } + + \dim_set:Nn \l_tmpa_dim { + \box_ht:N \ptxcd_headrule_box+\box_dp:N \ptxcd_headrule_box-\g_ptxcd_titlerule_dim + +\box_ht:N \g_ptxcd_title_box+.5\c_ptxcd_logoheight_dim+\g_ptxcd_title_fill_skip+\box_dp:N \g_ptxcd_title_box + } + + \ModifyLayer[ + addvoffset=\l_tmpa_dim, + addheight=-\l_tmpa_dim + -\box_dp:N \g_ptxcd_sponsor_box + +\c_ptxcd_rulesep_dim + ]{title.TUDa.image} + + \bool_if:NT \g_ptxcd_colorbacktitle_bool { + \ModifyLayer[ + textarea, + addvoffset=\dim_eval:n {\box_ht:N \ptxcd_headrule_box+\box_dp:N \ptxcd_headrule_box-\g_ptxcd_titlerule_dim}, + height={\box_ht:N \g_ptxcd_title_box+ \g_ptxcd_title_fill_skip+.5\c_ptxcd_logoheight_dim + \bool_if:NT \g_ptxcd_colorbacksubtitle_bool {+\box_dp:N \g_ptxcd_title_box} + } + ]{title.TUDa.background} + } + \vspace*{\dim_eval:n { + -\topskip + -\g_ptxcd_titlerule_dim + +\box_ht:N \ptxcd_headrule_box + +\box_dp:N \ptxcd_headrule_box + +.5\c_ptxcd_logoheight_dim + }} + \nointerlineskip + \ptxcd_setup_title_box: + + \bool_if:NT \g_@@_logo_head_bool { + \dim_compare:nT {\box_ht:N \g_ptxcd_title_info_box+ \box_dp:N \g_ptxcd_title_info_box > \box_ht:N \g_ptxcd_title_box} + {\msg_warning:nn{tudapub} {infobox-too-high}} + \makebox[\linewidth][r]{\smash{ + \raisebox{-\height}{ + \makebox[\_@@_logowidth:][l]{ + \box_use:N \g_ptxcd_title_info_box + }} + }} +} +\par +\vspace*{\skip_use:N \g_ptxcd_title_fill_skip} +\setlength{\fboxsep}{\z@} +} + +\newkomafont{institution}{\sffamily} +\newkomafont{titleinfo}{\ptxcd@sffamily@lining} +\setkomafont{subtitle}{\bfseries} +\setkomafont{subject}{} +\setkomafont{publishers}{} +\setkomafont{author}{} +\setkomafont{date}{} + +\bool_if:NF \g_ptxcd_smalltitle_bool { + \int_gdecr:N \g_ptxcd_paper_int +} +\file_input:n {tuda-a\int_use:N \g_ptxcd_paper_int paper.clo} +\ptxcd_setup_title_sizes: + +\seq_new:N \g_ptxcd_title_info_seq +\box_new:N \g_ptxcd_title_info_box + +\cs_new:Nn \ptxcd_make_title_info_box:n { + \setlength{\fboxsep}{1.5mm}% + \colorbox{InfoBox}{ + \makebox[\dim_eval:n {\_@@_logowidth:-\fboxsep}][r]{ + \parbox{\dim_eval:n {\_@@_logowidth:+\fboxsep-\_@@_logosep:}}{ + \expandafter \fontsize\ptxcd_titlethanks_fontsize:\selectfont\usekomafont{institution}% + \raggedright% + #1 + }}} +} + +\cs_new:Nn \ptxcd_make_title_logo_box:n { + \setlength{\fboxsep}{\z@}% + \parbox{\_@@_logowidth:}{ + \colorbox{InfoBox}{ + \rlap{ + \makebox[\dim_eval:n {\_@@_logowidth: + \_@@_logosep:}][r]{ + \colorbox{InfoBox}{#1\hspace{\_@@_logosep:}} + } + } + } + } +} +% \end{macrocode} +% +% \begin{macro}{\addTitleBox} +% \begin{macrocode} +\newcommand{\addTitleBox}[1]{\seq_gput_right:Nn \g_ptxcd_title_info_seq {\ptxcd_make_title_info_box:n {#1}}} +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +\NewDocumentCommand{\addTitleBoxLogo}{sm}{ + \IfBooleanTF{#1}{ + \seq_gput_right:Nn \g_ptxcd_title_info_seq { + \ptxcd_make_title_logo_box:n {#2} + } + }{ + \seq_gput_right:Nn \g_ptxcd_title_info_seq { + \ptxcd_make_title_logo_box:n { + \hbox_set:Nn \l_tmpa_box { + \includegraphics[width=1.5\c_ptxcd_logoheight_dim]{#2} + } + \dim_set:Nn \l_tmpa_dim {2\c_ptxcd_logoheight_dim/3} + \dim_compare:nTF {\box_ht:N \l_tmpa_box > \l_tmpa_dim} + {\includegraphics[width=\l_tmpa_dim]{#2}} + {\box_use:N \l_tmpa_box} + } + } + } +} +% \end{macrocode} +% \changes{v4.00}{2025-01-26}{Added accept-missing-logos option for public testing workflows.} +% \begin{macrocode} +\addTitleBoxLogo*{\makebox[\linewidth][l]{\_@@_insert_logo:}} + +\DeclareNewLayer[textarea,background,mode=picture, + contents={ + \tl_if_empty:NTF \g_ptxcd_titleimage_code_tl + { + \bool_if:NF \g_ptxcd_colorbacktitle_bool + { + \bool_if:NT \g_ptxcd_colorback_bool {\putLL{\color{identbarcolor}\rule{\layerwidth}{\layerheight}}} + } + } + {\putUL{\color{identbarcolor} + \let\width\layerwidth + \let\height\layerheight + \raisebox{-\height}{\parbox[t]{\textwidth}{ + \leavevmode\ignorespaces + \g_ptxcd_titleimage_code_tl + }}}} + \bool_if:NF \g_@@_logo_head_bool { + \put(\dim_to_decimal_in_unit:nn {\layerwidth-\_@@_logowidth: + } {\unitlength}, + \dim_to_decimal_in_unit:nn {\layerheight-\box_ht:N \g_ptxcd_title_info_box - .5\c_ptxcd_logoheight_dim} {\unitlength}){ + \rlap{\box_use:N \g_ptxcd_title_info_box} + } + } + } +]{title.TUDa.image} + +\DeclareNewLayer[background,mode=picture, + contents={ + \bool_lazy_and:nnT {\g_ptxcd_colorback_bool} {\g_ptxcd_colorbacktitle_bool} { + {\color{identbarcolor}\rule{\layerwidth}{\layerheight}} + } + } +]{title.TUDa.background} + +\DeclareNewLayer[ + clone=plain.TUDa.pub.head.above.line, + hoffset=\coverpageleftmargin, + width=\paperwidth-\coverpageleftmargin-\coverpagerightmargin, +]{title.TUDa.rule} + +\ptxcd_makeheadrule[color=identbarcolor, width=\textwidth]{ptxcd_title_headline} + +\cs_new:Nn \ptxcd_setup_title_box: { + \hbox_gset:Nn \g_ptxcd_title_info_box + { + \parbox{\dim_eval:n {\_@@_logowidth:+\_@@_logosep:}}{ + \seq_use:Nn \g_ptxcd_title_info_seq {\par\nointerlineskip\vspace{\dim_eval:n {\c_ptxcd_largerule_dim+\c_ptxcd_rulesep_dim}}} + } + } +} + +\cs_new:Nn \ptxcd_setup_sponsor_box: { + \bool_if:nF {\seq_if_empty_p:N \g_ptxcd_sponsors_seq && \tl_if_empty_p:N \@sponsors} { + \hbox_gset:Nn \g_ptxcd_sponsor_box { + \edef\height{\noexpand\dimexpr\dim_eval:n {\_@@_logosep: + .5\c_ptxcd_logoheight_dim}} + \parbox[t]{\textwidth}{ + \rule{\linewidth}{\g_ptxcd_titlerule_dim}\par\nointerlineskip + \addvspace{\c_ptxcd_rulesep_dim} + \seq_use:Nn \g_ptxcd_sponsors_seq {\hfill} + \ifhmode\par\fi + \ifx\@sponsors\@empty + \else + \addvspace{.1\c_ptxcd_logoheight_dim} + \@sponsors\par + \fi + \par\nointerlineskip\addvspace{\c_ptxcd_rulesep_dim} + \rule{\linewidth}{\g_ptxcd_titlerule_dim} + } + } + } +} + +\DeclareNewPageStyleByLayers{title.TUDa}{title.TUDa.background,title.TUDa.rule,title.TUDa.image} +% \end{macrocode} +% Logos +%</class> +%<*class|xmpdata> +% \begin{macrocode} +\if_bool:N \g_ptxcd_pdfx_bool + \iow_new:N \ptxcd_xmpdata_stream + \tl_new:N \g_ptxcd_xmp_title_tl + \tl_new:N \g_ptxcd_xmp_author_tl + + \cs_if_exist:NF \prop_gput_if_new:Nnx { + \cs_generate_variant:Nn \prop_gput_if_new:Nnn {Nnx} + } + + \cs_if_exist:NF \tl_to_str:V {\cs_generate_variant:Nn \tl_to_str:N {V}} + + \cs_new:Nn \ptxcd_pass_TitleData: { + \iow_open:Nn \ptxcd_xmpdata_stream {\jobname.xmpdata} + \begingroup + \def\newline{} + \def\\{} + \let\thanks\use_none:n + \cs_set:Npn \and {\exp_not:n {\exp_not:N \sep}} + \use:c {Hy@pdfstringtrue} +% \end{macrocode} +% \cls{tudaletter} did not support the title mechanism, but as it does by loading scrartcl this shouldn't be an issue to keep this section for it. +% \begin{macrocode} + \tl_gset:Nf \g_ptxcd_xmp_title_tl {\@title} + \prop_gput_if_new:Nnx \g_ptxcd_MetaData_prop {Title} {\tl_to_str:V \g_ptxcd_xmp_title_tl} + \prop_if_in:NnF \g_ptxcd_MetaData_prop {Author} { + \tl_gset:Nx \g_ptxcd_xmp_author_tl {\seq_use:Nn \g_ptxcd_author_seq {\exp_not:N \sep}} + \tl_gset:Nx \g_ptxcd_xmp_author_tl {\g_ptxcd_xmp_author_tl} + \prop_gput:Nnx \g_ptxcd_MetaData_prop {Author} {\tl_to_str:V \g_ptxcd_xmp_author_tl} + } + \prop_gput_if_new:Nnn \g_ptxcd_MetaData_prop {Publisher}{TU~Darmstadt} + \prop_gput_if_new:Nnn \g_ptxcd_MetaData_prop {Creator}{LaTeX~using~TUDa-CI} + \use:c {pdfx@localcommands}%should be held inside group + \prop_map_function:NN \g_ptxcd_MetaData_prop \ptxcd_write_xmp_line:nn + \endgroup + \iow_close:N \ptxcd_xmpdata_stream + \let\ptxcd_pass_TitleData:\relax + } + \cs_new:Nn \ptxcd_write_xmp_line:nn { + \begingroup + \cs_set:Npn \sep {\exp_not:N \sep} + \cs_if_exist:cTF {#1}{ + \iow_now:Nx \ptxcd_xmpdata_stream { + \c_backslash_str #1 {\exp_not:n {#2}} + } + }{ + \msg_error:nnn{tuda-ci} {unknown-metadata} {#1} + } + \endgroup + } + + \prop_new:N \g_ptxcd_MetaData_prop + + \newcommand*{\Metadata}[1]{ + \keyval_parse:NNn \use_none:n \ptxcd_set_metadata_prop:nn + {#1} + } + + \cs_set:Nn \ptxcd_set_metadata_prop:nn { + % Fallback test for older kernels doesn't support mixed case eintries + \cs_if_exist:NTF \text_titlecase_first:n { + \exp_args:NNf \prop_gput:Nnn \g_ptxcd_MetaData_prop {\text_titlecase_first:n {#1}} {#2} + } { + \exp_args:NNx \prop_gput:Nnn \g_ptxcd_MetaData_prop { + \str_uppercase:f {\tl_head:n {#1}} + \str_lowercase:f {\tl_tail:n {#1}} + } {#2} + } + } +% \end{macrocode} +% %TODO use base\_str? +% \begin{macrocode} + \msg_new:nnnn{tuda-ci} {unknown-metadata} { + You~ used~ the~ #1~ metadata~ entry.\\ + I~ don't~ know~ how~ to~ handle~ that.\\ + It~ will~ be~ ignored. + } {See~ TUDa-CI~ or~ pdfx~ documentation~ for~ details.} +\else: + \hypersetup{pdfcreator=LaTeX~using~TUDa-CI} + \msg_new:nnnn {tuda-ci} {metadata-to-hypersetup} { + You~don't~use~pdfx.~ + Here~the~\string\Metadata ~command~only~exists~for~compatibility~reasons.\\ + I~will~pass~the~data~to~ḩypersetup. + }{ + If~possible~please~use~hyperref's~\string\hypersetup~command~for~the~metadata~directly.\\ + See~hyperref~documentation~for~details~on~usage. + } + + \newcommand*{\Metadata}[1]{ + \tl_set:Nn \l_tmpa_tl {#1} + \tl_replace_all:Nnn \l_tmpa_tl {\sep} {;~}% pdfx-Syntax compatibility + \clist_map_inline:Nn \l_tmpa_tl { + \exp_args:Nx \hypersetup{pdf\tl_trim_spaces:n {##1}} + } + \msg_warning:nn {tuda-ci} {metadata-to-hypersetup} + } + \cs_new:Nn \ptxcd_pass_TitleData: { +% \end{macrocode} +% check if pdfmanagement is active +% \begin{macrocode} + \prop_if_exist:NTF \g__pdfmanagement_documentproperties_prop { + \prop_set_eq:NN \l_tmpa_prop \g__pdfmanagement_documentproperties_prop + } { + \prop_set_eq:NN \l_tmpa_prop \g__hyp_documentproperties_prop + } +% \end{macrocode} +% title +% \begin{macrocode} + \prop_if_in:NnF \l_tmpa_prop {hyperref/pdftitle} { + \begingroup + \def\newline{} + \def\\{} + \let\thanks\use_none:n + \tl_gset:Nf \g_tmpa_tl {\@title} + \endgroup + \hypersetup{pdftitle={\tl_to_str:V \g_tmpa_tl}} + } +% \begin{macrocode} + \prop_if_in:NnF \l_tmpa_prop {hyperref/pdfauthor} { + \begingroup + \def\newline{} + \def\\{} + \let\thanks\use_none:n + \tl_gset:Nx \g_tmpa_tl {\seq_use:Nn \g_ptxcd_author_seq {\exp_not:N \and}} + \tl_gset:Nx \g_tmpa_tl {\g_tmpa_tl } + \endgroup + \hypersetup{pdfauthor=\g_tmpa_tl} + } + } + \bool_if:NF \g_ptxcd_pdfa_bool { + \msg_new:nnn{tuda-ci} {no-pdfa}{The~ tuda\c_@@_base_str\space class~ will~ not~ create~ PDF/A.} + \msg_info:nn{tuda-ci} {no-pdfa} + } +\fi: +% \end{macrocode} +% \iffalse +%</class|xmpdata> +%<*class> +% \fi +% \begin{macrocode} +\box_new:N \g_ptxcd_sponsor_box +\seq_new:N \g_ptxcd_sponsors_seq +% \end{macrocode} +% +% \begin{macro}{\AddSponsor} +% \begin{macrocode} +\def\AddSponsor{\seq_gput_right:Nn \g_ptxcd_sponsors_seq} +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\sponsors} +% \begin{macrocode} +\def\sponsors#1{\def\@sponsors{#1}} +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +\sponsors{} + +\cs_new:Npn \ptxcd_title_footnote:w [#1] #2 { + \textsuperscript{ \ptxcd_title_footnotestyle:n {#1}}#2 +} + +\cs_set_eq:NN \ptxcd_title_footnotestyle:n \@fnsymbol + +\str_if_eq:VnTF \g_ptxcd_pubType_tl {thesis} { + \input{tudathesis.cfg} +} { + \msg_new:nnnn {tudapub} {only-thesis} {You~tried~to~use~\use:c { #1}.~This~macro~is~only~available~for~publications~of~type~thesis}{See~tuda-ci~documentation~for~further~information} + + \clist_map_inline:nn {birthplace, group, examdate, submissiondate, tuprints, urn, reviewer} { + \expandafter\newcommand\csname #1\endcsname[2][]{ + \msg_error:nnn {tudapub} {only-thesis} {#1} + } + } +% \end{macrocode} +% +% \begin{macro}{\maketitle} +% \begin{macrocode} +%% The following macro is an adapted version of the corresponding KOMA-Script macro +%% Copyright (c) 1994-2019 Markus Kohm [komascript at gmx info] + \renewcommand*{\maketitle}[1][1]{ + \def\and{,~ } + \cs_if_exist_use:N \ptxcd_pass_TitleData: + \if@titlepage + \edef\titlepage@restore{% + \noexpand\endgroup + \noexpand\global\noexpand\@colht\the\@colht + \noexpand\global\noexpand\@colroom\the\@colroom + \noexpand\global\vsize\the\vsize + \noexpand\global\noexpand\@titlepageiscoverpagefalse + \noexpand\let\noexpand\titlepage@restore\noexpand\relax + }% + \ptxcd_disable_marginpar: + \begin{titlepage} + \setcounter{page}{% + #1% + }% + \def\thefootnote{\ptxcd_title_footnotestyle:n {\c@footnote}} + \if@titlepageiscoverpage + \begingroup + \topmargin=\dimexpr \coverpagetopmargin-1in\relax + \oddsidemargin=\dimexpr \coverpageleftmargin-1in\relax + \evensidemargin=\dimexpr \coverpageleftmargin-1in\relax + \textwidth=\dimexpr + \paperwidth-\coverpageleftmargin-\coverpagerightmargin\relax + \textheight=\dimexpr + \paperheight-\coverpagetopmargin-\coverpagebottommargin\relax + \headheight=0pt + \headsep=0pt + \footskip=\baselineskip + \@colht=\textheight + \@colroom=\textheight + \vsize=\textheight + \columnwidth=\textwidth + \hsize=\columnwidth + \linewidth=\hsize + \else + \let\titlepage@restore\relax + \fi + \setparsizes{\z@}{\z@}{\z@\@plus 1fil}\par@updaterelative + \ptxcd_setup_sponsor_box: + \hbox_gset:Nn \g_ptxcd_title_box { + \parbox[t]{\linewidth}{ + \begin{minipage}[b]{\bool_if:NT \g_@@_logo_head_bool {.75}\linewidth} + \bool_lazy_and:nnT {\g_ptxcd_colorback_bool} {\g_ptxcd_colorbacktitle_bool} {\color{textonaccentcolor}} + \tl_if_empty:NF \@titlehead { + \begin{addmargin}{3mm} + {\usekomafont{titlehead}{\@titlehead\par}} + \end{addmargin} + } + \begin{addmargin}[\dim_eval:n {\box_if_empty:NF \g_ptxcd_PaperID_box {\box_wd:N\g_ptxcd_PaperID_box+.5\c_ptxcd_logoheight_dim} +3mm}]{3mm} + \raggedright + \leavevmode\usekomafont{title}% + \expandafter\fontsize\ptxcd_title_fontsize: + \selectfont + \llap{\raisebox{\dimexpr-\height+.5\baselineskip}[0pt][0pt]{\box_use:N \g_ptxcd_PaperID_box}\hspace{.5\c_ptxcd_logoheight_dim}} + \@title\strut + \par + \box_if_empty:NTF \g_ptxcd_PaperID_box + {\vskip0pt} + {\rule{0pt}{.5\c_ptxcd_logoheight_dim}} + \end{addmargin} + \end{minipage}% + \bool_if:NT \g_ptxcd_colorbacksubtitle_bool {\color{textonaccentcolor}} + \par\nointerlineskip + \rule{\linewidth}{\g_ptxcd_titlerule_dim}\par\vspace{\c_ptxcd_rulesep_dim} + \begin{addmargin}{3mm} + \usekomafont{titleinfo} + \expandafter\fontsize\ptxcd_titleinfo_fontsize: + \selectfont + {\ifx\@subtitle\@empty\else\usekomafont{subtitle}{\@subtitle\par}\fi}% + {\ifx\@subject\@empty\else\usekomafont{subject}{\@subject\par}\fi} + {% + \usekomafont{author} + \lineskip 0.75em + \@author + \par + }% + {\ifx\@date\@empty\else\usekomafont{date}{\@date\par}\fi}% + {\ifx\@publishers\@empty\else\usekomafont{publishers}{\@publishers \par}\fi}% + \end{addmargin} + \tl_if_empty:NF \@thanks { + \expandafter\fontsize\ptxcd_titlethanks_fontsize:\selectfont\par + \rule{\linewidth}{\g_ptxcd_titlerule_dim}\par + \begin{addmargin}{3mm} + \let\footnotetext\ptxcd_title_footnote:w + \@thanks + \end{addmargin} + \par\vspace{-\dp\strutbox} + } + \normalcolor + \rule{\linewidth}{\g_ptxcd_titlerule_dim}\par} + } + \let\@thanks\@empty + \ptxcd_adjust_titlepage_style: + \thispagestyle{title.TUDa} + \nointerlineskip\box_use:N \g_ptxcd_title_box + \par + \vfill + \box_if_empty:NTF \g_ptxcd_sponsor_box { + \raisebox{-\c_ptxcd_rulesep_dim}[0pt][0pt]{\rule{\linewidth}{\g_ptxcd_titlerule_dim}} + }{ + \box_use:N \g_ptxcd_sponsor_box + } + \if@twoside + \@tempswatrue + \expandafter\ifnum \@nameuse{scr@v@3.12}>\scr@compatibility\relax + \else + \ifx\@uppertitleback\@empty\ifx\@lowertitleback\@empty + \@tempswafalse + \fi\fi + \fi + \if@tempswa + \next@tpage + \begin{minipage}[t]{\textwidth} + \@uppertitleback + \end{minipage}\par + \vfill + \begin{minipage}[b]{\textwidth} + \@lowertitleback + \end{minipage}\par + \@thanks\let\@thanks\@empty + \fi + \fi + \ifx\@dedication\@empty + \else + \next@tdpage\null\vfill + {\centering\usekomafont{dedication}{\@dedication \par}}% + \vskip \z@ \@plus3fill + \@thanks\let\@thanks\@empty + \cleardoubleemptypage + \fi + \ifx\titlepage@restore\relax\else\clearpage\titlepage@restore\fi + \end{titlepage} + \setcounter{footnote}{0}% + \global\let\and\relax + \cleardoublepage + \ptxcd_restore_typearea: + \aftergroup\ptxcd_restore_typearea: + \else + \par + \@tempcnta=% + #1% + \relax\ifnum\@tempcnta=1\else + \ClassWarning{\KOMAClassName}{% + Optional argument of \string\maketitle\space ignored\MessageBreak + in `titlepage=false' mode% + }% + \fi + \ifx\@uppertitleback\@empty\else + \ClassWarning{\KOMAClassName}{% + non empty \string\uppertitleback\space ignored + by \string\maketitle\MessageBreak + in `titlepage=false' mode% + }% + \fi + \ifx\@lowertitleback\@empty\else + \ClassWarning{\KOMAClassName}{% + non empty \string\lowertitleback\space ignored + by \string\maketitle\MessageBreak + in `titlepage=false' mode% + }% + \fi + \begingroup + \let\titlepage@restore\relax + \def\thefootnote{\fnsymbol{footnote}} + \next@tdpage + \ifx\@extratitle\@empty + \ifx\@frontispiece\@empty\else \mbox{}\fi + \else + \@makeextratitle + \fi + \ifx\@frontispiece\@empty + \ifx\@extratitle\@empty\else\next@tdpage\fi + \else + \next@tpage + \@makefrontispiece + \next@tdpage + \fi + \if@twocolumn + \twocolumn[\@maketitle] + \else + \@maketitle + \fi + \ifx\titlepagestyle\@empty\else\thispagestyle{\titlepagestyle}\fi + \global\let\@thanks\@empty + \endgroup + \fi + } +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +} + +\newkomafont{paperid}{\sffamily} +\box_new:N \g_ptxcd_PaperID_box +% \end{macrocode} +% +% \begin{macro}{\SetPaperID} +% \begin{macrocode} +\newcommand*{\SetPaperID}[2]{ + \hbox_gset:Nn \g_ptxcd_PaperID_box { + \usekomafont{paperid} + \if@titlepage + \dim_set:Nn \l_tmpa_dim {\exp_last_unbraced:No \use_i:nn \ptxcd_title_fontsize: + \exp_last_unbraced:No \use_ii:nn \ptxcd_title_fontsize:} + \else + \Huge + \dim_set:Nn \l_tmpa_dim {1.8\baselineskip} + \fi + \fontsize{1.1\l_tmpa_dim}{1.1\l_tmpa_dim} + \selectfont + #1{\Huge #2} + } +} +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\@maketitle} +% \begin{macrocode} +\renewcommand*{\@maketitle}{% + \global\@topnum=\z@ + \setparsizes{\z@}{\z@}{\z@\@plus 1fil}\par@updaterelative + \vspace*{-\dim_eval:n { + \headheight + +\headsep + +\topskip + -\box_ht:N\ptxcd_headrule_box + -\box_dp:N \ptxcd_headrule_box + }} + \par + \nointerlineskip + \begingroup + \usekomafont{disposition} + \hsize=\g_ptxcd_headwidth_dim + \setlength{\fboxsep}{\z@} + \def\thefootnote{\ptxcd_title_footnotestyle:n {\c@footnote}} + \bool_if:NT \g_ptxcd_colorback_bool {\bool_set_true:N \g_ptxcd_colorbacktitle_bool} + \bool_if:NT \g_ptxcd_colorbacktitle_bool {\colorbox{identbarcolor}} + {\parbox[t]{\g_ptxcd_headwidth_dim}{ + \rule{\z@}{.5\c_ptxcd_logoheight_dim}\par\nointerlineskip + \raisebox{-\height}{% + \begin{minipage}[t]{\dim_eval:n {\linewidth-\_@@_logowidth:-1ex}} + \bool_if:NT \g_ptxcd_colorbacktitle_bool {\begin{addmargin}{.5\c_ptxcd_largerule_dim}} + \raggedright + \bool_if:NT \g_ptxcd_colorback_bool {\color{textonaccentcolor}} + \tl_if_empty:NF \@titlehead {\usekomafont{titlehead}{\@titlehead\par}} + \box_if_empty:NF \g_ptxcd_PaperID_box {\begin{addmargin}[\dim_eval:n {\box_wd:N\g_ptxcd_PaperID_box+.5\c_ptxcd_logoheight_dim}]{0pt}} + \raggedright + \bool_if:NT \g_ptxcd_colorback_bool {\color{textonaccentcolor}} + \tl_if_empty:NF \@titlehead {\usekomafont{titlehead}{\@titlehead\par}} + \leavevmode\usekomafont{title}% + \Huge + \llap{\raisebox{\dimexpr-\height+.5\baselineskip}[0pt][0pt]{\box_use:N \g_ptxcd_PaperID_box}\hspace{.5\c_ptxcd_logoheight_dim}} + \@title\strut + \par + \box_if_empty:NTF \g_ptxcd_PaperID_box + {\vskip1em} + {\rule{0pt}{.5\c_ptxcd_logoheight_dim}} + \box_if_empty:NF \g_ptxcd_PaperID_box {\end{addmargin}} + \bool_if:NTF \g_ptxcd_colorbacktitle_bool {\end{addmargin}} {\par} + \vspace{\dim_eval:n {\c_ptxcd_largerule_dim+\c_ptxcd_rulesep_dim}} + \end{minipage} + } + \hfill + \raisebox{-\height}{ + \ptxcd_setup_title_box: + \makebox[\_@@_logowidth:][l]{ + \box_use:N \g_ptxcd_title_info_box + } + } + \dim_compare:nNnTF {\box_ht:N \g_ptxcd_title_info_box + \box_ht:N \g_ptxcd_title_info_box} > {(\_@@_logowidth:)/2} + {\vspace{\c_ptxcd_largerule_dim}} + {\vspace{.5\c_ptxcd_logoheight_dim}} + \par + }} + \par + \nointerlineskip + \rule{\g_ptxcd_headwidth_dim}{\g_ptxcd_titlerule_dim} + \begin{addmargin}{.5\c_ptxcd_largerule_dim} + \Large + \clist_map_inline:nn {subtitle, subject, author, date, publishers} + {\tl_if_empty:cF {@##1} {{\usekomafont{##1}\use:c {@##1}\par}}} + \vspace{\c_ptxcd_rulesep_dim} + \end{addmargin} + \tl_if_empty:NF \@thanks { + \par\nointerlineskip + \rule{\g_ptxcd_headwidth_dim}{\g_ptxcd_titlerule_dim} + \expandafter\fontsize\ptxcd_titlethanks_fontsize:\selectfont + \begin{addmargin}{.5\c_ptxcd_largerule_dim} + \let\footnotetext\ptxcd_title_footnote:w + \@thanks + \vspace{\c_ptxcd_rulesep_dim} + \end{addmargin} + \par + \let\@thanks\@empty + } + \par\nointerlineskip + \rule{\g_ptxcd_headwidth_dim}{\g_ptxcd_titlerule_dim} + \par + \endgroup + \vskip .5\c_ptxcd_logoheight_dim +}% +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\abstract} +%%Abstract anpassungen mit Sprache +% \begin{macrocode} +\providecommand{\abstract}{}% für book +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +\RenewDocumentEnvironment{abstract}{o}{ + \begingroup + \IfNoValueF{#1}{\selectlanguage{#1}} + \bool_set_true:N \l_tmpa_bool + \cs_if_exist:NT \if@abstrt { + \if@abstrt + \else + \bool_set_false:NT \l_tmpa_bool + \fi + } + \bool_if:NT \l_tmpa_bool { + \scr@ifundefinedorrelax{chapter}{% + \Iftocfeature{toc}{leveldown} + {\subsection*} + {\section*} + }{ + \Iftocfeature{toc}{leveldown} + {\section*} + {\chapter*} + } {\abstractname} + + }}{ + \endgroup +} +% \end{macrocode} +% Anpassungen marginpar +% \begin{macrocode} +\cs_set_eq:NN\ptxcd_orig@marginpar:w \marginpar +\newkomafont{marginpar}{\accentfont\color{textaccentcolor}} +\RenewDocumentCommand{\marginpar}{om}{ + \IfNoValueTF{#1}{ + \ptxcd_orig@marginpar:w {\leavevmode\usekomafont{marginpar}#2} + }{ + \ptxcd_orig@marginpar:w [{\leavevmode\usekomafont{marginpar}#1}]{\leavevmode\usekomafont{marginpar}#2} + } +} + +\ptxcd_declare_caption:Nnn \authorandname {und} {and} +\ptxcd_declare_caption:Nnn \ptxcd_datename {Datum}{Date} +% \end{macrocode} +% +% \begin{macro}{\ptxcd} +% \begin{macrocode} +\gdef\ptxcd_dateseparator{:~} +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\frontmatter} +% \begin{macrocode} +\providecommand*{\frontmatter}{ + \if@twoside\cleardoublepage\else\clearpage\fi \@mainmattertrue + \pagenumbering {roman} +} +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\mainmatter} +% \begin{macrocode} +\providecommand*{\mainmatter}{ + \if@twoside\cleardoublepage\else\clearpage\fi \@mainmattertrue + \pagenumbering {arabic} +} +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\backmatter} +% \begin{macrocode} +\providecommand*{\backmatter}{ + \if@twoside\cleardoublepage\else\clearpage\fi \@mainmatterfalse +} +% \end{macrocode} +% \end{macro} +% +% IMRAD:Introduction +% \begin{macrocode} +\seq_if_exist:NTF \seq_const_from_clist:Nn { + \seq_const_from_clist:Nn \c_ptxcd_IMRAD_seq {introduction, methods, results, discussion} +} { + \seq_new:N \c_ptxcd_IMRAD_seq + \seq_gset_from_clist:Nn \c_ptxcd_IMRAD_seq {introduction, methods, results, discussion} +} +% \end{macrocode} +% +% \begin{macro}{\IMRADlabel} +% \begin{macrocode} +\newcommand*{\IMRADlabel}[1]{ + \seq_if_in:NnTF \c_ptxcd_IMRAD_seq {#1} + {\label{IMRAD:#1}} + {\msg_error:nnnn {tudapub} {undefined-IMRADlabel}{#1}{\seq_use:Nn \c_ptxcd_IMRAD_seq {,}}} +} +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +\bool_if:NT \g_ptxcd_IMRAD_bool { + \AtEndDocument{ + \seq_map_inline:Nn \c_ptxcd_IMRAD_seq { + \cs_if_exist:cF {r@IMRAD:#1} { + \msg_warning:nnn {tudapub} {missing-IMRADlabel} {#1} + } + } + } +} + +\msg_new:nnn {tudapub} {undefined-IMRADlabel} { + You~tried~to~set~an~IMRAD~label~with~key~#1.\\ + This~label~type~is~not~declared.\\ + Possible~labels~are:~#2 +} + +\msg_new:nnn{tudapub} {missing-IMRADlabel} { + You~did~not~provide~a~Label~for~key~#1.\\ + Either~you~need~to~recompile~your~document~or~add~a~label~using~\string\IMRADlabel. +} +% \end{macrocode} +% backwards compatibility for KOMA-Script +% \begin{macrocode} +\cs_if_exist:NF \Iftocfeature{ + \let\Iftocfeature\iftocfeature +} + +\file_if_exist_input:n {\g_@@_config_prefix_tl\g_ptxcd_department_str.cfg} +% \end{macrocode} + +% +% \iffalse +%</class> +%<*tudathesis> +% \fi +% \begin{macrocode} +\tl_new:N \g_ptxcd_thesis_drtext_tl +\clist_if_exist:NF \g_ptxcd_Required_title_data_clist {\clist_new:N \g_ptxcd_Required_title_data_clist} + +% Declare macros for department +\cs_new:Nn \ptxcd_select_department:n { + \str_case:nnTF {#1} { + {arch} {\ptxcd_declare_caption:Nnn \ptxcd_department: {Architektur} {Architecture}} + {bauing} {\ptxcd_declare_caption:Nnn \ptxcd_department: {Bau-~und~Umweltingenieurwissenschaften}{Civil~and~Environmental~Engineering}} + {bio} {\ptxcd_declare_caption:Nnn \ptxcd_department: {Biologie}{Biology}} + {chem} {\ptxcd_declare_caption:Nnn \ptxcd_department: {Chemie}{Chemistry}} + {etit} {\ptxcd_declare_caption:Nnn \ptxcd_department: {Elektrotechnik~und~Informationstechnik}{Electrical~Engineering~and~Information~Technology}} + {gugw} {\ptxcd_declare_caption:Nnn \ptxcd_department: {Gesellschafts-~und~Geschichtswissenschaften}{History~and~Social~Sciences}} + {humanw} {\ptxcd_declare_caption:Nnn \ptxcd_department: {Humanwissenschaften}{Human~Sciences}} + {inf} {\ptxcd_declare_caption:Nnn \ptxcd_department: {Informatik}{Computer~Science}} + {mb} {\ptxcd_declare_caption:Nnn \ptxcd_department: {Maschinenbau}{Mechanical~Engineering}} + {matgeo} {\ptxcd_declare_caption:Nnn \ptxcd_department: {Material-~und~Geowissenschaften}{Materials~and~Earth~Sciences}} + {math} {\ptxcd_declare_caption:Nnn \ptxcd_department: {Mathematik}{Mathematics}} + {phys} {\ptxcd_declare_caption:Nnn \ptxcd_department: {Physik}{Physics}} + {wi} {\ptxcd_declare_caption:Nnn \ptxcd_department: {Rechts-~und~Wirtschaftswissenschaften}{Law~and~Economics}} + } + { + \ptxcd_declare_caption:Nnn \departmentname {Fachbereich} {department} + \ptxcd_declare_caption:Nnn \departmentfullname {\departmentname{}~ \ptxcd_department:} { \ptxcd_department:{}~ \text_titlecase:n{\departmentname}} + \ptxcd_declare_caption:Nnn \ptxcd_departmentprefix: {im~ \departmentname}{in~the~\departmentname{}~ of} + \ptxcd_declare_caption:Nnn \ptxcd_in_department {\ptxcd_departmentprefix:{}~\ptxcd_department:}{\ptxcd_departmentprefix:{}~\ptxcd_department:} + } + {\bool_if:NTF \g_ptxcd_dr_bool + { + \msg_warning:nnn{tudapub/thesis} {unrecognized-department} {#1} + \gdef\ptxcd_department:{#1} + \ptxcd_declare_caption:Nnn \departmentname {Fachbereich} {department} + } + {\ptxcd_select_studyfield:n {#1}} + } +} + +\cs_new:Nn \ptxcd_select_studyfield:n { + \str_case:nnTF {#1} { + {ce}{\ptxcd_declare_caption:Nnn \ptxcd_department: {Computational\nobreakspace Engineering}{Computational\nobreakspace Engineering}} + {ese}{\ptxcd_declare_caption:Nnn \ptxcd_department: {Energy~Science~and~Engineering}{Energy~Science~and~Engineering}} + {ist}{\ptxcd_declare_caption:Nnn \ptxcd_department: {Informationssystemtechnik} {Information~Systems~Technology}} + {mech}{\ptxcd_declare_caption:Nnn \ptxcd_department: {Mechanik}{Mechanics}} + {metro}{\ptxcd_declare_caption:Nnn \ptxcd_department: {Mechatronik}{Mechatronics}} + } + { + \ptxcd_declare_caption:Nnn \departmentname {Studienbereich} {field~of~study} + \ptxcd_declare_caption:Nnn \departmentfullname {\departmentname{}~ \ptxcd_department:} {\departmentname{}:~\ptxcd_department:} + \ptxcd_declare_caption:Nnn \ptxcd_departmentprefix: {im~ \departmentname}{in~the~\departmentname} + \ptxcd_declare_caption:Nnn \ptxcd_in_department {\ptxcd_departmentprefix:{}~\ptxcd_department:} {\ptxcd_departmentprefix:{}~``\ptxcd_department:''} + } + { + \msg_warning:nnn{tudapub/thesis} {unrecognized-department} {#1} + \gdef\ptxcd_department:{#1} + \ptxcd_declare_caption:Nnn \departmentname {Fachbereich} {department} + } +} + +\cs_new:Nn \ptxcd_insert_studentID:n { + (\ptxcd_studentIDname :\nobreakspace#1) +} + +\ptxcd_declare_caption:Nnn \ptxcd_byname {von} {by} +\ptxcd_declare_caption:Nnn \ptxcd_fromname {aus} {from} +\ptxcd_declare_caption:Nnn \ptxcd_departmentprefix: {im~ \departmentname}{in~the~\departmentname{}~ of} +\ptxcd_declare_caption:Nnn \ptxcd_reviewname {Gutachten}{review} +\ptxcd_declare_caption:Nnnn \ptxcd_examdatename {Tag~ der~ Prüfung}{Date~ of~ thesis~ defense}{Date~ of~ thesis~ defence} +\ptxcd_declare_caption:Nnn \ptxcd_submissiondatename {Tag~ der~ Einreichung}{Date~ of~ submission} +\ptxcd_declare_caption:Nnn \ptxcd_studentIDname {Matrikelnummer} {Student\nobreakspace ID} + +% Fallback content for box if not overwritten +\newcommand*\ptxcd_box_department {\cs_if_exist_use:NF \departmentfullname {\ptxcd_department:}} +\newcommand*\ptxcd_in_department {} +\newcommand*{\ptxcd_thesisStatus}{} +\tl_new:N \g_@@_affidavit_version_tl +\def\@ThesisTypeArticle{die} + +\keys_define:nn {ptxcd/thesis} { + dr .choice:, + dr/rernat .code:n = \tl_gset:Nn \g_ptxcd_thesis_drtext_tl {Zur~Erlangung~des~Grades~eines~Doktors~der~Naturwissenschaften~(Dr.\,rer.\,nat.)}, + dr/ing .code:n = \tl_gset:Nn \g_ptxcd_thesis_drtext_tl {Zur~Erlangung~des~akademischen~Grades~Doktor-Ingenieur~(Dr.-Ing.)}, + dr/phil .code:n = \tl_gset:Nn \g_ptxcd_thesis_drtext_tl {Zur~Erlangung~des~Grades~eines~Doktor~der~Philosophie~(Dr.\,phil.)}, + dr/rerpol .code:n = \tl_gset:Nn \g_ptxcd_thesis_drtext_tl {Zur~Erlangung~des~Grades~eines~Doctor~rerum~politicarum (Dr. rer. pol.)}, + type .choice:, + type/sta .code:n = {\def\ptxcd_thesisType{Studienarbeit} + \clist_gset:Nn \g_ptxcd_Required_title_data_clist {title, author, date} + \bool_gset_false:N \g_ptxcd_dr_bool + }, +% type/diplom .code:n = {\def\ptxcd_thesisType{Diplomarbeit}\clist_gset:Nn \g_ptxcd_Required_title_data_clist {title, author, submissiondate, reviewer, department}}, + type/bsc .meta:n = {type=bachelor}, + type/bachelor .code:n = {\ptxcd_declare_caption:Nnn \ptxcd_thesisType{Bachelorarbeit}{bachelor~ thesis}\def\@ThesisTypeArticle{die}\clist_gset:Nn \g_ptxcd_Required_title_data_clist {title, author, submissiondate, department, reviewer}\bool_gset_false:N \g_ptxcd_dr_bool}, + type/pp .code:n = { \ptxcd_declare_caption:Nnn \ptxcd_thesisType {Project-Proposal}{project~ proposal}\def\@ThesisTypeArticle{das}\clist_gset:Nn \g_ptxcd_Required_title_data_clist {title, author, date, department}\bool_gset_false:N \g_ptxcd_dr_bool}, + type/msc .meta:n = {type=master}, + type/master .code:n = \ptxcd_declare_caption:Nnn \ptxcd_thesisType{Masterarbeit}{master~ thesis}\def\@ThesisTypeArticle{die}\clist_gset:Nn \g_ptxcd_Required_title_data_clist {title, author, submissiondate, department, reviewer}\bool_gset_false:N \g_ptxcd_dr_bool, + type/dr .code:n = \ptxcd_declare_caption:Nnn \ptxcd_thesisType{Dissertation}{doctoral~ thesis}\ptxcd_declare_caption:Nnn\ptxcd_thesisStatus{vorgelegte}{submitted}\def\@ThesisTypeArticle{die}\clist_gset:Nn \g_ptxcd_Required_title_data_clist {title, author, submissiondate , department, reviewer}\bool_gset_true:N \g_ptxcd_dr_bool, + type/drfinal .code:n = \ptxcd_declare_caption:Nnn \ptxcd_thesisType {Dissertation}{doctoral~ thesis}\ptxcd_declare_caption:Nnn\ptxcd_thesisStatus{genehmigte}{accepted}\def\@ThesisTypeArticle{die}\clist_gset:Nn \g_ptxcd_Required_title_data_clist {title, author, submissiondate,examdate, department, reviewer}\bool_gset_true:N \g_ptxcd_dr_bool, + type/unknown .code:n = \def\ptxcd_thesisType{#1}\clist_gset:Nn \g_ptxcd_Required_title_data_clist {}\def\@ThesisTypeArticle{die}\bool_gset_false:N \g_ptxcd_dr_bool, + ignore-missing-data .bool_gset:N = \g_ptxcd_missing_data_warning_bool, + ignore-missing-data .initial:n = false, + department .tl_gset:N = \g_ptxcd_department_choice_tl, + status .code:n = \tl_if_head_is_group:nTF {#1} {\ptxcd_declare_caption:Nnn\ptxcd_thesisStatus #1 {}} {\ptxcd_declare_caption:Nnn\ptxcd_thesisStatus{#1}{#1}}, + fieldofstudy .meta:n ={department = #1}, + ignore-title-language .bool_gset:N = \g_ptxcd_ignore_title_language_bool, + ignore-title-language .initial:n ={false}, + noinstbox .bool_gset:N = \g_ptxcd_manual_info_box_bool, + instbox .bool_gset_inverse:N = \g_ptxcd_manual_info_box_bool, + instbox .initial:n = true, + reviewer-on-uppertitleback .bool_gset:N = \g_@@_reviewer_on_uppertitleback_bool, + reviewer-on-uppertitleback .initial:n = false, + hide-architecture-note .bool_gset_inverse:N = \g_@@_architecture_note_bool, + hide-architecture-note .initial:n = false, + hide-architecture-note .default:n = true, +} + +\prop_map_inline:Nn \g_ptxcd_unknown_clsopts_prop { + \keys_if_exist:nnT {ptxcd/thesis} {#1} { + \keys_set:nn {ptxcd/thesis} {#1=#2} + } +} + +\tl_if_empty:NF \g_ptxcd_thesis_options_tl {\keys_set:nV {ptxcd/thesis} \g_ptxcd_thesis_options_tl} + +\cs_new:Npn \drtext #1 {\tl_gset:Nn \g_ptxcd_thesis_drtext_tl {#1}} +\tl_new:N \g_ptxcd_titleintro_tl +\cs_new:Npn \titleintro #1 {\tl_gset:Nn \g_ptxcd_titleintro_tl {#1}} +\tl_new:N \g_ptxcd_titleaddendum_tl +\cs_new:Npn \titleaddendum #1 {\tl_gset:Nn \g_ptxcd_titleaddendum_tl {#1}} + +\msg_new:nnnn{tudapub/thesis} {required-data-missing} {You~did~not~provide~#1~data~for~the~title.~Either~provide~it~or~change~your~publication~type.} {See~ the~ TUDa-CI~ documentation~ for~ further~ information~ and~ workarounds.} + +\cs_new:Nn \ptxcd_missing_title_data:n { + \bool_if:NTF \g_ptxcd_missing_data_warning_bool + \msg_warning:nnn + \msg_error:nnn{tudapub/thesis} {required-data-missing} {#1} +} + +\cs_new:Nn \ptxcd_check_title_data:Nn { + \clist_if_in:NnT \g_ptxcd_Required_title_data_clist {#2} { + \tl_if_empty:NT #1 { + \bool_if:NTF \g_ptxcd_missing_data_warning_bool + {\msg_warning:nnn} + {\msg_error:nnn} {tudapub/thesis} {required-data-missing} {#2} + } + } +} + +\cs_generate_variant:Nn \ptxcd_check_title_data:Nn {cn} + +\renewcommand*\author[2][]{ + \seq_gset_split:Nnn \g_ptxcd_author_seq {\and} {#2} + \tl_if_empty:nTF {#1} + {\tl_set:Nn \l_ptxcd_signature_tl {#2}} + {\tl_set:Nn \l_ptxcd_signature_tl {#1}} +} + +\newcommand*{\studentID}[1]{ + \tl_set:Nn \l_ptxcd_studentID_tl {#1} +} + +\gdef\ptxcd_institution{} +\gdef\ptxcd_institute{} +\gdef\ptxcd_department:{} +% \gdef\ptxcd_studentID{} + +\NewDocumentCommand{\department}{som}{% + \IfBooleanTF{#1}{ + \tl_gset:Nn \ptxcd_department: {#3} + \tl_gset:Nn \ptxcd_in_department{#3} + \IfNoValueTF {#2} {\tl_gset:Nn \ptxcd_box_department {#3}} {\tl_gset:Nn \ptxcd_box_department{#2}} + \clist_remove_all:Nn \g_ptxcd_Required_title_data_clist {department} + }{ + \tl_gset:Nn \g_ptxcd_department_choice_tl {#3} + \IfNoValueF {#2} {\tl_gset:Nn \ptxcd_departmentprefix: {#2}} + } +} + +\newcommand*{\institute}[1]{ + \gdef\ptxcd_institute{#1} +} + +\gdef\ptxcd_group{} +\newcommand*{\group}[1]{% + \gdef\ptxcd_group{#1} +} + +\gdef\ptxcd_birthplace{} +\newcommand*{\birthplace}[1]{% + \bool_if:NTF \g_ptxcd_dr_bool + {\gdef\ptxcd_birthplace{#1}} + {\msg_info:nnn{tudapub/thesis} {dr-field-only} {birthplace}} +} + +\publishers{Darmstadt\bool_if:NT \g_ptxcd_dr_bool {,~Technische~Universität~Darmstadt}} + +\seq_new:N \g_ptxcd_reviewer_seq +\NewDocumentCommand{\reviewer}{som}{ + \IfNoValueF {#2} { + \IfBooleanTF{#1} + {\setupReviewName*{#2}} + {\setupReviewName{#2}} + } + \tl_if_empty:nTF {#3} + {\let\@reviewer\@empty} + {\seq_gset_split:Nnn \g_ptxcd_reviewer_seq {\and} {#3}} +} + +\cs_set:Nn \ptxcd_thesis_print_reviewer: { + \clist_if_in:NnT \g_ptxcd_Required_title_data_clist {reviewer} { + \seq_if_empty:NT \g_ptxcd_reviewer_seq {\ptxcd_missing_title_data:n {reviewer}} + } + \int_zero:N \l_tmpb_int + \par\vspace*{\baselineskip} + { + \seq_map_inline:Nn \g_ptxcd_reviewer_seq + { + \int_incr:N \l_tmpb_int + \cs_if_exist_use:cF {_@@_reviewname_\int_use:N \l_tmpb_int :} + {\int_to_arabic:n {\l_tmpb_int}.~\text_titlecase:n{\ptxcd_reviewname}} + :~\exp_not:n {##1}\\ + } + } +} + +\gdef\ptxcd_examdate{} +\newcommand*{\examdate}[1]{ + \bool_if:NTF \g_ptxcd_dr_bool + {\gdef\ptxcd_examdate{#1}} + {\msg_info:nnn{tudapub/thesis} {dr-field-only} {examdate}} +} + +\gdef\ptxcd_submissiondate{} +\newcommand*{\submissiondate}[1]{ + \gdef\ptxcd_submissiondate{#1} +} + +\gdef\@date{} + +\cs_new:Nn \ptxcd_thesis_print_dates:n { + \bool_set_false:N \l_tmpa_bool + \tl_if_empty:NF \@date { + \ptxcd_datename\tl_if_empty:NF \ptxcd_datename {\ptxcd_dateseparator}\@date + \bool_set_true:N \l_tmpa_bool + } + \tl_if_empty:NF \ptxcd_submissiondate { + \bool_if:NTF \l_tmpa_bool {#1} {\bool_set_true:N \l_tmpa_bool}\ptxcd_submissiondatename\ptxcd_dateseparator\ptxcd_submissiondate + } + \tl_if_empty:NF \ptxcd_examdate { + \bool_if:NTF \l_tmpa_bool {#1} {\bool_set_true:N \l_tmpa_bool}\ptxcd_examdatename\ptxcd_dateseparator\ptxcd_examdate + } +} + +\tl_new:N \g_ptxcd_license_info_tl + +\keys_define:nn {ptxcd/thesis} { + urn .tl_gset:N =\g_ptxcd_thesis_urn_tl, + urn .initial:V = \c_empty_tl, + printid .tl_gset:N = \g_ptxcd_thesis_tuprints_tl, + printid .initial:V = \c_empty_tl, + doi .tl_gset:N = \g_ptxcd_thesis_doi_tl, + year .tl_gset:N = \g_ptxcd_thesis_publication_year_tl, + year .initial:n = , + license .choices:nn = {cc-by-4.0,cc-by-sa-4.0,cc-by-nc-sa-4.0,cc-by-nc-4.0,cc-by-nd-4.0,cc-by-nc-nd-4.0} { + \tl_gset:Nx \g_ptxcd_license_info_tl {\exp_not:N \g_@@_cc_license:n {\l_keys_choice_tl} \exp_not:N \iflanguage{\exp_not:N \bbl@main@language}{}{\exp_not:n {\par\smallskip\otherlanguage{\bbl@main@language}}{\exp_not:N \g_@@_cc_license:n {\l_keys_choice_tl}}}} + }, + license / cc-by-nc-nd-2.0-de .code:n = \tl_gset:Nn \g_ptxcd_license_info_tl {\use:c {g_@@_cc-by-nc-nd-2.0-de:}}, + license / inc-1.0-de .code:n = \tl_gset:Nn \g_ptxcd_license_info_tl { + Die~Veröffentlichung~ist~urheberrechtlich~geschützt\newline + \url{https://rightsstatements.org/page/InC/1.0/} + }, + license / inc-1.0-en .code:n = \tl_gset:Nn \g_ptxcd_license_info_tl { + This~work~is~protected~by~copyright\newline + \url{https://rightsstatements.org/page/InC/1.0/} + }, + license / inc-1.0 .code:n = \tl_if_in:NnTF \languagename {german} {\keys_set:nn {ptxcd/thesis}{license=inc-1.0-de}}{\keys_set:nn {ptxcd/thesis}{license=inc-1.0-en}}, + license / initial .code:n = {\keys_set:nn {ptxcd/thesis} {license=cc-by-4.0}}, + license / unknown .code:n = \tl_gset:Nn \g_ptxcd_license_info_tl {#1}, + license .initial:n = initial, + signature .tl_set:N = \l_ptxcd_signature_tl, + studentID .tl_set:N = \l_ptxcd_studentID_tl, + studentID .initial:n =, + signature-image .tl_set:N = \l_ptxcd_signature_image_tl, + signature-image .initial:n =, + signature-location .tl_set:N = \l_ptxcd_signature_location_tl, + signature-location .initial:n = Darmstadt, +} + +\msg_new:nnnn {tudapub/thesis} {default-license-will-change} { +TUprints~changed~their~default~license.\\ +tuda-ci~will~adapt~this~change~in~the~next~major~update.~\\ +Please~choose~your~license~manually~to~avoid~unintended~changes. +} {Use~either~the~old~default~value~license=cc-by-nc-nd-2.0-de or~license=cc-by-4.0~or~license={<custom~text>}~with~\string\tuprints.} + +\cs_new:cn {g_@@_cc-by-nc-nd-2.0-de:} { + Die~Veröffentlichung~steht~unter~folgender~Creative~Commons~Lizenz:\\ + Namensnennung~--~Keine~kommerzielle~Nutzung~--~Keine~Bearbeitung~ 2.0~Deutschland\\ + \url{https://creativecommons.org/licenses/by-nc-nd/2.0/de/} +} + +\defcaptionname{ngerman, german}{\g_@@_cc_attr_by:}{Namensnennung} +\defcaptionname{ngerman, german}{\g_@@_cc_attr_nc:}{Nicht~kommerziell} +\defcaptionname{ngerman, german}{\g_@@_cc_attr_sa:}{Weitergabe~unter~gleichen~Bedingungen} +\defcaptionname{ngerman, german}{\g_@@_cc_attr_nd:}{Keine~Bearbeitungen} + +\defcaptionname{english, USenglish, american, UKenglish, british}{\g_@@_cc_attr_by:}{Attribution} +\defcaptionname{english, USenglish, american, UKenglish, british}{\g_@@_cc_attr_nc:}{NonCommercial} +\defcaptionname{english, USenglish, american, UKenglish, british}{\g_@@_cc_attr_sa:}{ShareAlike} +\defcaptionname{english, USenglish, american, UKenglish, british}{\g_@@_cc_attr_nd:}{NoDerivatives} + +\defcaptionname{ngerman,german}{\g_@@_cc_intro:}{Die~Veröffentlichung~steht~unter~folgender~Creative~Commons~Lizenz:} +\defcaptionname{english, USenglish, american, UKenglish, british}{\g_@@_cc_intro:}{This~work~is~licensed~under~a~Creative~Commons~License:} + +\defcaptionname{ngerman,german}{\g_@@_cc_sep:}{~--~} +\defcaptionname{english, USenglish, american, UKenglish, british}{\g_@@_cc_sep:}{--} + +\cs_new:Nn \g_@@_cc_license:n { + \group_begin: + \g_@@_cc_intro:\\ + \seq_set_split:Nnn \l_tmpa_seq {-} {#1} + \bool_set_false:N \l_tmpa_bool + \seq_remove_all:Nn \l_tmpa_seq {cc} + \seq_pop_right:NN \l_tmpa_seq \l_tmpa_tl + \seq_map_inline:Nn \l_tmpa_seq { + \bool_if:NTF \l_tmpa_bool {\g_@@_cc_sep:} {\bool_set_true:N \l_tmpa_bool} + \use:c {g_@@_cc_attr_##1:} + }~\l_tmpa_tl{}~International\\ + \url{https://creativecommons.org/licenses/\seq_use:Nn \l_tmpa_seq {-}/\l_tmpa_tl/} + \group_end: +} + +\newcommand{\tuprints}[1]{% + \tl_if_in:nnTF {#1} {=} + {\keys_set:nn {ptxcd/thesis} {#1}} + {\keys_set:nn {ptxcd/thesis} {printid=#1}} + \lowertitleback{ + \urlstyle{same} + \selectlanguage{german} + Bitte~zitieren~Sie~dieses~Dokument~als: + \tl_if_empty:NF \g_ptxcd_thesis_urn_tl {\\URN:~urn:nbn:de:tuda-tuprints-\g_ptxcd_thesis_urn_tl}\\ + URL:~\url{https://tuprints.ulb.tu-darmstadt.de/\g_ptxcd_thesis_tuprints_tl}\\ + \tl_if_empty:NF \g_ptxcd_thesis_doi_tl {DOI:~\url{https://doi.org/\g_ptxcd_thesis_doi_tl}\\} + \tl_if_empty:NF \g_ptxcd_thesis_publication_year_tl {Jahr~der~Veröffentlichung~auf~TUprints:~\g_ptxcd_thesis_publication_year_tl} + \par\vspace{\baselineskip} + Dieses~Dokument~wird~bereitgestellt~von~tuprints,\\ + E-Publishing-Service~der~TU~Darmstadt\\ + \url{https://tuprints.ulb.tu-darmstadt.de}\\ + \url{tuprints@ulb.tu-darmstadt.de}\\[2\baselineskip] + \tl_if_empty:NF \g_ptxcd_license_info_tl {\\[2\baselineskip]\g_ptxcd_license_info_tl} + }% +} + +\gdef\@subject{ + \text_titlecase_first:n{\tl_if_empty:NF \ptxcd_thesisStatus {\ptxcd_thesisStatus{}~}\ptxcd_thesisType}~ + \tl_if_empty:NF \ptxcd_in_department {\ptxcd_in_department{}~} + \seq_if_empty:NF \g_ptxcd_author_seq {\ptxcd_byname\nobreakspace\@author} + \tl_if_empty:NF \ptxcd_birthplace {\space\ptxcd_fromname\space\ptxcd_birthplace} + \tl_if_empty:NF \l_ptxcd_studentID_tl {\space\ptxcd_insert_studentID:n {\l_ptxcd_studentID_tl}} +} + +\uppertitleback{ + \liningnums + \raggedright + \@title\par\@subtitle + \par\vspace*{\baselineskip} +% ignore birthplace on english subject + \let\ptxcd_birthplace\@empty + \@subject + \bool_if:NT \g_@@_reviewer_on_uppertitleback_bool + \ptxcd_thesis_print_reviewer: + \exp_args:Nx \tl_if_empty:nF {\@date\ptxcd_submissiondate}{ + \par\vspace*{\baselineskip} + \ptxcd_thesis_print_dates:n {\\} + } + \tl_if_empty:NF \@publishers { + \par\vspace*{\baselineskip} + \@publishers + } +} + +%%Studienbereich (field of study): +%%ce - Computational Engineering +%%ese - Energy Science and Engineering +%%ist - Informationssystemtechnik +%%mech - Mechanik +%%metro - Mechatronik +% +%{ce}{Computational~Engineering}{Computational~Engineering} +%{ese}{Energy~Science~and~Engineering}{Energy~Science~and~Engineering} +%{ist}{Information~Systems~Engineering}{Information~Systems~Engineering} +%{mech}{Mechanics}{Mechanics} +%{metro}{Mechatronics}{Mechatronics} + +\defcaptionname{english}{\researchgroupname}{research group} +\defcaptionname{ngerman, german}{\researchgroupname}{Fachgebiet} +\defcaptionname{english}{\institutename}{institute} +\defcaptionname{ngerman, german}{\istitutename}{Institut} + +\renewcommand{\titlepagestyle}{title.TUDa} + +\box_new:N \g_ptxcd_thesis_institution_box + +%% The following macro is an adapted version of the corresponding KOMA-Script macro +%% Copyright (c) 1994-2019 Markus Kohm [komascript at gmx info] +\renewcommand*{\maketitle}[1][1]{ + \bool_if:NF \g_ptxcd_ignore_title_language_bool { + \bool_set_false:N \l_tmpa_bool + \clist_map_inline:nn {english, british, ngerman, german} { + \iflanguage{##1} + {\bool_set_true:N \l_tmpa_bool + \clist_map_break:}{} + } + \bool_if:NF \l_tmpa_bool { + \msg_error:nnx{tudapub/thesis} {unsupported-title-language} {\languagename} + } + } + \exp_args:NV \ptxcd_select_department:n \g_ptxcd_department_choice_tl + \clist_map_inline:nn {author, date} { + \ptxcd_check_title_data:cn {@##1} {##1} + } + \clist_map_inline:nn {examdate, birthplace, group, department, institution} { + \ptxcd_check_title_data:cn {TUDa@##1} {##1} + } + \cs_if_exist_use:N \ptxcd_pass_TitleData: + \edef\titlepage@restore{% + \noexpand\endgroup + \noexpand\global\noexpand\@colht\the\@colht + \noexpand\global\noexpand\@colroom\the\@colroom + \noexpand\global\vsize\the\vsize + \noexpand\global\noexpand\@titlepageiscoverpagefalse + \noexpand\let\noexpand\titlepage@restore\noexpand\relax + }% + \ptxcd_disable_marginpar: + \cleardoublepage + \begin{titlepage} + \setcounter{page}{% + #1% + }% + \def\thefootnote{\fnsymbol{footnote}} + \if@titlepageiscoverpage + \begingroup + \topmargin=\dimexpr \coverpagetopmargin-1in\relax + \oddsidemargin=\dimexpr \coverpageleftmargin-1in\relax + \evensidemargin=\dimexpr \coverpageleftmargin-1in\relax + \textwidth=\dimexpr + \paperwidth-\coverpageleftmargin-\coverpagerightmargin\relax + \textheight=\dimexpr + \paperheight-\coverpagetopmargin-\coverpagebottommargin\relax + \headheight=0pt + \headsep=0pt + \footskip=\baselineskip + \@colht=\textheight + \@colroom=\textheight + \vsize=\textheight + \columnwidth=\textwidth + \hsize=\columnwidth + \linewidth=\hsize + \else + \let\titlepage@restore\relax + \fi + \setparsizes{\z@}{\z@}{\z@\@plus 1fil}\par@updaterelative + \ptxcd_setup_sponsor_box: + \hbox_gset:Nn \g_ptxcd_title_box { + \parbox[t]{\linewidth}{ + \begin{minipage}[b]{\bool_if:NT \g_@@_logo_head_bool {.75}\linewidth} + \bool_lazy_and:nnT {\g_ptxcd_colorback_bool} {\g_ptxcd_colorbacktitle_bool} {\color{textonaccentcolor}} + \tl_if_empty:NF \@titlehead { + \begin{addmargin}{3mm} + {\usekomafont{titlehead}{\@titlehead\par}} + \end{addmargin} + } + \begin{addmargin}[\dim_eval:n {\box_if_empty:NF \g_ptxcd_PaperID_box {\box_wd:N\g_ptxcd_PaperID_box+.5\c_ptxcd_logoheight_dim} +3mm}]{3mm} + \raggedright + \leavevmode\usekomafont{title} + \expandafter\fontsize\ptxcd_title_fontsize: + \selectfont + \llap{\raisebox{\dimexpr-\height+.5\baselineskip}[0pt][0pt]{\box_use:N \g_ptxcd_PaperID_box}\hspace{.5\c_ptxcd_logoheight_dim}} + \@title\strut + \par + \box_if_empty:NTF \g_ptxcd_PaperID_box + {\vskip0pt} + {\rule{0pt}{.5\c_ptxcd_logoheight_dim}} + \end{addmargin} + \end{minipage}% + \bool_if:NT \g_ptxcd_colorbacksubtitle_bool {\color{textonaccentcolor}} + \par\nointerlineskip + \rule{\linewidth}{\g_ptxcd_titlerule_dim}\par\vspace{\c_ptxcd_rulesep_dim} + \begin{addmargin}{3mm} + \usekomafont{titleinfo} + \raggedright + \expandafter\fontsize\ptxcd_titleinfo_fontsize: + \selectfont + {\ifx\@subtitle\@empty\else\usekomafont{subtitle}{\@subtitle\par}\fi}% + \usekomafont{subject} + \bool_if:NT \g_ptxcd_dr_bool {\selectlanguage{german}} + \tl_if_empty:NF \g_ptxcd_titleintro_tl {\g_ptxcd_titleintro_tl\par} + \tl_if_empty:NF \g_ptxcd_thesis_drtext_tl {\g_ptxcd_thesis_drtext_tl\par} + {% + \usekomafont{author} + \lineskip 0.75em + \@subject + \par + }% + {\usekomafont{date}{\ptxcd_thesis_print_dates:n {,~}\par}}% + \ptxcd_thesis_print_reviewer:\par + {\usekomafont{publishers}{\@publishers \par}}% + \tl_if_empty:NF \g_ptxcd_titleaddendum_tl {\g_ptxcd_titleaddendum_tl\par} + \end{addmargin} + \tl_if_empty:NF \@thanks { + \expandafter\fontsize\ptxcd_titlethanks_fontsize:\selectfont\par + \rule{\linewidth}{\g_ptxcd_titlerule_dim}\par + \begin{addmargin}{3mm} + \let\footnotetext\ptxcd_title@footnote + \@thanks + \end{addmargin} + \par\vspace{-\dp\strutbox} + } + \normalcolor + \rule{\linewidth}{\g_ptxcd_titlerule_dim}\par + } + } + \let\@thanks\@empty + \bool_if:NF \g_ptxcd_manual_info_box_bool { + \exp_args:Nf \tl_if_empty:nF {\ptxcd_institution\ptxcd_department:\ptxcd_institute\ptxcd_group} { + \addTitleBox{ + \setlength{\parskip}{\c_ptxcd_rulesep_dim} + \tl_if_empty:NF \ptxcd_institution {\ptxcd_institution\par} + \tl_if_empty:NF \ptxcd_box_department {\ptxcd_box_department\par} + \tl_if_empty:NF \ptxcd_institute {\ptxcd_institute\par} + \tl_if_empty:NF \ptxcd_group {\ptxcd_group} + }} + } + \ptxcd_adjust_titlepage_style: + \thispagestyle{title.TUDa} + \nointerlineskip\box_use:N \g_ptxcd_title_box + \par + \vfill + \box_if_empty:NTF \g_ptxcd_sponsor_box { + \raisebox{-\c_ptxcd_rulesep_dim}[0pt][0pt]{\rule{\linewidth}{\g_ptxcd_titlerule_dim}} + }{ + \box_use:N \g_ptxcd_sponsor_box + } + \if@twoside + \@tempswatrue + \expandafter\ifnum \@nameuse{scr@v@3.12}>\scr@compatibility\relax + \else + \ifx\@uppertitleback\@empty + \ifx\@lowertitleback\@empty + \@tempswafalse + \fi + \fi + \fi + \else + \exp_args:Nf \tl_if_empty:nTF {\g_ptxcd_thesis_urn_tl\g_ptxcd_thesis_tuprints_tl} + {\@tempswafalse} + {\@tempswatrue} + \fi + \if@tempswa + \next@tpage + \begin{minipage}[t]{\textwidth} + \@uppertitleback + \end{minipage}\par + \vfill + \begin{minipage}[b]{\textwidth} + \@lowertitleback + \end{minipage}\par + \@thanks\let\@thanks\@empty + \fi + \ifx\@dedication\@empty + \else + \next@tdpage\null\vfill + {\centering\usekomafont{dedication}{\@dedication \par}}% + \vskip \z@ \@plus3fill + \@thanks\let\@thanks\@empty + \cleardoubleemptypage + \fi + \ifx\titlepage@restore\relax\else\clearpage\titlepage@restore\fi + \end{titlepage} + \setcounter{footnote}{0}% + \global\let\and\relax + \cleardoublepage + \ptxcd_restore_typearea: + \aftergroup\ptxcd_restore_typearea: +} + +\newcommand*{\@ThesisType}{\ptxcd_thesisType} + +\bool_if:NTF \g_ptxcd_dr_bool { + \keys_define:nn {ptxcd/thesis} { + affidavit .choices:nn = {dr}{\tl_gset_eq:NN \g_@@_affidavit_version_tl \l_keys_choice_tl}, + affidavit / default .meta:n = {affidavit=dr}, + affidavit .initial:n = dr, + } +} { + \keys_define:nn {ptxcd/thesis} { + affidavit .choices:nn = {digital,print}{\tl_gset_eq:NN \g_@@_affidavit_version_tl \l_keys_choice_tl}, + affidavit / default .meta:n = {affidavit=digital}, + affidavit / hide-architecture-note .meta:n = {hide-architecture-note}, + affidavit .initial:n = default, + } +} +\NewDocumentCommand{\affidavit}{so}{% + \IfNoValueF {#2} {% + \tl_if_in:nnTF {#2} {=} + {\keys_set:nn {ptxcd/thesis} {#2}} + {\keys_set:nn {ptxcd/thesis} {affidavit=#2}}% + }% + \clearpage + \begin{otherlanguage}{german} + \bool_if:NTF \g_ptxcd_dr_bool { + \g_@@_affidavit_dr_tl + } { + \tl_use:c {g_@@_affidavit_\g_@@_affidavit_version_tl _tl} + } + \par + \bigskip + \AffidavitSignature + \end{otherlanguage} + \IfBooleanF{#1}{\clearpage} +} + +\ExplSyntaxOff + +\expandafter\def\csname g_@@_affidavit_dr_tl\endcsname {% + \section*{Erklärungen laut Promotionsordnung} + \subsection*{\S\,8 Abs. 1 lit. d PromO} + Ich versichere hiermit, dass zu einem vorherigen Zeitpunkt noch keine Promotion versucht wurde. In diesem Fall sind nähere Angaben über Zeitpunkt, Hochschule, Dissertationsthema und Ergebnis dieses Versuchs mitzuteilen. + + \subsection*{\S\,9 Abs. 1 PromO} + Ich versichere hiermit, dass die vorliegende Dissertation – abgesehen von den in ihr ausdrücklich genannten Hilfen – selbstständig verfasst wurde und dass die „Grundsätze zur Sicherung guter wissenschaftlicher Praxis an der Technischen Universität Darmstadt“ und die „Leitlinien zum Umgang mit digitalen Forschungsdaten an der TU Darmstadt“ in den jeweils aktuellen Versionen bei der Verfassung der Dissertation beachtet wurden. + + \subsection*{\S\,9 Abs. 2 PromO} + Die Arbeit hat bisher noch nicht zu Prüfungszwecken gedient. +} + +%% Quelle: https://www.tu-darmstadt.de/studieren/studierende_tu/studienorganisation_und_tucan/hilfe_und_faq/artikel_details_de_en_37824.de.jsp +\expandafter\def\csname g_@@_affidavit_digital_tl\endcsname {% + \subsection*{Erklärung zur Abschlussarbeit gemäß \S\,22~Abs.~7~APB TU~Darmstadt} + \begin{sloppypar}% + Hiermit erkläre ich, \@author, dass ich die vorliegende Arbeit gemäß \S\,22~Abs.~7~APB der TU Darmstadt selbstständig, ohne Hilfe Dritter und nur mit den angegebenen Quellen und Hilfsmitteln angefertigt habe. + Ich habe mit Ausnahme der zitierten Literatur und anderer in der Arbeit genannter Quellen keine fremden Hilfsmittel benutzt. Die von mir bei der Anfertigung dieser wissenschaftlichen Arbeit wörtlich oder inhaltlich benutzte Literatur und alle anderen Quellen habe ich im Text deutlich gekennzeichnet und gesondert aufgeführt. Dies gilt auch für Quellen oder Hilfsmittel aus dem Internet. + \end{sloppypar}% + \par + Diese Arbeit hat in gleicher oder ähnlicher Form noch keiner Prüfungsbehörde vorgelegen. + \par + Mir ist bekannt, dass im Falle eines Plagiats (\S\,38~Abs.~2 ~APB) ein Täuschungsversuch vorliegt, der dazu führt, dass die Arbeit mit 5,0 bewertet und damit ein Prüfungsversuch verbraucht wird. Abschlussarbeiten dürfen nur einmal wiederholt werden. + \csname bool_if:cT\endcsname {g_@@_architecture_note_bool} {% + \par + Bei einer Thesis des Fachbereichs Architektur entspricht die eingereichte elektronische Fassung dem vorgestellten Modell und den vorgelegten Plänen. + } +} + +\ExplSyntaxOn + +\cs_set_eq:NN \g_@@_affidavit_print_tl \g_@@_affidavit_digital_tl + +\NewDocumentEnvironment{affidavit*}{om}{ + \IfNoValueF {#1} {\begin{otherlanguage}{#1}} + \section*{#2} + }{ + \IfNoValueF {#1} {\end{otherlanguage}} +} + +\NewDocumentCommand{\AffidavitSignature}{o}{ + \par + \begingroup + \IfNoValueF {#1} {% + \tl_if_in:nnTF {#1} {=} + {\keys_set:nn {ptxcd/thesis} {#1}} + {\keys_set:nn {ptxcd/thesis} {signature-location=#1}}% + }% + \tl_if_empty:NT \l_ptxcd_signature_image_tl {\bigskip} + \noindent \l_ptxcd_signature_location_tl,~ \ptxcd_submissiondate\hfill + \SignatureBox{\l_ptxcd_signature_tl} + \endgroup + \\\strut +} + +\newcommand*{\SignatureBox}[2][5cm]{\parbox[t]{#1}{\centering + \tl_if_empty:NF \l_ptxcd_signature_image_tl + {\let\width\linewidth\l_ptxcd_signature_image_tl\par\nointerlineskip} + \rule{\linewidth}{.3pt}\\\makebox[0pt][c]{#2}} +} + +% messages: +\msg_new:nnn{tudapub/thesis} {dr-field-only} { + You~submitted~#1~data~for~title~information.\\ + This~field~is~only~used~for~type=dr/drfinal.\\ + It~will~be~ignored. +} + +\msg_new:nnn{tudapub/thesis} {unrecognized-department} { + I~can't~recognize~your~department~#1.\\ + I~will~use~the~string~'#1'~directly.\\ + Ensure~your~department~has~to~shortcut.\\ + See~tudathesis~documentation~for~further~details. +} + +\msg_new:nnnn{tudapub/thesis} {unsupported-title-language} { + You~chose~an~unsupported~language~"#1".\\ + \string\maketitle\ ~ist~not~configured~for~this~language. +}{ + You~can~manually~configure~it,~as~described~in~tudathesis~documentation.\\ + Use~"ignore-title-language"~Option~to~ignore~this~message~at~your~own~risk. +} + +\PassOptionsToPackage{german}{babel} +\AtBeginDocument{ + \@ifpackageloaded{babel}{}{ + \msg_new:nnnn{tudapub/thesis} {missing-babel} { + The~babel~package~is~not~loaded.\\ + Please~load~babel~with~option\\ + main=<main~language~of~your~document>\\ + to~ensure~correct~hyphenation. + }{ + I~will~use~a~workaround~(redefine~\string\otherlanguagen)~to~be~able~to~compile,~but~can't~configure~hyphenation~correctly. + } + \msg_warning:nn {tudapub/thesis} {missing-babel} + \renewenvironment{otherlanguage}[1]{}{} + } +} + +% Fallback mechanism for older l3 kernels +\cs_if_exist:NF \text_titlecase:n { + \cs_set_eq:NN \text_titlecase:n \tl_mixed_case:n +} + +\seq_new:N \g_ptxcd_reviewer_name_seq +\NewDocumentCommand{\setupReviewName}{som}{ + \IfBooleanTF {#1} { + \clist_map_inline:nn {#3} { + \int_incr:N \l_tmpb_int + \cs_set:cn {_@@_reviewname_\int_use:N \l_tmpb_int :} {##1} + } + } { + \IfNoValueTF {#2} { + \cs_set:Npn \ptxcd_reviewname {#3} + } { + \ifnum #2 > 0 + \cs_set:cn {_@@_reviewname_#2:} + {#3} + \fi + } + } +} +% \end{macrocode} +% \iffalse +%</tudathesis> +% \fi +% \Finale +\endinput diff --git a/Master/texmf-dist/source/latex/tuda-ci/tuda-ci.ins b/Master/texmf-dist/source/latex/tuda-ci/tuda-ci.ins new file mode 100644 index 00000000000..3d38237dbdf --- /dev/null +++ b/Master/texmf-dist/source/latex/tuda-ci/tuda-ci.ins @@ -0,0 +1,242 @@ +%% This is file `tuda-ci.ins' version 4.00 (2025-01-26), +%% it is part of +%% 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! +%% +%% +%% ========================================== +%% + +\input docstrip.tex +\keepsilent + +\usedir{tex/latex/tuda-ci} + +\let\orig@ds@heading\ds@heading +\let\ds@heading\@empty +\declarepreamble\tudatop +it is part of +TUDa-CI -- Corporate Design for TU Darmstadt + +---------------------------------------------------------------------------- + + Copyright (C) 2018--2025 by Marei Peischl <marei@peitex.de> + +============================================================================ +\endpreamble +\declarepreamble\tudabottom +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! + +============================================================================ + +\endpreamble +\ExplSyntaxOn +\tl_replace_once:Nnn \tudatop{\ReferenceLines} {^^J} +\tl_replace_once:Nnn \tudabottom {\ReferenceLines} {^^J} +\ExplSyntaxOff + +\let\ds@heading\orig@ds@heading +\declarepreamble\tudadefault\tudatop\tudabottom +\endpreamble + +\usepreamble\tudadefault + +\askforoverwritefalse + +\generate{ + %tudabeamer + \file{tudabeamer.cls}{ + \from{tudabeamer.dtx}{class,initialize,options} + \from{tuda-ci.dtx}{options,tudabeamer,beamer} + \from{tudabeamer.dtx}{class,body} + } + %tudapub + \file{tudapub.cls}{\from{tuda-ci.dtx}{class,tudapub,pdfa,options}} +} + +\generate{% + \file{tudaexercise.cls}{% + \from{tudaexercise.dtx}{class,initialization}% + \from{tuda-ci.dtx}{options,exercise,print}% + \from{tudaexercise.dtx}{class,center}% + \from{tuda-ci.dtx}{margin,geometry,exercise}% + \from{tudaexercise.dtx}{class,body} + }% +} +\generate{\file{tudaleaflet.cls}{% + \from{tudaleaflet.dtx}{class,initialization}% + \from{tuda-ci.dtx}{options,leaflet,print}% + \from{tudaleaflet.dtx}{class,body}% + }% +} +\generate{\file{tudaletter.cls}{% + \from{tudaletter.dtx}{class,initialization}% + \from{tuda-ci.dtx}{options,letter,print,process-options,pdfa}% + \from{tudaletter.dtx}{class,packages}% + \from{tuda-ci.dtx}{pdfx}% + \from{tudaletter.dtx}{class,body}% + \from{tuda-ci.dtx}{xmpdata}% + }% +} +\generate{\file{tudasciposter.cls}{% + \from{tudasciposter.dtx}{class,initialization}% + \from{tuda-ci.dtx}{options,sciposter,print,pdfa}% + \from{tudasciposter.dtx}{class,packages}% + \from{tuda-ci.dtx}{pdfx}% + \from{tudasciposter.dtx}{class,body}% + \from{tuda-ci.dtx}{xmpdata}% + }% +} +\generate{\file{tudaposter.cls}{% + \from{tudaposter.dtx}{class,initialization}% + \from{tuda-ci.dtx}{options,poster,print}% + \from{tudaposter.dtx}{class,body}% + }% +} +\generate{ + \file{beamerouterthemeTUDa.sty}{ + \from{beamerouterthemeTUDa.dtx}{package,initialize,main} + \from{tuda-ci.dtx}{options,beamer-outer} + \from{beamerouterthemeTUDa.dtx}{package,main,body} + } + \file{tudathesis.cfg}{\from{tuda-ci.dtx}{cfg,tudathesis}} + \file{tudacolors.sty}{\from{tudacolors.dtx}{package}} + \file{tudafonts.sty}{\from{tudafonts.dtx}{package}} + \file{tudarules.sty}{\from{tudarules.dtx}{package}} +} +\generate{ +% tudabeamer + \file{beamerthemeTUDa.sty}{\from{tudabeamer.dtx}{package,main,initialize,body,options}} + \file{beamerthemeTUDa2008.sty}{\from{tudabeamer.dtx}{package,2008,initialize,body,options}} + \file{beamerthemeTUDa2023.sty}{\from{tudabeamer.dtx}{package,2023,initialize,body,options}} +% beamer font theme + \file{beamerfontthemeTUDa.sty}{\from{beamerfontthemeTUDa.dtx}{package,main}} + \file{beamerfontthemeTUDa2008.sty}{\from{beamerfontthemeTUDa.dtx}{package,2008}} +% beamer color theme + \file{beamercolorthemeTUDa.sty}{\from{beamercolorthemeTUDa.dtx}{package,main}} + \file{beamercolorthemeTUDa2008.sty}{\from{beamercolorthemeTUDa.dtx}{package,2008}} +% \file{beamerouterthemeTUDa2008.sty}{\from{beamerouterthemeTUDa.dtx}{package,2008}} + \file{beamerouterthemeTUDa2008.sty}{% + \from{beamerouterthemeTUDa.dtx}{package,initialize,2008}% + \from{tuda-ci.dtx}{options,beamer-outer}% + \from{beamerouterthemeTUDa.dtx}{package,2008,body}% + \from{beamerthemeTUDa2008.dtx}{outer}% + }% +% beamer inner theme + \file{beamerinnerthemeTUDa.sty}{\from{beamerinnerthemeTUDa.dtx}{package,main}} + \file{beamerinnerthemeTUDa2008.sty}{\from{beamerinnerthemeTUDa.dtx}{package,2008}} + \file{beamerinnerthemeTUDa2023.sty}{\from{beamerinnerthemeTUDa.dtx}{package,2023}} +} + +\declarepreamble\tudakomasize +it is part of +TUDa-CI -- Corporate Design for TU Darmstadt + +---------------------------------------------------------------------------- + + Copyright (C) 2018--2025 by Marei Peischl <marei@peitex.de> + +============================================================================ + +The source file includes parts of the files scrkernel-fonts.dtx and scrkernel-paragraphs.dtx +Copyright (c) 1994--2024 Markus Kohm [komascript at gmx info] +which are part of the KOMA-Script bundle. + +The files were modified 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! + +============================================================================ + +\endpreamble + +\generate{% + \file{tudasize9pt.clo}{\from{tudasize.dtx}{scrsize,9pt}}% + \file{tudalettersize10pt.clo}{\from{tudasize.dtx}{scrsize,tudaletter}}% +}% + +\usepreamble\tudadefault + +\ExplSyntaxOn +\int_new:N \g_ptxcd_count_int + +% redefine module replacement to allow custom replacements for paper size +\str_new:N \l_ptxcd__tmpa_str +\str_new:N \l_@@_customize_ins_str +\cs_set_eq:NN \_@@_customize_ins_prepareActiveModule:n \prepareActiveModule +\cs_set:Npn \prepareActiveModule#1{ + \_@@_customize_ins_prepareActiveModule:n {#1}% + \tl_put_left:Nn \replaceModuleInLine{ + \str_set:NV \l_ptxcd__tmpa_str \inLine + \exp_args:NNxx \str_replace_all:Nnn \l_ptxcd__tmpa_str {\tl_to_str:V \l_@@_customize_ins_str} {\use:c {\l_@@_customize_ins_str}} + \tl_set_rescan:NnV \inLine {} \l_ptxcd__tmpa_str + \int_gzero:N \g_ptxcd_count_int + } +} + + +\str_set:Nx \l_@@_customize_ins_str {\string\@@tudasizepaper@@\space} + +\cs_set:Npn \generateTUDaPaperFiles #1 { + \str_set:Nx \l_@@_customize_ins_str {\string\@@tudasizepaper@@\space} + \clist_map_inline:nn {#1} { + \generate{ + \tl_set:cn {\str_use:N \l_@@_customize_ins_str} {##1} + \file{tuda-##1paper.clo}{\from{tudasize.dtx}{##1,tudasize}} + } + } +} +\ExplSyntaxOff +\generateTUDaPaperFiles {a0,a1,a2,a3,a4,a5} + +\endbatchfile diff --git a/Master/texmf-dist/source/latex/tuda-ci/tudabeamer.dtx b/Master/texmf-dist/source/latex/tuda-ci/tudabeamer.dtx new file mode 100644 index 00000000000..2d9e49ff188 --- /dev/null +++ b/Master/texmf-dist/source/latex/tuda-ci/tudabeamer.dtx @@ -0,0 +1,327 @@ +% \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{tudabeamer.dtx}[2025-01-26 v4.00 Beamer slides using the corporate design of TU Darmstadt] +\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> +%<*initialize> +%<@@=ptxcd> +%<package|class>\NeedsTeXFormat{LaTeX2e}[2022/06/01] +%<class>\ProvidesClass{tudabeamer} +%<*class> + [2025-01-26 v4.00 Beamer wrapper class for TUDa-CI – Corporate Design Templates for TU Darmstadt] +%</class> +%<main>\ProvidesExplPackage{beamerthemeTUDa}{2025-01-26}{4.00}{Beamer theme using the Corporate Design of TU Darmstadt} +%<2023>\ProvidesExplPackage{beamerthemeTUDa2023}{2025-01-26}{4.00}{Beamer theme using the Corporate Design of TU Darmstadt Design of 2023} +%<2008>\ProvidesPackage{beamerthemeTUDa2008}[2025-01-26 v4.00 beamer theme using the Corporate Design of TU Darmstadt Design of 2008] +%</initialize> +%<*driver>^^A Preparation for real docstrip documentation +\providecommand*{\TUDaDocDTXfiles}{tudabeamer.dtx} +\input{tuda-ci.dtx} +%</driver> +% \fi +% +% \changes{v4.00}{2025-01-26}{Converted to DTX file} +% +% \DoNotIndex{\newcommand,\newenvironment} +% +% \GetFileInfo{tudabeamer.dtx} +% \title{The \textsf{tudabeamer} package} +% \author{Marei Peischl\thanks{Email: \href{mailto:tuda-ci@peitex.de}{tuda-ci@peitex.de}}} +% \date{\fileversion~from \filedate} +% +% \maketitle +% +% \MaybeStop{} +% +% \section{Implementation} +% +% \iffalse +%<*initialize> +%<*class> +% \fi +% \begin{macrocode} +\PassOptionsToClass{10pt}{beamer} +\ExplSyntaxOn +\str_new:N \g_ptxcd_department_str +\str_const:Nn \c_@@_base_str {beamer} +% \end{macrocode} +% \iffalse +%</class> +%<main>\tl_if_exist:NF \g_@@_design_tl { +%<*main|class> +% \fi +% \begin{macrocode} + \tl_new:N \g_@@_design_tl +% \end{macrocode} +% 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. +% The theme in the end will either do something or send a warning message. +% \changes{v4.00}{2025-01-26}{Refactor all beamer options to fix passing issues.} +% \begin{macrocode} + \cs_new:Nn \_@@_beamer_declare_pass_options:nn { + \keys_define:nn {ptxcd/beamer} { + #1 .code:n = \clist_map_inline:nn {#2}{ + \PassOptionsToPackage{#1=##1}{beamer####1themeTUDa2008} + \PassOptionsToPackage{#1=##1}{beamer####1themeTUDa} + }, + #1 .default:n = true, + } + } + + \_@@_beamer_declare_pass_options:nn {centerframetitle} {outer} + \_@@_beamer_declare_pass_options:nn {headsepline} {outer} + \_@@_beamer_declare_pass_options:nn {logo} {outer} + \_@@_beamer_declare_pass_options:nn {colortitle} {color} + \_@@_beamer_declare_pass_options:nn {colorbacktitle} {color} + \_@@_beamer_declare_pass_options:nn {colorback} {color} + \_@@_beamer_declare_pass_options:nn {colorframetitle} {outer, color} +% \iffalse +%<main>} +% \fi + +\keys_define:nn {ptxcd/beamer} { + accentcolor .code:n = \PassOptionsToPackage{accentcolor=#1}{tudacolors}, +% \end{macrocode} +% \iffalse +%</main|class> +%<*options> +%<*class> +% \fi +% \begin{macrocode} + color .code:n = { + \tl_if_in:nnTF {#1} {=} { + \msg_new:nnn {tudabeamer} {color-option-warning} { + The~color~option~should~no~longer~be~used~to~pass~options~to~the~tudacolors~package.\\ + Please~use~tudacolors={##1}~instead~of~color={##1}.\\ + See~the~tudabeamer~documentation~for~more~information. + } + \msg_warning:nnn {tudabeamer} {color-option-warning} {#1} + \PassOptionsToPackage{#1}{tudacolors} + } { + \PassOptionsToPackage{color=#1}{tudacolors} + } + }, + tudacolors .code:n = \PassOptionsToPackage{#1}{tudacolors}, +% \end{macrocode} +% \iffalse +%</class> +%<*!(2023|2008)> +% \fi +% \begin{macrocode} + 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 / default .code:n = { + \tl_gset:Nn \g_@@_design_tl {default} + }, + design .initial:n = default, + design2023 .meta:n = {design=2023}, + design2008 .meta:n = {design=2008}, + design .usage:n = load, +%<main>} +% \end{macrocode} +% \iffalse +%</!(2023|2008)> +% \fi +% +% +% \iffalse +%</options> +%</initialize> +%<*body> +%<*class> +% \fi +% \begin{macrocode} +\ExplSyntaxOff +\PassOptionsToPackage{ + hidelinks, + unicode, + pdfpagelabels=false, + plainpages=false, + pdfcreator=LaTeX using the TUDa-CI Bundle, +}{hyperref} +\PassOptionsToClass{t}{beamer} +\DeclareOption*{% + \PassOptionsToClass{\CurrentOption}{beamer} +} +%</class> +%<main|class|wrapper>\ProcessKeyOptions[ptxcd/beamer] +%<*class> +\ProcessOptions* +\ExplSyntaxOn +\tl_if_eq:NnT \g_@@_design_tl {default} { + \msg_new:nnn {tudabeamer} {default-design-changed} { + With~version~4.0~tudabeamer~switched~to~the~new~corporate~design~layout.\\ + In~case~this~is~not~intended,~it's~possible~switch~back~using~`design=2008`~option.\\ + `design=2023`~will~disable~this~warning. + } + \msg_warning:nn {tudabeamer} {default-design-changed} + \keys_set:nn {ptxcd/beamer} {design=2023} +} +\ExplSyntaxOff +\LoadClass{beamer} +\ExplSyntaxOn +% +% \begin{macro}{\department} +% \department command +% \begin{macrocode} +\def\department{\@dblarg\ptxcd_beamer_department} +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\ptxcd} +% \begin{macrocode} +\long\def\ptxcd_beamer_department[#1]#2{% + \def\beamer@temp{#2}% + \ifx\beamer@temp\@empty + \def\insertdepartment{} + \else + \def\insertdepartment{\def\inst{\beamer@instinst}\def\and{\qquad}#2}% + \fi + \def\beamer@shortdepartment{#1}} +\department{} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\insertshortdepartment} +% \begin{macrocode} +\newcommand\insertshortdepartment[1][]{% + {% + \let\thanks=\@gobble% + \beamer@setupshort{#1}% + \beamer@insertshort{\beamer@shortdepartment}% + }% +} +% \end{macrocode} +% end of \department command +% \changes{v4.00}{2025-01-26}{remove pdfa option} +% \end{macro} +\str_if_empty:NF \g_ptxcd_department_str {} +% \end{macrocode} +% Load the TUDa theme +% \begin{macrocode} +\usetheme{TUDa\g_@@_design_tl}% +\let\accentfont\normalfont% +\file_if_exist:nTF {\g_@@_config_prefix_tl beamerthemeTUDa-\g_ptxcd_department_str.sty} + {\RequirePackage{\g_@@_config_prefix_tl beamerthemeTUDa-\g_ptxcd_department_str}} + { + \file_if_exist:nT {beamerthemeTUDa-\g_ptxcd_department_str.sty} + {\RequirePackage{beamerthemeTUDa-\g_ptxcd_department_str}} + } +\ExplSyntaxOff +% \end{macrocode} +% \iffalse +%</class> +% \fi +% +% \iffalse +%<*package> +% \fi +% \iffalse +%<*main> +% \fi +% \begin{macrocode} +\RequirePackageWithOptions{beamerthemeTUDa\g_@@_design_tl} +% \end{macrocode} +% \iffalse +%</main> +% \fi +% \subsection{Design specific options} +% The design for 2023 removed a lot of options as the accentcolor is no longer used within the frames. +% \iffalse +%<*2023> +% \fi +% \begin{macrocode} +\msg_new:nnn {tudabeamer} {option-removed} { + The~design~you~selected~doesn't~support~the~option~`#1`.\\ + It~will~be~ignored. +} +% \end{macrocode} +% \iffalse +%</2023> +%</package> +%<*options> +% \fi +% \begin{macrocode} +%<2008>\ExplSyntaxOn +%<2008|2023>\ProcessKeyOptions[ptxcd/beamer] +%</options> +%<*package> +\mode<presentation> +%<2008>\ExplSyntaxOff +% \end{macrocode} +% \subsection{Design 2023} +% \iffalse +%<*2023> +% \fi +% \begin{macrocode} +\usefonttheme{TUDa} +\usecolortheme{TUDa} +\useoutertheme{TUDa} +\useinnertheme[design=2023]{TUDa} +% \end{macrocode} +% \iffalse +%</2023> +% \fi +% \subsection{Design 2008} +% \iffalse +%<*2008> +% \fi +% \begin{macrocode} +\usefonttheme{TUDa2008} +\usecolortheme{TUDa2008} +\useoutertheme{TUDa2008} +\useinnertheme[design=2008]{TUDa} +% \end{macrocode} +% \iffalse +%</2008> +% \fi +% \begin{macrocode} +\setbeamertemplate{navigation symbols}{} +\mode<all> +% \end{macrocode} +% \iffalse +%</package> +%</body> +% \fi +% \Finale +% \fi^^A No documentation on this +\endinput diff --git a/Master/texmf-dist/source/latex/tuda-ci/tudacolors.dtx b/Master/texmf-dist/source/latex/tuda-ci/tudacolors.dtx new file mode 100644 index 00000000000..757516dd528 --- /dev/null +++ b/Master/texmf-dist/source/latex/tuda-ci/tudacolors.dtx @@ -0,0 +1,277 @@ +% \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 +%<*driver> +\ProvidesFile{tudacolors.dtx} + [2025-01-26 v4.00 Color definition for TU Darmstadt's tuda-ci bundle] +%</driver> +%<*package> +%<@@=ptxcd> +\NeedsTeXFormat{LaTeX2e}[2020-10-01] +\ProvidesExplPackage{tudacolors}{2025-01-26}{4.00}{Color definition for TU Darmstadt's tuda-ci bundle} +%</package> +%<*driver> +\providecommand*{\TUDaDocDTXfiles}{tudacolors.dtx} +\input{tuda-ci.dtx} +%</driver> +% \fi +% \chapter{\pkg{tudacolors} –– Color definitions} +% \label{sec:color} +% The \pkg{tudacolors} package provides the general color definitions necessary for the TUDa-CI Templates. +% It defines the colors according to the design guideline \cite{TUDaGuideline}. +% The definitions are using the \pkg{xcolor} package \cite{xcolor}. +% Additionally the \option{mecheng} specific colors (see \autoref{sec:mecheng-color}) but the additional colors used by the new \cls{tudabeamer} layout are provided directly in the color theme. +% This is because right now these colors are only defined in RGB mode and should not be used in documents using CMYK colors. +% +% The colors can be used like within standard \LaTeX. +% The predefined TUDa-CI specific colors are: +% +% \begin{multicols}{4} +% \raggedright +% \renewcommand*{\definecolor}[3]{\makebox[5em]{#1}\textcolor{#1}{\rule{1cm}{\ht\strutbox}}\par} +% \input{tudacolors.def} +% \end{multicols} +% +% \pkg{tudacolors} provides package options to allow color selection or the color mode. +% Since \pkg{tudacolors} is usually not loaded directly but indirectly using one of the TUDa-CI document classes, the options can be added as class options, as described in \autoref{sec:options}. +% They will be passed to the package. +% \begin{implementation} +% \section{Implementation} +% +% \iffalse +%<*package> +% \fi +% \begin{macrocode} +\str_if_exist:NF \g_ptxcd_department_str { + \str_new:N \g_ptxcd_department_str + \str_gset:Nn \g_ptxcd_department_str {default} +} +\keys_define:nn {ptxcd/colors} { +% \end{macrocode} +% \end{implementation} +% +% \begin{documentation} +% \DescribeKeyOption{accentcolor=\meta{Color}}{0b}* +% \DescribeOption{accent=} +% +% Highlight color used for all highlight elements by default. +% The options below will reference this color as default setting meta{accentcolor}. +% Depending on the documentclass it might be used for the so-called \enquote{identbar} as well as highlighted test elements, e.\,g. within letters if \option{premium} is enabled. +% +% |accent| is an alias. +% We recommend using |accentcolor| to simplify recognizing the purpose of that option. +% \end{documentation} +% +% \begin{implementation} +% \begin{optionenv}{accent=} +% \begin{macrocode} + accent .tl_gset:N = \g_ptxcd_color_accent_tl, + accent .initial:n = 0b, + accentcolor .meta:n = {accent =#1}, +% \end{macrocode} +% \end{optionenv}^^A accent +% \end{implementation} +% +% \begin{documentation} +% \DescribeKeyOption{textaccent=\meta{color}}{\meta{accentcolor}}* +% The accent color for highlighted text. Usage depends on the document class. +% \end{documentation} +% +% \begin{implementation} +% \begin{optionenv}{textaccent=\meta{color}} +% \begin{macrocode} + textaccent .tl_gset:N = \g_ptxcd_color_textaccent_tl, + textaccent .initial:n = \g_ptxcd_color_accent_tl, + textaccentcolor .meta:n = {textaccent = #1}, +% \end{macrocode} +% \end{optionenv}^^A textaccent +% \end{implementation} +% +% \begin{documentation} +% \DescribeKeyOption{identbar=\meta{color}}{\meta{accentcolor}}* +% Color of the colored bar on the top of the page or slides using the 2008 layout. +% \end{documentation} +% +% \begin{implementation} +% \begin{optionenv}{identbar=\meta{color}} +% \begin{macrocode} + identbar .tl_gset:N = \g_ptxcd_color_identbar_tl, + identbar .initial:n = \g_ptxcd_color_accent_tl, + identbarcolor .meta:n = {identbar = #1}, +% \end{macrocode} +% \end{optionenv}^^A identbar +% compatibility only +% \begin{macrocode} + color .code:n = { + \keys_set:nn {ptxcd/colors} { + accent=#1, + textaccent=#1, + identbar=#1 + } + \PassOptionsToPackage{color=}{siunitx} + }, +% \end{macrocode} +% \end{implementation} +% +% \begin{documentation} +% \DescribeKeyOption{text=preferblack/preferwhite}{preferwhite}* +% The text placed on top a colored area, e.\,g. if the background of the title is set colored is either set to black or white. +% There are some color combinations forbidded according to the design guideline \cite{TUDaGuideline} and some colors are allowed to use black or white. +% This option can be used to prefer either black or white for the title in case both variants are allowed. +% It's not possible to enforce a forbidden setting using this option. +% \end{documentation} +% +% \begin{implementation} +% \begin{optionenv}{text} +% \begin{macrocode} + text .choice:, + text/preferblack .code:n = \bool_gset_false:N \g_ptxcd_color_whitetext_bool, + text/preferwhite .code:n = \bool_gset_true:N \g_ptxcd_color_whitetext_bool, + text .initial:n = {preferwhite}, + text/black .meta:n = {text=preferblack}, + text/white .meta:n = {text=preferwhite}, +% \end{macrocode} +% \end{optionenv}^^A text +% \end{implementation} +% \begin{documentation} +% \DescribeKeyOption*{colormode=cmyk/RGB}{Depends on document type}* +% The colormode can be selected to overwrite the default setting. +% Please be aware, that there is a difference in casing and \code{RGB} has to be used uppercase and \code{cmyk} lowercase. +% The reason for this is that internally uppercase and lowercase model names slightly differ because of rounding. +% \end{documentation} +% \begin{implementation} +% \begin{optionenv}{cmyk, RGB} +% \begin{macrocode} + cmyk .code:n = \PassOptionsToPackage{cmyk}{xcolor}, + RGB .code:n = \PassOptionsToPackage{RGB}{xcolor}, +% \end{macrocode} +% \end{optionenv} +% \end{implementation} +% \begin{documentation} +% \DescribeKeyOption{department=default/mecheng/\meta{department}}{default}* +% Within \pkg{tudacolors} it's only checked if the department was set to \option{mecheng}. In that case the additional color configuration will be enbled (\autoref{sec:mecheng}). +% \end{documentation} +% \begin{implementation} +% \begin{optionenv}{department=} +% \begin{macrocode} + department .choice:, + department / default .code:n = \str_gset:Nn \g_ptxcd_department_str {default}, + department / mecheng .code:n = { + \str_gset:Nn \g_ptxcd_department_str {mecheng} + \keys_set:nn {ptxcd/colors}{ + accent=TUDa-2d, + identbar=TUDa-6b + } + }, + department / unknown .code:n = { + \str_gset:Nx \g_ptxcd_department_str {\l_keys_value_tl} + }, +% \end{macrocode} +% Necessary to apply the option if it was processed before. +% \begin{macrocode} + department .initial:V = \g_ptxcd_department_str, +% \end{macrocode} +% \end{optionenv}^^A department +% \end{implementation} +% \begin{implementation} +% \begin{macrocode} + departmentconfigprefix .tl_gset:N = \g_@@_config_prefix_tl, + mecheng .meta:n = {department=mecheng}, +} +\ProcessKeyOptions[ptxcd/colors] +\RequirePackage{xcolor} +\input{tudacolors.def} +\str_if_eq:VnT \g_ptxcd_department_str {mecheng} { + \colorlet{TUDa-Primary1}{TUDa-6b} + \colorlet{TUDa-Primary2}{TUDa-2d} + \colorlet{TUDa-Secondary1}{TUDa-9a} + \colorlet{TUDa-Secondary2}{TUDa-8a} + \colorlet{TUDa-Secondary3}{TUDa-6a} + \colorlet{TUDa-Secondary4}{TUDa-3a} + \colorlet{TUDa-Secondary5}{TUDa-4a} + \colorlet{TUDa-Secondary6}{TUDa-5a} + \colorlet{TUDa-Arrow}{TUDa-Primary2} +} +\clist_const:Nn \c_ptxcd_color_forbid_textaccent_clist {TUDa-0a,TUDa-5a,TUDa-6a,TUDa-6b,TUDa-7a} +\clist_const:Nn \c_ptxcd_color_allow_blacktext_clist {TUDa-0a,TUDa-0b,TUDa-0c,TUDa-1a,TUDa-2a,TUDa-3a,TUDa-4a,TUDa-4b,TUDa-4c,TUDa-5a,TUDa-5b,TUDa-5c,TUDa-6a,TUDa-6b,TUDa-6c,TUDa-7a,TUDa-7b,TUDa-7c,TUDa-8a,TUDa-8b,TUDa-8c,TUDa-9a,TUDa-9b,TUDa-10a} +\clist_const:Nn \c_ptxcd_color_allow_whitetext_clist {TUDa-0b,TUDa-0c,TUDa-0d,black,TUDa-1a,TUDa-1b,TUDa-1c,TUDa-1d,TUDa-2a,TUDa-2b,TUDa-2c,TUDa-2d,TUDa-3a,TUDa-3b,TUDa-3c,TUDa-3d,TUDa-4b,TUDa-4c,TUDa-4d,TUDa-5b,TUDa-5c,TUDa-5d,TUDa-6c,TUDa-6d,TUDa-7b,TUDa-7c,TUDa-7d,TUDa-8a,TUDa-8b,TUDa-8c,TUDa-8d,TUDa-9a,TUDa-9b,TUDa-9c,TUDa-9d,TUDa-10a,TUDa-10b,TUDa-10c,TUDa-10d,TUDa-11a,TUDa-11b,TUDa-11c,TUDa-11d} +% \end{macrocode} +% messages +% \begin{macrocode} +\msg_new:nnnn{tudacolors} {undefined-color} {The~ color~ #1~ you~ selected~ is~ not~ defined.} {See~ the~ tuda-ci~ manual~ for~ a~ list~ of~ available~ colors.} +\msg_new:nnnn{tudacolors} {unselectable-color} {The~ color~ you~ selected~ (#1)~ must~ not~ be~ choosen~ for~ #2.} {See~ the~ Corporate~ Design~ Guideline~ for~ further~ information.} +\hook_new:n {ptxcd/init-colors} +\hook_gput_code:nnn {ptxcd/init-colors} {tudacolors} { + \clist_map_inline:nn {accent, textaccent, identbar} { + \cs_if_exist:cF {\string\color@\tl_use:c {g_ptxcd_color_#1_tl}} { + \cs_if_exist:cT {\string\color@TUDa-\tl_use:c {g_ptxcd_color_#1_tl}} { + \tl_gset:cx {g_ptxcd_color_#1_tl} {TUDa-\tl_use:c {g_ptxcd_color_#1_tl}} + } + } + } + \exp_args:Nnx \colorlet{accentcolor}{\g_ptxcd_color_accent_tl} + \bool_if:NTF \g_ptxcd_color_whitetext_bool { + \clist_if_in:NVTF \c_ptxcd_color_allow_whitetext_clist \g_ptxcd_color_accent_tl { + \colorlet{textonaccentcolor}{white} + } { + \colorlet{textonaccentcolor}{black} + \tl_if_in:NnT \g_ptxcd_color_accent_tl {TUDa} { + \msg_warning:nnxx{tudacolors} {unselectable-color} {white} {textonaccentcolor} + } + } + } { + \clist_if_in:NVTF \c_ptxcd_color_allow_blacktext_clist \g_ptxcd_color_accent_tl { + \colorlet{textonaccentcolor}{black} + } { + \colorlet{textonaccentcolor}{white} + \tl_if_in:NnT \g_ptxcd_color_accent_tl {TUDa} { + \msg_warning:nnxx{tudacolors} {unselectable-color} {black} {textonaccentcolor} + } + } + } + \colorlet{identbarcolor}{\g_ptxcd_color_identbar_tl} + \exp_args:NNx \clist_if_in:NnTF \c_ptxcd_color_forbid_textaccent_clist {\g_ptxcd_color_textaccent_tl} { + \msg_warning:nnxx{tudacolors} {unselectable-color} {\g_ptxcd_color_textaccent_tl} {textaccentcolor} + \colorlet{textaccentcolor}{black} + } { + \colorlet{textaccentcolor}{\g_ptxcd_color_textaccent_tl} + } +} +\file_if_exist_input:n {\g_@@_config_prefix_tl\g_ptxcd_department_str-colors.def} +\hook_use:n {ptxcd/init-colors} +\colorlet{InfoBox}{white} +% \end{macrocode} +% \end{implementation} +% \iffalse +%</package> +% \fi +% +% \Finale +\endinput diff --git a/Master/texmf-dist/source/latex/tuda-ci/tudaexercise.dtx b/Master/texmf-dist/source/latex/tuda-ci/tudaexercise.dtx new file mode 100644 index 00000000000..459a78b60e7 --- /dev/null +++ b/Master/texmf-dist/source/latex/tuda-ci/tudaexercise.dtx @@ -0,0 +1,1490 @@ +% \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{tudaexercise.dtx}[2025-01-26 v4.00 Exercise sheets and exams using TU Darmstadt's Corporate Desing (TUDa-CI)] +\typeout{***********************************************************} +\typeout{No documentation included in this file! Please see tuda-ci.pdf for more information and DEMO-TUDaExercise.tex/.pdf for an example of use.} +\typeout{***********************************************************} +\stop +%</driver> +%<*class&initialization> +%<@@=ptxcd> +\NeedsTeXFormat{LaTeX2e}[2020/10/01] +\ProvidesExplClass{tudaexercise}{2025-01-26}{4.00}{Exercise sheets and exams using TU Darmstadt's Corporate Desing (TUDa-CI)} +%</class&initialization> +%<*driver>^^A Preparation for real docstrip documentation +\providecommand*{\TUDaDocDTXfiles}{tudaexercise.dtx} +\input{tuda-ci.dtx} +%</driver> +% \fi +% +% \changes{v4.00}{2025-01-26}{Converted to DTX file} +% +% \DoNotIndex{\newcommand,\newenvironment} +% +% +% \maketitle +% +% +% +% \DescribeEnv{solution} +% +% +% \DescribeMacro{\sectionlinesformat} +% +% +% \DescribeMacro{\institution} +% +% +% \DescribeMacro{\titlepagestyle} +% +% +% \DescribeMacro{\titleimage} +% +% +% \DescribeMacro{\author} +% +% +% \DescribeMacro{\title} +% +% +% \DescribeMacro{\sheetnumber} +% +% +% \DescribeMacro{\term} +% +% +% \DescribeMacro{\sheetsep} +% +% +% \DescribeMacro{\tasksep} +% +% +% \DescribeMacro{\solutionsep} +% +% +% \DescribeMacro{\StudentNamesep} +% +% +% \DescribeMacro{\StudentIDname} +% +% +% \DescribeMacro{\StudentIDsep} +% +% +% \DescribeMacro{\creditformat} +% +% +% \DescribeMacro{\creditformatsum} +% +% +% \DescribeMacro{\pointformat} +% +% +% \DescribeMacro{\PointsName} +% +% +% \DescribeMacro{\thetask} +% +% +% \DescribeMacro{\taskformat} +% +% +% \DescribeEnv{task} +% +% +% \DescribeMacro{\thesubtask} +% +% +% \DescribeMacro{\subtaskformat} +% +% +% \DescribeEnv{subtask} +% +% +% \MaybeStop{} +% +% \section{Implementation} +% +% \iffalse +%<*initialization> +% \fi +% +% \begin{macrocode} +\msg_new:nnnn {tudaexercise} {outdated-koma-script} { + Your~KOMA-Script~is~outdated.\\ + To~use~the~feature~'#1'~you~will~be~required~to~update. +} { + Please~do~not~use~this~feature~or~update~your~TeX~distribution.\\ + The~feature~requires~KOMA-Script~v#2~or~newer. +} +\str_const:Nn \c_@@_base_str {exercise} +\prop_new:N \g_ptxcd_clsopts_prop +\prop_new:N \g_ptxcd_unknown_clsopts_prop +\prop_gput:Nnn \g_ptxcd_clsopts_prop {captions} {nooneline} +\prop_gput:Nnn \g_ptxcd_clsopts_prop {parskip} {half-} +\prop_new:N \g_@@_points_collector_prop +\prop_new:N \g_@@_subtask_points_collector_prop +\prop_new:N \g_@@_property_collector_prop +\bool_new:N \l_@@_points_auto_bool +\bool_new:N \g_@@_points_bool +\prop_new:N \g_@@_loaded_points_prop +\fp_new:N \g_@@_points_total_fp +\int_new:N \g_ptxcd_paper_int +\bool_new:N \g_ptxcd_geometry_bool +\bool_new:N \g_ptxcd_custommargins_bool +\bool_new:N \l_@@_solution_bool +\bool_new:N \g_ptxcd_smalltitle_bool +\str_new:N \g_ptxcd_department_str +\tl_new:N \g_ptxcd_tmp_tl +\int_new:N \g_ptxcd_tmp_int +\tl_new:N \l_ptxcd_tmp_tl +\clist_map_inline:nn {section,subsection,subsubsection,task,subtask,@solution} { + \bool_new:c {g_@@_ruled_#1_bool} + \bool_gset_true:c {g_@@_ruled_#1_bool} +} +\bool_new:N \g_@@_runin_subtask_bool +% \end{macrocode} +% \begin{documentation} +% \DescribeEnv{solution} +% +% \end{documentation} +% \begin{environment}{solution} +% \begin{macrocode} +\newenvironment{solution}{}{} +% \end{macrocode} +% \end{environment} +% \end{implementation} +% +% \begin{documentation} +% \DescribeEnv{solution*} +% +% \end{documentation} +% \begin{environment}{solution*} +% \begin{macrocode} +\newenvironment{solution*}{}{} +% \end{macrocode} +% \end{environment} +% \end{implementation} +% \changes{v4.00}{2025-01-26}{Remove obsolete use of environ} +% \begin{macrocode} +\cs_new:Nn \_@@_setup_solution: { + \bool_if:NTF \l_@@_solution_bool { + \def\solution{\_@@_solutionheader:} + \def\endsolution{} + \expandafter\def\csname solution*\endcsname{\ignorespaces} + \expandafter\let\csname endsolution*\endcsname\endsolution + }{ + \RenewDocumentEnvironment{solution}{+b}{}{} + \RenewDocumentEnvironment{solution*}{+b}{}{} + } +} +\_@@_setup_solution: +\prg_new_conditional:Nnn \_@@_if_solution: {T,F,TF} { + \bool_if:NTF \l_@@_solution_bool + {\prg_return_true:} + {\prg_return_false:} +} +\let\IfSolutionT \_@@_if_solution:T +\let\IfSolutionF \_@@_if_solution:F +\let\IfSolutionTF \_@@_if_solution:TF +% \end{macrocode} +% Message Declaration for option processing +% \begin{macrocode} +\msg_new:nnn{tudaexercise} {titlepage-option-disabled} { + You~set~the~titlepage~option~to~#1.\\ + This option is not supported by tudaexercise.cls.\\ + The~KOMA-Script~option~titlepage~is~forced~to~"false". +} +% \end{macrocode} +% \changes{v4.00}{2025-01-26}{add bookmarksnumbered option and enable by default} +% The options have to be passed before the package options to allow being changed by the user. +% \begin{macrocode} +\PassOptionsToPackage{pdfusetitle,bookmarksnumbered=true}{hyperref} +\keys_define:nn {ptxcd/exercise} { +% \end{macrocode} +% +% \begin{macrocode} + bookmarksnumbered .code:n = \PassOptionsToPackage{bookmarksnumbered=#1}{hyperref}, + compat .bool_gset:N = \g_@@_compatibility_bool, + compat .initial:n = false, + compatilibity .meta:n = {compat=#1}, + compatibility .default:n = true, + credit .tl_set:N = \l_@@_credit_tl, + credit .initial:n =, + headontitle .bool_gset:N = \g_ptxcd_headontitle_bool, + headontitle .initial:n = false, + headontitle .default:n =true, + titlepage .code:n = {\msg_warning:nnn {tudapub} {titlepage-option-disabled} {#1}}, + match-task-subtask-syntax .bool_gset:N = \g_ptxcd_match_task_subtask_bool, + match-task-subtask-syntax .initial:n = false, + match-task-subtask-syntax .default:n = true, + solution .code:n = { + \bool_set_eq:Nc \l_@@_solution_bool {c_#1_bool} + \_@@_setup_solution: + }, + solution .default:n = true, + unknown .code:n = {\prop_gput:NVn \g_ptxcd_unknown_clsopts_prop \l_keys_key_tl {#1}}, + points .choice:, + points / true .code:n = \bool_set_false:N \l_@@_points_auto_bool\bool_gset_true:N \g_@@_points_bool, + points /false .code:n = \bool_set_false:N \l_@@_points_auto_bool\bool_gset_false:N \g_@@_points_bool, + points / auto .code:n = \bool_set_true:N \l_@@_points_auto_bool\bool_gset_true:N \g_@@_points_bool, + points .initial:n = false, + subtask .choice:, + subtask / ruled .code:n = + \bool_gset_true:N \g_@@_ruled_subtask_bool + \bool_gset_false:N \g_@@_runin_subtask_bool, + subtask / runin .code:n = + \bool_gset_false:N \g_@@_ruled_subtask_bool + \bool_gset_true:N \g_@@_runin_subtask_bool, + subtask / plain .code:n = + \bool_gset_false:N \g_@@_ruled_subtask_bool + \bool_gset_false:N \g_@@_runin_subtask_bool, +%</initialization> +% ^AA} +%<*center> +\ProcessKeyOptions[ptxcd/exercise] +\prop_map_inline:Nn \g_ptxcd_clsopts_prop { + \tl_if_empty:nTF {#2} + {\PassOptionsToClass {#1} {scrartcl}} + { + \clist_map_inline:nn {#2} {\PassOptionsToClass {#1=##1} {scrartcl}} + } +} + \bool_new:N \l_@@_subtask_fallback_bool + \fp_new:N \l_@@_task_points_fp + \fp_new:N \g_@@_ex_collected_points_fp + \tl_new:N \l_@@_task_credit_tl + \keys_define:nn {ptxcd/task}{ + points .choice:, + points / auto .code:n = + \bool_set_true:N \l_@@_points_auto_bool, + points / unknown .code:n = \fp_set:Nn \l_@@_task_points_fp {#1} + \bool_set_false:N \l_@@_points_auto_bool, + credit .code:n = \tl_set:Nn \l_@@_task_credit_tl {#1} + \bool_set_false:N \l_@@_points_auto_bool, + solution .meta:nn ={ptxcd/exercise}{solution=#1}, + } +\fp_new:N \l_@@_subtask_points_fp +\keys_define:nn {ptxcd/subtask} { + credit .tl_set:N = \l_@@_subtask_credit_tl, + credit .initial:n =, + points .code:n = \fp_set:Nn \l_@@_subtask_points_fp {#1} + \bool_set_false:N \l_@@_points_auto_bool, + title .tl_set:N = \l_@@_title_tl, + title .initial:n =, + unknown .code:n = { + \bool_set_true:N \l_@@_subtask_fallback_bool + \tl_clear:N \l_@@_subtask_credit_tl + \fp_zero:N \l_@@_subtask_points_fp + }, +} +\keys_define:nn {ptxcd/exercise/headline} { + headline .code:n = { + \if@twoside + \keys_set:nn {ptxcd/exercise/headline} {odd=#1,even=#1} + \else + \keys_set:nn {ptxcd/exercise/headline} {oneside=#1} + \fi + }, +} +\clist_map_inline:nn {odd, even, oneside} { + \tl_new:c {g_@@_headline_#1_tl} + \box_new:c {g_@@_headline_#1_box} + \keys_define:nn {ptxcd/exercise/headline} { + #1 .choice:, + #1 / title-name-id .meta:n = { + #1 = { + \g_ptxcd_shorttitle_tl\par + \StudentName\StudentID + } + }, + #1 / title-name .meta:n = { + #1 = { + \g_ptxcd_shorttitle_tl\par + \smallskip + \StudentName + } + }, + #1 / title .meta:n = {#1 = {\g_ptxcd_shorttitle_tl}}, + #1 / name-id .meta:n = {#1 = {\StudentName\StudentID}}, + #1 / name .meta:n = {#1 = {\StudentName}}, + #1 / unknown .code:n = \tl_gset:cn {g_@@_headline_#1_tl} {##1} + } +} +% \end{macrocode} +% Load tudasize clo file if available +% \begin{macrocode} +\file_if_exist:nT {tudasize\prop_item:Nn \g_ptxcd_clsopts_prop {fontsize}.clo} +{\providecommand*{\@fontsizefilebase}{tudasize}} +\LoadClass{scrartcl} +\bool_if:NT \g_@@_points_bool { + \cs_if_exist:NF \AddtoDoHook{ + \msg_error:nnnn {tudaexercise} {outdated-koma-script} {points=true/auto} {3.27} + \keys_set:nn {ptxcd/exercise} {points=false} + } +} +\RequirePackage{tudarules} +% \end{macrocode} +% Has to be loaded here due to headwidth options +% \begin{macrocode} +\RequirePackage[draft=false]{scrlayer-scrpage} +\KOMAoptions {twoside = false} +\prop_map_inline:Nn \g_ptxcd_unknown_clsopts_prop { + \cs_if_exist:cT {KV@KOMA.scrartcl.cls@#1} { + \tl_if_empty:nTF {#2} + {\KOMAoptions{#1}} + {\KOMAoption{#1}{#2} + } + } +} +% \end{macrocode} +% \begin{implementation} +% \begin{macro}{\sectionlinesformat} +% \begin{macrocode} +\renewcommand*\sectionlinesformat[4]{% + \parbox{\linewidth}{ + \bool_if:cT {g_@@_ruled_#1_bool} { + \rule[5\g_ptxcd_titlerule_dim]{\linewidth}{\g_ptxcd_titlerule_dim}\par\nointerlineskip + } + \@hangfrom{% + \hskip #2#3}{ + \tl_if_eq:nnT {#1} {task} { + \exp_args:No \tl_if_empty:nF {#4} + {:~} + \bool_if:NT \l_@@_points_auto_bool { + \exp_args:NNx \prop_get:NnN \g_@@_loaded_points_prop {\thetask} \l_ptxcd_tmp_tl + \quark_if_no_value:NF \l_ptxcd_tmp_tl { + \fp_set:Nn \l_@@_task_points_fp {\l_ptxcd_tmp_tl} + } + } + } + #4 + \tl_if_in:nnT {#1} {task} { + \tl_if_empty:cTF{l_@@_#1_credit_tl} + {\pointformat{\fp_to_decimal:c {l_@@_#1_points_fp}}} + {\creditformat{\tl_use:c {l_@@_#1_credit_tl}}} + } + \rule[-\dp\strutbox]{0pt}{\dp\strutbox}\par}\nointerlineskip + \skip_vertical:n {\ptxcd_titlerule_sep: -\dp\strutbox} + \bool_if:cT {g_@@_ruled_#1_bool} + {\smash{\rule{\linewidth}{\g_ptxcd_titlerule_dim}}} + } +} +\RequirePackage{tudafonts} +% \end{macrocode} +% \iffalse +%</center> +%<*body> +% \fi +% \end{macro} +% \end{implementation} +% +% \begin{documentation} +% \DescribeMacro{\institution} +% +%^^A TODO Rename and deprecate variable names +% \end{documentation} +% \begin{implementation} +% \begin{macro}{\institution} +% \begin{macrocode} +\newcommand*{\institution}[1]{ + \def\ptxcd_institution{#1} +} +% \end{macrocode} +% \end{macro} +% \end{implementation} +% +% \begin{documentation} +% \DescribeMacro{\ptxcd_datename} +% +% \end{documentation} +% \begin{implementation} +% \begin{macro}{\ptxcd_datename} +% \begin{macrocode} +\gdef\ptxcd_datename{Datum} +% \end{macrocode} +% \end{macro} +% \end{implementation} +% +% \begin{documentation} +% \DescribeMacro{\ptxcd_dateseparator} +% +% \end{documentation} +% \begin{implementation} +% \begin{macro}{\ptxcd_dateseparator} +% \begin{macrocode} +\gdef\ptxcd_dateseparator{:~} +% \end{macrocode} +% \end{macro} +% \end{implementation} +% +% \begin{macrocode} +\setkomafont{disposition}{\sffamily\bfseries} +\cs_new:Nn \ptxcd_titlerule_sep: {\the\dp\strutbox} +\RequirePackage{tudacolors} +\setkomafont{pageheadfoot}{\sffamily\small} +\setkomafont{pagenumber}{} +\addtokomafont{captionlabel}{\sffamily} +\addtokomafont{caption}{\sffamily} +\cs_new:Nn \_@@_preamble_ConfigureHeadline:n { + \tl_if_empty:nF {#1} {\keys_set:nn {ptxcd/exercise/headline} {#1}} +} +\cs_new:Nn \ptxcd_ConfigureHeadline:n { + \_@@_preamble_ConfigureHeadline:n {#1} + \ptxcd_update_headline_boxes: + \_@@_adjust_headheight: +} +\NewDocumentCommand{\ConfigureHeadline}{m}{\_@@_preamble_ConfigureHeadline:n {#1}} +\bool_if:NT \g_@@_compatibility_bool { + \cs_new:Npn \_@@_env_to_tl_aux:w #1 \q_stop { \tl_gset:Nn \g_@@_headline_oneside_tl {#1} } + \NewDocumentEnvironment{examheader}{+b}{}{ + \tl_gset:Nn \g_@@_headline_oneside_tl {#1} + \tl_gset:Nn \g_@@_headline_odd_tl {#1} + \tl_gset:Nn \g_@@_headline_even_tl {#1} + \ptxcd_ConfigureHeadline:n {} + } + \newcommand*{\examheaderdefault}{\par\StudentName\StudentID} +} +\cs_new:Nn \ptxcd_update_headline_boxes: { + \clist_map_inline:nn {even, odd, oneside} + { + \tl_if_empty:cF {g_@@_headline_##1_tl} { + \vbox_gset:cn {g_@@_headline_##1_box} { + \begin{minipage}[b]{\textwidth} + \usekomafont{pagehead} + \raggedright + \leavevmode\rule{\z@}{\dimexpr\ht\strutbox+\c_ptxcd_rulesep_dim} + \ignorespaces + \use:c {g_@@_headline_##1_tl}\ignorespaces\strut + \par\vspace{\z@} + \end{minipage} + } + } + } +} +\cs_new:Nn \_@@_adjust_headheight: { + \if@twoside + \dim_set:Nn \l_tmpa_dim { + \dim_max:nn + {\box_ht:N \g_@@_headline_odd_box+\box_dp:N \g_@@_headline_odd_box} + {\box_ht:N \g_@@_headline_even_box+\box_dp:N \g_@@_headline_even_box} + } + \else + \dim_set:Nn \l_tmpa_dim { + \box_ht:N \g_@@_headline_oneside_box + + \box_dp:N \g_@@_headline_oneside_box + } + \fi + \dim_compare:nT {\l_tmpa_dim > \z@} + { + \dim_add:Nn \l_tmpa_dim {\box_dp:N \ptxcd_headrule_box +\c_ptxcd_rulesep_dim} + \KOMAoptions{headinclude, headheight=\l_tmpa_dim,headsepline = .5\c_ptxcd_smallrule_dim} + \if@twoside + \cehead{\box_use:c {g_@@_headline_even_box}} + \cohead{\box_use:c {g_@@_headline_odd_box}} + \else + \chead{\box_use:c {g_@@_headline_oneside_box}} + \fi + \global\setlength{\headheight}{\l_tmpa_dim} + } +} +\newpairofpagestyles{TUDa.exercise}{ + \KOMAoptions{plainfootsepline,headtopline,plainheadtopline} + \KOMAoptions { + headwidth=text, + footwidth=text + } + \setkomafont{pagehead}{} + \box_if_exist:NF \ptxcd_headrule_box { + \ptxcd_makeheadrule[color=identbarcolor, width=\sls@headwidth]{ptxcd_headrule} + } + \ModifyLayer[ + background, + height=\box_dp:N \ptxcd_headrule_box, + align=tl, + voffset=\g_ptxcd_topMargin_dim, + contents=\raisebox{\depth}{\box_use:N \ptxcd_headrule_box}, + ]{plain.TUDa.exercise.head.above.line} + \ModifyLayer[ + background, + height=\box_dp:N \ptxcd_headrule_box, + align=tl, + voffset=\g_ptxcd_topMargin_dim, + contents=\raisebox{\depth}{\box_use:N \ptxcd_headrule_box}, + ]{TUDa.exercise.head.above.line} + \ofoot[\pagemark]{\pagemark} + \ModifyLayer[addvoffset=\c_ptxcd_rulesep_dim]{TUDa.exercise.foot.even} + \ModifyLayer[addvoffset=\c_ptxcd_rulesep_dim]{TUDa.exercise.foot.odd} + \ModifyLayer[addvoffset=\c_ptxcd_rulesep_dim]{TUDa.exercise.foot.oneside} + \ModifyLayer[addvoffset=\c_ptxcd_rulesep_dim]{plain.TUDa.exercise.foot.even} + \ModifyLayer[addvoffset=\c_ptxcd_rulesep_dim]{plain.TUDa.exercise.foot.odd} + \ModifyLayer[addvoffset=\c_ptxcd_rulesep_dim]{plain.TUDa.exercise.foot.oneside} +} +\DeclarePageStyleAlias{TUDa}{TUDa.exercise} +\DeclarePageStyleAlias{plain.TUDa}{plain.TUDa.exercise} +% \end{macrocode} +% \begin{implementation} +% \begin{macrocode} +\renewcommand{\titlepagestyle}{plain.TUDa} +\pagestyle{TUDa} +% \end{macrocode} +% +% \begin{macrocode} +\seq_new:N \g_ptxcd_author_seq +% \end{macrocode} +% \begin{documentation} +% \DescribeMacro{\author} +% +% \end{documentation} +% \begin{implementation} +% \begin{macro}{\author} +% \begin{macrocode} +\renewcommand*\author[1]{ + \seq_gset_split:Nnn \g_ptxcd_author_seq {\and} {#1} +} +% \end{macrocode} +% \end{macro} +% \end{implementation} +% +% \begin{macrocode} +\msg_new:nnn{tudapub} {unknown-language} { + You~selected~an~unknown~language~#1.\\ + The~Variable~#2~does~not~have~a~predefined~value.\\ + Ensure~to~redefine~#2~to~match~your~language.\\ + Otherwise~the~ngerman~vaue~#3~will~be~used. +} +\cs_new:Nn \ptxcd_define_captionFallback:Nn { + \providecommand*#1{ + \msg_warning:nnxxx{tudapub} {unknown-language} + {\languagename} {\exp_not:N #1} {#2} + \def#1{#2} + } +} +\cs_new:Nn \ptxcd_declare_caption:Nnnn { + \ptxcd_define_captionFallback:Nn #1 {#2} + \defcaptionname{ngerman, german}{#1}{#2} + \defcaptionname{english, USenglish, american}{#1}{#3} + \defcaptionname{UKenglish, british}{#1}{#4} +} +\cs_new:Nn \ptxcd_declare_caption:Nnn { + \ptxcd_declare_caption:Nnnn #1 {#2} {#3} {#3} +} +\ptxcd_declare_caption:Nnn \authorandname {und} {and} +% \end{macrocode} +% \begin{documentation} +% \DescribeMacro{\@author} +% +% \end{documentation} +% \begin{implementation} +% \begin{macro}{\@author} +% \begin{macrocode} +\renewcommand*{\@author}{ + \seq_use:Nnnn \g_ptxcd_author_seq {~\authorandname{}~} {,~} {~\&~} +} +\tl_new:N \g_ptxcd_shorttitle_tl +% \end{macrocode} +% \end{macro} +% \end{implementation} +% +% \begin{documentation} +% \DescribeMacro{\title} +% +% \end{documentation} +% \begin{implementation} +% \begin{macro}{\title} +% \begin{macrocode} +\RenewDocumentCommand{\title}{om}{ + \IfNoValueTF{#1}{ + \tl_gset:Nn \g_ptxcd_shorttitle_tl {#2} + }{ + \tl_gset:Nn \g_ptxcd_shorttitle_tl {#1} + } + \def\@title{#2} +} +% \end{macrocode} +% \end{macro} +% \end{implementation} +% +% Define \subsubtitle for compatibility +% \begin{macrocode} +\newcommand*{\subsubtitle}[1]{ + \def\@subsubtitle{#1} +} +\subsubtitle{} +% \end{macrocode} +% \begin{documentation} +% \DescribeMacro{\ptxcd_title@footnote} +% +% \end{documentation} +% \begin{implementation} +% \begin{macro}{\ptxcd_title@footnote} +% \begin{macrocode} +\newcommand*{\ptxcd_title@footnote}[2][1]{ + \textsuperscript{\@fnsymbol{#1}}#2 +} +% \end{macrocode} +% \end{macro} +% \end{implementation} +% +% \begin{documentation} +% \DescribeMacro{\@maketitle} +% +% \end{documentation} +% \begin{implementation} +% \begin{macro}{\@maketitle} +% \begin{macrocode} +\renewcommand*{\@maketitle}{% +\global\@topnum=\z@ +\setparsizes{\z@}{\z@}{\z@\@plus 1fil}\par@updaterelative +\vspace*{-\dim_eval:n { + \headheight + -\c_ptxcd_largerule_dim -\c_ptxcd_rulesep_dim + +\headsep + +\ht\strutbox + +\p@ + }} +\par +\nointerlineskip +\begingroup +\setlength{\fboxsep}{\z@} +\bool_if:NT \g_ptxcd_colorback_bool {\colorbox{accentcolor}}{\parbox[t]{\linewidth}{ + \rule{0pt}{\bool_if:NTF \g_ptxcd_smalltitle_bool {.25} {.5}\c_ptxcd_logoheight_dim} + \par\nointerlineskip + \raisebox{-\height}{% + \begin{minipage}[t]{\dimexpr\linewidth-\_@@_logowidth:-1ex} + \bool_if:NT \g_ptxcd_colorback_bool {\begin{addmargin}{3mm}} + \raggedright + \bool_if:NT \g_ptxcd_colorback_bool {\color{textonaccentcolor}} + \tl_if_empty:NF \@titlehead {\usekomafont{titlehead}{\@titlehead\par}} + \leavevmode\usekomafont{title}% + {\usekomafont{title}\bool_if:NTF \g_ptxcd_smalltitle_bool {\LARGE} {\huge} {\@title\par}}% + \vskip 1em + \bool_if:NF \g_@@_compatibility_bool + { + {\ifx\@subtitle\@empty\else\usekomafont{subtitle}\@subtitle\par\fi}% + \gdef\@subtitle{} + \vskip .5em + } + { + \xdef\@author {\@author} + \ifx\@author\@empty\else\usekomafont{author}\@author\par\fi + } + \vskip .5em + \bool_if:NTF \g_ptxcd_colorback_bool {\end{addmargin}} {\par} + \end{minipage}} + \tl_if_empty:NF \g_ptxcd_logofile_tl { + \hfill\raisebox{\dim_eval:n { + \bool_if:NTF \g_ptxcd_colorback_bool + {-\height} + {-.9\c_ptxcd_logoheight_dim} + }} + [0pt] + [\dim_eval:n { + \bool_if:NTF \g_ptxcd_smalltitle_bool + {\bool_if:NTF \g_ptxcd_colorback_bool {1.15}{1}} + {\bool_if:NTF \g_ptxcd_colorback_bool {1.5}{1.3} + }\c_ptxcd_logoheight_dim}] + {\makebox[\_@@_logowidth:][l]{\_@@_insert_logo:}} + } + \par\medskip + }} +\par +\nointerlineskip +\rule{\linewidth}{\g_ptxcd_titlerule_dim} +% \end{macrocode} +% subtitle fields if not compat +% \begin{macrocode} +\exp_args:Nf \tl_if_empty:nF {\g_ptxcd_ex_sheetnum_tl\@date\g_ptxcd_ex_term_tl\use:c {@subsubtitle}\@subtitle}{ + \par\nointerlineskip + \bool_if:NT \g_ptxcd_colorback_bool {\colorbox{accentcolor}}{ + \parbox{\linewidth}{ + \begin{minipage}{\linewidth} + \bool_if:NT \g_ptxcd_colorback_bool { + \color{textonaccentcolor} + \begin{addmargin}{3mm} + } + \null\par + \def\ptxcd_nextsep{} + \clist_map_inline:nn {@subtitle, @subsubtitle, g_ptxcd_ex_term_tl, @date} { + \tl_if_empty:cF {##1} {\ptxcd_nextsep\use:c {##1}\def\ptxcd_nextsep{\\}} + } + \tl_if_empty:NF \g_ptxcd_ex_sheetnum_tl {\ptxcd_nextsep\sheetname\sheetsep\g_ptxcd_ex_sheetnum_tl} + \bool_if:NT \g_ptxcd_colorback_bool {\end{addmargin}} + \end{minipage} + \vspace*{\dp\strutbox} + }}\par\nointerlineskip + \rule{\linewidth}{\g_ptxcd_titlerule_dim} +} +\par +\bool_if:NT \g_ptxcd_headontitle_bool { + \if@twoside + \box_use:N \g_@@_headline_odd_box + \else + \box_use:N \g_@@_headline_oneside_box + \fi + \par + \rule{\linewidth}{\g_ptxcd_titlerule_dim} + \par +} +\endgroup +\vskip 2em +\ConfigureHeadline{} +}% +\setkomafont{subtitle}{\bfseries} +\setkomafont{author}{} +\setkomafont{date}{} +\newkomafont{sheetnumber}{\usekomafont{date}} +\newkomafont{term}{\usekomafont{date}} +\date{} +\tl_new:N \g_ptxcd_ex_sheetnum_tl +% \end{macrocode} +% \end{macro} +% \end{implementation} +% +% \begin{documentation} +% \DescribeMacro{\sheetnumber} +% +% \end{documentation} +% \begin{implementation} +% \begin{macro}{\sheetnumber} +% \begin{macrocode} +\newcommand*{\sheetnumber}[1]{\tl_gset:Nn \g_ptxcd_ex_sheetnum_tl {#1}} +% \end{macrocode} +% \end{macro} +% \end{implementation} +% +% \begin{macrocode} +\sheetnumber{} +\tl_new:N \g_ptxcd_ex_term_tl +% \end{macrocode} +% \begin{documentation} +% \DescribeMacro{\term} +% +% \end{documentation} +% \begin{implementation} +% \begin{macro}{\term} +% \begin{macrocode} +\newcommand*{\term}[1]{\tl_gset:Nn \g_ptxcd_ex_term_tl {#1}} +% \end{macrocode} +% \end{macro} +% \end{implementation} +% +% \begin{macrocode} +\term{} +% \end{macrocode} +% Logos +% \begin{macrocode} +\RequirePackage{graphicx} +% \end{macrocode} +% %hyperref +% \begin{macrocode} +\RequirePackage{hyperref} +\hypersetup{hidelinks, unicode} +\providecaptionname{ngerman, german}{\sheetname}{Übungsblatt} +\providecaptionname{english, american, british}{\sheetname}{Sheet} +% \end{macrocode} +% \begin{documentation} +% \DescribeMacro{\sheetsep} +% +% \end{documentation} +% \begin{implementation} +% \begin{macro}{\sheetsep} +% \begin{macrocode} +\newcommand*{\sheetsep}{~} +% \end{macrocode} +% \end{macro} +% \end{implementation} +% +% \begin{macrocode} +\providecaptionname{ngerman, german}{\taskname}{Aufgabe} +\providecaptionname{english, american, british}{\taskname}{Task} +% \end{macrocode} +% \begin{documentation} +% \DescribeMacro{\tasksep} +% +% \end{documentation} +% \begin{implementation} +% \begin{macro}{\tasksep} +% \begin{macrocode} +\newcommand*{\tasksep}{~}%TODO +% \end{macrocode} +% \end{macro} +% \end{implementation} +% +% \begin{macrocode} +\providecaptionname{ngerman, german}{\solutionname}{Lösungsvorschlag} +\providecaptionname{english, american, british}{\solutionname}{Solution} +% \end{macrocode} +% \begin{documentation} +% \DescribeMacro{\solutionsep} +% +% \end{documentation} +% \begin{implementation} +% \begin{macro}{\solutionsep} +% \begin{macrocode} +\newcommand*{\solutionsep}{:~} +% \end{macrocode} +% \end{macro} +% \end{implementation} +% +% \begin{macrocode} +\providecaptionname{ngerman, german}{\StudentNamename}{Nachname,~Vorname} +\providecaptionname{english, american, british}{\StudentNamename}{Last Name,~ First Name} +% \end{macrocode} +% \begin{documentation} +% \DescribeMacro{\StudentNamesep} +% +% \end{documentation} +% \begin{implementation} +% \begin{macro}{\StudentNamesep} +% \begin{macrocode} +\newcommand*{\StudentNamesep}{:~} +% \end{macrocode} +% \end{macro} +% \end{implementation} +% +% \begin{documentation} +% \DescribeMacro{\StudentIDname} +% +% \end{documentation} +% \begin{implementation} +% \begin{macro}{\StudentIDname} +% \begin{macrocode} +\providecommand{\StudentIDname}{Matrikelnummer} +% \end{macrocode} +% \end{macro} +% \end{implementation} +% +% \begin{macrocode} +\providecaptionname{ngerman, german}{\StudentIDname}{Matrikelnummer} +\providecaptionname{english, american, british}{\StudentIDname}{Enrollment ID} +% \end{macrocode} +% \begin{documentation} +% \DescribeMacro{\StudentIDsep} +% +% \end{documentation} +% \begin{implementation} +% \begin{macro}{\StudentIDsep} +% \begin{macrocode} +\newcommand*{\StudentIDsep}{:~} +% \end{macrocode} +% \end{macro} +% \end{implementation} +% +% \begin{documentation} +% \DescribeMacro{\creditformat} +% +% \end{documentation} +% \begin{implementation} +% \begin{macro}{\creditformat} +% \begin{macrocode} +\providecommand{\creditformat}[1]{\space(#1)} +% \end{macrocode} +% \end{macro} +% \end{implementation} +% +% \begin{documentation} +% \DescribeMacro{\creditformatsum} +% +% \end{documentation} +% \begin{implementation} +% \begin{macro}{\creditformatsum} +% \begin{macrocode} +\providecommand{\creditformatsum}[1]{\creditformat{#1}} +% \end{macrocode} +% \end{macro} +% \end{implementation} +% +% \begin{documentation} +% \DescribeMacro{\pointformat} +% +% \end{documentation} +% \begin{implementation} +% \begin{macro}{\pointformat} +% \begin{macrocode} +\newcommand*{\pointformat}[1]{ + \fp_compare:nF {#1 = 0} { + \bool_if:NTF \l_@@_points_auto_bool + \creditformatsum + \creditformat + { + \fp_to_decimal:n {#1}\space + \fp_compare:nTF {#1=1} + \PointName + \PointsName + } + } +} +% \end{macrocode} +% \end{macro} +% \end{implementation} +% +% \begin{macrocode} +\providecaptionname{ngerman, german}{\PointName}{Punkt} +\providecaptionname{english, american, british}{\PointName}{Point} +% \end{macrocode} +% \begin{documentation} +% \DescribeMacro{\PointsName} +% +% \end{documentation} +% \begin{implementation} +% \begin{macro}{\PointsName} +% \begin{macrocode} +\providecommand{\PointsName}{Punkte} +% \end{macrocode} +% \end{macro} +% \end{implementation} +% +% \begin{macrocode} +\providecaptionname{ngerman, german}{\PointsName}{Punkte} +\providecaptionname{english, american, british}{\PointsName}{Points} +% \end{macrocode} +% Has to be initialized after captionnames have been defined +% \begin{macrocode} +\AtBeginDocument{ + \ptxcd_update_headline_boxes: + \_@@_adjust_headheight: + \global\let\ConfigureHeadline\ptxcd_ConfigureHeadline:n +} +% \end{macrocode} +% task environment +% \begin{macrocode} +\DeclareSectionCommand[% + style=section,% + level=2,% + indent=\z@,% + beforeskip=\cs_if_exist_use:NF \scr@subsection@beforeskip {-3.25ex\@plus -1ex \@minus -.2ex},% + afterskip=\cs_if_exist_use:NF \scr@subsection@afterskip {1.5ex \@plus .2ex},% + tocstyle=section,% + tocindent=\cs_if_exist_use:NF \scr@tso@subsection@indent {1.5em},% + tocnumwidth=\cs_if_exist_use:NF \scr@tso@subsection@numwidth {2.3em},% +]{task} +% \end{macrocode} +% \begin{documentation} +% \DescribeMacro{\thetask} +% +% \end{documentation} +% \begin{implementation} +% \begin{macro}{\thetask} +% \begin{macrocode} +\renewcommand*{\thetask}{ + \g_ptxcd_ex_sheetnum_tl\tl_if_empty:NF \g_ptxcd_ex_sheetnum_tl{.} + \arabic{task} +} +% \end{macrocode} +% \end{macro} +% \end{implementation} +% +% \begin{documentation} +% \DescribeMacro{\taskformat} +% +% \end{documentation} +% \begin{implementation} +% \begin{macro}{\taskformat} +% \begin{macrocode} +\newcommand*{\tasklabel}{\thetask} +\renewcommand*{\taskformat}{\taskname\tasksep\tasklabel{}} +% \end{macrocode} +% \end{macro} +% \end{implementation} +% +% \begin{macrocode} +\let\@task\task +\cs_undefine:N \task +% \end{macrocode} +% \begin{documentation} +% \DescribeEnv{task} +% +% \end{documentation} +% \begin{environment}{task} +% \begin{macrocode} +\NewDocumentEnvironment{task}{om}{ + \IfNoValueF{#1}{\keys_set:nn {ptxcd/task}{#1}} + \@task{#2} + \edef\@currenttasklabel{\tasklabel} +}{ + \_@@_save_task_properties:nnnn {} {\thetask} {#2} { + \bool_if:NTF \l_@@_points_auto_bool { + \fp_to_decimal:N \g_@@_ex_collected_points_fp + }{ + \fp_to_decimal:N \l_@@_task_points_fp + } + } + \fp_gzero:N \g_@@_ex_collected_points_fp +} +% \end{macrocode} +% \changes{v4.00}{2025-01-26}{Write task properties diractly per task/subtask} +% \begin{macrocode} +\cs_new:Nn \_@@_save_task_properties:nnnn { + \iow_now:Ne \@auxout { + \exp_not:N \ptxcd@TaskProperties {#1} {#2} { + \tl_if_empty:cF {l_@@_#1credit_tl} {credit=\tl_to_str:v {l_ptxcd_#1credit_tl},} + \tl_if_blank:nF {#3} {title=\tl_to_str:n {#3},} + } {#4} + } + \prop_gput:cee {g_@@_#1points_collector_prop} + {#2} {#4} +} +\cs_generate_variant:Nn \_@@_save_task_properties:nnnn {nnon} +% \end{macrocode} +% +% \begin{macrocode} +\iffalse +\newcommand*{\addsubtasktocentry}[4]{ + \show\subtaskentry + %% {Dateierweiterung }{Ebene }{Gliederungsnummer }{Eintrag } + %\IfArgIsEmpty {#3}{\addcontentsline {#1}{#2}{\protect \nonumberline #4}}{\addcontentsline {#1}{#2}{\protect \numberline {#3}#4}} + \tocbasic@addxcontentsline{#1}{#2}{#3}{#4} + \iow_now:Ne \@auxout { + \exp_not:N \ptxcd@TaskProperties {\the\c@task} {\the\c@subtask} {\tl_to_str:n {#2}} { + \bool_if:NTF \l_@@_points_auto_bool { + \fp_to_decimal:N \l_@@_task_points_fp + }{ + \fp_to_decimal:N \g_@@_ex_collected_points_fp + } + } + } +} +\fi + +%\ptxcd@TaskProperties {}{5.10}{Einheitliche Syntax für Task/Subtask}{0} +\newcommand*\ptxcd@TaskProperties [4]{ + \prop_gput:cnn {g_@@_#1points_collector_prop} + {#2} {#4} + \clist_map_inline:nn {#3} { + \prop_gput_from_keyval:Nn \g_@@_property_collector_prop { + #2-##1 + } + } + \prop_gput:Nnn \g_@@_property_collector_prop {#2-points} {#4} +} +% \end{macrocode} +% \end{environment} +% \end{implementation} +% +% \begin{macrocode} +\cs_set_eq:cN {task*} \task +\cs_set_eq:cN {endtask*} \endtask +% \end{macrocode} +% subtasks +% \begin{macrocode} +\DeclareSectionCommand[% + style=section,% + level=3,% + indent=\z@,% + beforeskip=\cs_if_exist_use:NF \scr@subsubsection@beforeskip {-3.25ex\@plus -1ex \@minus -.2ex},% + afterskip=\cs_if_exist_use:NF \scr@subsubsection@afterskip {1.5ex \@plus .2ex},% + tocstyle=subsection,% + tocindent=\cs_if_exist_use:NF \scr@tso@subsubsection@indent {1.5em},% + tocnumwidth=\cs_if_exist_use:NF \scr@tso@subsubsection@numwidth {2.3em},% + counterwithin=task,% +]{subtask} +\bool_if:NT \g_@@_runin_subtask_bool { + \RedeclareSectionCommand[runin=true]{subtask} +} +% \end{macrocode} +% \begin{documentation} +% \DescribeMacro{\thesubtask} +% +% \end{documentation} +% \begin{implementation} +% \begin{macro}{\thesubtask} +% \begin{macrocode} +\renewcommand*{\thesubtask}{\alph{subtask})} +% \end{macrocode} +% \end{macro} +% \end{implementation} +% +% \begin{documentation} +% \DescribeMacro{\subtaskformat} +% +% \end{documentation} +% \begin{implementation} +% \begin{macro}{\subtaskformat} +% \begin{macrocode} +\newcommand*{\subtasklabel}{\thetask\thesubtask} +\renewcommand*{\subtaskformat}{\subtasklabel\enskip} +% \end{macrocode} +% \end{macro} +% \end{implementation} +% +% \begin{macrocode} +\setkomafont{subtask}{\mdseries\normalsize} +\let\@subtask\subtask +\cs_undefine:N \subtask +% \end{macrocode} +% \begin{documentation} +% \DescribeEnv{subtask} +% +% \end{documentation} +% \begin{environment}{subtask} +% \begin{macrocode} +\NewDocumentEnvironment{subtask}{o}{ + \begingroup + \tl_if_in:nnTF {#1} {=} { + \keys_set:nn {ptxcd/subtask} {#1} + } { + \keys_set:nn {ptxcd/subtask} {title={#1}} + } + \bool_if:NTF \l_@@_subtask_fallback_bool { + \@subtask{\IfNoValueF{#1}{#1}} + }{ + \@subtask{\l_@@_title_tl} + } + \edef\@currenttasklabel{\subtasklabel} + \_@@_save_task_properties:nnon {subtask_} {\@currenttasklabel} + {\l_@@_title_tl} {\fp_to_decimal:N \l_@@_subtask_points_fp} + \bool_if:NT \g_@@_runin_subtask_bool \strut + \tl_gset_eq:NN \g_tmpa_tl \@currentlabel + \endgroup + \edef\@currentcounter{subtask} + \protected@edef\@currentlabel{\p@subtask\thesubtask} +}{} +% \end{macrocode} +% \end{environment} +% \end{implementation} +% +% \begin{documentation} +% \DescribeEnv{subtask*} +% +% \end{documentation} +% \begin{environment}{subtask*} +% \begin{macrocode} +\NewDocumentEnvironment{subtask*}{om}{ + \begingroup + \IfNoValueF{#1}{\keys_set:nn {ptxcd/subtask}{#1}} + \@subtask{#2} + \tl_gset_eq:NN \g_tmpa_tl \@currentlabel + \endgroup + \tl_set_eq:NN \@currentlabel \g_tmpa_tl +}{} +% Solution mechanism +% + \DeclareSectionCommand[% + style=section,% + level=3,% + indent=\z@,% + beforeskip=\cs_if_exist_use:NF \scr@subsubsection@beforeskip {-3.25ex\@plus -1ex \@minus -.2ex},% + afterskip=\cs_if_exist_use:NF \scr@subsubsection@afterskip {1.5ex \@plus .2ex},% + tocstyle=subsection,% + tocindent=\cs_if_exist_use:NF \scr@tso@subsubsection@indent {1.5em},% + tocnumwidth=\cs_if_exist_use:NF \scr@tso@subsubsection@numwidth {2.3em},% + ]{@solution} + \setkomafont{@solution}{\normalfont} + \cs_new:Nn \_@@_solutionheader: { + \@solution*{\solutionname\solutionsep} + \if@newlist\global\@newlistfalse\fi + } +% \end{macrocode} +% \end{environment} +% \end{implementation} +% +% \begin{macrocode} +\box_new:N \g_ptxcd_NumberForm_box +\hbox_gset:Nn \g_ptxcd_NumberForm_box { + \rule{\fboxrule}{1ex} + \rule{1em}{\fboxrule} + \rule{\fboxrule}{1ex} + \, +} +% \end{macrocode} +% \begin{documentation} +% \DescribeMacro{\ptxcd_StudentID} +% +% \end{documentation} +% \begin{implementation} +% \begin{macro}{\ptxcd_StudentID} +% \begin{macrocode} +\newcommand*\ptxcd_StudentID[1][7]{ + \StudentIDname\StudentIDsep\prg_replicate:nn {#1} {\box_use:N \g_ptxcd_NumberForm_box} +} +% \end{macrocode} +% \end{macro} +% \end{implementation} +% +% \begin{macrocode} +\let\StudentID\ptxcd_StudentID +% \end{macrocode} +% \begin{documentation} +% \DescribeMacro{\ptxcd_StudentName} +% +% \end{documentation} +% \begin{implementation} +% \begin{macro}{\ptxcd_StudentName} +% \begin{macrocode} +\newcommand*\ptxcd_StudentName{ + \StudentNamename\StudentNamesep\hrulefill\qquad +} +% \end{macrocode} +% \end{macro} +% \end{implementation} +% +% \begin{macrocode} +\let\StudentName\ptxcd_StudentName +\let\ShortTitle\g_ptxcd_shorttitle_tl +% \end{macrocode} +% Compatibility Features +% +% \begin{macrocode} +\bool_if:NT \g_@@_compatibility_bool { + \cs_set_eq:NN \c@subsection \c@task + \cs_set_eq:NN \subsection \task + \cs_set_eq:NN \c@subsubsection \c@subtask + \cs_set_eq:NN \subsubsection \subtask + \cs_set_eq:NN \thetask \thesubsection + \cs_set_eq:NN \thesubtask \thesubsection +} +\file_if_exist_input:n {\g_@@_config_prefix_tl\g_ptxcd_department_str.cfg} +\ptxcd_makeheadrule[color=identbarcolor, width=\textwidth]{ptxcd_headrule} +% \end{macrocode} +% Point referencing +% \begin{macrocode} +\cs_if_exist:NTF \AddtoDoHook { + \AddtoDoHook{heading/preinit/subtask}{ + \bool_if:NT \g_@@_points_bool { + \fp_gadd:Nn \g_@@_ex_collected_points_fp {\l_@@_subtask_points_fp} + } + } + \AddtoDoHook{heading/preinit/task}{ + \fp_gzero:N \g_@@_ex_collected_points_fp + } +} { + \msg_warning:nnnn {tudaexercise} {outdated-koma-script} {point~references} {3.27} +} +\msg_new:nnn {tudaexercise} {points-differ} { + Value~of~points~changed~for~at~least~one~task.\\ + Please~rerun~LaTeX~to~get~correct~references~and~calculations. +} +\msg_new:nnn {tudaexercise} {empty-point-mapping} { + I~could~not~find~references~for~points~in~the~aux~file.\\ + Please~rerun~LaTeX~to~get~correct~references~and~calculations. +} +\msg_new:nnn {tudaexercise} {point-referencing-disabled} { + You~try~to~use~#1.\\ + This~function~is~only~available~with~points=true~or~points=auto.\\ + Please~activate~referencing~to~use~it. +} +\bool_if:NTF \g_@@_points_bool { + \BeforeClosingMainAux{ + \tl_clear:N \l_tmpa_tl + \tl_clear:N \l_tmpb_tl + \fp_zero:N \l_tmpa_fp + \prop_map_inline:Nn \g_@@_points_collector_prop { + \tl_put_right:Nn \l_tmpa_tl {#1=#2,} + \fp_add:Nn \l_tmpa_fp {#2} + } + \prop_map_inline:Nn \g_@@_subtask_points_collector_prop { + \tl_put_right:Nn \l_tmpa_tl {#1=#2,} + } + \prop_map_inline:Nn \g_@@_loaded_points_prop { + \tl_put_right:Nn \l_tmpb_tl {#1=#2,} + } + \tl_if_eq:NNF \l_tmpa_tl \l_tmpb_tl { + \msg_warning:nn {tudaexercise} {points-differ} + } + \iow_now:Nx \@auxout{ + \exp_not:N \ptxcd@LoadPoints[\the\c@task][\fp_use:N \l_tmpa_fp]{\l_tmpa_tl} + } + } + \cs_new:Nn \_@@_getPoints:n { + \prop_if_in:NnTF \g_@@_loaded_points_prop {#1} + {\prop_item:Nn \g_@@_loaded_points_prop {#1}} + {\nfss@text{\reset@font\bfseries??}} + } + \cs_generate_variant:Nn \_@@_getPoints:n {x} + \newcommand{\getPoints}[1]{\_@@_getPoints:x {#1}} + \newcommand{\refPoints}[1]{ + \edef\x{#1} + \cs_if_exist:cTF {r@\x} { + \str_if_in:cnTF {r@\x} {subtask} { + \tl_set_eq:Nc \l_tmpa_tl {r@\x} + \getPoints{\tl_item:Nn \l_tmpa_tl {2}\tl_item:Nn \l_tmpa_tl {1}} + } { + \getPoints{\tl_head:v {r@\x}} + } + }{ + \nfss@text{\reset@font\bfseries??} + } + } + \newcommand{\getPointsTotal}{ + \fp_use:N \g_@@_points_total_fp + } +% \end{macrocode} +% \DescribeMacro{\getTaskProperty}\oarg{Task Number}{title/credit/points} +% Suggested in PR \# 316 \url{https://github.com/tudace/tuda_latex_templates/pull/316} +% \changes{v4.00}{2025-01-26}{Add Interface to access task title} +% \begin{macrocode} +\NewDocumentCommand{\getTaskProperty}{O{\@currenttasklabel}m}{ + \exp_args:Ne \tl_show:n {#1-#2} + \prop_show:N \g_@@_property_collector_prop + \prop_if_in:NnTF \g_@@_property_collector_prop {#1-#2} + {\prop_item:Nn \g_@@_property_collector_prop {#1-#2}} + {{\nfss@text{\reset@font\bfseries??}}} +} + + \NewDocumentCommand{\mapPoints}{sO{1}m}{ + \mapTasks[skip-zero-points=true,\IfBooleanF{#1}{subtask=false},start-task=#2]{#3}{#3} + } +% \end{macrocode} +% \changes{v4.00}{2025-01-26}{Add mapping Mechanismus including subtasks based on Pull-request 316} +% \begin{Syntax} +% \_@@_point_mapping_aux:nnn \marg{task/subtask} \marg{start value} \marg{action to do before continuing the loop} +% \end{Syntax} +% \begin{macrocode} +\cs_new:Nn \_@@_point_mapping_aux:nnn { + \bool_set_true:c {l_@@_#1_bool} + \cs_set:ce {_@@_cached_#1_counter:} {\int_eval:n {\value{#1}}} + \setcounter{#1}{#2} + \bool_while_do:cn {l_@@_#1_bool} { + \prop_get:NeNTF \g_@@_loaded_points_prop {\use:c {#1label}} \l_tmpa_tl { +% \end{macrocode} +% mechanism to skip item if it doesn't have points +% \begin{macrocode} + \bool_if:NT \l_@@_skip_zero_points_bool + {\fp_compare:nF {\l_tmpa_tl = 0}} + \use:n + { + \tl_build_put_right:Ne \l_ptxcd_tmp_tl { + \exp_not:c {_@@_map_points_#1:nn} {\use:c {#1label}} {\l_tmpa_tl} + } + } + #3 + \stepcounter{#1} + } {\bool_set_false:c {l_@@_#1_bool}} + } + \setcounter{#1}{\use:c {_@@_cached_#1_counter:}} +} +% \end{macrocode} +% \changes{v4.00}{2025-01-26}{Add generic mechanism to iterate over tasks} +% \begin{macrocode} +\keys_define:nn {ptxcd/task-mapping} { + task .bool_set:N = \l_@@_task_bool, + task .initial:n = false, + subtask .bool_set:N = \l_@@_subtask_bool, + subtask .initial:n = false, + skip-zero-points .bool_set:N = \l_@@_skip_zero_points_bool, + skip-zero-points .initial:n = false, + start-task .int_set:N = \l_@@_start_task_int, + start-task .initial:n = 1, +} + +\NewDocumentCommand{\mapTasks}{O{}+m+m}{ + \cs_gset:Ne \_@@_restore_task_counters: { + \exp_not:N \setcounter{task}{\the\value{task}} + \exp_not:N \setcounter{subtask}{\the\value{subtask}} + } + \group_begin: + \keys_set:ne {ptxcd/task-mapping} { + task = true, + subtask=true, + #1 + } + \cs_gset:Nn \_@@_map_points_task:nn {#2} + \cs_gset:Nn \_@@_map_points_subtask:nn {#3} + + \prop_if_empty:NTF \g_@@_loaded_points_prop { + \msg_warning:nn {tudaexercise} {empty-point-mapping} + \tl_set:Nn \l_ptxcd_tmp_tl {\_@@_map_points_task:nn {?task?} {?points?}} + } { + \tl_build_begin:N \l_ptxcd_tmp_tl + \exp_args:Nne \use:n { + \bool_if:NTF \l_@@_task_bool \use:n \use_ii:nn + {\_@@_point_mapping_aux:nnn {task} {\int_use:N \l_@@_start_task_int}} + }{ + \bool_if:NT \l_@@_subtask_bool { + \exp_not:n { + \bool_set_true:N \l_@@_subtask_bool + \_@@_point_mapping_aux:nnn {subtask} {1} {} + } + } + } + \tl_build_end:N \l_ptxcd_tmp_tl + } + \cs_gset_eq:NN \g_ptxcd_tmp_tl \l_ptxcd_tmp_tl + \exp_last_unbraced:No + \group_end: + \g_ptxcd_tmp_tl +% \end{macrocode} +% check if between tabular rows to use \noalign +% \begin{macrocode} + \ifhmode\else\ifvoid\@arstrutbox\else\noalign\fi\fi + {\_@@_restore_task_counters:} + } +} { + \newcommand{\getPoints}[1]{ + \msg_error:nnn {tudaexercise} {point-referencing-disabled} {\getPoints} + } + \newcommand{\refPoints}[1]{ + \msg_error:nnn {tudaexercise} {point-referencing-disabled} {\refPoints} + } + \newcommand{\getPointsTotal}[1]{ + \msg_error:nnn {tudaexercise} {point-referencing-disabled} {\getPointsTotal} + } + \NewDocumentCommand{\mapPoints}{som} { + \msg_error:nnn {tudaexercise} {point-referencing-disabled} {\mapPoints} + } + \NewDocumentCommand{\getTaskProperty}{om}{ + \msg_error:nnn {tudaexercise} {point-referencing-disabled} {\getTaskProperty} + } +} +% \end{macrocode} +% \begin{documentation} +% \DescribeMacro{\ptxcd@LoadPoints} +% +% \end{documentation} +% \begin{implementation} +% \begin{macro}{\ptxcd@LoadPoints} +% \begin{macrocode} +\int_new:N \g_@@_max_task_int +\NewDocumentCommand{\ptxcd@LoadPoints}{oO{0}m}{ + \IfNoValueF{#1}{\int_gset:Nn \g_@@_max_task_int {#1}} + \prop_gset_from_keyval:Nn \g_@@_loaded_points_prop { + #3 + } + \fp_gset:Nn \g_@@_points_total_fp {#2} +} +% \end{macrocode} +% \end{macro} +% \end{implementation} +% +% \begin{macrocode} +\endinput +% \end{macrocode} + +% +% \iffalse +%</body> +% \fi +% \Finale +% \fi^^A No documentation on this +\endinput diff --git a/Master/texmf-dist/source/latex/tuda-ci/tudafonts.dtx b/Master/texmf-dist/source/latex/tuda-ci/tudafonts.dtx new file mode 100644 index 00000000000..a6471b429f6 --- /dev/null +++ b/Master/texmf-dist/source/latex/tuda-ci/tudafonts.dtx @@ -0,0 +1,164 @@ +% \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{tudafonts.dtx} +%<*package> +%<@@=ptxcd> +\NeedsTeXFormat{LaTeX2e}[2022/06/01] +\ProvidesPackage{tudafonts} +%</package> +%<*driver|package> + [2025-01-26 v4.00 + font setup for TUDa-CI, TU Darmstadt's Corporate Design] +%</driver|package> +%<*driver> +\typeout{***********************************************************} +\typeout{No documentation included in this file! Please see tuda-ci.pdf for more information.} +\typeout{***********************************************************} +\stop +%</driver> +%<*driver>^^A Preparation for real docstrip documentation +\providecommand*{\TUDaDocDTXfiles}{tudafonts.dtx} +\input{tuda-ci.dtx} +%</driver> +% \fi +% +% \changes{v4.00}{2025-01-26}{Converted to DTX file} +% +% \DoNotIndex{\newcommand,\newenvironment} +% +% \GetFileInfo{tudafonts.dtx} +% \title{The \textsf{tudafonts} package} +% \author{Marei Peischl\thanks{Email: \href{mailto:tuda-ci@peitex.de}{tuda-ci@peitex.de}}} +% \date{\fileversion~from \filedate} +% +% \maketitle +% +% +% \MaybeStop{} +% +% \section{Implementation} +% +% \iffalse +%<*package> +% \fi +% \begin{macrocode} +\expandafter\newif\csname if@ptxcd@T1\endcsname +\DeclareOption{T1}{\csname @ptxcd@T1true\endcsname} +\ProcessOptions\relax +\RequirePackage{iftex} +\RequirePackage{anyfontsize} +\ifPDFTeX + \csname @ptxcd@T1true\endcsname + %Fallback for older versions + \expandafter\ifx\csname DeclareUnicodeCharacter\endcsname\relax + \RequirePackage[utf8]{inputenc} + \fi + \expandafter\ifx\csname texteuro\endcsname\relax + \RequirePackage{textcomp} + \fi + \DeclareUnicodeCharacter{20AC}{\texteuro} +\fi +\csname if@ptxcd@T1\endcsname + \ifLuaTeX + \RequirePackage[utf8]{luainputenc} + \fi + \RequirePackage{XCharter}%activates T1 + \PassOptionsToPackage{type1}{roboto} + \PassOptionsToPackage{type1}{roboto-mono} + % Workaround for missing ligature replacements with roboto in T1 + \ifXeTeX + \else + \RequirePackage{microtype} + \DisableLigatures{encoding = *, family=\sfdefault,shape = sc } + \fi +\else + \RequirePackage{fontspec} + \setmainfont{XCharter} +\fi +\RequirePackage{roboto} +\csname if@ptxcd@T1\endcsname + \newcommand\robotoblackspaced{% + \robotoblack + \lsstyle + } +\else + \newfontfamily\robotoblackspaced + [ Numbers = {\roboto@figurealign,\roboto@figurestyle}, + UprightFont = *-Black , + ItalicFont = *-BlackItalic, + LetterSpace=26, + WordSpace=2.2 + ] + {Roboto} +\fi +\IfFileExists{roboto-mono.sty}{ + \RequirePackage{roboto-mono} +}{ + \PackageWarningNoLine{tudafonts}{% + The font package roboto-mono.sty could not be found. + Probably your TeX-distribution is outdated.\MessageBreak + For correct font setup either install it manually or update you distribution} +} +% \end{macrocode} +% +% \begin{macro}{\ptxcd@sffamily@lining} +% \begin{macrocode} +\def\ptxcd@sffamily@lining{\robototlf} +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +\let\accentfont\robotoslab +\DeclareTextFontCommand{\textaccent}{\accentfont} +% \end{macrocode} +% adjust LaTeX Logo kerning to font +% \begin{macrocode} +\DeclareRobustCommand{\LaTeX}{% + {L\setbox\z@\hbox{\check@mathfonts \fontsize\sf@size\z@ + \math@fontsfalse\selectfont A}\kern-.57\wd\z@ + \sbox\tw@ T\vbox to \ht\tw@{\copy\z@ \vss}\kern-.2\wd\z@}% + {% + \ifdim\fontdimen1\font=\z@ \else \count\z@=\fontdimen5\font + \multiply\count\z@ by 64\relax\divide\count\z@ by\p@ + \count\tw@=\fontdimen1\font \multiply\count\tw@ by\count\z@ + \divide\count\tw@ by 64\relax\divide\count\tw@ by\tw@ + \kern-\the\count\tw@ sp\relax\fi}% + \TeX} +% \end{macrocode} +% +% \iffalse +%</package> +% \fi +% +% \Finale +% \fi^^A No documentation on this +\endinput diff --git a/Master/texmf-dist/source/latex/tuda-ci/tudaleaflet.dtx b/Master/texmf-dist/source/latex/tuda-ci/tudaleaflet.dtx new file mode 100644 index 00000000000..259f2299374 --- /dev/null +++ b/Master/texmf-dist/source/latex/tuda-ci/tudaleaflet.dtx @@ -0,0 +1,614 @@ +% \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{tudaleaflet.dtx} + [2025-01-26 v4.00 Leaflets using the Corporate Design of TU Darmstadt] +\typeout{***********************************************************} +\typeout{No documentation included in this file! Please see tuda-ci.pdf for more information and DEMO-TUDaLeaflet.tex/.pdf for an example of use.} +\typeout{***********************************************************} +\stop +%</driver> +%<*class&initialization> +%<@@=ptxcd> +\NeedsTeXFormat{LaTeX2e}[2020/10/01] +\ProvidesExplPackage{tudaleaflet}{2025-01-26}{4.00}{Leaflets using the Corporate Design of TU Darmstadt} +%</class&initialization> +% +% +%<*driver>^^A Preparation for real docstrip documentation +\providecommand*{\TUDaDocDTXfiles}{tudaleaflet.dtx} +\input{tuda-ci.dtx} +%</driver> +% \fi +% +% \changes{v4.00}{2025-01-26}{Converted to DTX file} +% +% \DoNotIndex{\newcommand,\newenvironment} +% +% \GetFileInfo{tudaleaflet.dtx} +% \title{The \textsf{tudaleaflet} package} +% \author{<+author+>\thanks{Email: \href{mailto:<+email+>}{<+email+>}}} +% \date{\fileversion~from \filedate} +% +% \maketitle +% +% +% \DescribeMacro{\maketitle} +% +% +% \DescribeMacro{\section} +% +% +% \DescribeMacro{\subsection} +% +% +% \DescribeMacro{\subsubsection} +% +% +% \DescribeMacro{\subtitle} +% +% +% \DescribeMacro{\AddSponsor} +% +% +% \DescribeMacro{\sponsors} +% +% +% \DescribeMacro{\footergraphics} +% +% +% \DescribeMacro{\titleimage} +% +% +% \DescribeMacro{\addTitleBox} +% +% +% \DescribeMacro{\addTitleBoxLogo} +% +% +% \MaybeStop{} +% +% \section{Implementation} +% +% \iffalse +%<*initialization> +% \fi +% \begin{macrocode} +\str_const:Nn \c_@@_base_str {leaflet} +\tl_new:N \g_ptxcd_sponsor_pos_tl +\keys_define:nn {ptxcd/leaflet} { + sponsor .choices:nn = {title,lastfoot,manual}{\tl_gset_eq:NN \g_ptxcd_sponsor_pos_tl \l_keys_choice_tl}, + sponsor .initial:n = title, +% \end{macrocode} +% \iffalse +%</initialization> +%<*body> +% \fi +% \begin{macrocode} +\DeclareOption*{\PassOptionsToClass{\CurrentOption}{leaflet}} + +\ProcessKeyOptions[ptxcd/leaflet] +\ProcessOptions\relax +\bool_if:NT \g_ptxcd_colorbacksubtitle_bool { + \bool_if:NF \g_ptxcd_colorbacktitle_bool { + \msg_new:nnnn {ptxcd/leaflet} {incompatible-options} {You~cannot~use~the~setting~#1~at~the~same~time~as~#2.} {See~TUDaLeaflet~documentation~for~further~information.} + \msg_error:nn {ptxcd/leaflet} {incompatible-options} {colorbacksubtitle=true} {colorbacktitle=false} + } +} +\LoadClass[notumble]{leaflet} +% \end{macrocode} +% to workaround incompatibilities between leaflet and scrextend +% \begin{macrocode} +\let\sectfont\relax +\RequirePackage{scrextend} +\RequirePackage{scrlayer} +\PassOptionsToPackage{cmyk}{tudacolors} +\RequirePackage[paper=leaflet]{tudarules} +\setlength{\headheight}{1cm}%to add headline +\setlength{\footheight}{2mm} +\setmargins{10mm}{\dimexpr10mm+\headheight\relax}{10mm}{10mm}%Hardcoded, according to the guideline +\DeclareNewLayer[ + head, + mode=picture, + contents=\putUL{\box_use:N \ptxcd_headrule_box} +]{TUDa.flyer.headline} +\DeclareNewLayer[ + foot, + mode=picture, + height=\z@, + voffset=\paperheight-14mm, + contents=\smash{\box_use:N \ptxcd_footrule_box} +]{TUDa.flyer.footline} +\DeclareNewPageStyleByLayers{TUDa.flyer}{ + TUDa.flyer.headline, + TUDa.flyer.footline, +} +% \end{macrocode} +% Title specific additions to pagestyle +% +% \begin{macrocode} +\DeclareNewLayer[textarea,mode=picture, + addheight=\headheight-\box_dp:N \ptxcd_headrule_box+\dp\strutbox, + contents={ + \bool_if:NT \g_ptxcd_colorback_bool {\putLL{\color{identbarcolor}\rule{\layerwidth}{\layerheight}}} + \tl_if_empty:NTF \g_ptxcd_titleimage_code_tl + {\bool_if:NT \g_ptxcd_colorback_bool {\putLL{\color{identbarcolor}\rule{\layerwidth}{\layerheight}}}} + {\putUL{\color{identbarcolor}\raisebox{-\height}{\parbox[t]{\textwidth}{ + \let\width\layerwidth + \let\height\layerheight + \g_ptxcd_titleimage_code_tl + }}}} + \put(\dim_to_decimal_in_unit:nn {\layerwidth-\_@@_logowidth: + } {\unitlength}, + \dim_to_decimal_in_unit:nn {\layerheight-\box_ht:N \g_ptxcd_title_info_box - .5\c_ptxcd_logoheight_dim} {\unitlength}){ + \rlap{\box_use:N \g_ptxcd_title_info_box} + } + } +]{title.TUDa.image} +\DeclareNewLayer[textarea,background,mode=picture, + contents={ + \bool_if:NT \g_ptxcd_colorbacktitle_bool { + \color{identbarcolor}\rule{\layerwidth}{\layerheight} + } + } +]{title.TUDa.background} +\DeclareNewPageStyleByLayers{title.TUDa}{ + title.TUDa.image, + title.TUDa.background, + TUDa.flyer.headline, + TUDa.flyer.footline, +} +\cs_new:Nn \ptxcd_Setup_Title_box: { + \hbox_gset:Nn \g_ptxcd_title_info_box + { + \parbox{\dim_eval:n {\_@@_logowidth: + \_@@_logosep:}}{ + \seq_use:Nn \g_ptxcd_title_info_seq {\par\nointerlineskip\vspace{\dim_eval:n {\c_ptxcd_largerule_dim+\c_ptxcd_rulesep_dim}}} + } + } +} +% \end{macrocode} +% \begin{documentation} +% \DescribeMacro{\sectionlinesformat} +% +% \end{documentation} +% \begin{implementation} +% \begin{macro}{\sectionlinesformat} +% \begin{macrocode} +\newcommand*\sectionlinesformat[1]{% + \parbox{\linewidth}{ + \rule[\ptxcd_titlerule_sep:]{\linewidth}{\g_ptxcd_titlerule_dim}\par\nointerlineskip + #1\strut\rule[-\dp\strutbox]{0pt}{\dp\strutbox}\par\nointerlineskip + \skip_vertical:n {\ptxcd_titlerule_sep: -.5\dp\strutbox} + \smash{\rule{\linewidth}{\g_ptxcd_titlerule_dim}} + } +} +% \end{macrocode} +% \end{macro} +% \end{implementation} +% +% \begin{documentation} +% \DescribeMacro{\raggedtitle} +% +% \end{documentation} +% \begin{implementation} +% \begin{macro}{\raggedtitle} +% \begin{macrocode} +\newcommand*{\raggedtitle}{\raggedright} +% \end{macrocode} +% \end{macro} +% \end{implementation} +% +% \begin{documentation} +% \DescribeMacro{\maketitle} +% +% \end{documentation} +% \begin{implementation} +% \begin{macro}{\maketitle} +% \begin{macrocode} +\renewcommand*{\maketitle}{ + \def\and{,~ } + \hbox_gset:Nn \g_ptxcd_sponsor_box { + \edef\height{\noexpand\dimexpr\dim_eval:n {\_@@_logosep: + .5\c_ptxcd_logoheight_dim}} + \parbox[b]{\textwidth}{% + \rule{\linewidth}{\g_ptxcd_titlerule_dim}\par\nointerlineskip + \vspace{.1\c_ptxcd_logoheight_dim} + \seq_use:Nn \g_ptxcd_sponsors_seq {\hfill}\par + \addvspace{.1\c_ptxcd_logoheight_dim} + \ifx\@sponsors\@empty + \else + \@sponsors\par + \fi + \par\nointerlineskip\addvspace{\dim_eval:n {.1\c_ptxcd_logoheight_dim-\c_ptxcd_rulesep_dim}} + } + } + \begin{titlepage} + \def\thefootnote{\fnsymbol{footnote}} + \hbox_gset:Nn \g_ptxcd_title_box { + \parbox[t]{\linewidth}{ + \begin{minipage}[b]{\linewidth} + \bool_if:NT \g_ptxcd_colorbacktitle_bool {\color{textonaccentcolor}} + \begin{addmargin}{3mm} + \raggedtitle + \Huge + \usekomafont{disposition} + \usekomafont{title} + \leavevmode% + \@title\strut\par + \vskip0pt + \end{addmargin} + \end{minipage}% + \par\nointerlineskip + \bool_if:NTF \g_ptxcd_colorbacksubtitle_bool + {\textcolor{white}{\rule{\linewidth}{\c_ptxcd_rulesep_dim}}} + {\rule{\linewidth}{\g_ptxcd_titlerule_dim}} + \par + \vspace{\c_ptxcd_rulesep_dim} + \begin{addmargin}{3mm} + \bool_if:NT \g_ptxcd_colorbacksubtitle_bool {\color{textonaccentcolor}} + \raggedtitle + \usekomafont{disposition} + {\ifx\@subtitle\@empty\else\usekomafont{subtitle}{\@subtitle\par}\fi}% + {% + \usekomafont{author} + \lineskip 0.75em + \@author + \par + }% + {\usekomafont{date}{\@date\par}}% + \end{addmargin} + \nointerlineskip + \vspace{\c_ptxcd_rulesep_dim} + \bool_if:NT \g_ptxcd_colorbacktitle_bool + { + \textcolor{white}{\rule{\linewidth}{\c_ptxcd_rulesep_dim}}\par\nointerlineskip + } + \rule{\linewidth}{\g_ptxcd_titlerule_dim}\par + } + } + \ptxcd_adjust_titlepage_style: + \par + \vspace*{\dimexpr.5\c_ptxcd_logoheight_dim-\topskip} + \box_use:N \g_ptxcd_title_box + \par + \vfill\null + \if@twoside + \@tempswatrue + \expandafter\ifnum \@nameuse{scr@v@3.12}>\scr@compatibility\relax + \else + \ifx\@uppertitleback\@empty\ifx\@lowertitleback\@empty + \@tempswafalse + \fi\fi + \fi + \fi +\end{titlepage} +\setcounter{footnote}{0}% +\global\let\and\relax +} +% \end{macrocode} +% \end{macro} +% \end{implementation} +% +% \begin{macrocode} +\cs_set:Nn \ptxcd_adjust_titlepage_style: { + \dim_set:Nn \l_tmpa_dim {1\c_ptxcd_logoheight_dim}%\fp_to_dim:n {2.8\baselineskip}} + \dim_compare:nT {\box_ht:N \g_ptxcd_title_box < \l_tmpa_dim} { + \skip_set:Nn \g_ptxcd_title_fill_skip {\dim_eval:n {\l_tmpa_dim - \box_ht:N \g_ptxcd_title_box}} + } + \dim_set:Nn \l_tmpa_dim { + +\box_ht:N \g_ptxcd_title_box + +.5\c_ptxcd_logoheight_dim + +\box_dp:N \g_ptxcd_title_box + +\g_ptxcd_title_fill_skip + } + \ModifyLayer[ + addvoffset=\l_tmpa_dim, + addheight= -\l_tmpa_dim + ]{title.TUDa.image} + \DeclareNewLayer[clone=TUDa.flyer.footline, + mode=picture, + align=bl, + height=\box_ht:N \g_ptxcd_sponsor_box + \box_dp:N \g_ptxcd_sponsor_box, + addvoffset=-\dp\strutbox, + contents=\raisebox{\depth}{\box_use:N \g_ptxcd_sponsor_box} + ] + {title.TUDa.sponsor} + \exp_args:Nx \tl_if_eq:nnT {\g_ptxcd_sponsor_pos_tl} {title} { + \AddLayersToPageStyle{title.TUDa}{title.TUDa.sponsor} + \ModifyLayer[ + addheight=-\box_ht:N \g_ptxcd_sponsor_box -\box_dp:N \g_ptxcd_sponsor_box-\dp\strutbox + ]{title.TUDa.image} + } + \ModifyLayer[ + addvoffset={-\dim_eval:n {\headheight -\box_ht:N \ptxcd_headrule_box-\box_dp:N \ptxcd_headrule_box }}, + height={ + \bool_if:NT \g_ptxcd_colorbacksubtitle_bool {\box_dp:N \g_ptxcd_title_box} + +\box_ht:N \g_ptxcd_title_box+\g_ptxcd_title_fill_skip+.5\c_ptxcd_logoheight_dim+ + \headheight -\box_ht:N \ptxcd_headrule_box-\box_dp:N \ptxcd_headrule_box + } + ]{title.TUDa.background} + \AddLayersToPageStyle{title.TUDa}{title.TUDa.background} + \thispagestyle{title.TUDa} + \nointerlineskip + \ptxcd_Setup_Title_box: + \par + \vspace*{\skip_use:N \g_ptxcd_title_fill_skip} + \setlength{\fboxsep}{\z@} +} +% \end{macrocode} +% \begin{macrocode} +\pagestyle{TUDa.flyer} +\RequirePackage{tudafonts} +% \end{macrocode} +% \begin{documentation} +% \DescribeMacro{\familydefault} +% +% \end{documentation} +% \begin{implementation} +% \begin{macro}{\familydefault} +% \begin{macrocode} +\renewcommand*{\familydefault}{\sfdefault} +% \end{macrocode} +% \end{macro} +% \end{implementation} +% +% Titlepage font setup +% compatibility after disposition was removed from scrextend +% \begin{macrocode} +\expandafter\ifx\csname scr@fnt@disposition\endcsname\relax + \newkomafont{disposition} +\fi +\setkomafont{disposition}{\bfseries} +\setkomafont{title}{\Huge} +\setkomafont{subtitle}{} +\setkomafont{date}{} +\setkomafont{author}{} +\newkomafont{institution}{} +% \end{macrocode} +% Adjust section font setup to be komafont compatible +% \begin{macrocode} +\newkomafont{section}{} +\newkomafont{subsection}{} +\newkomafont{subsubsection}{} +% \end{macrocode} +% \begin{documentation} +% \DescribeMacro{\section} +% +% \end{documentation} +% \begin{implementation} +% \begin{macrocode} +\renewcommand\section{\@startsection{section}{1}{\z@}% + {-3.5ex \@plus -.75ex}% + {1ex}% + {\usekomafont{disposition}\usekomafont{section}\sectfont}} +\renewcommand\subsection{\@startsection{subsection}{2}{\z@}% + {-2.5ex plus -.5ex}% + {1\p@}% + {\usekomafont{disposition}\usekomafont{subsection}\sectfont}} +\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}% + {-2.5ex plus -.5ex}% + {-1em}% + {\usekomafont{disposition}\usekomafont{subsubsection}\sectfont}} +\clist_map_inline:nn {section, subsection, subsubsection} { + \cs_set_eq:cc {ptxcd_save_#1} {#1} + \exp_args:Nc \RenewDocumentCommand{#1}{sO{##3}m}{ + \IfBooleanTF{##1}{ + \use:c {ptxcd_save_#1}*{\sectionlinesformat{##3}} + }{ + \use:c {ptxcd_save_#1}[##2]{\sectionlinesformat{##3}} + } + } +} +% \end{macrocode} +% \end{implementation} +% \begin{macrocode} +\cs_new:Nn \ptxcd_titlerule_sep: {\the\dp\strutbox} +% \end{macrocode} +% \begin{documentation} +% \DescribeMacro{\subtitle} +% +% \end{documentation} +% \begin{implementation} +% \begin{macro}{\subtitle} +% \begin{macrocode} +\def\subtitle#1{\def\@subtitle{#1}} +% \end{macrocode} +% \end{macro} +% \end{implementation} +% +% \begin{macrocode} +\subtitle{} +\seq_new:N \g_ptxcd_sponsors_seq +% \end{macrocode} +% \begin{documentation} +% \DescribeMacro{\AddSponsor} +% +% \end{documentation} +% \begin{implementation} +% \begin{macro}{\AddSponsor} +% \begin{macrocode} +\def\AddSponsor{\seq_gput_right:Nn \g_ptxcd_sponsors_seq} +% \end{macrocode} +% \end{macro} +% \end{implementation} +% +% \begin{documentation} +% \DescribeMacro{\sponsors} +% +% \end{documentation} +% \begin{implementation} +% \begin{macro}{\sponsors} +% \begin{macrocode} +\def\sponsors#1{\def\@sponsors{#1}} +% \end{macrocode} +% \end{macro} +% \end{implementation} +% +% \begin{macrocode} +\sponsors{} +\box_new:N \g_ptxcd_sponsor_box +% \end{macrocode} +% \begin{documentation} +% \DescribeMacro{\footergraphics} +% +% \end{documentation} +% \begin{implementation} +% \begin{macro}{\footergraphics} +% \begin{macrocode} +\newcommand*{\footergraphics}[1]{ + \begingroup + \let\height\g_ptxcd_footheight_dim + \hbox_gset:Nn \g_ptxcd_footergraphics_box {#1} + \endgroup +} +% \end{macrocode} +% \end{macro} +% \end{implementation} +% +% \begin{macrocode} +\tl_new:N \g_ptxcd_titleimage_code_tl +\tl_gset_eq:NN \g_ptxcd_titleimage_code_tl \c_empty_tl +% \end{macrocode} +% \begin{documentation} +% \DescribeMacro{\titleimage} +% +% \end{documentation} +% \begin{implementation} +% \begin{macro}{\titleimage} +% \begin{macrocode} +\newcommand{\titleimage}[1]{\tl_gset:Nn \g_ptxcd_titleimage_code_tl {#1}} +% \end{macrocode} +% \end{macro} +% \end{implementation} +% +% \begin{macrocode} +\author{}%to remove warning if no author given +\box_new:N \g_ptxcd_title_box +\skip_new:N \g_ptxcd_title_fill_skip +\seq_new:N \g_ptxcd_title_info_seq +\box_new:N \g_ptxcd_title_info_box +\cs_new:Nn \ptxcd_make_title_info_box:n { + \setlength{\fboxsep}{1.5mm}% + \colorbox{InfoBox}{ + \makebox[\dim_eval:n {\_@@_logowidth:-\fboxsep}][r]{ + \parbox{2\c_ptxcd_logoheight_dim}{ + \usekomafont{institution} + \raggedright% + #1 + }}} +} +\cs_new:Nn \ptxcd_make_title_logo_box:n { + \setlength{\fboxsep}{\z@} + \parbox{\_@@_logowidth:}{ + \colorbox{InfoBox}{ + \rlap{ + \makebox[\dim_eval:n {\_@@_logowidth: + \_@@_logosep:}][r]{ + \colorbox{InfoBox}{#1\hspace{.3\c_ptxcd_logoheight_dim}} + } + } + } + } +} +% \end{macrocode} +% \begin{documentation} +% \DescribeMacro{\addTitleBox} +% +% \end{documentation} +% \begin{implementation} +% \begin{macro}{\addTitleBox} +% \begin{macrocode} +\newcommand{\addTitleBox}[1]{\seq_gput_right:Nn \g_ptxcd_title_info_seq {\ptxcd_make_title_info_box:n {#1}}} +% \end{macrocode} +% \end{macro} +% \end{implementation} +% +% \begin{documentation} +% \DescribeMacro{\addTitleBoxLogo} +% +% \end{documentation} +% \begin{implementation} +% \begin{macro}{\addTitleBoxLogo} +% \begin{macrocode} +\NewDocumentCommand{\addTitleBoxLogo}{sm}{ + \IfBooleanTF{#1}{ + \seq_gput_right:Nn \g_ptxcd_title_info_seq { + \ptxcd_make_title_logo_box:n {#2} + } + }{ + \seq_gput_right:Nn \g_ptxcd_title_info_seq { + \ptxcd_make_title_logo_box:n { + \hbox_set:Nn \l_tmpa_box { + \includegraphics[width=1.5\c_ptxcd_logoheight_dim]{#2} + } + \dim_set:Nn \l_tmpa_dim {2\c_ptxcd_logoheight_dim/3} + \dim_compare:nTF {\box_ht:N \l_tmpa_box > \l_tmpa_dim} + {\includegraphics[width=\l_tmpa_dim]{#2}} + {\box_use:N \l_tmpa_box} + } + } + } +} +% \end{macrocode} +% \end{macro} +% \end{implementation} +% +% \begin{macrocode} +\addTitleBoxLogo*{\makebox[\linewidth][l]{\_@@_insert_logo:}} +\date{} +\let\insertSponsors\relax +\str_case:Vn \g_ptxcd_sponsor_pos_tl { + {lastfoot}{ + \AtEndDocument{ + \par\vspace*{\fill} + \leavevmode\raisebox{\dimexpr\depth-\baselineskip}[0pt][0pt]{ + \box_use:N \g_ptxcd_sponsor_box + } + } + } + {manual} { + \renewcommand*{\insertSponsors}{\par\vfill\leavevmode\box_use:N \g_ptxcd_sponsor_box\par\nobreak\nointerlineskip\rule{\linewidth}{\g_ptxcd_titlerule_dim} + } + } +} +\file_if_exist_input:n {\g_@@_config_prefix_tl\g_ptxcd_department_str.cfg} +\ptxcd_makeheadrule[color=identbarcolor]{ptxcd_headrule} +\ptxcd_makefootrule{ptxcd_footrule} +\endinput +% \end{macrocode} + +% +% \iffalse +%</body> +% \fi +% +% \Finale +% \fi^^A No documentation on this +\endinput diff --git a/Master/texmf-dist/source/latex/tuda-ci/tudaletter.dtx b/Master/texmf-dist/source/latex/tuda-ci/tudaletter.dtx new file mode 100644 index 00000000000..0e556c92dd9 --- /dev/null +++ b/Master/texmf-dist/source/latex/tuda-ci/tudaletter.dtx @@ -0,0 +1,536 @@ +% \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{tudaletter.dtx}[2025-01-26 v4.00 Letters for TUDa-CI, Corporate Design of TU Darmstadt] +\typeout{***********************************************************} +\typeout{No documentation included in this file! Please see tuda-ci.pdf for more information and DEMO-TUDaLetter.tex/.pdf for an example of use.} +\typeout{***********************************************************} +\stop +%</driver> +%<*class&initialization> +%<@@=ptxcd> +\NeedsTeXFormat{LaTeX2e}[2020/10/01] +\ProvidesExplClass{tudaletter}{2025-01-26}{4.00}{Letters for TUDa-CI, Corporate Design of TU Darmstadt} +%</class&initialization> +%<*driver>^^A Preparation for real docstrip documentation +\providecommand*{\TUDaDocDTXfiles}{tudaletter.dtx} +\input{tuda-ci.dtx} +%</driver> +% \fi +% +% \changes{v4.00}{2025-01-26}{Converted to DTX file} +% +% \DoNotIndex{\newcommand,\newenvironment} +% +% \GetFileInfo{tudaletter.dtx} +% \title{The \textsf{tudaletter} package} +% \author{<+author+>\thanks{Email: \href{mailto:<+email+>}{<+email+>}}} +% \date{\fileversion~from \filedate} +% +% \maketitle +% +% +% \DescribeMacro{\fileversion} +% +% +% \DescribeMacro{\filedate} +% +% +% \DescribeMacro{\opening} +% +% +% \DescribeMacro{\letterpagestyle} +% +% +% \MaybeStop{} +% +% \section{Implementation} +% +% \iffalse +%<*class> +%<*initialization> +% \fi +% +% +% \begin{macrocode} +\str_const:Nn \c_@@_base_str {letter} +\str_new:N \g_ptxcd_department_str +\bool_new:N \g_@@_adjust_textwidth_bool +\keys_define:nn {ptxcd/letter} { + logo .bool_gset:N = \g_@@_letter_logo_bool, + logo .default:n = true, + logo .initial:n = true, + premium .bool_gset:N = \g_@@_letter_premium_bool, + premium .default:n = true, + firstpagenumber .bool_gset:N = \g_@@_firstpagenumber_bool, + firstpagenumber .initial:n = true, + raggedright .bool_gset:N = \g_@@_letter_raggedright_bool, + headrule .bool_gset:N = \g_@@_letter_headrule_bool, + headrule .initial:n = true, + headrule .default:n = true, + textwidth .choice:, + textwidth / wide .code:n = \bool_gset_true:N \g_@@_adjust_textwidth_bool, + textwidth / narrow .code:n = \bool_gset_false:N \g_@@_adjust_textwidth_bool, + textwidth .initial:n = wide, +%</initialization> +%<gobble>} +% \end{macrocode} +% \iffalse +%<*packages> +% \fi +% \begin{macrocode} +% \begin{documentation} +% \DescribeMacro{\@fontsizefilebase} +% +% \end{documentation} +% \begin{implementation} +% \begin{macro}{\@fontsizefilebase} +% \begin{macrocode} +\newcommand*{\@fontsizefilebase}{tudalettersize} +% \end{macrocode} +% \end{macro} +% \end{implementation} +% +% \begin{macrocode} +\PassOptionsToClass{fontsize=10pt,parskip=full-}{scrletter} +\PassOptionsToPackage{refline=nodate,addrfield=topaligned,firstfoot=false,pagenumber=botright}{scrletter} +\LoadClass{scrletter} +% \end{macrocode} +% Load the TUDa-colorscheme +% \begin{macrocode} +\RequirePackage{tudacolors} +\RequirePackage{tudafonts} +\RequirePackage{graphicx} +\RequirePackage{afterpage} +\RequirePackage{ragged2e} +\bool_if:NTF \g_@@_letter_premium_bool { + \cs_new:Nn \ptxcd_premiumcolor: {accentcolor} + \cs_new:Nn \ptxcd_use_premiumcolor: {\color{accentcolor}} + \cs_set:Nn \ptxcd_use_premiumcolor_text: {\color{textaccentcolor}} +}{ + \cs_new:Nn \ptxcd_premiumcolor: {black} + \let\ptxcd_use_premiumcolor:\relax + \let\ptxcd_use_premiumcolor_text:\relax +} +% \end{macrocode} +% %%%%Briefbogen +% % Spacing: +% \begin{macrocode} +\dim_const:Nn \c_ptxcd_HeadMargin_dim {12.5mm} +\dim_const:Nn \c_ptxcd_LeftMargin_dim {24.0mm} +\dim_const:Nn \c_@@_firstpage_extraindent_dim {-\paperwidth+120mm +\c_ptxcd_LeftMargin_dim +\c_ptxcd_HeadMargin_dim} +\bool_if:NTF \g_@@_adjust_textwidth_bool + { + \dim_const:Nn \c_ptxcd_RightMargin_dim {\c_ptxcd_HeadMargin_dim} + }{ + \dim_const:Nn \c_ptxcd_RightMargin_dim {\c_ptxcd_HeadMargin_dim-\c_@@_firstpage_extraindent_dim} + } +\dim_const:Nn \c_ptxcd_BottomMargin_dim {20mm} +\dim_const:Nn \c_ptxcd_Linewidth_dim {\paperwidth-\c_ptxcd_LeftMargin_dim-\c_ptxcd_RightMargin_dim} +\RequirePackage{geometry} +\geometry{ + twoside=false, + left=\c_ptxcd_LeftMargin_dim, + right=\c_ptxcd_RightMargin_dim, + bottom=\c_ptxcd_BottomMargin_dim, + footskip=7mm, +} +\dim_const:Nn \c_ptxcd_textwidth_dim {\textwidth} +\bool_if:NTF \g_@@_letter_logo_bool { + \geometry{top=64mm} +} { + \geometry{top=30mm} +} +% \end{macrocode} +% \iffalse +%</packages> +%<*pdfx> +% \fi +% \changes{v4.00}{2025-01-26}{Unify pdfx/pdfa mechanism structure over all document types} +% \begin{macrocode} +\if_bool:N \g_ptxcd_pdfx_bool + \PassOptionsToPackage{a-2b}{pdfx} +% \end{macrocode} +% Workaround posted by David Carlisle on tex.stackexchange +% Thanks to Ulrike Fischer for mentioning it in #472 +% \begin{macrocode} + \let \_@@_grouplevel_before_pdfx: \currentgrouplevel + \chardef\currentgrouplevel0 + \ExplSyntaxOff + \RequirePackage{pdfx} + \ExplSyntaxOn + \let \currentgrouplevel \_@@_grouplevel_before_pdfx: + \cs_undefine:N \_@@_grouplevel_before_pdfx: +% \end{macrocode} +% end of the workaround +% \begin{macrocode} +\else: + \PassOptionsToPackage{hidelinks, unicode}{hyperref} + \RequirePackage{hyperref} +\fi: +% \end{macrocode} +% \iffalse +%</pdfx> +%<*body> +% \fi +% \changes{v4.00}{2025-01-26}{Unify pdfx/pdfa mechanism structure over all document types} +% \begin{macrocode} +\RequirePackage[paper=a4]{tudarules}% might load pgfcore, so it has to be loaded after pdfx +\setplength{firstheadhpos}{\c_ptxcd_HeadMargin_dim} +\setplength{firstheadvpos}{\c_ptxcd_HeadMargin_dim} +\setplength{firstheadwidth}{\dim_eval:n {\paperwidth - 2\c_ptxcd_HeadMargin_dim}} +\setplength{firstfootvpos}{\dim_eval:n {\paperheight -17mm}} +\setplength{firstfoothpos}{\useplength{firstheadhpos}} +\setplength{firstfootwidth}{\useplength{firstheadwidth}} +\setplength{toaddrhpos}{\c_ptxcd_LeftMargin_dim} +\setplength{toaddrvpos}{50mm} +\setplength{backaddrheight}{4mm} +\setplength{toaddrindent}{0mm} +\setplength{refhpos}{\c_ptxcd_LeftMargin_dim} +\setplength{refvpos}{106mm} +\setplength{subjectaftervskip}{2\baselineskip} +\setplength{lochpos}{\c_ptxcd_HeadMargin_dim} +\setplength{locvpos}{\dimexpr\useplength{refvpos}+\useplength{subjectaftervskip}+1.4\baselineskip\relax} +\setplength{refaftervskip}{0pt} +\setplength{subjectbeforevskip}{0pt} +\setplength{locwidth}{\dimexpr\paperwidth-154,5mm -\c_ptxcd_HeadMargin_dim\relax} +\setplength{locheight}{\dimexpr\paperheight-\useplength{locvpos}-\c_ptxcd_BottomMargin_dim\relax} +\bool_if:NTF \g_@@_letter_headrule_bool { + \ptxcd_makeheadrule[width=\useplength{firstheadwidth},color=identbarcolor]{ptxcd_LetterheadRule} +} { + \box_new:N \ptxcd_LetterheadRule_box + \def\ptxcd_LetterheadRule{} +} +\ptxcd_makefootrule[width=\useplength{firstheadwidth}]{ptxcd_LetterfootRule} +\box_new:N \g_TUDaLetter_firsthead_box +\hbox_gset:Nn \g_TUDaLetter_firsthead_box { + \parbox[t]{\useplength{firstheadwidth}}{ + \raggedleft + \smash{\ptxcd_LetterheadRule} + \par + \vspace{.5\c_ptxcd_logoheight_dim} + \makebox[\_@@_logowidth:][l]{\_@@_insert_logo:} + } +} +\box_gset_dp:Nn \g_TUDaLetter_firsthead_box {\c_zero_dim} +\setkomavar{firsthead}{ + \box_use:N \g_TUDaLetter_firsthead_box +} +\KOMAoptions{backaddress=plain} +\setkomavar{backaddressseparator}{\,$\vert$\,} +% \end{macrocode} +% DOKU neue komavars +% \begin{macrocode} +\newkomavar{frominstitution} +\newkomavar{frominstitution-en} +\newkomafont{ptxcd_location}{\accentfont\normalcolor} +\setkomafont{fromname}{\small} +\newkomafont{ptxcd_frominst}{\small\ptxcd_use_premiumcolor_text: } +\setkomafont{fromaddress}{\footnotesize} +\setkomafont{refname}{} +\setkomafont{refvalue}{} +\setkomafont{pageheadfoot}{\footnotesize} +% \end{macrocode} +% \begin{documentation} +% \DescribeMacro{\TUD@locfield} +% +% \end{documentation} +% \begin{implementation} +% \begin{macro}{\TUD@locfield} +% \begin{macrocode} +\newcommand{\TUD@locfield}{% + \usekomafont{ptxcd_location}\usekomafont{fromaddress} + \setparsizes{\z@}{\z@}{\z@ plus 1fil} + \par@updaterelative + \begingroup + \int_compare:nT {0 < \@pageat <3} { + \ptxcd_letterpagemark:\\[\baselineskip] + } + \usekomafont{ptxcd_frominst} + \Ifkomavarempty{frominstitution}{}{% + {\usekomavar[\raggedright]{frominstitution}} + \\[\baselineskip]}% + \Ifkomavarempty{frominstitution-en}{}{% + \usekomavar[\raggedright]{frominstitution-en} + \\[\baselineskip]}% + \endgroup + \Ifkomavarempty{fromlogo}{}{\usekomavar{fromlogo}\\[\baselineskip]}% + \Ifkomavarempty{fromname}{} + {{\usekomafont{fromname}\usekomavar{fromname}} + \Ifkomavarempty{fromfunction}{}{\\\usekomavar{fromfunction}} + \\[\baselineskip]}% + \Ifkomavarempty{fromaddress}{}{\usekomavar{fromaddress}\\[\baselineskip]}% + \@tempswafalse + \clist_map_inline:nn {fromphone, fromfax, fromemail, fromurl}{ + \@tempswatrue + \Ifkomavarempty{##1}{}{ + \Ifkomavarempty*{##1}{}{\makebox[1cm][l]{\usekomavar*{##1}}}\usekomavar{##1}\par + } + } + \if@tempswa + \vspace{2\baselineskip} + \fi + \Ifkomavarempty*{date}{}{\usekomavar*{date}\\\usekomavar{date}} + \seq_use:Nn \g_@@_reffields_seq {} + \Ifkomavarempty{frombank}{}{\vfill% + \Ifkomavarempty*{frombank}{Bankverbindung}{\usekomavar*{frombank}}\\\usekomavar{frombank} + } +} +% \end{macrocode} +% \end{macro} +% \end{implementation} +% +% \begin{macrocode} +\setkomavar{location}{\parbox[t][.45\paperheight][t]{\useplength{locwidth}}{\TUD@locfield}} +\tl_const:Nn \ptxcd_reffield_separator_tl {\\} +\cs_new:Nn \ptxcd_set_reffield:n { + \Ifkomavarempty{#1}{}{% + \if@tempswa\\[\baselineskip]\fi + \parbox[t]{\linewidth}{\noindent\raggedright + \usekomafont{refname} + \usekomavar*{#1}\ptxcd_reffield_separator_tl + \usekomafont{refvalue} + \usekomavar{#1} + }% + \@tempswatrue + }% +} +\seq_new:N \g_@@_reffields_seq +\newlength{\TUD@page@free} +\newcounter{TUD@page@free@lines} +\dim_new:N \g_@@_page_free_dim +\int_new:N \g_@@_free_lines_int +% \end{macrocode} +% \begin{documentation} +% \DescribeMacro{\opening} +% +% \end{documentation} +% \begin{implementation} +% \begin{macro}{\opening} +% \begin{macrocode} +\renewcommand{\opening}[1]{% + \widowpenalty=100 + \@PapersizeWarning + \seq_gclear:N \g_@@_reffields_seq + \renewcommand*{\@set@reffield}[1]{ + \typeout{Field: ##1}% + \str_if_eq:nnT {##1}{datemarkerfield}{% + \let\scr@datemarkerfield@var=\scr@date@var + \let\scr@datemarkerfield@name=\scr@date@name + \setkomavar{date}{}% + } + \Ifkomavarempty{##1}{}{% + \seq_gput_right:Nn \g_@@_reffields_seq {% + \ptxcd_set_reffield:n {##1} + }% + }% + } + \let\do@set@reffield\@set@reffield + \@set@reffields + \removereffields + \@gen@firsthead + \@mkboth{\scr@fromname@var}{\scr@subject@var}% + \thispagestyle{letter.first}\noindent + \Ifkomavarempty{toname}{\setkomavar{toname}{\mbox{}}}{} + \@foldmarks\@firstheadfootfield\@addrfield\@locfield + \ifdim\useplength{subjectvpos}=\z@\else\@subjfield\fi + \@datefield + \@makelettertitle + \ifdim\useplength{subjectvpos}=\z@\if@subjafter\else\@subjfield\fi\fi + {\setparsizes{\z@}{\z@}{\z@ plus 1fil}\par@updaterelative#1\par}% + {\setlength{\@tempdima}{\baselineskip}% + \addtolength{\@tempdima}{-\parskip}% + \ifdim \@tempdima>\z@\vskip\@tempdima\fi}% + \ifdim\useplength{subjectvpos}=\z@\if@subjafter\@subjfield\fi\fi + \setcounter{equation}{0}% + \@afterheading% + \@nobreaktrue + \@afterindentfalse + \bool_if:NT \g_@@_adjust_textwidth_bool { + \everypar{% + \if@nobreak + \@nobreakfalse\clubpenalty\@M + \if@afterindent + \else{\setbox\z@\lastbox} + \fi + \else + \clubpenalty\@clubpenalty + \fi + \ifnum\thepage=1% + \dim_gset:Nn \g_@@_page_free_dim {-\pagegoal + \pagetotal} + \dim_compare:nTF {-\g_@@_page_free_dim>2\baselineskip} + { + \int_gset:Nn \g_@@_free_lines_int {\fp_eval:n {ceil(\g_@@_page_free_dim/\baselineskip)}} + \int_compare:nT {\g_@@_free_lines_int<0} { + \hangafter=\g_@@_free_lines_int\hangindent=\c_@@_firstpage_extraindent_dim% + } + } { + \dim_compare:nT {-\TUD@page@free>\baselineskip} { + \hangafter=-2\hangindent=\c_@@_firstpage_extraindent_dim% + } + } + \fi% + }% + \global\setlength{\linewidth}{\dim_eval:n {\c_ptxcd_Linewidth_dim + \c_@@_firstpage_extraindent_dim}} + \afterpage{ + \global\setlength{\linewidth}{\c_ptxcd_Linewidth_dim} + \widowpenalty=10000 + } + } +} +% \end{macrocode} +% \end{macro} +% \end{implementation} +% +% \begin{macrocode} +\AtBeginDocument{% + \raggedbottom% +} +\setkomafont{backaddress}{\accentfont\tiny\ptxcd_use_premiumcolor_text:\raisebox{\dimexpr-\totalheight+\ht\strutbox\relax}{\rule{\z@}{4mm}}} +\raggedbottom +\int_new:N \l_ptxcd_letter_lastpage_int +\cs_new:Nn \ptxcd_letterpagemark: { + %get lastpage for this letter if not already done + \int_compare:nNnTF {\value{page}} = {1} { + \bool_if:NTF \g_@@_firstpagenumber_bool + {\bool_set_true:N \l_tmpa_bool} + {\bool_set_false:N \l_tmpa_bool} + } + {\bool_set_true:N \l_tmpa_bool} + \bool_if:NT \l_tmpa_bool { + \int_if_exist:cF {c_ptxcd_letter\thisletter _lastpage_int} { + \cs_if_exist:cTF {r@\thisletter.lastpage} { + \int_const:cn {c_ptxcd_letter\thisletter _lastpage_int} { + \exp_args:NNc \expandafter \@secondoffive { r@\thisletter.lastpage} + } + } { + %warning -> rerun latex + \int_const:cn {c_ptxcd_letter\thisletter _lastpage_int} {0} + } + } + \usekomafont{pagenumber}\pagename\nobreakspace\thepage + \int_compare:nT { + \int_use:c {c_ptxcd_letter\thisletter _lastpage_int} + > 1 + } {/\int_to_arabic:n{\int_use:c {c_ptxcd_letter\thisletter _lastpage_int}}} + } +} +\setkomavar{firstfoot}{\usekomavar{nextfoot}} +\setkomavar{nextfoot}{% + \ifnum\@pageat>2 + \parbox[c]{\layerwidth}{% + \ifcase\@pageat\or\or\or\raggedright\or\centering\or\raggedleft\fi + \strut\pagemark% + }% + \fi +} +\cs_set_eq:NN \letterpagemark \ptxcd_letterpagemark: +\bool_if:NT \g_@@_letter_headrule_bool { + \bool_if:NTF \g_@@_letter_logo_bool { + \setkomavar{nexthead}{\raisebox{\topskip}{\box_use:N \g_TUDaLetter_firsthead_box}} + }{ + \setkomavar{nexthead}{\raisebox{\depth}{\ptxcd_LetterheadRule}} + } +} +\newpairofpagestyles[letter]{TUDaLetter}{ + \exp_args:Nx \KOMAoptions{ + footwidth=\dimexpr\paperwidth-2\c_ptxcd_HeadMargin_dim \c_colon_str-\dim_eval:n {\c_ptxcd_HeadMargin_dim -1mm}, + headwidth=\dimexpr\paperwidth-2\c_ptxcd_HeadMargin_dim \c_colon_str-\dim_eval:n {\c_ptxcd_HeadMargin_dim -1mm}, + footsepline=.5\c_ptxcd_smallrule_dim,plainfootsepline + } + \ModifyLayer[voffset=\c_ptxcd_HeadMargin_dim,align=tl]{TUDaLetter.head.even} + \ModifyLayer[voffset=\c_ptxcd_HeadMargin_dim,align=tl]{TUDaLetter.head.odd} + \ModifyLayer[voffset=\c_ptxcd_HeadMargin_dim,align=tl]{TUDaLetter.head.oneside} + \ModifyLayer[voffset=\c_ptxcd_HeadMargin_dim,align=tl]{plain.TUDaLetter.head.even} + \ModifyLayer[voffset=\c_ptxcd_HeadMargin_dim,align=tl]{plain.TUDaLetter.head.odd} + \ModifyLayer[voffset=\c_ptxcd_HeadMargin_dim,align=tl]{plain.TUDaLetter.head.oneside} + \lehead{\usekomavar{nexthead}}% + \lohead{\usekomavar{nexthead}}% + \lefoot{\usekomavar{nextfoot}}% + \lofoot{\usekomavar{nextfoot}}% +} +\DeclarePageStyleByLayers{TUDaLetter.first}{TUDaLetter.foot.even,TUDaLetter.foot.odd,TUDaLetter.foot.oneside,TUDaLetter.foot.above.line} +\pagestyle{TUDaLetter} +\DeclarePageStyleAlias{letter.first}{TUDaLetter.first} +% \end{macrocode} +% \begin{documentation} +% \DescribeMacro{\letterpagestyle} +% +% \end{documentation} +% \begin{implementation} +% \begin{macro}{\letterpagestyle} +% \begin{macrocode} +\def\letterpagestyle{TUDaLetter} +% \end{macrocode} +% \end{macro} +% \end{implementation} +% +% Widows and clubs +% \begin{macrocode} +\widowpenalty=10000 +\clubpenalty=10000 +% \end{macrocode} +% default values +% \begin{macrocode} +\setkomavar*{fromemail}{} +\setkomavar*{fromurl}{} +\setkomavar{backaddress}{Technische~ Universität~ Darmstadt\\Karolinenplatz~ 5\\64289~ Darmstadt} +% \end{macrocode} +% renewcaptions +% \begin{macrocode} +\defcaptionname{german,ngerman,austrian,naustrian,% + swissgerman,nswissgerman}\yourmailname{Ihre~ Nachricht}% +\defcaptionname{german, ngerman,austrian,naustrian,% + swissgerman,nswissgerman}\phonename{Tel.}% +% \end{macrocode} +% signature raggedright +% \begin{macrocode} +\let\raggedsignature\raggedright +\newkomavar{fromfunction} +\bool_if:NT \g_@@_letter_raggedright_bool {\AtBeginLetter{\RaggedRight}} +% \end{macrocode} +% backwards compatibility for KOMA-Script +% \begin{macrocode} +\cs_if_exist:NF \Ifkomavarempty{ + \let\Ifkomavarempty\ifkomavarempty +} +\file_if_exist_input:n {\g_@@_config_prefix_tl\g_ptxcd_department_str.cfg} +% \end{macrocode} + +% +% \iffalse +%</body> +%</class> +% \fi +% \Finale +% \fi^^A No documentation on this +\endinput diff --git a/Master/texmf-dist/source/latex/tuda-ci/tudaposter.dtx b/Master/texmf-dist/source/latex/tuda-ci/tudaposter.dtx new file mode 100644 index 00000000000..13539c77fbf --- /dev/null +++ b/Master/texmf-dist/source/latex/tuda-ci/tudaposter.dtx @@ -0,0 +1,757 @@ +% \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{tudaposter.dtx}[2025-01-26 v4.00 Announcement poster Layouts for the Corporate Design of TU Darmstadt] +\typeout{***********************************************************} +\typeout{No documentation included in this file! Please see tuda-ci.pdf for more information and DEMO-TUDaPoster.tex/.pdf for an example of use.} +\typeout{***********************************************************} +\stop +%</driver> +%<*class&initialization> +%<@@=ptxcd> +\NeedsTeXFormat{LaTeX2e}[2020/10/01] +\ProvidesExplPackage{tudaposter}{2025-01-26}{4.00}{Announcement poster Layouts for the Corporate Design of TU Darmstadt} +%</class&initialization> +% +%<*driver>^^A Preparation for real docstrip documentation +\providecommand*{\TUDaDocDTXfiles}{tudaposter.dtx} +\input{tuda-ci.dtx} +%</driver> +% \fi +% +% \changes{v4.00}{2025-01-26}{Converted to DTX file} +% +% \DoNotIndex{\newcommand,\newenvironment} +% +% \GetFileInfo{tudaposter.dtx} +% \title{The \textsf{tudaposter} package} +% \author{<+author+>\thanks{Email: \href{mailto:<+email+>}{<+email+>}}} +% \date{\fileversion~from \filedate} +% +% \maketitle +% +% +% \DescribeMacro{\familydefault} +% +% +% \DescribeMacro{\titleinfo} +% +% +% \DescribeMacro{\maketitle} +% +% +% \DescribeMacro{\titlegraphic} +% +% +% \DescribeMacro{\addTitleBox} +% +% +% \DescribeMacro{\addTitleBoxLogo} +% +% +% \DescribeMacro{\footer} +% +% +% \DescribeMacro{\footerqrcode} +% +% +% \DescribeMacro{\footerqrcodeimg} +% +% +% \DescribeMacro{\infofont} +% +% +% \DescribeMacro{\SetMarginpar} +% +% +% \DescribeMacro{\contentwidth} +% +% +% \DescribeMacro{\contentheight} +% +% +% \DescribeMacro{\author} +% +% +% \MaybeStop{} +% +% \section{Implementation} +% +% \iffalse +%<*class&initialization> +% \fi +% \begin{macrocode} +\bool_new:N \g_@@_logo_head_bool +\dim_new:N \g_ptxcd_margin_dim +\int_new:N \g_ptxcd_paper_int +\int_new:N \g_ptxcd_postertype_int +\str_new:N \g_ptxcd_department_str +\str_const:Nn \c_@@_base_str {poster} +\keys_define:nn {ptxcd/poster} { + footer .bool_gset:N = \g_ptxcd_poster_foot_bool, + footer .default:n = true, + footer .initial:n = false, + footheight .dim_gset:N = \g_ptxcd_footheight_dim, + fontsize .choice:, + fontsize / auto .code:n = \tl_gclear:N \g_ptxcd_fontsize_tl, + fontsize / unknown .code:n = {\@defaultunits\@tempdima#1pt\relax\@nnil \tl_gset:Nx \g_ptxcd_fontsize_tl {\the\@tempdima}}, + fontsize .initial:n = auto, + type .choice:, + type / default .code:n = { + \int_gset:Nn \g_ptxcd_postertype_int {1} + }, + type / announcement .code:n = { + \int_gset:Nn \g_ptxcd_postertype_int {2} + \keys_set:nn {ptxcd/poster}{ + marginpar=true, + indenttext=false,%allow overwrite - check default + logo=head, + title=small, + colorsubtitle=true + } + }, + type .initial:n = default, + indenttext .bool_gset:N = \g_ptxcd_indenttext_bool, + indenttext .initial:n = false, + indenttext .default:n = true, + colorsubtitle .bool_gset:N = \g_ptxcd_colorsubtitle_bool, + colorsubtitle .default:n = true, + colorsubtitle .initial:n = false, +%</class&initialization> +%<gobble>} +%<*class&body> +\ProcessKeyOptions[ptxcd/poster] +\ExplSyntaxOff +\PassOptionsToPackage{DIV=6,typeareawarninfolimit=-1}{typearea} +\LoadClass[parskip=half-]{scrartcl} +\RequirePackage{scrlayer} +\RequirePackage{scrlayer-notecolumn} +\ExplSyntaxOn +\bool_if:NTF \g_ptxcd_smalltitle_bool { + \file_input:n {tuda-a\int_use:N \g_ptxcd_paper_int paper.clo} + \ptxcd_setup_title_sizes: + \file_input:n {tuda-a\int_use:N \g_ptxcd_paper_int paper.clo} + \ptxcd_setup_base_sizes: +}{ + \int_gdecr:N \g_ptxcd_paper_int + \file_input:n {tuda-a\int_use:N \g_ptxcd_paper_int paper.clo} + \ptxcd_setup_title_sizes: + \ptxcd_setup_base_sizes: +} +\setkomafont{title}{ + \bool_if:NT \g_ptxcd_colorback_bool + {\color{textonaccentcolor}}\expandafter\fontsize\ptxcd_title_fontsize:\selectfont} +\setkomafont{subtitle}{\expandafter\fontsize\ptxcd_titleinfo_fontsize:\selectfont} +\newkomafont{titleinfo}{\usekomafont{subtitle}} +\clist_map_inline:nn {author, date, publishers} +{\setkomafont{#1}{\usekomafont{subtitle}}} +\ExplSyntaxOff +\KOMAoptions{fontsize=\csname g_ptxcd_fontsize_tl\endcsname} +\ExplSyntaxOn +\RequirePackage{tudafonts} +% \end{macrocode} +% \begin{documentation} +% \DescribeMacro{\familydefault} +% +% \end{documentation} +% \begin{implementation} +% \begin{macro}{\familydefault} +% \begin{macrocode} +\renewcommand*{\familydefault}{\sfdefault} +% \end{macrocode} +% \end{macro} +% \end{implementation} +% +% \begin{macrocode} +\exp_args:Nx \PassOptionsToPackage{mode=tikz}{tudarules} +\RequirePackage{tudarules} +\RequirePackage{tudacolors} +\RequirePackage{qrcode} +\RequirePackage{tikz} +\newlength{\contentwidth} +\setlength{\contentwidth}{\dimexpr\paperwidth-2\g_ptxcd_margin_dim} +\ptxcd_makeheadrule[width=\contentwidth, color=identbarcolor]{ptxcd_headrule} +% \end{macrocode} +%%%%%%%%%%%%%%%%%%%%%% +% \begin{macrocode} +\int_case:nn {\g_ptxcd_postertype_int} +{ + {1} {} + {2} { + \addtokomafont{subtitle}{\bfseries} + } +} +% \end{macrocode} +% %%%%%%%%%%%%%%%%%%%%% +% marginpar option +% \begin{macrocode} +\dim_new:N \g_ptxcd_marginpar_dim +% \end{macrocode} +% %%%%%%%%%%%%%%%%%%%%% +% \begin{macrocode} +\dim_new:N \g_ptxcd_titleindent_dim +\begingroup +\expandafter\fontsize\ptxcd_title_fontsize:\selectfont +\dim_gset:Nn \g_ptxcd_titleindent_dim {.5ex} +\endgroup +\dim_new:N \g_ptxcd_columnSep_dim +\dim_gset:Nn \g_ptxcd_columnSep_dim {1em} +\RequirePackage{geometry} +\geometry{ + margin= \g_ptxcd_margin_dim, + hmargin = \dim_eval:n { + \g_ptxcd_margin_dim + + \bool_if:NTF \g_ptxcd_indenttext_bool + {\g_ptxcd_titleindent_dim} {0pt} + }, + top=\dim_eval:n { + \box_ht:N \ptxcd_headrule_box + \box_dp:N \ptxcd_headrule_box + + .5\c_ptxcd_logoheight_dim + +\g_ptxcd_margin_dim} +} +\bool_if:NTF \g_ptxcd_marginpar_bool { + \dim_gset:Nn \g_ptxcd_marginpar_dim {\_@@_logowidth:} + \geometry{ + includemp, marginpar=\g_ptxcd_marginpar_dim, marginparsep=\g_ptxcd_columnSep_dim, + right = \dim_eval:n { + \g_ptxcd_margin_dim + + \bool_if:nTF {\g_ptxcd_indenttext_bool && !\g_ptxcd_marginpar_bool} + {\g_ptxcd_titleindent_dim} {0pt} + }, + } + \KOMAoptions{mpinclude} +}{ + \dim_gzero:N \g_ptxcd_marginpar_dim + \geometry{ + nomarginpar, + right = \dim_eval:n { + \bool_if:NT \g_ptxcd_indenttext_bool + {\g_ptxcd_titleindent_dim} + + \g_ptxcd_margin_dim + }, + } + \KOMAoptions{mpinclude=false} +} +\bool_if:NT \g_ptxcd_poster_foot_bool { + \dim_compare:nT {\g_ptxcd_footheight_dim = 0pt} { + \dim_set:Nn \g_ptxcd_footheight_dim + {1.5\baselineskip} + } + \geometry{bottom=\dim_eval:n {\g_ptxcd_footheight_dim+\footskip+\g_ptxcd_margin_dim}} +} +% \end{macrocode} +% %%%%%%%%%%%%%%%%%%%%% +% +% \begin{macrocode} +\dim_new:N \g_ptxcd_qrcode_dim +\dim_gset:Nn \g_ptxcd_qrcode_dim {.7\c_ptxcd_logoheight_dim} +\DeclareNewLayer[ + background, + align=br, + width=\g_ptxcd_qrcode_dim, + height=\g_ptxcd_qrcode_dim, + hoffset=\paperwidth-\g_ptxcd_margin_dim, + voffset=\paperheight-\g_ptxcd_margin_dim, + mode=picture, + contents={% + \tl_if_empty:NF \g_ptxcd_poster_qrcode_tl { + \let\width\g_ptxcd_qrcode_dim + \let\height\g_ptxcd_qrcode_dim + \g_ptxcd_poster_qrcode_tl + } + } +]{TUDa.poster.qrcode} +\DeclareNewLayer[ + clone=TUDa.poster.qrcode, + align=bl, + hoffset=\g_ptxcd_margin_dim, + width=\paperwidth-2\g_ptxcd_margin_dim, + height=\g_ptxcd_footheight_dim, + contents={ + \bool_if:NTF \g_ptxcd_poster_foot_bool { + \putUL{\rule{\layerwidth}{\g_ptxcd_titlerule_dim}} + \put(0,0) {\parbox[b][\g_ptxcd_footheight_dim][c]{\layerwidth}{\strut\g_ptxcd_poster_foot_tl\strut}} + \putLL{\rule{\layerwidth}{\g_ptxcd_titlerule_dim}} + }{ + \smash{\rule{\layerwidth}{\g_ptxcd_titlerule_dim}} + } + } +]{TUDa.poster.footer} +\DeclareNewLayer[ + background,mode=picture, + width=\paperwidth-2\g_ptxcd_margin_dim, + hoffset=\g_ptxcd_margin_dim, + voffset=\g_ptxcd_margin_dim+\box_ht:N \ptxcd_headrule_box + \box_dp:N \ptxcd_headrule_box, + contents=\bool_if:NT \g_ptxcd_colorback_bool {\color{accentcolor}\rule{\layerwidth}{\layerheight}}, +]{TUDa.poster.background} +\DeclareNewLayer[ + textarea, + foreground, + align=tr, + hoffset=\paperwidth-\g_ptxcd_margin_dim, + width=\_@@_logowidth:, + height=.5\textheight, + contents={\box_use:N \g_ptxcd_title_info_box} +]{TUDa.poster.logo} +\DeclareNewLayer[ + clone=TUDa.poster.background, + align=tl, + voffset=\g_ptxcd_margin_dim, + height=\box_ht:N \ptxcd_headrule_box + \box_dp:N \ptxcd_headrule_box, + mode=picture, + contents={\box_use:N \ptxcd_headrule_box} +]{TUDa.poster.rule} +\DeclareNewLayer[ + clone=notecolumn.marginpar, +]{TUDa.poster.marginpar} +\DeclareNewPageStyleByLayers{TUDa.poster.title}{TUDa.poster.rule,TUDa.poster.background,TUDa.poster.qrcode,TUDa.poster.footer} +\DeclareNewPageStyleByLayers{TUDa.poster}{TUDa.poster.rule,TUDa.poster.qrcode,TUDa.poster.footer, TUDa.poster.marginpar} +\pagestyle{TUDa.poster} +\dim_new:N \g_ptxcd_titlegraphic_max_height_dim +\dim_new:N \g_ptxcd_titleback_dim +% \end{macrocode} +% \begin{documentation} +% \DescribeMacro{\titleinfo} +% +% \end{documentation} +% \begin{implementation} +% \begin{macro}{\titleinfo} +% \begin{macrocode} +\newcommand*{\titleinfo}[1]{\def\@titleinfo{#1}} +% \end{macrocode} +% \end{macro} +% \end{implementation} +% +% \begin{macrocode} +\titleinfo{} +% \end{macrocode} +% \begin{documentation} +% \DescribeMacro{\maketitle} +% +% \end{documentation} +% \begin{implementation} +% \begin{macro}{\maketitle} +% \begin{macrocode} +\renewcommand*{\maketitle}{ + \begingroup + \setparsizes{\z@}{\z@}{\z@\@plus 1fil}\par@updaterelative + \bool_if:NT \g_ptxcd_marginpar_bool + {\setlength{\linewidth}{\dim_eval:n {\textwidth+\g_ptxcd_marginpar_dim + \marginparsep}}} + \vbox_gset:Nn \g_ptxcd_title_box + { + \usesizeofkomafont{title} + \parbox[t]{\linewidth}{ + \bool_if:NT \g_ptxcd_smalltitle_bool {\raisebox{ + \dim_max:nn {0pt} {1.5\c_ptxcd_logoheight_dim - \height} + }} + { + \begin{minipage}[b]{\bool_if:NT \g_@@_logo_head_bool {.75}\linewidth} + \leavevmode\par\nointerlineskip + \bool_if:NF \g_ptxcd_indenttext_bool {\begin{addmargin}{\g_ptxcd_titleindent_dim }} + \usekomafont{title} + \raggedright + \tl_if_empty:NF \@titlehead {\usekomafont{titlehead}{\@titlehead\par}} + \leavevmode\usekomafont{disposition}\usekomafont{title}% + \@title\strut\par + \bool_if:NTF \g_ptxcd_indenttext_bool {\nointerlineskip\leavevmode}{\end{addmargin}} + \end{minipage} + } + \par\nointerlineskip + \exp_args:Nf \tl_if_empty:nF {\@subtitle\@titleinfo\@subject\@author\@date\@publishers} { + \bool_if:NT \g_ptxcd_indenttext_bool {\hspace*{-\g_ptxcd_titleindent_dim}} + \rule{\linewidth}{\g_ptxcd_titlerule_dim} + \par + \nointerlineskip + \vspace{\c_ptxcd_rulesep_dim} + \bool_if:NTF \g_ptxcd_indenttext_bool {\begingroup}{\begin{addmargin}{\g_ptxcd_titleindent_dim }} + \bool_if:NT \g_ptxcd_colorsubtitle_bool {\color{textonaccentcolor}} + \clist_map_inline:nn {subtitle, titleinfo, subject, author, date, publishers} + {\tl_if_empty:cF {@##1} {{\usekomafont{##1}\use:c {@##1}\par}}} + \nointerlineskip + \bool_if:NTF \g_ptxcd_indenttext_bool {\endgroup} {\end{addmargin}} + \vspace{\c_ptxcd_rulesep_dim} + \par\nointerlineskip + \bool_if:NT \g_ptxcd_indenttext_bool {\hspace*{-\g_ptxcd_titleindent_dim}} + \tl_if_empty:NF \@thanks { + \bool_if:NT \g_ptxcd_indenttext_bool {\hspace*{-\g_ptxcd_titleindent_dim}}\rule{\linewidth}{\g_ptxcd_titlerule_dim} + \vspace{\c_ptxcd_rulesep_dim} + \par\nointerlineskip + \expandafter\fontsize\ptxcd_titlethanks_fontsize:\selectfont + \bool_if:NTF \g_ptxcd_indenttext_bool {\begingroup}{\begin{addmargin}{\g_ptxcd_titleindent_dim }} + \let\footnotetext\ptxcd_title@footnote + \@thanks + \vspace{\c_ptxcd_rulesep_dim} + \bool_if:NTF \g_ptxcd_indenttext_bool {\endgroup} {\end{addmargin}} + \global\let\@thanks\@empty + \par + } + } + \nointerlineskip + \rule{\linewidth}{\g_ptxcd_titlerule_dim} + } + } + \endgroup + \ptxcd_Setup_Title_box: + \dim_gset:Nn \g_ptxcd_titleback_dim { + \bool_if:NT \g_ptxcd_colorsubtitle_bool {\box_dp:N \g_ptxcd_title_box}+ + \box_ht:N \g_ptxcd_title_box+.5\c_ptxcd_logoheight_dim + } + \ModifyLayer[ + height=\g_ptxcd_titleback_dim + ]{TUDa.poster.background} + \bool_if:NF \g_@@_logo_head_bool { + \ModifyLayer[ + addvoffset= + \bool_if:NF \g_ptxcd_colorsubtitle_bool {\box_dp:N \g_ptxcd_title_box}+\g_ptxcd_titleback_dim+\c_ptxcd_smallrule_dim + ]{TUDa.poster.logo} + } + \leavevmode\box_use:N \g_ptxcd_title_box\par + \dim_set:Nn \g_ptxcd_titlegraphic_max_height_dim {\textheight-\pagetotal} + \bool_if:NTF \g_@@_logo_head_bool { + \dim_compare:nT {\box_ht:N \g_ptxcd_title_info_box+ \box_dp:N \g_ptxcd_title_info_box > \box_ht:N \g_ptxcd_title_box} + {\msg_warning:nn{tudaposter} {infobox-too-high}} + } { + \dim_compare:nT {\box_ht:N \g_ptxcd_title_info_box+ \box_dp:N \g_ptxcd_title_info_box > \box_ht:N \g_ptxcd_titlegraphic_box + \box_dp:N \g_ptxcd_titlegraphic_box} + {\msg_warning:nn{tudaposter} {infobox-too-high}} + } + \global\def\contentheight{\g_ptxcd_titlegraphic_max_height_dim} + \tl_if_empty:NF \@titlegraphic{ + \vbox_gset:Nn \g_ptxcd_titlegraphic_box {\parbox[t]{\dim_eval:n {\paperwidth-2\g_ptxcd_margin_dim}}{\@titlegraphic}} + \par\nointerlineskip + \box_use:N \g_ptxcd_titlegraphic_box + } + \DeclareLayer[ + clone=TUDa.poster.marginpar, + height=\bool_if:NF \l_ptxcd_marginpar_overlap_bool {-\box_ht:N \g_ptxcd_titlegraphic_box-\box_dp:N \g_ptxcd_titlegraphic_box} + +\textheight-\box_ht:N \g_ptxcd_title_box-\box_dp:N \g_ptxcd_title_box-.5\c_ptxcd_logoheight_dim, + addvoffset=\bool_if:NF \l_ptxcd_marginpar_overlap_bool {+\box_ht:N\g_ptxcd_titlegraphic_box+\box_dp:N \g_ptxcd_titlegraphic_box} + +\box_ht:N \g_ptxcd_title_box+\box_dp:N \g_ptxcd_title_box+.5\c_ptxcd_logoheight_dim, + ]{TUDa.poster.marginpar.title} + \tl_if_empty:NF \g_ptxcd_poster_qrcode_tl { + \ModifyLayer[addwidth=-\g_ptxcd_qrcode_dim-\c_ptxcd_rulesep_dim]{TUDa.poster.footer} + } + \AddLayersToPageStyle{TUDa.poster.title}{TUDa.poster.marginpar.title} + \AddLayersToPageStyle{TUDa.poster.title}{TUDa.poster.logo} + \thispagestyle{TUDa.poster.title} + \global\def\contentwidth{\linewidth} + \par + \let\@title\@empty + \let\@subtitle\@empty + \let\@titleinfo\@empty +} +% \end{macrocode} +% \end{macro} +% \end{implementation} +% \begin{macrocode} +\def\@titlegraphic{} +\newcommand{\titlegraphic}[1]{ + \def\@titlegraphic{#1} +} + +\box_new:N \g_ptxcd_titlegraphic_box +\seq_new:N \g_ptxcd_title_info_seq +\seq_gput_right:Nn \g_ptxcd_title_info_seq {\rlap{\_@@_insert_logo:}} +\box_new:N \g_ptxcd_title_info_box +\box_new:N \g_ptxcd_title_box +\cs_new:Nn \ptxcd_make_title_info_box:n { + \usekomafont{titleinfo} + \setlength{\fboxsep}{.2\baselineskip} + \colorbox{InfoBox}{\hspace*{\dimexpr.2\c_ptxcd_logoheight_dim-\fboxsep}% + \parbox{2\c_ptxcd_logoheight_dim}{ + \raggedright + #1 + }} +} +\cs_new:Nn \ptxcd_make_title_logo_box:n { + \setlength{\fboxsep}{\z@}% + \parbox{\_@@_logowidth:}{ + \colorbox{InfoBox}{ + \rlap{ + \makebox[\dim_eval:n {\_ptxcd_logowidth: + \_ptxcd_logowsep:}][r]{ + \colorbox{InfoBox}{#1\hspace{\_@@_logosep:}} + } + } + } + } +} +% \end{macrocode} +% \begin{documentation} +% \DescribeMacro{\addTitleBox} +% +% \end{documentation} +% \begin{implementation} +% \begin{macro}{\addTitleBox} +% \begin{macrocode} +\newcommand{\addTitleBox}[1]{\seq_gput_right:Nn \g_ptxcd_title_info_seq {\ptxcd_make_title_info_box:n {#1}}} +% \end{macrocode} +% \end{macro} +% \end{implementation} +% +% \begin{documentation} +% \DescribeMacro{\addTitleBoxLogo} +% +% \end{documentation} +% \begin{implementation} +% \begin{macro}{\addTitleBoxLogo} +% \begin{macrocode} +\NewDocumentCommand{\addTitleBoxLogo}{sm}{ + \IfBooleanTF{#1}{ + \seq_gput_right:Nn \g_ptxcd_title_info_seq { + \ptxcd_make_title_logo_box:n {#2} + } + }{ + \seq_gput_right:Nn \g_ptxcd_title_info_seq { + \ptxcd_make_title_logo_box:n { + \hbox_set:Nn \l_tmpa_box { + \includegraphics[width=1.5\c_ptxcd_logoheight_dim]{#2} + } + \dim_set:Nn \l_tmpa_dim {2\c_ptxcd_logoheight_dim/3} + \dim_compare:nTF {\box_ht:N \l_tmpa_box > \l_tmpa_dim} + {\includegraphics[width=\l_tmpa_dim]{#2}} + {\box_use:N \l_tmpa_box} + } + } + } +} +% \end{macrocode} +% \end{macro} +% \end{implementation} +% +% \begin{macrocode} +\cs_new:Nn \ptxcd_Setup_Title_box: { + \hbox_gset:Nn \g_ptxcd_title_info_box + {\parbox{\_@@_logowidth:}{ + \seq_use:Nn \g_ptxcd_title_info_seq {\par\nointerlineskip\skip_vertical:n + { + \box_ht:N \ptxcd_headrule_box + \box_dp:N \ptxcd_headrule_box + } + } + }} +} +\tl_new:N \g_ptxcd_poster_foot_tl +% \end{macrocode} +% \begin{documentation} +% \DescribeMacro{\footer} +% +% \end{documentation} +% \begin{implementation} +% \begin{macro}{\footer} +% \begin{macrocode} +\newcommand{\footer}[1]{ + \tl_gset:Nn \g_ptxcd_poster_foot_tl {#1} +} +% \end{macrocode} +% \end{macro} +% \end{implementation} +% +% \begin{macrocode} +\tl_new:N \g_ptxcd_poster_qrcode_tl +% \end{macrocode} +% \begin{documentation} +% \DescribeMacro{\footerqrcode} +% +% \end{documentation} +% \begin{implementation} +% \begin{macro}{\footerqrcode} +% \begin{macrocode} +\newcommand*{\footerqrcode}[1]{ + \tl_gset:Nn \g_ptxcd_poster_qrcode_tl + {\raisebox{\depth}{\qrcode[height={\g_ptxcd_qrcode_dim}]{#1}}} +} +% \end{macrocode} +% \end{macro} +% \end{implementation} +% +% \begin{documentation} +% \DescribeMacro{\footerqrcodeimg} +% +% \end{documentation} +% \begin{implementation} +% \begin{macro}{\footerqrcodeimg} +% \begin{macrocode} +\newcommand*{\footerqrcodeimg}[1]{\tl_gset:Nn \g_ptxcd_poster_qrcode_tl {#1}} +% \end{macrocode} +% \end{macro} +% \end{implementation} +% +% \begin{macrocode} +\RedeclareSectionCommand[afterskip=1ex plus .2ex]{section} +\RedeclareSectionCommand[afterskip=.2ex plus .2ex]{subsection} +\msg_new:nnn{tudaposter} {infobox-too-high} { + The~height~of~your~Infobox~exeeds~the~space~reserved~in~the~title~block.\\ + You~should~probably~switch~to~logo=bottom~or~reduce~the~number/size~of~InfoBoxes. +} +\keys_define:nn {ptxcd/poster/marginparopts}{ + valign .tl_set:N = \l_ptxcd_marginpar_valign_tl, + valign .initial:n = t, + overlap .bool_set:N = \l_ptxcd_marginpar_overlap_bool, + overlap .initial:n = false, + overlap .default:n = true +} +% \end{macrocode} +% \begin{documentation} +% \DescribeMacro{\infofont} +% +% \end{documentation} +% \begin{implementation} +% \begin{macro}{\infofont} +% \begin{macrocode} +\newcommand*{\infofont}{\accentfont\normalcolor\footnotesize} +% \end{macrocode} +% \end{macro} +% \end{implementation} +% +% \begin{macrocode} +\DeclareTextFontCommand{\infotext}{\infofont} +\int_new:N \g_ptxcd_marginpar_int +% \end{macrocode} +% \begin{documentation} +% \DescribeMacro{\SetMarginpar} +% +% \end{documentation} +% \begin{implementation} +% \begin{macro}{\SetMarginpar} +% \begin{macrocode} +\NewDocumentCommand{\SetMarginpar}{o+m}{ + \bool_if:NF \g_ptxcd_marginpar_bool {\msg_warning:nn {ptxcd/Poster} {marginpar-disabled}} + \IfNoValueF{#1}{\keys_set:nn {ptxcd/poster/marginparopts} {#1}} + \ModifyLayer[addvoffset={-\ht\strutbox},contents={\parbox[t][\layerheight][\l_ptxcd_marginpar_valign_tl]{\layerwidth}{#2\strut}}]{TUDa.poster.marginpar} + \bool_set_true:N \l_tmpa_bool +} +% \end{macrocode} +% \end{macro} +% \end{implementation} +% +% \begin{macrocode} +\msg_new:nnnn {ptxcd/Poster} {marginpar-disabled} { + You~are~adding~data~to~the~marginpar~box,~though~marginpar option is set to false.\\ + I~will~add~it,~but~cannot~ensure~the~position. +} { + I'd~suggest~to~switch~the~marginpar~option~to~true. + See~the~TUDa-CI~documentation~for~further~information. +} +% \end{macrocode} + +\global\def\contentwidth{\linewidth} +\global\def\contentheight{\g_ptxcd_titlegraphic_max_height_dim} +% \end{macrocode} +% +%author setup +% +% \begin{macrocode} +\seq_new:N \g_ptxcd_author_seq +% \end{macrocode} +% \begin{documentation} +% \DescribeMacro{\author} +% +% \end{documentation} +% \begin{implementation} +% \begin{macro}{\author} +% \begin{macrocode} +\renewcommand*\author[1]{ + \seq_gset_split:Nnn \g_ptxcd_author_seq {\and} {#1} +} +% \end{macrocode} +% \end{macro} +% \end{implementation} +% +% \begin{macrocode} +\msg_new:nnn{tudapub} {unknown-language} { + You~selected~an~unknown~language~#1.\\ + The~Variable~#2~does~not~have~a~predefined~value.\\ + Ensure~to~redefine~#2~to~match~your~language.\\ + Otherwise~the~ngerman~vaue~#3~will~be~used. +} +\cs_new:Nn \ptxcd_define_captionFallback:Nn { + \providecommand*#1{ + \msg_warning:nnxxx{tudapub} {unknown-language} + {\languagename} {\exp_not:N #1} {#2} + \def#1{#2} + } +} +\cs_new:Nn \ptxcd_declare_caption:Nnnn { + \ptxcd_define_captionFallback:Nn #1 {#2} + \defcaptionname{ngerman, german}{#1}{#2} + \defcaptionname{english, USenglish, american}{#1}{#3} + \defcaptionname{UKenglish, british}{#1}{#4} +} +\cs_new:Nn \ptxcd_declare_caption:Nnn { + \ptxcd_declare_caption:Nnnn #1 {#2} {#3} {#3} +} +% \end{macrocode} +% \begin{documentation} +% \DescribeMacro{\@author} +% +% \end{documentation} +% \begin{implementation} +% \begin{macro}{\@author} +% \begin{macrocode} +\renewcommand*{\@author}{ + \begingroup + \hyphenpenalty=100000 + \seq_use:Nnnn \g_ptxcd_author_seq {~\authorandname{}~} {,~} {~\&~} + \endgroup +} +% \end{macrocode} +% \end{macro} +% \end{implementation} +% +% \begin{macrocode} +\ptxcd_declare_caption:Nnn \authorandname {und} {and} +% \end{macrocode} +% \begin{documentation} +% \DescribeMacro{\ptxcd_title@footnote} +% +% \end{documentation} +% \begin{implementation} +% \begin{macro}{\ptxcd_title@footnote} +% \begin{macrocode} +\newcommand*{\ptxcd_title@footnote}[2][1]{ + \textsuperscript{#1}#2 +} +% \end{macrocode} +% \end{macro} +% \end{implementation} +% +% \begin{macrocode} +\file_if_exist_input:n {\g_@@_config_prefix_tl\g_ptxcd_department_str.cfg} +\endinput +% \end{macrocode} + +% +% \iffalse +%</class|body> +% \fi +% +% \Finale +% \fi^^A No documentation on this +\endinput diff --git a/Master/texmf-dist/source/latex/tuda-ci/tudarules.dtx b/Master/texmf-dist/source/latex/tuda-ci/tudarules.dtx new file mode 100644 index 00000000000..fcefffadd4f --- /dev/null +++ b/Master/texmf-dist/source/latex/tuda-ci/tudarules.dtx @@ -0,0 +1,200 @@ +% \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{tudarules.dtx} + [2025-01-26 v4.00 Creation of colored bars for tuda-ci bundle] +\typeout{***********************************************************} +\typeout{No documentation included in this file! Please see tuda-ci.pdf for more information.} +\typeout{***********************************************************} +\stop +%</driver> +%<*package> +%<@@=ptxcd> +\NeedsTeXFormat{LaTeX2e}[2020/10/01] +\ProvidesExplPackage{tudarules}{2025-01-26}{4.00}{Creation of colored bars for the tuda-ci bundle} +%</package> +%<*driver>^^A Preparation for real docstrip documentation +\providecommand*{\TUDaDocDTXfiles}{tudarules.dtx} +\input{tuda-ci.dtx} +%</driver> +% \fi +% +% \changes{v4.00}{2025-01-26}{Converted to DTX file} +% +% \DoNotIndex{\newcommand,\newenvironment} +% +% \GetFileInfo{tudarules.dtx} +% \title{The \textsf{tudarules} package} +% \author{Marei Peischl\thanks{Email: \href{mailto:tuda-ci@peitex.de}{tuda-ci@peitex.de}}} +% \date{\fileversion~from \filedate} +% +% \maketitle +% +% +% \MaybeStop{} +% +% \section{Implementation} +% +% \iffalse +%<*package> +% \fi +% \begin{macrocode} +\str_if_exist:NF \g_ptxcd_department_str { + \str_new:N \g_ptxcd_department_str + \str_gset:Nn \g_ptxcd_department_str {default} +} +\bool_new:N \g_ptxcd_simple_rules_bool +\dim_new:N \g_ptxcd_titlerule_dim +\seq_if_exist:NF \l_ptxcd_tmpa_seq {\seq_new:N \l_ptxcd_tmpa_seq} +\tl_if_exist:NF \l_ptxcd_tmpa_tk {\tl_new:N \l_ptxcd_tmpa_tl} +\cs_new:Nn \ptxcd_rules_set_values:n { + \seq_set_split:Nnn \l_ptxcd_tmpa_seq {|} {#1} + \int_step_inline:nnnn {1} {1} {4} { + \tl_set:Nn \l_ptxcd_tmpa_tl {c_ptxcd_ + \clist_item:nn {largerule, rulesep, smallrule, logoheight} {##1} + _dim} + \dim_if_exist:cT {\l_ptxcd_tmpa_tl} {\cs_undefine:c {\l_ptxcd_tmpa_tl}} + \dim_const:cn {\l_ptxcd_tmpa_tl} {\seq_item:Nn \l_ptxcd_tmpa_seq {##1}} + } + \dim_gset:Nn \g_ptxcd_titlerule_dim {.5\c_ptxcd_smallrule_dim} +} +\keys_define:nn {ptxcd/rules} { + color .tl_gset:N = \g_ptxcd_rules_color_tl, + blackrule .meta:n = {color=black}, + paper .choice:, + paper/dl .code:n = { \ptxcd_rules_set_values:n { 3.5mm | 1.4mm | 1.2pt | 17 mm | 0.6pt| 10mm | 14mm}}, + paper/a6 .code:n = { \ptxcd_rules_set_values:n { 3 mm | 1.4mm | 1.2pt | 16.5mm | 0.6pt| 10mm | 15mm}}, + paper/a5 .code:n = { \ptxcd_rules_set_values:n { 3.3mm | 1.4mm | 1.2pt | 19 mm | 0.6pt| 12mm | 16mm}}, + paper/a4 .code:n = { \ptxcd_rules_set_values:n { 4 mm | 1.4mm | 1.2pt | 22 mm | 0.6pt| 15mm | 20mm}}, + paper/a3 .code:n = { \ptxcd_rules_set_values:n { 4.5mm | 1.4mm | 1.2pt | 24.5mm | 0.6pt| 15mm | 20mm}}, + paper/a2 .code:n = { \ptxcd_rules_set_values:n { 8 mm | 2.5mm | 2.2pt | 44.5mm | 1.1pt| 30mm | 35mm}}, + paper/a1 .code:n = { \ptxcd_rules_set_values:n { 10 mm | 3.0mm | 2.8pt | 55.5mm | 1.4pt| 30mm | 35mm}}, + paper/a0 .code:n = { \ptxcd_rules_set_values:n { 16 mm | 5.2mm | 4.8pt | 80 mm | 2.4pt| 30mm | 35mm}}, + paper/slide .code:n = { \ptxcd_rules_set_values:n { 2mm | .7mm | .6pt | 11 mm | .3pt| 7.5mm | 10mm}}, + paper/beamer .meta:n = {paper= slide}, + paper/leaflet .meta:n = {paper=a5}, + color .tl_gset:N = \g_ptxcd_rules_default_color_tl, + color .initial:n = black, + mode .tl_gset:N = \g_ptxcd_rules_default_mode_tl, + mode .initial:n = box, + department .choice:, + department / default .code:n = \str_gset:Nn \g_ptxcd_department_str {default}, + department / mecheng .code:n = \str_gset:Nn \g_ptxcd_department_str {mecheng}, + department / unknown .code:n = { + \str_gset:Nx \g_ptxcd_department_str {\l_keys_value_tl} + }, + mecheng .meta:n = {department=mecheng}, +} +\ProcessKeyOptions[ptxcd/rules] +\RequirePackage{tudacolors} +\RequirePackage{xparse} +% \end{macrocode} +% Switch between TikZ and box mode +% \begin{macrocode} +\bool_new:N \g_ptxcd_rule_TikZmode_bool +\keys_define:nn {ptxcd/rules} { + width .dim_gset:N = \l_ptxcd_headrule_width_dim, + color .tl_gset:N = \l_ptxcd_headrule_color_tl, + mode .choice:, + mode / box .code:n = \bool_gset_false:N \g_ptxcd_rule_TikZmode_bool, + mode / tikz .code:n = \bool_gset_true:N \g_ptxcd_rule_TikZmode_bool, + mode / TikZ .code:n = \bool_gset_true:N \g_ptxcd_rule_TikZmode_bool, +} +\cs_if_exist_use:NF \str_case:Vn \str_case:on +\g_ptxcd_department_str { + {mecheng} {\bool_gset_true:N \g_ptxcd_simple_rules_bool} +} +\cs_new:Nn \_@@_logowidth: {\dim_eval:n {2.2\c_ptxcd_logoheight_dim}} +\cs_new:Nn \_@@_logosep:{\dim_eval:n {0.3\c_ptxcd_logoheight_dim}} +\NewDocumentCommand{\ptxcd_makeheadrule}{som}{ + \keys_set:nn {ptxcd/rules} { + %TODO maybe package options for default + width=\textwidth, + } + \exp_args:Nnx \keys_set:nn {ptxcd/rules} { + mode= \g_ptxcd_rules_default_mode_tl, + color= \g_ptxcd_rules_default_color_tl + } + \IfNoValueF {#2} {\keys_set:nn {ptxcd/rules}{#2}} + \IfBooleanF {#1} {\box_if_exist:cF {#3_box} {\box_new:c {#3_box}}} + \bool_if:NTF \g_ptxcd_simple_rules_bool { + \IfBooleanTF {#1} \use_none:n \hbox_gset:cn + {#3_box} + { + \color{\l_ptxcd_headrule_color_tl} + \raisebox{-\height}{\rule{\l_ptxcd_headrule_width_dim}{.5\c_ptxcd_largerule_dim}} + } + }{ + \bool_if:NTF \g_ptxcd_rule_TikZmode_bool { + \IfBooleanTF {#1} \use_none:n \hbox_gset:cn + {#3_box} { + \begin{tikzpicture} + \fill[\l_ptxcd_headrule_color_tl](0,\c_ptxcd_rulesep_dim)rectangle++(\l_ptxcd_headrule_width_dim,\c_ptxcd_largerule_dim); + \fill(0,0)rectangle(\l_ptxcd_headrule_width_dim,-\c_ptxcd_smallrule_dim); + \end{tikzpicture} + } + }{ + \IfBooleanTF {#1} \use_none:n \hbox_gset:cn + {#3_box} + { + \parbox[t]{\l_ptxcd_headrule_width_dim}{ + \setlength{\baselineskip}{\z@} + \null\par\nointerlineskip + \textcolor{\l_ptxcd_headrule_color_tl}{\rule{\linewidth}{\c_ptxcd_largerule_dim}} + \vspace{\c_ptxcd_rulesep_dim}\par\nointerlineskip + \rule{\linewidth}{\c_ptxcd_smallrule_dim} + } + } + } + } + \IfBooleanF {#1} {\cs_set:cpn {#3} {\box_use:c {#3_box}}} +} +\NewDocumentCommand{\ptxcd_makefootrule}{som}{ + \keys_set:nn {ptxcd/rules} { + width= \textwidth + } + \IfNoValueF {#2} {\keys_set:nn {ptxcd/rules}{#2}} + \IfBooleanF {#1} {\box_new:c {#3_box}} + \IfBooleanTF {#1} \use_none:n \hbox_gset:cn {#3_box} { + \raisebox{-\height}{\rule{\l_ptxcd_headrule_width_dim}{\g_ptxcd_titlerule_dim}} + } + \IfBooleanF{#1} {\cs_new:cpn {#3} {\box_use:c {#3_box}}} +} +% \end{macrocode} +% +% \iffalse +%</package> +% \fi +% +% \Finale +% \fi^^A No documentation on this +\endinput diff --git a/Master/texmf-dist/source/latex/tuda-ci/tudasciposter.dtx b/Master/texmf-dist/source/latex/tuda-ci/tudasciposter.dtx new file mode 100644 index 00000000000..769000f031f --- /dev/null +++ b/Master/texmf-dist/source/latex/tuda-ci/tudasciposter.dtx @@ -0,0 +1,657 @@ +% \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{tudasciposter.dtx} + [2025-01-26 v4.00 Scientific Poster Layout for TUDa-CI] +\typeout{***********************************************************} +\typeout{No documentation included in this file! Please see tuda-ci.pdf for more information and DEMO-TUDaSciPoster.tex/.pdf for an example of use.} +\typeout{***********************************************************} +\stop +%</driver> +%<@@=ptxcd> +%<*class&initialization> +\NeedsTeXFormat{LaTeX2e}[2022/06/01] +\ProvidesExplClass{tudasciposter}{2025-01-26}{4.00}{Scientific Poster Layout for TU Darmstadt} +%</class&initialization> +% +%<*driver>^^A Preparation for real docstrip documentation +\providecommand*{\TUDaDocDTXfiles}{tudasciposter.dtx} +\input{tuda-ci.dtx} +%</driver> +% \fi +% +% \changes{v4.00}{2025-01-26}{Converted to DTX file} +% +% \DoNotIndex{\newcommand,\newenvironment} +% +% +% \DescribeMacro{\title} +% +% +% \DescribeMacro{\footergraphics} +% +% +% \DescribeMacro{\footer} +% +% +% \DescribeMacro{\footerqrcode} +% +% +% \DescribeMacro{\Metadata} +% +% +% \DescribeMacro{\author} +% +% +% \DescribeMacro{\authorandname} +% +% +% \DescribeMacro{\titlegraphic} +% +% +% \DescribeMacro{\institute} +% +% +% \MaybeStop{} +% +% \section{Implementation} +% +% \iffalse +%<*class&initialization> +% \fi +% \begin{macrocode} +\prop_new:N \g_ptxcd_clsopts_prop +\tl_new:N \g_ptxcd_boxstyle_tl +\int_new:N \g_ptxcd_paper_int +\str_new:N \g_ptxcd_department_str +\str_const:Nn \c_@@_base_str {sciposter} +\keys_define:nn {ptxcd/poster} { + titletext .code:n = {\PassOptionsToPackage{text =#1}{tudacolors}}, + footer .bool_gset:N = \g_ptxcd_poster_foot_bool, + footer .default:n = true, + footer .initial:n = true, + thanks .tl_gset:N = \g_ptxcd_footnote_label_tl, + thanks .initial:n = arabic*, + boxstyle .choice:, + boxstyle / official .code:n = \tl_gset:Nn \g_ptxcd_boxstyle_tl {TUDa}, + boxstyle / colored .code:n= \tl_gset:Nn \g_ptxcd_boxstyle_tl {TUDa-colored}, + boxstyle / boxed .code:n= \tl_gset:Nn \g_ptxcd_boxstyle_tl {TUDa-boxed}, + boxstyle /default .meta:n = {boxstyle=official}, + boxstyle .initial:n = default, + unknown .code:n = {\prop_gput:NVn \g_ptxcd_clsopts_prop \l_keys_key_tl {#1}}, + fontsize .tl_gset:N = \g_ptxcd_fontsize_tl, + titlesepline .bool_gset:N = \g_ptxcd_titlesepline_bool, + titlesepline .initial:n = true, +%</class&initialization> +%<gobble>} +%<*class&packages> +\ProcessKeyOptions[ptxcd/poster] +\dim_new:N \g_ptxcd_margin_dim +\bool_if:NTF \g_ptxcd_smalltitle_bool { + \file_input:n {tuda-a\int_use:N \g_ptxcd_paper_int paper.clo} + \ptxcd_setup_title_sizes: + \file_input:n {tuda-a\int_use:N \g_ptxcd_paper_int paper.clo} + \ptxcd_setup_base_sizes: +}{ + \int_gdecr:N \g_ptxcd_paper_int + \file_input:n {tuda-a\int_use:N \g_ptxcd_paper_int paper.clo} + \ptxcd_setup_title_sizes: + \ptxcd_setup_base_sizes: +} +\prop_gput:NnV \g_ptxcd_clsopts_prop {fontsize} \g_ptxcd_fontsize_tl +\prop_map_inline:Nn \g_ptxcd_clsopts_prop { + \tl_if_empty:nTF {#2} + {\PassOptionsToClass{#1}{scrartcl}} + {\clist_map_inline:nn {#2} {\PassOptionsToClass{#1=##1}{scrartcl}}} +} +\ExplSyntaxOff +\PassOptionsToPackage{typeareawarninfolimit=-1,DIV=10}{typearea} +\LoadClass[parskip=full-]{scrartcl} +\ExplSyntaxOn +% \end{macrocode} +% \iffalse +%</class&packages> +%<*class&body> +% \fi +% \begin{macrocode} +\ExplSyntaxOff +\RequirePackage{tudafonts} +\RequirePackage{tudacolors} +\RequirePackage[margin=0pt]{geometry} +\RequirePackage{tcolorbox} +\tcbuselibrary{poster} +\RequirePackage[mode=tikz]{tudarules} +\RequirePackage{qrcode} +\ExplSyntaxOn + +\renewcommand*{\familydefault}{\sfdefault} +\setkomafont{title}{ + \color{titlefgcolor} + \expandafter\fontsize\ptxcd_title_fontsize:\selectfont + \bfseries +} +\setkomafont{author}{\bfseries} +\setkomafont{captionlabel}{\bfseries} +\setkomafont{disposition}{\sffamily\bfseries} +% \end{macrocode} +% end of font adjustments +% +% \begin{macrocode} +\dim_const:Nn \c_ptxcd_headrule_ht_dim {\c_ptxcd_rulesep_dim +\c_ptxcd_largerule_dim + \c_ptxcd_smallrule_dim} +% \end{macrocode} +% Setup title +% \begin{macrocode} +\box_new:N \l_ptxcd_tmpa_box +\box_new:N \g_ptxcd_titlegraphic_box +\box_new:N \g_ptxcd_title_box +\box_new:N \g_ptxcd_author_box +\box_new:N \g_ptxcd_credit_box +\tl_new:N \g_ptxcd_thanks_tl +% \end{macrocode} +% \begin{documentation} +% \DescribeMacro{\ptxcd_title@footnote} +% +% \end{documentation} +% \begin{implementation} +% \begin{macro}{\ptxcd_title@footnote} +% \begin{macrocode} +\newcommand*{\ptxcd_title@footnote}[2][1]{ + \begingroup + \ptxcd_def_footnotelabel: + \footnotemark[#1]\,#2\quad + \endgroup +} +% \end{macrocode} +% \end{macro} +% \end{implementation} +% +% \begin{macrocode} +\tl_greplace_all:Nnn \g_ptxcd_footnote_label_tl {*} {{footnote}} +\clist_map_inline:nn {alph, arabic, fnsymbol, Alph, roman, Roman} { + \tl_greplace_all:Nnn \g_ptxcd_footnote_label_tl {#1} {\use:c {#1}} +} +\cs_set:Nn \ptxcd_def_footnotelabel: { + \renewcommand*{\thefootnote}{\g_ptxcd_footnote_label_tl} +} +\pagestyle{empty} +% \end{macrocode} +% \begin{documentation} +% \DescribeMacro{\title} +% +% \end{documentation} +% \begin{implementation} +% \begin{macro}{\title} +% \begin{macrocode} +\renewcommand*{\title}[1]{\gdef \@title {#1}} +% \end{macrocode} +% \end{macro} +% \end{implementation} +% +% \begin{macrocode} +\dim_new:N \g_ptxcd_footheight_dim +\dim_gset:Nn \g_ptxcd_footheight_dim {0.06\paperwidth}% +\box_new:N \g_ptxcd_footergraphics_box +% \end{macrocode} +% \begin{documentation} +% \DescribeMacro{\footergraphics} +% +% \end{documentation} +% \begin{implementation} +% \begin{macro}{\footergraphics} +% \begin{macrocode} +\newcommand*{\footergraphics}[1]{ + \begingroup + \let\height\g_ptxcd_footheight_dim + \hbox_gset:Nn \g_ptxcd_footergraphics_box {#1} + \endgroup +} +% \end{macrocode} +% \end{macro} +% \end{implementation} +% +% \begin{macrocode} +\tl_new:N \g_ptxcd_poster_foot_tl +% \end{macrocode} +% \begin{documentation} +% \DescribeMacro{\footer} +% +% \end{documentation} +% \begin{implementation} +% \begin{macro}{\footer} +% \begin{macrocode} +\newcommand{\footer}[1]{ + \tl_gset:Nn \g_ptxcd_poster_foot_tl {#1} +} +% \end{macrocode} +% \end{macro} +% \end{implementation} +% +% \begin{macrocode} +\tl_new:N \g_ptxcd_poster_qrcode_tl +\msg_new:nnnn {tudapub} {biblatex-required}{ + You~tried~to~use~#1.\\ + This~feature~requires~the~biblatex~package. +} { + Try~to~remove~the~star~or~load~biblatex. +} +% \end{macrocode} +% \begin{documentation} +% \DescribeMacro{\footerqrcode} +% +% \end{documentation} +% \begin{implementation} +% \begin{macro}{\footerqrcode} +% \begin{macrocode} +\NewDocumentCommand{\footerqrcode}{sm}{ + \IfBooleanTF {#1} { + \cs_if_exist:NTF \blx@blxinit { + \begingroup + \blx@blxinit + \entrydata{#2}{ + \tl_gset:Nx \g_ptxcd_poster_qrcode_tl{\thefield{url}} + } + \endgroup + }{ + \msg_error:nnx {tudapub} {biblatex-required} {\use:c{footerqrcode*}} + } + }{ + \tl_gset:Nn \g_ptxcd_poster_qrcode_tl {#2} + } +} +% \end{macrocode} +% \end{macro} +% \end{implementation}% +% redefine \author to manage \and and \thanks +% +% \begin{macrocode} +\seq_new:N \g_ptxcd_author_seq +% \end{macrocode} +% \begin{documentation} +% \DescribeMacro{\author} +% +% \end{documentation} +% \begin{implementation} +% \begin{macro}{\author} +% \begin{macrocode} +\renewcommand*\author[1]{ + \seq_gset_split:Nnn \g_ptxcd_author_seq {\and} {#1} +} +% \end{macrocode} +% \end{macro} +% \end{implementation} +% +% \begin{macrocode} +\msg_new:nnn{tudasciposter} {unknown-language} { + You~selected~an~unknown~language~#1.\\ + The~Variable~#2~does~not~have~a~predefined~value.\\ + Ensure~to~redefine~#2~to~match~your~language.\\ + Otherwise~the~ngerman~vaue~#3~will~be~used. +} +% \end{macrocode} +% \begin{documentation} +% \DescribeMacro{\authorandname} +% +% \end{documentation} +% \begin{implementation} +% \begin{macro}{\authorandname} +% \begin{macrocode} +\providecommand*\authorandname{ + \msg_warning:nnxxx{tudasciposter} {unknown-language} + {\languagename} {\exp_not:N \authorandname} {und} + und +} +% \end{macrocode} +% \end{macro} +% \end{implementation} +% +% \begin{macrocode} +\defcaptionname{ngerman, german}{\authorandname}{und} +\defcaptionname{english, USenglish, american, UKenglish, british}{\authorandname}{and} +% \end{macrocode} +% \begin{documentation} +% \DescribeMacro{\@author} +% +% \end{documentation} +% \begin{implementation} +% \begin{macro}{\@author} +% \begin{macrocode} +\renewcommand*{\@author}{ + \seq_use:Nnnn \g_ptxcd_author_seq {~\authorandname{}~} {,~} {~\&~} +} +% \end{macrocode} +% \end{macro} +% \end{implementation} +% +% \begin{documentation} +% \DescribeMacro{\titlegraphic} +% +% \end{documentation} +% \begin{implementation} +% \begin{macro}{\titlegraphic} +% \begin{macrocode} +\newcommand\titlegraphic[1]{\def\@titlegraphic{#1}} +% \end{macrocode} +% \end{macro} +% \end{implementation} +% +% \begin{macrocode} +\titlegraphic{} +% \end{macrocode} +% \begin{documentation} +% \DescribeMacro{\institute} +% +% \end{documentation} +% \begin{implementation} +% \begin{macro}{\institute} +% \begin{macrocode} +\newcommand{\institute}[1]{\def\@institute{#1}} +% \end{macrocode} +% \end{macro} +% \end{implementation} +% +% \begin{macrocode} +\institute{} +% \end{macrocode} +% Language dependent configuration +% \begin{macrocode} +\AtBeginDocument{ + \@ifpackageloaded{babel}{ + \addto\extrasngerman{\def\authorandname{und}} + \addto\extrasgerman{\def\authorandname{und}} + \addto\extrasenglish{\def\authorandname{and}} + \addto\extrasbritish{\def\authorandname{and}} + \addto\captionsngerman{\renewcommand{\figurename}{Abb.}} + \addto\captionsgerman{\renewcommand{\figurename}{Abb.}} + \addto\captionsenglish{\renewcommand{\figurename}{Fig.}} + \addto\captionsbritish{\renewcommand{\figurename}{Fig.}} + }{} +} +\newlength{\contentwidth} +\setlength{\contentwidth}{\dimexpr\paperwidth-2\g_ptxcd_margin_dim\relax} +\newlength{\contentheight} +\cs_new:Nn \_@@_logo_code:n { + \node[anchor=north~east,inner~sep=0pt,minimum~width=\dim_eval:n {\_@@_logowidth: + \_@@_logosep:}](#1) at ([xshift=\_@@_logosep:,yshift=-.5\c_ptxcd_logoheight_dim]identbar.south~east){ + \_@@_insert_logo: + }; +} +\tcbposterset{ + coverage = + { + spread, + parbox=false, + bottom=\dim_eval:n {\g_ptxcd_margin_dim + \bool_if:NT \g_ptxcd_poster_foot_bool {+\g_ptxcd_footheight_dim + 3\c_ptxcd_rulesep_dim} + }, + left=\g_ptxcd_margin_dim, + right=\g_ptxcd_margin_dim, + before= {\ptxcd_poster_setup_title_box:}, + top= \dim_eval:n { + \bool_if:NF \g_ptxcd_colorback_bool {1.5} + \g_ptxcd_margin_dim + +\box_ht:N \ptxcd_headrule_box + +\box_dp:N \ptxcd_headrule_box + +\g_ptxcd_titleblock_dim + +4\c_ptxcd_rulesep_dim + +\box_ht:N \g_ptxcd_author_box + +\box_dp:N \g_ptxcd_author_box + }, + overlay={% + \coordinate(topleft) at ([xshift=\g_ptxcd_margin_dim, yshift=-\g_ptxcd_margin_dim]current~page.north~ west); + \coordinate(topright) at ([xshift=-\g_ptxcd_margin_dim, yshift=-\g_ptxcd_margin_dim]current~page.north~ east); + \coordinate(bottomleft) at ([xshift=\g_ptxcd_margin_dim, yshift=\g_ptxcd_margin_dim]current~page.south~ west); + \coordinate(bottomright) at ([xshift=-\g_ptxcd_margin_dim, yshift=\g_ptxcd_margin_dim]current~page.south~ east); + \dim_gset:Nn \g_ptxcd_titleindent_dim {\bool_if:NTF \g_ptxcd_colorback_bool {3\c_ptxcd_rulesep_dim} {\c_zero_dim}} + \node[inner~sep=0pt, anchor=north~west](identbar) at (topleft){\ptxcd_headrule}; + \bool_if:NTF \g_ptxcd_colorback_bool + \fill \path [identbarcolor] + (identbar.south~east)rectangle([yshift=-\g_ptxcd_titleblock_dim]identbar.south~west) coordinate(bottomlefttitleblock); + \_@@_logo_code:n {TUDalogo} + \node[inner~sep=0pt,text~width=\_@@_logowidth:,align=right,anchor=north~west,](titlegraphic) at ([yshift=-\c_ptxcd_rulesep_dim]TUDalogo.south~west){\box_use:N \g_ptxcd_titlegraphic_box}; + \node[anchor=north~west,inner~sep=0pt,] (title) at ([ + xshift=\g_ptxcd_titleindent_dim,yshift=-.5\c_ptxcd_logoheight_dim]identbar.south~west) {\box_use:N \g_ptxcd_title_box}; + \bool_if:NT \g_ptxcd_titlesepline_bool + {\draw[line~ width=.5\c_ptxcd_smallrule_dim](bottomlefttitleblock)--++(\contentwidth,0);} + \node[anchor=north~west, inner~xsep=0pt, inner~ ysep=\c_ptxcd_rulesep_dim] (author) at ([xshift=\g_ptxcd_titleindent_dim]bottomlefttitleblock) {\box_use:N \g_ptxcd_author_box}; + \draw[line~ width=.5\c_ptxcd_smallrule_dim](author.south-|identbar.west)--++(\contentwidth,0); + \bool_if:NT \g_ptxcd_poster_foot_bool {\_@@_typeset_footer:} + }} +} +\cs_new:Nn \_@@_typeset_footer: { + \coordinate(lastpos) at (bottomright); + \tl_if_empty:NF \g_ptxcd_poster_qrcode_tl + { + \node[anchor=south~east, inner~sep=\z@] (qrcode)at (lastpos) + { + \exp_args:NnV \use:n {\qrcode[height=\dim_use:N \g_ptxcd_footheight_dim]}\g_ptxcd_poster_qrcode_tl + }; + \coordinate (lastpos) at (qrcode.south~west); + } + \box_if_empty:NF \g_ptxcd_footergraphics_box { + \node[anchor=south~east, inner~sep=\z@] at (lastpos) { + \accentfont + \box_use:N \g_ptxcd_footergraphics_box + }; + } + \node[anchor=north~ west, inner~ sep=\z@] (infofooter) at ([yshift=\g_ptxcd_footheight_dim]bottomleft) { + \parbox{\dim_eval:n {\contentwidth + -\box_wd:N \g_ptxcd_footergraphics_box + \tl_if_empty:NF \g_ptxcd_poster_qrcode_tl {-\g_ptxcd_footheight_dim-\c_ptxcd_rulesep_dim} + }}{ + \rule{\linewidth}{.5\c_ptxcd_smallrule_dim}\\ + \accentfont\small\g_ptxcd_poster_foot_tl + \par\medskip + \let\footnotetext\ptxcd_title@footnote + \g_ptxcd_thanks_tl} + }; +} +\hook_gput_code:nnn {ptxcd/init-colors} {tudasciposter} { +\bool_if:NTF \g_ptxcd_colorback_bool +{\colorlet{titlefgcolor}{textonaccentcolor}} +{\colorlet{titlefgcolor}{black}} +\colorlet{titlebgcolor}{accentcolor} +% \end{macrocode} +% Block Colors +% \begin{macrocode} +\colorlet{blocktitlebgcolor}{accentcolor} +\colorlet{blocktitlefgcolor}{textonaccentcolor} +% \end{macrocode} +% Innerblock Colors +% \begin{macrocode} +\colorlet{innerblockbodybgcolor}{textonaccentcolor} +} +% \end{macrocode} +% Background Colors +% \begin{macrocode} +\colorlet{backgroundcolor}{white} +\colorlet{framecolor}{white} +% \end{macrocode} +% Block Colors +% \begin{macrocode} +\colorlet{blockbodybgcolor}{white} +\colorlet{blockbodyfgcolor}{black} +% \end{macrocode} +% Innerblock Colors +% \begin{macrocode} +\colorlet{innerblocktitlebgcolor}{black!15} +\colorlet{innerblocktitlefgcolor}{black} +\colorlet{innerblockbodyfgcolor}{black} +\dim_new:N \g_ptxcd_titleblock_dim +\dim_new:N \g_ptxcd_titleindent_dim +\cs_new:Nn \_@@_inst:n {\textsuperscript{#1}} +\cs_new:Nn \ptxcd_poster_setup_title_box: { + \hbox_gset:Nn \g_ptxcd_title_box { + \parbox{.65\paperwidth}{ + \raggedright + \usekomafont{disposition}\usekomafont{title}\leavevmode\@title \par + } + } + \hbox_gset:Nn \g_ptxcd_author_box { + \parbox{\dimexpr\contentwidth-6\c_ptxcd_rulesep_dim\relax}{ + \ptxcd_def_footnotelabel: + \cs_set_eq:NN \inst\_@@_inst:n + {\usekomafont{author}\@author\\} + \tl_gset:No \g_ptxcd_thanks_tl {\@thanks} + \@institute + } + } + \tl_if_empty:NF \@titlegraphic { + \hbox_gset:Nn \g_ptxcd_titlegraphic_box { + \parbox{\_@@_logowidth:}{ + \raggedleft + \@titlegraphic + } + } + } + \dim_gset:Nn \g_ptxcd_titleblock_dim { + \dim_max:nn + { + +\box_ht:N \g_ptxcd_titlegraphic_box +\box_dp:N \g_ptxcd_titlegraphic_box+ 2\c_ptxcd_logoheight_dim + } + {\box_ht:N \g_ptxcd_title_box+ \box_dp:N \g_ptxcd_title_box+\c_ptxcd_logoheight_dim} + } +} +% \end{macrocode} +% %%%%%%%%%%%%%%%%%%%%% +% Declare TCBstyles for tudaposter +% \begin{macrocode} +\tcbset { +TUDa/.style = +{ +enhanced, +coltitle=black, +colbacktitle=white, +coltext=black, +colback=white, +size=minimal, +boxrule=.5\c_ptxcd_smallrule_dim, +leftrule=\z@, +rightrule=\z@, +fonttitle=\usekomafont{disposition}\usekomafont{section}, +before~title={\strut}, +toptitle=.5\c_ptxcd_rulesep_dim, +bottomtitle=.5\c_ptxcd_rulesep_dim, +top=\c_ptxcd_rulesep_dim, +bottom=\c_ptxcd_rulesep_dim, +frame~code={ +\iftcb@hasTitle + \fill[tcbcolframe](frame.north~west)rectangle(title.north~east); + \fill[tcbcolframe](title.south~west)rectangle(interior.north~east); +\else + \fill[tcbcolframe](frame.north~west)rectangle(interior.north~east); +\fi +\fill[tcbcolframe](interior.south~west)rectangle(frame.south~east); +}, +parbox=false, +}, +TUDa-inner/.style = + { + TUDa, + fonttitle=\usekomafont{disposition}\usekomafont{subsubsection} + }, +TUDa-colored/.style = + { + TUDa, + left=.5\c_ptxcd_rulesep_dim, + right=.5\c_ptxcd_rulesep_dim, + colbacktitle=blocktitlebgcolor, + coltitle=blocktitlefgcolor, + colback=blockbodybgcolor, + coltext=blockbodyfgcolor, + fonttitle=\usekomafont{disposition}\usekomafont{section}, + titlerule=\z@, + }, +TUDa-colored-inner/.style = + { + TUDa-colored, + colbacktitle=innerblocktitlebgcolor, + coltitle=innerblocktitlefgcolor, + colback=innerblockbodybgcolor, + coltext=innerblockbodyfgcolor, + fonttitle=\usekomafont{disposition}\usekomafont{subsubsection} + }, +TUDa-boxed/.style = +{ +enhanced, +size=minimal, +colbacktitle=blocktitlebgcolor, +coltitle=blocktitlefgcolor, +colback=blockbodybgcolor, +coltext=blockbodyfgcolor, +boxsep=\c_ptxcd_rulesep_dim, +boxrule=.5\c_ptxcd_smallrule_dim, +titlerule=\z@, +arc=1ex, +auto~outer~arc, +fonttitle=\usekomafont{disposition}\usekomafont{section}, +before~title={\strut}, +parbox=false, +}, +TUDa-boxed-inner/.style = + { + TUDa-boxed, + colbacktitle=innerblocktitlebgcolor, + coltitle=innerblocktitlefgcolor, + colback=innerblockbodybgcolor, + coltext=innerblockbodyfgcolor, + sharp~corners, + fonttitle=\usekomafont{disposition}\usekomafont{subsubsection} + }, +} +% \end{macrocode} +% Select default box styles according to style option +% \begin{macrocode} +\tcbposterset{boxes ={\g_ptxcd_boxstyle_tl}, poster={spacing=5cm}} +\tcbset{ +every~ box~ on~ layer~ 3/.style={reset,\g_ptxcd_boxstyle_tl -inner}, +every~ box~ on~ layer~ 4/.style={reset,\g_ptxcd_boxstyle_tl -inner}, +} +% \end{macrocode} +% Adjust caption indent +% \begin{macrocode} +\setcapindent{1em} +\file_if_exist_input:n {\g_@@_config_prefix_tl\g_ptxcd_department_str.cfg} +\hook_use:n {ptxcd/init-colors} +\ptxcd_makeheadrule[ + width=\paperwidth-2\g_ptxcd_margin_dim, + color=identbarcolor +]{ptxcd_headrule} +\endinput +% \end{macrocode} + +% +% \iffalse +%</class&body> +% \fi +% +% \Finale +% \fi^^A No documentation on this +\endinput diff --git a/Master/texmf-dist/source/latex/tuda-ci/tudasize.dtx b/Master/texmf-dist/source/latex/tuda-ci/tudasize.dtx new file mode 100644 index 00000000000..ee107b56d40 --- /dev/null +++ b/Master/texmf-dist/source/latex/tuda-ci/tudasize.dtx @@ -0,0 +1,275 @@ +% \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{tudasize.dtx} + [2025-01-26 v4.00 Paper and font size configuration for TUDa-CI] +\typeout{***********************************************************} +\typeout{No documentation included in this file! Please see tuda-ci.pdf for more the general documentation information.} +\typeout{***********************************************************} +\stop +%</driver> +% \iffalse %no documentation on this +%<@@=ptxcd> +%<*tudasize> +\ProvidesExplFile{tuda-\@@tudasizepaper@@ paper.clo}{2025-01-26}{4.00}{tuda-ci~size~adjustments~for~\@@tudasizepaper@@ paper} +\cs_set:Nn \ptxcd_setup_title_sizes: { + \cs_set:Nn \ptxcd_title_fontsize: { +%<a0> {125pt}{165pt} +%<a1> {86pt}{120pt} +%<a2> {65pt}{82pt} +%<a3> {47pt}{61pt} +%<a4> {36pt}{47pt} +%<a5> {22pt}{28pt} + } + \cs_set:Nn \ptxcd_titleinfo_fontsize: { +%<a0> {28pt}{35pt} +%<a1> {35pt}{42pt} +%<a2> {22pt}{28pt} +%<a3> {16pt}{20pt} +%<a4> {12pt}{14pt} +%<a5> {10pt}{11.5pt} + } + \cs_set:Nn \ptxcd_titlethanks_fontsize: { +%<a0> {24pt}{30pt} +%<a1> {22pt}{26pt} +%<a2> {14pt}{20pt} +%<a3> {12pt}{16pt} +%<a4|a5> {10pt}{11.5pt} + } +} +\cs_set:Nn \ptxcd_setup_base_sizes: { + \tl_if_empty:NT \g_ptxcd_fontsize_tl { + \tl_gset:Nn \g_ptxcd_fontsize_tl +%<a0> {30pt} +%<a1|a2> {25pt} +%<a3> {17pt} +%<a4> {14pt} +%<a5> {10pt} + } + \dim_gset:Nn \g_ptxcd_margin_dim +%<a0|a1|a2> {30mm} +%<a3|a4> {15mm} +%<a5> {12mm} +} +%</tudasize> +% +% The following part is a modified version of +% scrkernel-fonts.dtx and scrkernel-paragraphs.dtx +% Copyright (c) Markus Kohm, 2002-2024 +% modified by Marei Peischl <marei@peitex.de> +% \iffalse +%<*scrsize> +% \fi +% \begin{macrocode} +\ProvidesFile{% +%<9pt> tudasize9pt.clo% +%<tudaletter> tudalettersize10pt.clo% +}[ +%<9pt> TUDa-CI font size class option (9pt) +%<tudaletter> tudaletter font size class option (10pt) +] +% \end{macrocode} +% +% \begin{command}{\normalsize,\datasize,\small,\footnotesize,\scriptsize,\tiny,\large, +% \Large,\LARGE,\huge,\Huge} +% \begin{macrocode} +\let\normalsize\@undefined +\DeclareRobustCommand\normalsize{% +%<*9pt> + \@setfontsize\normalsize\@ixpt\@xipt% + \abovedisplayskip 8\p@ \@plus4\p@ \@minus4\p@ + \abovedisplayshortskip \z@ \@plus3\p@ + \belowdisplayshortskip 5\p@ \@plus3\p@ \@minus3\p@ +%</9pt> +%<*tudaletter> + \@setfontsize\normalsize\@xpt\@xipt + \abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@ + \abovedisplayshortskip \z@ \@plus3\p@ + \belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@ +%</tudaletter> + \belowdisplayskip \abovedisplayskip + \let\@listi\@listI +} +\def\datasize{% + \normalsize + \@setfontsize\normalsize +%<9pt> \@ixpt\@xipt +%<tudaletter> \@xpt\@xiiipt +} +\let\small\@undefined +\DeclareRobustCommand\small{% +%<*9pt> +\@setfontsize\small\@viiipt\@ixpt% +\abovedisplayskip 5\p@ \@plus2\p@ \@minus2\p@ +\abovedisplayshortskip \z@ \@plus1\p@ +\belowdisplayshortskip 3\p@ \@plus\p@ \@minus2\p@ +\def\@listi{\leftmargin\leftmargini + \topsep 3\p@ \@plus\p@ \@minus\p@ +%</9pt> +%<*tudaletter> + \@setfontsize\small\@ixpt{11}% + \abovedisplayskip 8.5\p@ \@plus3\p@ \@minus4\p@ + \abovedisplayshortskip \z@ \@plus2\p@ + \belowdisplayshortskip 4\p@ \@plus2\p@ \@minus2\p@ + \def\@listi{\leftmargin\leftmargini + \topsep 4\p@ \@plus2\p@ \@minus2\p@ +%</tudaletter> + \parsep 2\p@ \@plus\p@ \@minus\p@ + \itemsep \parsep}% + \belowdisplayskip \abovedisplayskip +} +\let\footnotesize\@undefined +\DeclareRobustCommand\footnotesize{% +%<*9pt> + \@setfontsize\footnotesize\@viipt\@viiipt + \abovedisplayskip 4\p@ \@plus2\p@ \@minus2\p@ + \abovedisplayshortskip \z@ \@plus1\p@ + \belowdisplayshortskip 2.5\p@ \@plus\p@ \@minus\p@ +%</9pt> +%<*tudaletter> + \@setfontsize\footnotesize{7.5pt}\@xpt% + \abovedisplayskip 6\p@ \@plus2\p@ \@minus4\p@ + \abovedisplayshortskip \z@ \@plus\p@ + \belowdisplayshortskip 3\p@ \@plus\p@ \@minus2\p@ +%</tudaletter> + \def\@listi{\leftmargin\leftmargini + \topsep 3\p@ \@plus\p@ \@minus\p@ + \parsep 2\p@ \@plus\p@ \@minus\p@ + \itemsep \parsep}% + \belowdisplayskip \abovedisplayskip +} +\let\scriptsize\@undefined +\let\tiny\@undefined +\let\large\@undefined +\let\Large\@undefined +\let\LARGE\@undefined +\let\huge\@undefined +\let\Huge\@undefined +%<*9pt> +\DeclareRobustCommand\scriptsize{\@setfontsize\scriptsize\@vipt\@viipt} +\DeclareRobustCommand\tiny{\@setfontsize\tiny\@vpt\@vipt} +\DeclareRobustCommand\large{\@setfontsize\large\@xpt\@xiipt} +\DeclareRobustCommand\Large{\@setfontsize\Large\@xipt{13}} +\DeclareRobustCommand\LARGE{\@setfontsize\LARGE\@xiipt{14}} +\DeclareRobustCommand\huge{\@setfontsize\huge\@xivpt{18}} +\DeclareRobustCommand\Huge{\@setfontsize\Huge\@xviipt{22}} +%</9pt> +%<*tudaletter> +\DeclareRobustCommand\scriptsize{\@setfontsize\scriptsize\@viipt\@viiipt} +\DeclareRobustCommand\tiny{\@setfontsize\tiny\@vipt\@viipt} +\DeclareRobustCommand\large{\@setfontsize\large\@xiipt{14}} +\DeclareRobustCommand\Large{\@setfontsize\Large\@xivpt{18}} +\DeclareRobustCommand\LARGE{\@setfontsize\LARGE\@xviipt{22}} +\DeclareRobustCommand\huge{\@setfontsize\huge\@xxpt{25}} +\DeclareRobustCommand\Huge{\@setfontsize\Huge\@xxvpt{30}} +%</tudaletter> +\normalsize +% \end{macrocode} +% \end{command} +% The values are same as with the standard classes. +% \begin{macrocode} +%<*9pt> +\setlength\footnotesep {6.3\p@} +\setlength{\skip\footins} {8\p@ \@plus 4\p@ \@minus 2\p@} +\setlength\textfloatsep {18\p@ \@plus 2\p@ \@minus 4\p@} +\setlength\dbltextfloatsep{18\p@ \@plus 2\p@ \@minus 2\p@} +%</9pt> +%<*tudaletter> +\setlength\footnotesep {6.65\p@} +\setlength{\skip\footins} {9\p@ \@plus 4\p@ \@minus 2\p@} +\setlength\textfloatsep {20\p@ \@plus 2\p@ \@minus 4\p@} +\setlength\dbltextfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@} +%</tudaletter> +\setlength\floatsep {12\p@ \@plus 2\p@ \@minus 2\p@} +\setlength\intextsep {12\p@ \@plus 2\p@ \@minus 2\p@} +\setlength\dblfloatsep {12\p@ \@plus 2\p@ \@minus 2\p@} +\setlength\@fptop {0\p@ \@plus 1fil} +\setlength\@fpsep {8\p@ \@plus 2fil} +\setlength\@fpbot {0\p@ \@plus 1fil} +\setlength\@dblfptop {0\p@ \@plus 1fil} +\setlength\@dblfpsep {8\p@ \@plus 2fil} +\setlength\@dblfpbot {0\p@ \@plus 1fil} +\setlength\partopsep {2\p@ \@plus 1\p@ \@minus 1\p@} +% \end{macrocode} +% \begin{macro}{\@listi,\@listii,\@listiii,\@listiv,\@listv,\@listvi} +% The definitions are the same as with the standard classes. +% \begin{macrocode} +\def\@listi{\leftmargin\leftmargini + \parsep 4\p@ \@plus2\p@ \@minus\p@ +%<9pt> \topsep 8\p@ \@plus2\p@ \@minus3\p@ +%<tudaletter> \topsep 8\p@ \@plus2\p@ \@minus4\p@ + \itemsep \parsep} +\let\@listI\@listi +\def\@listii {\leftmargin\leftmarginii + \labelwidth\leftmarginii + \advance\labelwidth-\labelsep + \topsep 4\p@ \@plus2\p@ \@minus\p@ + \parsep 2\p@ \@plus\p@ \@minus\p@ + \itemsep \parsep} +\def\@listiii{\leftmargin\leftmarginiii + \labelwidth\leftmarginiii + \advance\labelwidth-\labelsep + \topsep 2\p@ \@plus\p@\@minus\p@ + \parsep \z@ + \partopsep \p@ \@plus\z@ \@minus\p@ + \itemsep \topsep} +\def\@listiv {\leftmargin\leftmarginiv + \labelwidth\leftmarginiv + \advance\labelwidth-\labelsep} +\def\@listv {\leftmargin\leftmarginv + \labelwidth\leftmarginv + \advance\labelwidth-\labelsep} +\def\@listvi {\leftmargin\leftmarginvi + \labelwidth\leftmarginvi + \advance\labelwidth-\labelsep} +%%% From File: $Id: scrkernel-paragraphs.dtx 3064 2019-02-01 07:40:28Z kohm $ +\@ifundefined{@list@extra}{}{% + \expandafter\ifnum\scr@v@is@ge{3.17}\par@updaterelative\fi + \l@addto@macro{\@listi}{\@list@extra}% + \let\@listI=\@listi + \l@addto@macro{\@listii}{\@list@extra}% + \l@addto@macro{\@listiii}{\@list@extra}% + \l@addto@macro{\footnotesize}{\protect\add@extra@listi{ftns}}% + \l@addto@macro{\small}{\protect\add@extra@listi{sml}}% +} +\@listi +% \end{macrocode} +% \end{macro}^^A \@listi … \@listvi +% \end{ilength}^^A \@fptop … \@dblfpbot +% \end{length}^^A \footnotesep … \partopsep +% +% \Finale +% \PrintChanges +%</scrsize> +% \Finale +% \fi^^A No documentation on this +\endinput |