From 41baa3fc38fdb0dfd5f1825d8548a999ab07bf5d Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Sat, 25 Dec 2021 03:01:41 +0000 Subject: CTAN sync 202112250301 --- .../latex/contrib/bfh-ci/tex/bfh-layout-rules.cfg | 83 ++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 macros/latex/contrib/bfh-ci/tex/bfh-layout-rules.cfg (limited to 'macros/latex/contrib/bfh-ci/tex/bfh-layout-rules.cfg') diff --git a/macros/latex/contrib/bfh-ci/tex/bfh-layout-rules.cfg b/macros/latex/contrib/bfh-ci/tex/bfh-layout-rules.cfg new file mode 100644 index 0000000000..09a1ede007 --- /dev/null +++ b/macros/latex/contrib/bfh-ci/tex/bfh-layout-rules.cfg @@ -0,0 +1,83 @@ +%% This is file `bfh-layout-rules.cfg' version 2.0.0 (2021/12/23), +%% it is part of +%% BFH-CI -- Corporate Design for Bern University of Applied Sciences +%% ---------------------------------------------------------------------------- +%% +%% Copyright (C) 2021 by +%% Marei Peischl +%% Andreas Habegger +%% +%% ============================================================================ +%% 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 +%% Andreas Habegger +%% +%% The development respository can be found at +%% https://gitlab.ti.bfh.ch/bfh-latex/bfh-ci/ +%% Please use the issue tracker for feedback! +%% +%% ============================================================================ +%% +\ProvidesExplFile{bfh-layout-rules.cfg}{2021/12/23}{2.0.0}{rules configuration for bfhlayout} + +\int_if_exist:NF \g_ptxcd_paper_int { + \int_new:N \g_ptxcd_paper_int + \keys_define:nn {ptxcd/rules} { + paper .choices:nn = {a0,a1,a2,a3,a4,a5}{ + \int_gset_eq:NN \g_ptxcd_paper_int \l_keys_choice_int + }, + paper .initial:n = a4, + } +} + +\dim_new:N \g__ptxcd_rule_dim +\dim_new:N \g__ptxcd_rule_radius_dim + +\int_case:nnF {\g_ptxcd_paper_int} { + %A0 + {1} { + \dim_gset:Nn \g__ptxcd_rule_dim {8.5mm} + \dim_gset:Nn \g__ptxcd_rule_radius_dim {2.1mm} + } + %A1 + {2} { + \dim_gset:Nn \g__ptxcd_rule_dim {5.5mm} + \dim_gset:Nn \g__ptxcd_rule_radius_dim {1.6mm} + } + %A2 + {3} { + \dim_gset:Nn \g__ptxcd_rule_dim {4.5mm} + \dim_gset:Nn \g__ptxcd_rule_radius_dim {1.2mm} + } + %A3 + {4} { + \dim_gset:Nn \g__ptxcd_rule_dim {3.5mm} + \dim_gset:Nn \g__ptxcd_rule_radius_dim {.8mm} + } +}{ + \dim_gset:Nn \g__ptxcd_rule_dim {2.5mm} + \dim_gset:Nn \g__ptxcd_rule_radius_dim {.6mm} +} + +\ExplSyntaxOff +\RequirePackage{tikz} +\ExplSyntaxOn + +\NewDocumentCommand{\bfhRule}{sO{\linewidth}}{ + \par\nointerlineskip\skip_vertical:n {\g__ptxcd_rule_dim} + \noindent\tikz\path[fill=BFH-Gray,rounded~corners=\g__ptxcd_rule_radius_dim](0,0)rectangle(#2,\g__ptxcd_rule_dim); + \par\nointerlineskip\skip_vertical:n {\g__ptxcd_rule_dim} +} + + +\endinput \ No newline at end of file -- cgit v1.2.3