diff options
Diffstat (limited to 'macros/latex/contrib/tuda-ci/tex/tudapub.cls')
-rw-r--r-- | macros/latex/contrib/tuda-ci/tex/tudapub.cls | 35 |
1 files changed, 30 insertions, 5 deletions
diff --git a/macros/latex/contrib/tuda-ci/tex/tudapub.cls b/macros/latex/contrib/tuda-ci/tex/tudapub.cls index 407dc03f30..7ccb4fd236 100644 --- a/macros/latex/contrib/tuda-ci/tex/tudapub.cls +++ b/macros/latex/contrib/tuda-ci/tex/tudapub.cls @@ -1,4 +1,4 @@ -%% This is file `tudapub.cls' version 3.18 (2021/08/05), +%% This is file `tudapub.cls' version 3.20 (2021/10/12), %% it is part of %% TUDa-CI -- Corporate Design for TU Darmstadt %% ---------------------------------------------------------------------------- @@ -26,8 +26,8 @@ %% %% ============================================================================ %% -\def\fileversion{3.18} -\def\filedate{2021/08/05} +\def\fileversion{3.20} +\def\filedate{2021/10/12} \NeedsTeXFormat{LaTeX2e} \RequirePackage{expl3} \ProvidesExplClass{tudapub} @@ -70,7 +70,7 @@ 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,%MAYBE add custom values + class .initial:n = scrartcl, color .meta:n = {accentcolor=#1}, accentcolor .code:n = {\PassOptionsToPackage{accentcolor=#1}{tudacolors}}, textaccentcolor .code:n = {\PassOptionsToPackage{textaccentcolor=#1}{tudacolors}}, @@ -553,6 +553,31 @@ \tl_new:N \g_ptxcd_titleimage_code_tl \tl_gset_eq:NN \g_ptxcd_titleimage_code_tl \c_empty_tl \newcommand{\titleimage}[1]{\tl_gset:Nn \g_ptxcd_titleimage_code_tl {#1}} +\box_new:N \l__ptxcd_titlegraphic_box + +\RequirePackage{trimclip} + +\NewDocumentCommand{\titlegraphic}{sm}{ + \IfBooleanTF{#1}{ + \tl_gset:Nn \g_ptxcd_titleimage_code_tl { + \hbox_set:Nn \l__ptxcd_titlegraphic_box {\raisebox{\depth}{#2}} + \box_resize_to_wd:Nn \l__ptxcd_titlegraphic_box {\width} + \dim_compare:nTF {\box_ht:N \l__ptxcd_titlegraphic_box -\height> \c_zero_dim} + { + \dim_set:Nn \l_tmpa_dim {.5\box_ht:N \l__ptxcd_titlegraphic_box - .5\height} + \clipbox{0pt~\dim_eval:n{\l_tmpa_dim}~0pt~\dim_eval:n{\l_tmpa_dim}}{\box_use:N \l__ptxcd_titlegraphic_box} + }{ + \box_resize_to_ht:Nn \l__ptxcd_titlegraphic_box {\height} + \dim_set:Nn \l_tmpa_dim {(\box_wd:N \l__ptxcd_titlegraphic_box - \width) / 2} + \clipbox{\dim_eval:n{\l_tmpa_dim}~0pt~\dim_eval:n{\l_tmpa_dim}~0pt}{\box_use:N \l__ptxcd_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 @@ -680,7 +705,7 @@ \colorbox{InfoBox}{ \makebox[\dim_eval:n {2.2\c_ptxcd_logoheight_dim-\fboxsep}][r]{ \parbox{2\c_ptxcd_logoheight_dim}{ - \expandafter\fontsize\ptxcd_titlethanks_fontsize:\selectfont\usekomafont{institution}% + \expandafter \fontsize\ptxcd_titlethanks_fontsize:\selectfont\usekomafont{institution}% \raggedright% #1 }}} |