%% %% This is file `URoptions.sty' version 2.0 (2017/04/05), %% it is part of %% urcls -- Corporate Design for the University of Regensburg %% ---------------------------------------------------------------------------- %% %% Copyright (C) 2016--2017 by Marei Peischl %% %% ---------------------------------------------------------------------------- %% License information %% ---------------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 %% 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.3 or later is part of all distributions of LaTeX %% version 2005/12/01 or later. %% %% This work has the LPPL maintenance status `maintained'. %% %% The Current Maintainer of this work is Marei Peischl. %% %% ============================================================================ %% %% Dieses Werk darf nach den Bedingungen der LaTeX Project Public Lizenz %% in der Version 1.3c, verteilt und/oder verändert werden. Die aktuelle %% Version dieser Lizenz ist http://www.latex-project.org/lppl.txt und %% Version 1.3c oder neuer ist Teil aller LaTeX-Distributionen ab 2005/12/01. %% Dieses Werk hat den LPPL-Verwaltungs-Status "maintained". %% Die Verwaltung liegt aktuell bei der Autorin, Marei Peischl. %% %% ---------------------------------------------------------------------------- %% End of license information %% ---------------------------------------------------------------------------- %% \NeedsTeXFormat{LaTeX2e} \def\fileversion{2.0} \def\filedate{2017/04/05} \RequirePackage{expl3} \ProvidesExplPackage{URoptions}{\filedate}{\fileversion}{Implementation of keyval-options for the urcls bundle} \RequirePackage{URspecialopts} %Define the departments \clist_new:N \g_UR@dep_clist \clist_gset:Nn \g_UR@dep_clist {lov,ffg,asz,rw,ww,kt,pkgg,pps,slk,bvm,mat,ph,chp,med,ub,zsk,eur,zhw,rul,zfw,spo,rz,fsimphy} \cs_new:Nn \UR_Define@Key:n { \exp_args:Nx \keys_define:nn { \@currname.\@currext } {#1} } \cs_new:Nn \UR_Define@Key:nnn { \exp_args:Nx \keys_define:nn { \@currname.\@currext } {#1#2=#3} } \cs_generate_variant:Nn \UR_Define@Key:nnn {xno,xnn}% {xo,xn} \cs_new:Nn \UR_set@Key:n { \exp_args:Nx \keys_set:nn { \@currname.\@currext } {#1} } \cs_new:Npn \UR_Define@BoolKey [#1]#2 { \UR_Define@Key:n { #2 .bool_gset:c = {g_UR@#1_bool}, #2 .default:n = {true} } } \cs_new:Nn \UR_set@InitialValue:nn { \UR_Define@Key:n { #1 .initial:n = #2 } } %\NewDocumentCommand{\UR_Define@ComplementaryKey}{smmD<>{}}{ \cs_new:Npn \UR_Define@ComplementaryKey [#1]#2 { \UR_Define@Key:n { #2 .bool_gset_inverse:c = {g_UR@#1_bool}, #2 .default:n = {true}, } } \newcommand*{\UR_new@BoolOpt}{ \@dblarg\UR_Define@BoolKey } \newcommand*{\UR@define@draftfinalkeys}{ \UR_new@BoolOpt{draft} \UR_Define@ComplementaryKey[draft]{final} } %\UR@create@ChoiceKey{key}[default]{{value}{code},{value}{code}} \NewDocumentCommand\UR@create@ChoiceKey{momd<>}{ \UR_Define@Key:n{ #1 .choice: } \clist_map_inline:nn {#3} { \UR_Define@Key:xnn {#1 / \use_i:nn ##1} { .code:n} {\use_ii:nn ##1} } \IfNoValueF{#4}{ \UR_set@InitialValue:nn {#1}{#4} } \IfNoValueF{#2}{\UR_Define@Key:n { #1 .default:n = #2}} } \newcommand*{\UR@DeclareColorOptions}{ \Module@DefineSpecialPassKey{colors} \clist_map_inline:Nn \g_UR@dep_clist {\Module@DeclarePassOption{##1}[true]{URrules}} \clist_map_inline:nn {all,faculties} {\Module@DeclarePassOption{##1}[true]{URrules}} } \endinput