diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/tuda-ci/tudamecheng.cfg')
-rw-r--r-- | Master/texmf-dist/tex/latex/tuda-ci/tudamecheng.cfg | 263 |
1 files changed, 263 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/tuda-ci/tudamecheng.cfg b/Master/texmf-dist/tex/latex/tuda-ci/tudamecheng.cfg new file mode 100644 index 00000000000..d3bf8ed08a5 --- /dev/null +++ b/Master/texmf-dist/tex/latex/tuda-ci/tudamecheng.cfg @@ -0,0 +1,263 @@ +%% This is file `tudamecheng.cfg' version 3.00 (2020/09/08), +%% it is part of +%% TUDa-CI -- Corporate Design for TU Darmstadt +%% ---------------------------------------------------------------------------- +%% +%% Copyright (C) 2018--2020 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 Maintainers of this work are +%% Marei Peischl <tuda-ci@peitex.de> +%% Markus Lazanowski <latex@ce.tu-darmstadt.de> +%% +%% The development respository can be found at +%% https://github.com/tudace/tuda_latex_templates +%% Please use the issue tracker for feedback! +%% +%% ============================================================================ +%% +\def\fileversion{3.00} +\def\filedate{2020/09/08} +\RequirePackage{expl3} +\ProvidesExplFile{tudamecheng.cfg} +{\filedate}{\fileversion}{Special Features the department of mechanical engineering of Darmstadt's Corporate Design (tuda-ci)} + +\RequirePackage{pgf} + +\cs_new:Nn \ptxcd_mecheng_arrow:N { + \begin{pgfpicture} + \pgfsetbaseline{0} + \pgfsetcolor{TUDa-Arrow} + \pgfsetrectcap + \str_if_eq:VnTF \c__ptxcd_base_str {leaflet} + {\pgfsetlinewidth{2\g_ptxcd_titlerule_dim}} + {\pgfsetlinewidth{2\c_ptxcd_smallrule_dim}} + \pgfpathmoveto{\pgfpointorigin} + \pgfpathlineto{\pgfpointpolar{174}{.05#1}} + \pgfpathlineto{\pgfpointpolar{186}{.05#1}} + \pgfpathclose + \pgfusepath{fill} + \pgfpathmoveto{\pgfpoint{-.04#1}{0}} + \pgfpathlineto{\pgfpoint{-#1}{0}} + \pgfusepath{stroke} + \end{pgfpicture} +} + +\NewDocumentCommand{\MechEngArrow}{sm}{ + \IfBooleanT{#1}{\begingroup\colorlet{TUDa-Arrow}{.}} + \dim_set:Nn \l_tmpa_dim {#2}\ptxcd_mecheng_arrow:N \l_tmpa_dim + \IfBooleanT{#1}{\endgroup} +} + +\box_new:N \g_ptxcd_footline_box +\hbox_gset:Nn \g_ptxcd_footline_box {\MechEngArrow{\textwidth}} + + +\RenewDocumentCommand{\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}{\MechEngArrow{\l_ptxcd_headrule_width_dim}} + } + \IfBooleanF{#1} {\cs_new:cpn {#3} {\box_use:c {#3_box}}} +} + + +\str_if_eq:VnT \c__ptxcd_base_str {pub} { + \cs_set:Nn \ptxcd_setup_sponsor_box: { + \hbox_gset:Nn \g_ptxcd_sponsor_box { + \def\height{\dimexpr.8\c_ptxcd_logoheight_dim\relax} + \parbox[t]{\textwidth}{ + \bool_if:nF {\seq_if_empty_p:N \g_ptxcd_sponsors_seq && \tl_if_empty_p:N \@sponsors} { + \rule{\linewidth}{\g_ptxcd_titlerule_dim}\par\nointerlineskip + \vspace{\dimexpr.1\c_ptxcd_logoheight_dim-\c_ptxcd_smallrule_dim} + } + \seq_use:Nn \g_ptxcd_sponsors_seq {\hfill} + \ifhmode + \par + \nointerlineskip + \addvspace{.1\c_ptxcd_logoheight_dim} + \fi + \ifx\@sponsors\@empty + \else + \@sponsors\par + \nointerlineskip\addvspace{.1\c_ptxcd_logoheight_dim} + \fi + + \smash{\MechEngArrow{\linewidth}} + \\[\c_ptxcd_rulesep_dim] + \usekomafont{pagefoot}\includegraphics[width=\c_ptxcd_logoheight_dim]{\g_ptxcd_departmentlogo_tl} + } + } + } + + \renewcommand*{\sectionformat}{\color{TUDa-Primary2}\thesection\autodot\enskip} + + \if@titlepage + \titlehead{\rule{0pt}{\c_ptxcd_logoheight_dim}} + \fi +} + +\str_case:VnT \c__ptxcd_base_str { + {pub} {} + {exercise} {} +} { + + \addtokomafont{footsepline}{\color{accentcolor}} + + \newpairofpagestyles[TUDa.\c__ptxcd_base_str]{TUDa.mecheng}{ + \KOMAoptions{plainfootsepline,footsepline=5pt} + \ptxcd_makeheadrule[color=TUDa-Primary1, width=\sls@headwidth]{ptxcd_headrule} + + \ModifyLayer[ + contents=\smash{\ptxcd_headrule} + ]{TUDa.mecheng.head.above.line} + \ModifyLayer[ + contents=\smash{\ptxcd_headrule} + ]{plain.TUDa.mecheng.head.above.line} + + + \ModifyLayer[ + contents={ + \dim_compare:nF {\box_wd:N \g_ptxcd_footline_box=\layerwidth} { + \hbox_gset:Nn \g_ptxcd_footline_box {\MechEngArrow{\layerwidth}} + } + \smash{\box_use:N \g_ptxcd_footline_box} + } + ]{TUDa.mecheng.foot.above.line} + + \ModifyLayer[ + contents={ + \dim_compare:nF {\box_wd:N \g_ptxcd_footline_box=\layerwidth} { + \hbox_gset:Nn \g_ptxcd_footline_box {\MechEngArrow{\layerwidth}} + } + \smash{\box_use:N \g_ptxcd_footline_box} + } + ]{plain.TUDa.mecheng.foot.above.line} + + \clearpairofpagestyles + \cfoot[\pagemark]{\pagemark} + \tl_if_empty:NF \g_ptxcd_departmentlogo_tl { + \lefoot[{\raisebox{-\height}[0pt][0pt]{\includegraphics[width=\c_ptxcd_logoheight_dim]{\g_ptxcd_departmentlogo_tl}}}]{\raisebox{-\height}[0pt][0pt]{\includegraphics[width=\c_ptxcd_logoheight_dim]{\g_ptxcd_departmentlogo_tl}}} + \lofoot[{\raisebox{-\height}[0pt][0pt]{\includegraphics[width=\c_ptxcd_logoheight_dim]{\g_ptxcd_departmentlogo_tl}}}]{\raisebox{-\height}[0pt][0pt]{\includegraphics[width=\c_ptxcd_logoheight_dim]{\g_ptxcd_departmentlogo_tl}}} + } + } + \DeclarePageStyleAlias{TUDa}{TUDa.mecheng} + \DeclarePageStyleAlias{plain.TUDa}{plain.TUDa.mecheng} + \pagestyle{TUDa} +} + + +\str_if_eq:VnT \c__ptxcd_base_str {sciposter} { + \cs_set:Nn \__ptxcd_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=south~west,inner~sep=\z@] (footerarrow) at ([yshift=\g_ptxcd_footheight_dim]bottomleft) {\MechEngArrow{\contentwidth}}; + \node[anchor=north~west,inner~sep=\z@] (departmentlogo) at ([yshift=\g_ptxcd_footheight_dim]bottomleft) + {\includegraphics[width=\dimexpr2\linewidth/7]{\g_ptxcd_departmentlogo_tl}}; + \node[anchor=south~west,inner~sep=\z@] (infofooter) at (footerarrow.north~west) { + \parbox{\contentwidth}{ + \accentfont\small\g_ptxcd_poster_foot_tl + \par\medskip + \let\footnotetext\ptxcd_title@footnote + \g_ptxcd_thanks_tl} + }; + } +} + +\str_if_eq:VnT \c__ptxcd_base_str {poster} { + \ModifyLayer[ + clone=TUDa.poster.qrcode, + align=bl, + hoffset=\g_ptxcd_margin_dim, + width=\paperwidth-2\g_ptxcd_margin_dim, + height=\g_ptxcd_footheight_dim, + contents={ + \usekomafont{pagefoot} + \bool_if:NTF \g_ptxcd_poster_foot_bool { + \put(0,\LenToUnit{\g_ptxcd_qrcode_dim+\g_ptxcd_footheight_dim}){\rlap{\rule{\dimexpr\paperwidth-2\g_ptxcd_margin_dim}{.5\c_ptxcd_smallrule_dim}}} + \put(0,\LenToUnit{\g_ptxcd_qrcode_dim+.5\g_ptxcd_footheight_dim}) { + \parbox[c][\g_ptxcd_footheight_dim][c]{\layerwidth}{\strut\g_ptxcd_poster_foot_tl\strut}} + \put(0,\LenToUnit{1.2\g_ptxcd_qrcode_dim}){\rlap{\ptxcd_makefootrule*[width=\dimexpr\paperwidth-2\g_ptxcd_margin_dim, color=identbarcolor]{TUDa@footrule}}} + \putLL{ + \includegraphics[width=\dimexpr2\linewidth/7]{\g_ptxcd_departmentlogo_tl} + } + }{ + \put(0,\LenToUnit{1.2\g_ptxcd_qrcode_dim}){\rlap{\ptxcd_makefootrule*[width=\dimexpr\paperwidth-2\g_ptxcd_margin_dim, color=identbarcolor]{TUDa@footrule}}} + \putLL{ + \includegraphics[width=\dimexpr2\linewidth/7]{\g_ptxcd_departmentlogo_tl} + } + } + } + ]{TUDa.poster.footer} + + \dim_set:Nn \g_ptxcd_footheight_dim {\dim_max:nn {2\g_ptxcd_footheight_dim} {1.5\baselineskip}} + \geometry{bottom=\dim_eval:n {\g_ptxcd_footheight_dim+\footskip+\g_ptxcd_margin_dim}} +} + +\str_if_eq:VnT \c__ptxcd_base_str {letter} { + \setkomavar{nextfoot}{ + \raisebox{-\height}[0pt][0pt]{ + \parbox{\useplength{firstfootwidth}}{ + \usekomafont{pagefoot} + \includegraphics[width=1.4\c_ptxcd_logoheight_dim]{\g_ptxcd_departmentlogo_tl}\\ + \MechEngArrow{\l_ptxcd_headrule_width_dim} + } + } + } + + \setkomavar{nexthead}{} + \newpairofpagestyles[TUDaLetter]{TUDaLetter.mecheng}{ + \KOMAoptions{footsepline=false,pagenumber=topright} + \clearpairofpagestyles + \lehead{\usekomavar{nexthead}}% + \lohead{\usekomavar{nexthead}}% + \lefoot{\usekomavar{nextfoot}}% + \lofoot{\usekomavar{nextfoot}}% + \rehead[\pagemark]{\pagemark} + \rohead[\pagemark]{\pagemark} + } + + \DeclarePageStyleByLayers{TUDaLetter.mecheng.first}{TUDaLetter.mecheng.foot.even,TUDaLetter.mecheng.foot.odd,TUDaLetter.mecheng.foot.oneside,TUDaLetter.mecheng.foot.above.line} + \DeclarePageStyleAlias{letter.first}{TUDaLetter.mecheng.first} + + \def\letterpagestyle{TUDaLetter.mecheng} + \geometry{bottom=\dimexpr\c_ptxcd_BottomMargin_dim+10mm} +} + +\str_if_eq:VnT \c__ptxcd_base_str {leaflet} { + \ModifyLayer[ + contents={\raisebox{-\height}[0pt][0pt]{\parbox{\layerwidth}{ + \leavevmode\box_use:N \ptxcd_footrule_box\\[\c_ptxcd_rulesep_dim] + \includegraphics[width=\c_ptxcd_logoheight_dim]{\g_ptxcd_departmentlogo_tl} + }}} + ]{TUDa.flyer.footline} +} + +\endinput
\ No newline at end of file |