summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/bfh-ci/bfhmodule.sty
blob: 0f09714c93d754b3ed5fa3ba772aa3bd1c6c22e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
%% This is file `bfhmodule.sty' version 2.1.2 (2022/03/01),
%% it is part of
%% BFH-CI -- Corporate Design for Bern University of Applied Sciences
%% ----------------------------------------------------------------------------
%%
%%  Copyright (C) 2021–2022 by
%%      Marei Peischl <marei@peitex.de>
%%      Andreas Habegger <andreas.habegger@bfh.ch>
%%
%% ============================================================================
%% 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 <bfh-ci@peitex.de>
%%   Andreas Habegger <andreas.habegger@bfh.ch>
%%
%% The development respository can be found at
%% https://gitlab.ti.bfh.ch/bfh-latex/bfh-ci/
%% Please use the issue tracker for feedback!
%%
%% ============================================================================
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesExplPackage{bfhmodule}{2022/03/01}{2.1.2}{BFH module package -- modular extensions for bfh-ci}

\msg_new:nnn {bfhmodule} {module-not-found} {
	You~tried~to~load~the~BFH~layout~module~#1.\\
	I~could~not~find~a~file~named~bfh-layout-#1.cfg.
}

\msg_new:nnn {bfhmodule} {module-already-loaded} {
	You~tried~to~load~the~BFH~layout~module~#1.\\
	This~module~has~already~been~loaded.
}

\seq_new:N \g__ptxcd_module_seq

\newcommand*\LoadBFHModule[1]{
	\clist_map_inline:nn {#1} {
		\seq_if_in:NnTF \g__ptxcd_module_seq {##1} {
			\msg_warning:nnn {bfhmodule} {module-already-loaded} {##1}
		}{
			\file_if_exist_input:nF {bfh-layout-##1.cfg}
				{\msg_error:nnn {bfhmodule} {module-not-found} {##1}}
			\seq_gpush:Nn \g__ptxcd_module_seq {##1}
		}
	}
	\ExplSyntaxOff
}

\endinput