diff options
author | Karl Berry <karl@freefriends.org> | 2015-02-16 21:40:28 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2015-02-16 21:40:28 +0000 |
commit | 68695b0b7015bb233b4f5697ebdb9def46b9cb4a (patch) | |
tree | 94745a5ea3bedbf6b6904bf5cbb949151e8f41fd /Master/texmf-dist/tex/latex/tudscr/tudscrbase.sty | |
parent | e016928e2bd0e7163bde478d7ab2419f49468c3c (diff) |
tudscr (16feb15)
git-svn-id: svn://tug.org/texlive/trunk@36296 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/tudscr/tudscrbase.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/tudscr/tudscrbase.sty | 110 |
1 files changed, 71 insertions, 39 deletions
diff --git a/Master/texmf-dist/tex/latex/tudscr/tudscrbase.sty b/Master/texmf-dist/tex/latex/tudscr/tudscrbase.sty index c9e987129ac..591ed749a38 100644 --- a/Master/texmf-dist/tex/latex/tudscr/tudscrbase.sty +++ b/Master/texmf-dist/tex/latex/tudscr/tudscrbase.sty @@ -10,7 +10,7 @@ %% ============================================================================ %% %% TUD-KOMA-Script -%% Copyright (c) Falk Hanisch <tudscr[at]gmail.com>, 2012-2014 +%% Copyright (c) Falk Hanisch <tudscr@gmail.com>, 2012-2015 %% %% ============================================================================ %% @@ -24,13 +24,13 @@ %% %% ---------------------------------------------------------------------------- %% -%% Dieses Werk darf nach den Bedingungen der LaTeX Project Public Lizenz, -%% Version 1.3c, verteilt und/oder veraendert werden. Die neuste Version -%% dieser Lizenz ist http://www.latex-project.org/lppl.txt und Version 1.3c -%% ist Teil aller Verteilungen von LaTeX 2005/12/01 oder spaeter und dieses -%% Werks. Dieses Werk hat den LPPL-Verwaltungs-Status "author-maintained", -%% wird somit allein durch den Autor verwaltet. Der aktuelle Verwalter und -%% Autor dieses Werkes ist Falk Hanisch. +%% Dieses Werk darf nach den Bedingungen der LaTeX Project Public Lizenz +%% in der Version 1.3c, verteilt und/oder veraendert werden. Die aktuelle +%% Version dieser Lizenz ist http://www.latex-project.org/lppl.txt und +%% Version 1.3c oder spaeter ist Teil aller Verteilungen von LaTeX 2005/12/01 +%% oder spaeter und dieses Werks. Dieses Werk hat den LPPL-Verwaltungs-Status +%% "author-maintained", wird somit allein durch den Autor verwaltet. Der +%% aktuelle Verwalter und Autor dieses Werkes ist Falk Hanisch. %% %% ============================================================================ %% @@ -52,7 +52,7 @@ \fi% }% \fi% - \@TUDVersion{2014/12/17 v2.02 TUD-KOMA-Script}% + \@TUDVersion{2015/02/15 v2.03 TUD-KOMA-Script}% \endgroup% \providecommand*\tudscrmail{tudscr@gmail.com} \@ifundefined{TUDScript}{% @@ -65,7 +65,7 @@ %%% From File: tudscr-base.dtx \NeedsTeXFormat{LaTeX2e}[2011/06/27] \ProvidesPackage{tudscrbase}[% - 2014/12/17 v2.02 TUD-KOMA-Script + 2015/02/15 v2.03 TUD-KOMA-Script package (basics for the bundle)% ] @@ -80,17 +80,31 @@ \expandafter\@secondoftwo% \fi% } +\newcommand*\ifstrbool[4]{% + \ifstr{#1}{true}{#2}{% + \ifstr{#1}{on}{#2}{% + \ifstr{#1}{yes}{#2}{% + \ifstr{#1}{false}{#3}{% + \ifstr{#1}{no}{#3}{% + \ifstr{#1}{off}{#3}{% + #4% + }% + }% + }% + }% + }% + }% +} \DefineFamily{TUD} \newcommand*\TUDProcessOptions{\FamilyProcessOptions{TUD}} \newcommand*\TUDExecuteOptions{\FamilyExecuteOptions{TUD}} -\newcommand*\TUDDefaultOptions{cd,cdfont,tudbookmarks} \newcommand*\TUDoptions{\FamilyOptions{TUD}} \newcommand*\TUDoption{\FamilyOption{TUD}} \newcommand*\TUD@noworlater{\AtEndOfClass} \AtEndOfClass{\let\TUD@noworlater\@firstofone} \newcommand*\TUD@key[2][.\@currname.\@currext]{% \DefineFamilyMember{TUD}% - \@ifnextchar[%] + \kernel@ifnextchar[%] {\TUD@@key[#1]{#2}}{\TUD@@@key[#1]{#2}}% } \def\TUD@@key[#1]#2[#3]#4{% @@ -112,6 +126,11 @@ {false}{0},{off}{0},{no}{0},{true}{1},{on}{1},{yes}{1}% } \newcommand*\TUD@set@numkey{\FamilySetNumerical{TUD}} +\newcommand*\TUD@lengthkey[1][.\@currname.\@currext]{% + \DefineFamilyMember{TUD}% + \FamilyLengthKey[#1]{TUD}% +} +\newcommand*\TUD@set@lengthkey{\FamilySetLength{TUD}} \newcommand*\TUD@unknown@keyval{\FamilyUnknownKeyValue{TUD}} \newcommand*\TUD@key@lock[2][.\@currname.\@currext]{% \newbool{@tud@#2@locked}% @@ -123,67 +142,88 @@ \boolfalse{@tud@#1@locked}% }% } -\let\TUD@std@numkey@lock\TUD@std@ifkey@lock \newcommand*\TUD@set@ifkey@lock[1]{% \booltrue{@tud@#1@locked}% \TUD@set@ifkey{#1}% } +\let\TUD@std@numkey@lock\TUD@std@ifkey@lock \newcommand*\TUD@set@numkey@lock[1]{% \booltrue{@tud@#1@locked}% \TUD@set@numkey{#1}% } -\newcommand*\csdef@lock[2]{% +\newcommand*\cs@lock[2]{% \csdef{#1}{#2}% \newbool{#1@locked}% } -\newcommand*\csstd@lock[2]{% +\newcommand*\cs@std@lock[2]{% \ifbool{#1@locked}{}{% \csdef{#1}{#2}% \boolfalse{#1@locked}% }% } -\newcommand*\csset@lock[2]{% +\newcommand*\cs@set@lock[2]{% \csdef{#1}{#2}% \booltrue{#1@locked}% } -\newcommand*\newbool@lock[2][false]{% +\newcommand*\bool@lock[2][false]{% \newbool{#2}% \newbool{#2@locked}% \setbool{#2}{#1}% } -\newcommand*\stdbool@lock[2]{% +\newcommand*\bool@std@lock[2]{% \ifbool{#1@locked}{}{% \setbool{#1}{#2}% \boolfalse{#1@locked}% }% } -\newcommand*\setbool@lock[2]{% +\newcommand*\bool@set@lock[2]{% \setbool{#1}{#2}% \booltrue{#1@locked}% } \newcommand*\tud@cmd@store[1]{% - \ifcsdef{@@tud@#1}{}{\csletcs{@@tud@#1}{#1}}% + \ifcsdef{@@tud@#1}{}{% + \tud@cmd@check{#1}% + \csletcs{@@tud@#1}{#1}% + }% } \newcommand*\tud@cmd@reset[1]{% \ifcsdef{@@tud@#1}{% + \tud@cmd@check{#1}% \csletcs{#1}{@@tud@#1}% }{}% } -\newcommand*\tud@cmd@use[1]{% - \ifcsdef{@@tud@#1}{\@nameuse{@@tud@#1}}{\@nameuse{#1}}% -} \newcommand*\tud@cmd@restore[1]{% \ifcsdef{@@tud@#1}{% + \tud@cmd@check{#1}% \csletcs{#1}{@@tud@#1}% \csundef{@@tud@#1}% }{}% } +\newcommand*\tud@cmd@use[1]{% + \ifcsdef{@@tud@#1}{% + \@nameuse{@@tud@#1}% + }{% + \tud@cmd@check{#1}% + \@nameuse{#1}% + }% +} +\newcommand*\tud@cmd@check[1]{% + \ifcsdef{#1}{}{% + \PackageError{tudscrbase}{% + `\@backslashchar#1' is not defined% + }{% + The command `\@backslashchar#1' was never defined.\MessageBreak% + Please contact the TUD-KOMA-Script maintainer\MessageBreak% + via \tudscrmail. A bugfix is urgently required + }% + }% +} \newcommand*\tud@patch@wrn[1]{% \PackageWarning{tudscrbase}{% - It wasn't possible to patch `#1'.\MessageBreak% - Please contact the author via \tudscrmail.\MessageBreak% - Without a bugfix an erroneous output\MessageBreak% - may occur. + It wasn't possible to patch `\@backslashchar#1'.\MessageBreak% + Please contact the TUD-KOMA-Script maintainer\MessageBreak% + via \tudscrmail. Without a bugfix an\MessageBreak% + erroneous output may occur% }% } \newcommand*\TUD@parameter@family{}% @@ -238,18 +278,10 @@ \expandafter\kv@set@family@handler\expandafter{#1}% }% } -\newcommand*\TUD@parameter@set[1][]{% - \ifxblank{#1}{% - \TUD@parameter@checkfamily{\TUD@parameter@set}% - \expandafter\kvsetkeys\expandafter{\TUD@parameter@family}% - }{% - \expandafter\kvsetkeys\expandafter{#1}% - }% -} -\newcommand*\TUD@parameter@wrn[2]{% - \PackageWarning{tudscrbase}{% - Parameter `#1' can only be used with values:\MessageBreak% - #2% +\newcommand*\TUD@parameter@set[2]{\@expandtwoargs\kvsetkeys{#1}{#2}} +\newcommand*\TUD@parameter@error[2]{% + \PackageError{tudscrbase}{Unsupported value for parameter `#1'}{% + `#1' can only be used with values:\MessageBreak#2% }% } \endinput |