diff options
author | Karl Berry <karl@freefriends.org> | 2014-06-27 00:38:59 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2014-06-27 00:38:59 +0000 |
commit | 81231e60a62c9f46b647f59881e9165f01e4c9e2 (patch) | |
tree | f03c83af5253780c3225086d61d779e2a7742af4 /Master/texmf-dist/tex/generic/xkeyval | |
parent | bf6d61e576dd9107b5e449872ce0ea965df5e673 (diff) |
xkeyval
git-svn-id: svn://tug.org/texlive/trunk@34442 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/xkeyval')
-rw-r--r-- | Master/texmf-dist/tex/generic/xkeyval/keyval.tex | 8 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/xkeyval/pst-xkey.tex | 8 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/xkeyval/xkeyval.tex | 238 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/xkeyval/xkvex1.tex | 8 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/xkeyval/xkvex2.tex | 8 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/xkeyval/xkvex3.tex | 8 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/xkeyval/xkvex4.tex | 8 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/xkeyval/xkvtxhdr.tex | 8 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/xkeyval/xkvutils.tex | 271 |
9 files changed, 306 insertions, 259 deletions
diff --git a/Master/texmf-dist/tex/generic/xkeyval/keyval.tex b/Master/texmf-dist/tex/generic/xkeyval/keyval.tex index 845262148f9..2e20848268c 100644 --- a/Master/texmf-dist/tex/generic/xkeyval/keyval.tex +++ b/Master/texmf-dist/tex/generic/xkeyval/keyval.tex @@ -24,14 +24,14 @@ %% %% This work consists of the file xkeyval.dtx and derived files %% keyval.tex, xkvtxhdr.tex, xkeyval.sty, xkeyval.tex, xkvview.sty, -%% xkvltxp.sty, pst-xkey.tex, pst-xkey.sty, xkveca.cls, xkvecb.cls, -%% xkvesa.sty, xkvesb.sty, xkvesc.sty, xkvex1.tex, xkvex2.tex, -%% xkvex3.tex and xkvex4.tex. +%% xkvltxp.sty, xkvutils.tex, pst-xkey.tex, pst-xkey.sty, xkveca.cls, +%% xkvecb.cls, xkvesa.sty, xkvesb.sty, xkvesc.sty, xkvex1.tex, +%% xkvex2.tex, xkvex3.tex and xkvex4.tex. %% %% The following files constitute the xkeyval bundle and must be %% distributed as a whole: readme, xkeyval.pdf, keyval.tex, %% pst-xkey.sty, pst-xkey.tex, xkeyval.sty, xkeyval.tex, xkvview.sty, -%% xkvltxp.sty, xkvtxhdr.tex, pst-xkey.dtx and xkeyval.dtx. +%% xkvltxp.sty, xkvtxhdr.tex, xkvutils.tex, pst-xkey.dtx and xkeyval.dtx. %% %% %% Based on keyval.sty. diff --git a/Master/texmf-dist/tex/generic/xkeyval/pst-xkey.tex b/Master/texmf-dist/tex/generic/xkeyval/pst-xkey.tex index 3fa4f9e7e37..c97613157dd 100644 --- a/Master/texmf-dist/tex/generic/xkeyval/pst-xkey.tex +++ b/Master/texmf-dist/tex/generic/xkeyval/pst-xkey.tex @@ -24,14 +24,14 @@ %% %% This work consists of the file xkeyval.dtx and derived files %% keyval.tex, xkvtxhdr.tex, xkeyval.sty, xkeyval.tex, xkvview.sty, -%% xkvltxp.sty, pst-xkey.tex, pst-xkey.sty, xkveca.cls, xkvecb.cls, -%% xkvesa.sty, xkvesb.sty, xkvesc.sty, xkvex1.tex, xkvex2.tex, -%% xkvex3.tex and xkvex4.tex. +%% xkvltxp.sty, xkvutils.tex, pst-xkey.tex, pst-xkey.sty, xkveca.cls, +%% xkvecb.cls, xkvesa.sty, xkvesb.sty, xkvesc.sty, xkvex1.tex, +%% xkvex2.tex, xkvex3.tex and xkvex4.tex. %% %% The following files constitute the xkeyval bundle and must be %% distributed as a whole: readme, xkeyval.pdf, keyval.tex, %% pst-xkey.sty, pst-xkey.tex, xkeyval.sty, xkeyval.tex, xkvview.sty, -%% xkvltxp.sty, xkvtxhdr.tex, pst-xkey.dtx and xkeyval.dtx. +%% xkvltxp.sty, xkvtxhdr.tex, xkvutils.tex, pst-xkey.dtx and xkeyval.dtx. %% \csname PSTXKeyLoaded\endcsname \let\PSTXKeyLoaded\endinput diff --git a/Master/texmf-dist/tex/generic/xkeyval/xkeyval.tex b/Master/texmf-dist/tex/generic/xkeyval/xkeyval.tex index 9b956a077ef..954450c1685 100644 --- a/Master/texmf-dist/tex/generic/xkeyval/xkeyval.tex +++ b/Master/texmf-dist/tex/generic/xkeyval/xkeyval.tex @@ -24,14 +24,14 @@ %% %% This work consists of the file xkeyval.dtx and derived files %% keyval.tex, xkvtxhdr.tex, xkeyval.sty, xkeyval.tex, xkvview.sty, -%% xkvltxp.sty, pst-xkey.tex, pst-xkey.sty, xkveca.cls, xkvecb.cls, -%% xkvesa.sty, xkvesb.sty, xkvesc.sty, xkvex1.tex, xkvex2.tex, -%% xkvex3.tex and xkvex4.tex. +%% xkvltxp.sty, xkvutils.tex, pst-xkey.tex, pst-xkey.sty, xkveca.cls, +%% xkvecb.cls, xkvesa.sty, xkvesb.sty, xkvesc.sty, xkvex1.tex, +%% xkvex2.tex, xkvex3.tex and xkvex4.tex. %% %% The following files constitute the xkeyval bundle and must be %% distributed as a whole: readme, xkeyval.pdf, keyval.tex, %% pst-xkey.sty, pst-xkey.tex, xkeyval.sty, xkeyval.tex, xkvview.sty, -%% xkvltxp.sty, xkvtxhdr.tex, pst-xkey.dtx and xkeyval.dtx. +%% xkvltxp.sty, xkvtxhdr.tex, xkvutils.tex, pst-xkey.dtx and xkeyval.dtx. %% \csname XKeyValLoaded\endcsname \let\XKeyValLoaded\endinput @@ -46,8 +46,7 @@ \catcode`\=12\relax \catcode`\,12\relax \catcode`\:12\relax -\newtoks\XKV@toks -\newtoks\XKV@tempa@toks +\input xkvutils \newcount\XKV@depth \newif\ifXKV@st \newif\ifXKV@sg @@ -58,235 +57,12 @@ \newif\ifXKV@preset \let\XKV@rm\@empty \ifx\ProvidesFile\@undefined - \message{2014/05/09 v2.6d key=value parser (HA)} + \message{2014/05/25 v2.7 key=value parser (HA)} \input xkvtxhdr \else - \ProvidesFile{xkeyval.tex}[2014/05/09 v2.6d key=value parser (HA)] + \ProvidesFile{xkeyval.tex}[2014/05/25 v2.7 key=value parser (HA)] \@addtofilelist{xkeyval.tex} \fi -\long\def\@firstoftwo#1#2{#1} -\long\def\@secondoftwo#1#2{#2} -\long\def\XKV@afterfi#1\fi{\fi#1} -\long\def\XKV@afterelsefi#1\else#2\fi{\fi#1} -\ifx\ifcsname\@undefined\XKV@afterelsefi - \def\XKV@ifundefined#1{% - \begingroup\expandafter\expandafter\expandafter\endgroup - \expandafter\ifx\csname#1\endcsname\relax - \expandafter\@firstoftwo - \else - \expandafter\@secondoftwo - \fi - } -\else - \def\XKV@ifundefined#1{% - \ifcsname#1\endcsname - \expandafter\@secondoftwo - \else - \expandafter\@firstoftwo - \fi - } -\fi -\XKV@ifundefined{ver@keyval.sty}{ - \input keyval - \expandafter\def\csname ver@keyval.sty\endcsname{1999/03/16} -}{} -\long\def\@ifnextcharacter#1#2#3{% - \@ifnextchar\bgroup - {\@ifnextchar{#1}{#2}{#3}}% - {\@ifncharacter{#1}{#2}{#3}}% -} -\long\def\@ifncharacter#1#2#3#4{% - \if\string#1\string#4% - \expandafter\@firstoftwo - \else - \expandafter\@secondoftwo - \fi - {#2}{#3}#4% -} -\long\def\XKV@for@n#1#2#3{% - \XKV@tempa@toks{#1}\edef#2{\the\XKV@tempa@toks}% - \ifx#2\@empty - \XKV@for@break - \else - \expandafter\XKV@f@r - \fi - #2{#3}#1,\@nil,% -} -\long\def\XKV@f@r#1#2#3,{% - \XKV@tempa@toks{#3}\edef#1{\the\XKV@tempa@toks}% - \ifx#1\@nnil - \expandafter\@gobbletwo - \else - #2\expandafter\XKV@f@r - \fi - #1{#2}% -} -\long\def\XKV@for@break #1\@nil,{\fi} -\long\def\XKV@for@o#1{\expandafter\XKV@for@n\expandafter{#1}} -\long\def\XKV@for@en#1#2#3{\XKV@f@r#2{#3}#1,\@nil,} -\long\def\XKV@for@eo#1#2#3{% - \def#2{\XKV@f@r#2{#3}}\expandafter#2#1,\@nil,% -} -\long\def\XKV@whilist#1#2#3\fi#4{% - #3\expandafter\XKV@wh@list#1,\@nil,\@nil\@@#2#3\fi{#4}{}\fi -} -\long\def\XKV@wh@list#1,#2\@@#3#4\fi#5#6{% - \def#3{#1}% - \ifx#3\@nnil - \def#3{#6}\expandafter\XKV@wh@l@st - \else - #4% - #5\expandafter\expandafter\expandafter\XKV@wh@list - \else - \def#3{#6}\expandafter\expandafter\expandafter\XKV@wh@l@st - \fi - \fi - #2\@@#3#4\fi{#5}{#1}% -} -\long\def\XKV@wh@l@st#1\@@#2#3\fi#4#5{} -\long\def\XKV@addtomacro@n#1#2{% - \XKV@tempa@toks\expandafter{#1#2}% - \edef#1{\the\XKV@tempa@toks}% -} -\def\XKV@addtomacro@o#1#2{% - \expandafter\XKV@addtomacro@n\expandafter#1\expandafter{#2}% -} -\def\XKV@addtolist@n#1#2{% - \ifx#1\@empty - \XKV@addtomacro@n#1{#2}% - \else - \XKV@addtomacro@n#1{,#2}% - \fi -} -\def\XKV@addtolist@o#1#2{% - \ifx#1\@empty - \XKV@addtomacro@o#1#2% - \else - \XKV@addtomacro@o#1{\expandafter,#2}% - \fi -} -\def\XKV@addtolist@x#1#2{\edef#1{#1\ifx#1\@empty\else,\fi#2}} -\def\@selective@sanitize{\@testopt\@s@lective@sanitize\@M} -\def\@s@lective@sanitize[#1]#2#3{% - \begingroup - \count@#1\relax\advance\count@\@ne - \XKV@toks\expandafter{#3}% - \def#3{#2}\@onelevel@sanitize#3% - \edef#3{{#3}{\the\XKV@toks}}% - \expandafter\@s@l@ctive@sanitize\expandafter#3#3% - \expandafter\XKV@tempa@toks\expandafter{#3}% - \expandafter\endgroup\expandafter\toks@\expandafter{\the\XKV@tempa@toks}% - \edef#3{\the\toks@}% -} -\def\@s@l@ctive@sanitize#1#2#3{% - \def\@i{\futurelet\@@tok\@ii}% - \def\@ii{% - \expandafter\@iii\meaning\@@tok\relax - \ifx\@@tok\@s@l@ctive@sanitize - \let\@@cmd\@gobble - \else - \ifx\@@tok\@sptoken - \XKV@toks\expandafter{#1}\edef#1{\the\XKV@toks\space}% - \def\@@cmd{\afterassignment\@i\let\@@tok= }% - \else - \let\@@cmd\@iv - \fi - \fi - \@@cmd - }% - \def\@iii##1##2\relax{\if##1\@backslashchar\let\@@tok\relax\fi}% - \def\@iv##1{% - \toks@\expandafter{#1}\XKV@toks{##1}% - \ifx\@@tok\bgroup - \advance\count@\m@ne - \ifnum\count@>\z@ - \begingroup - \def#1{\expandafter\@s@l@ctive@sanitize - \csname\string#1\endcsname{#2}}% - \expandafter#1\expandafter{\the\XKV@toks}% - \XKV@toks\expandafter\expandafter\expandafter - {\csname\string#1\endcsname}% - \edef#1{\noexpand\XKV@toks{\the\XKV@toks}}% - \expandafter\endgroup#1% - \fi - \edef#1{\the\toks@{\the\XKV@toks}}% - \advance\count@\@ne - \let\@@cmd\@i - \else - \edef#1{\expandafter\string\the\XKV@toks}% - \expandafter\in@\expandafter{#1}{#2}% - \edef#1{\the\toks@\ifin@#1\else - \ifx\@@tok\@sptoken\space\else\the\XKV@toks\fi\fi}% - \edef\@@cmd{\noexpand\@i\ifx\@@tok\@sptoken\the\XKV@toks\fi}% - \fi - \@@cmd - }% - \let#1\@empty\@i#3\@s@l@ctive@sanitize -} -\long\def\XKV@checksanitizea#1#2{% - \XKV@ch@cksanitize{#1}#2=% - \ifin@\else\XKV@ch@cksanitize{#1}#2,\fi - \ifin@\@selective@sanitize[0]{,=}#2\fi -} -\def\XKV@checksanitizeb#1#2{% - \XKV@ch@cksanitize{#1}#2,% - \ifin@\@selective@sanitize[0],#2\fi -} -\long\def\XKV@ch@cksanitize#1#2#3{% - \XKV@tempa@toks{#1}\edef#2{\the\XKV@tempa@toks}% - \@onelevel@sanitize#2% - \@expandtwoargs\in@#3{#2}% - \ifin@ - \long\def#2##1#3##2\@nil{% - \XKV@tempa@toks{##2}\edef#2{\the\XKV@tempa@toks}% - \ifx#2\@empty\else\in@false\fi - }% - #2#1#3\@nil - \fi - \XKV@tempa@toks{#1}\edef#2{\the\XKV@tempa@toks}% -} -\def\XKV@sp@deflist#1#2{% - \let#1\@empty - \XKV@for@n{#2}\XKV@resa{% - \expandafter\KV@@sp@def\expandafter\XKV@resa\expandafter{\XKV@resa}% - \XKV@addtomacro@o#1{\expandafter,\XKV@resa}% - }% - \ifx#1\@empty\else - \def\XKV@resa,##1\@nil{\def#1{##1}}% - \expandafter\XKV@resa#1\@nil - \fi -} -\def\XKV@merge#1#2#3{% - \XKV@checksanitizea{#2}\XKV@tempa - \XKV@for@o\XKV@tempa\XKV@tempa{% - \XKV@pltrue - #3\XKV@tempa\XKV@tempb - \let\XKV@tempc#1% - \let#1\@empty - \XKV@for@o\XKV@tempc\XKV@tempc{% - #3\XKV@tempc\XKV@tempd - \ifx\XKV@tempb\XKV@tempd - \XKV@plfalse - \XKV@addtolist@o#1\XKV@tempa - \else - \XKV@addtolist@o#1\XKV@tempc - \fi - }% - \ifXKV@pl\XKV@addtolist@o#1\XKV@tempa\fi - }% - \ifXKV@st\global\let#1#1\fi -} -\def\XKV@delete#1#2#3{% - \XKV@checksanitizeb{#2}\XKV@tempa - \let\XKV@tempb#1% - \let#1\@empty - \XKV@for@o\XKV@tempb\XKV@tempb{% - #3\XKV@tempb\XKV@tempc - \@expandtwoargs\in@{,\XKV@tempc,}{,\XKV@tempa,}% - \ifin@\else\XKV@addtolist@o#1\XKV@tempb\fi - }% - \ifXKV@st\global\let#1#1\fi -} \def\XKV@warn#1{\message{xkeyval warning: #1}} \def\XKV@err#1{\errmessage{xkeyval error: #1}} \def\KV@errx{\XKV@err} diff --git a/Master/texmf-dist/tex/generic/xkeyval/xkvex1.tex b/Master/texmf-dist/tex/generic/xkeyval/xkvex1.tex index a6c24b244a0..fa3175e5244 100644 --- a/Master/texmf-dist/tex/generic/xkeyval/xkvex1.tex +++ b/Master/texmf-dist/tex/generic/xkeyval/xkvex1.tex @@ -24,14 +24,14 @@ %% %% This work consists of the file xkeyval.dtx and derived files %% keyval.tex, xkvtxhdr.tex, xkeyval.sty, xkeyval.tex, xkvview.sty, -%% xkvltxp.sty, pst-xkey.tex, pst-xkey.sty, xkveca.cls, xkvecb.cls, -%% xkvesa.sty, xkvesb.sty, xkvesc.sty, xkvex1.tex, xkvex2.tex, -%% xkvex3.tex and xkvex4.tex. +%% xkvltxp.sty, xkvutils.tex, pst-xkey.tex, pst-xkey.sty, xkveca.cls, +%% xkvecb.cls, xkvesa.sty, xkvesb.sty, xkvesc.sty, xkvex1.tex, +%% xkvex2.tex, xkvex3.tex and xkvex4.tex. %% %% The following files constitute the xkeyval bundle and must be %% distributed as a whole: readme, xkeyval.pdf, keyval.tex, %% pst-xkey.sty, pst-xkey.tex, xkeyval.sty, xkeyval.tex, xkvview.sty, -%% xkvltxp.sty, xkvtxhdr.tex, pst-xkey.dtx and xkeyval.dtx. +%% xkvltxp.sty, xkvtxhdr.tex, xkvutils.tex, pst-xkey.dtx and xkeyval.dtx. %% \input xkeyval diff --git a/Master/texmf-dist/tex/generic/xkeyval/xkvex2.tex b/Master/texmf-dist/tex/generic/xkeyval/xkvex2.tex index 8616eb81f63..f1faa18d77d 100644 --- a/Master/texmf-dist/tex/generic/xkeyval/xkvex2.tex +++ b/Master/texmf-dist/tex/generic/xkeyval/xkvex2.tex @@ -24,14 +24,14 @@ %% %% This work consists of the file xkeyval.dtx and derived files %% keyval.tex, xkvtxhdr.tex, xkeyval.sty, xkeyval.tex, xkvview.sty, -%% xkvltxp.sty, pst-xkey.tex, pst-xkey.sty, xkveca.cls, xkvecb.cls, -%% xkvesa.sty, xkvesb.sty, xkvesc.sty, xkvex1.tex, xkvex2.tex, -%% xkvex3.tex and xkvex4.tex. +%% xkvltxp.sty, xkvutils.tex, pst-xkey.tex, pst-xkey.sty, xkveca.cls, +%% xkvecb.cls, xkvesa.sty, xkvesb.sty, xkvesc.sty, xkvex1.tex, +%% xkvex2.tex, xkvex3.tex and xkvex4.tex. %% %% The following files constitute the xkeyval bundle and must be %% distributed as a whole: readme, xkeyval.pdf, keyval.tex, %% pst-xkey.sty, pst-xkey.tex, xkeyval.sty, xkeyval.tex, xkvview.sty, -%% xkvltxp.sty, xkvtxhdr.tex, pst-xkey.dtx and xkeyval.dtx. +%% xkvltxp.sty, xkvtxhdr.tex, xkvutils.tex, pst-xkey.dtx and xkeyval.dtx. %% \documentclass{article} \usepackage{xkeyval} diff --git a/Master/texmf-dist/tex/generic/xkeyval/xkvex3.tex b/Master/texmf-dist/tex/generic/xkeyval/xkvex3.tex index a21a493e9aa..3af72ff69cb 100644 --- a/Master/texmf-dist/tex/generic/xkeyval/xkvex3.tex +++ b/Master/texmf-dist/tex/generic/xkeyval/xkvex3.tex @@ -24,14 +24,14 @@ %% %% This work consists of the file xkeyval.dtx and derived files %% keyval.tex, xkvtxhdr.tex, xkeyval.sty, xkeyval.tex, xkvview.sty, -%% xkvltxp.sty, pst-xkey.tex, pst-xkey.sty, xkveca.cls, xkvecb.cls, -%% xkvesa.sty, xkvesb.sty, xkvesc.sty, xkvex1.tex, xkvex2.tex, -%% xkvex3.tex and xkvex4.tex. +%% xkvltxp.sty, xkvutils.tex, pst-xkey.tex, pst-xkey.sty, xkveca.cls, +%% xkvecb.cls, xkvesa.sty, xkvesb.sty, xkvesc.sty, xkvex1.tex, +%% xkvex2.tex, xkvex3.tex and xkvex4.tex. %% %% The following files constitute the xkeyval bundle and must be %% distributed as a whole: readme, xkeyval.pdf, keyval.tex, %% pst-xkey.sty, pst-xkey.tex, xkeyval.sty, xkeyval.tex, xkvview.sty, -%% xkvltxp.sty, xkvtxhdr.tex, pst-xkey.dtx and xkeyval.dtx. +%% xkvltxp.sty, xkvtxhdr.tex, xkvutils.tex, pst-xkey.dtx and xkeyval.dtx. %% %% keyi will set \keyi in xkveca.cls %% keyvi will set \keyvi in xkveca.cls and xkvesc.sty will pick diff --git a/Master/texmf-dist/tex/generic/xkeyval/xkvex4.tex b/Master/texmf-dist/tex/generic/xkeyval/xkvex4.tex index a7cdfc45a6d..916818b922f 100644 --- a/Master/texmf-dist/tex/generic/xkeyval/xkvex4.tex +++ b/Master/texmf-dist/tex/generic/xkeyval/xkvex4.tex @@ -24,14 +24,14 @@ %% %% This work consists of the file xkeyval.dtx and derived files %% keyval.tex, xkvtxhdr.tex, xkeyval.sty, xkeyval.tex, xkvview.sty, -%% xkvltxp.sty, pst-xkey.tex, pst-xkey.sty, xkveca.cls, xkvecb.cls, -%% xkvesa.sty, xkvesb.sty, xkvesc.sty, xkvex1.tex, xkvex2.tex, -%% xkvex3.tex and xkvex4.tex. +%% xkvltxp.sty, xkvutils.tex, pst-xkey.tex, pst-xkey.sty, xkveca.cls, +%% xkvecb.cls, xkvesa.sty, xkvesb.sty, xkvesc.sty, xkvex1.tex, +%% xkvex2.tex, xkvex3.tex and xkvex4.tex. %% %% The following files constitute the xkeyval bundle and must be %% distributed as a whole: readme, xkeyval.pdf, keyval.tex, %% pst-xkey.sty, pst-xkey.tex, xkeyval.sty, xkeyval.tex, xkvview.sty, -%% xkvltxp.sty, xkvtxhdr.tex, pst-xkey.dtx and xkeyval.dtx. +%% xkvltxp.sty, xkvtxhdr.tex, xkvutils.tex, pst-xkey.dtx and xkeyval.dtx. %% %% Load LaTeX kernel macros patch \RequirePackage{xkvltxp} diff --git a/Master/texmf-dist/tex/generic/xkeyval/xkvtxhdr.tex b/Master/texmf-dist/tex/generic/xkeyval/xkvtxhdr.tex index f6933df422b..a3df28495f4 100644 --- a/Master/texmf-dist/tex/generic/xkeyval/xkvtxhdr.tex +++ b/Master/texmf-dist/tex/generic/xkeyval/xkvtxhdr.tex @@ -24,14 +24,14 @@ %% %% This work consists of the file xkeyval.dtx and derived files %% keyval.tex, xkvtxhdr.tex, xkeyval.sty, xkeyval.tex, xkvview.sty, -%% xkvltxp.sty, pst-xkey.tex, pst-xkey.sty, xkveca.cls, xkvecb.cls, -%% xkvesa.sty, xkvesb.sty, xkvesc.sty, xkvex1.tex, xkvex2.tex, -%% xkvex3.tex and xkvex4.tex. +%% xkvltxp.sty, xkvutils.tex, pst-xkey.tex, pst-xkey.sty, xkveca.cls, +%% xkvecb.cls, xkvesa.sty, xkvesb.sty, xkvesc.sty, xkvex1.tex, +%% xkvex2.tex, xkvex3.tex and xkvex4.tex. %% %% The following files constitute the xkeyval bundle and must be %% distributed as a whole: readme, xkeyval.pdf, keyval.tex, %% pst-xkey.sty, pst-xkey.tex, xkeyval.sty, xkeyval.tex, xkvview.sty, -%% xkvltxp.sty, xkvtxhdr.tex, pst-xkey.dtx and xkeyval.dtx. +%% xkvltxp.sty, xkvtxhdr.tex, xkvutils.tex, pst-xkey.dtx and xkeyval.dtx. %% %% %% Taken from latex.ltx. diff --git a/Master/texmf-dist/tex/generic/xkeyval/xkvutils.tex b/Master/texmf-dist/tex/generic/xkeyval/xkvutils.tex new file mode 100644 index 00000000000..5eb5130f617 --- /dev/null +++ b/Master/texmf-dist/tex/generic/xkeyval/xkvutils.tex @@ -0,0 +1,271 @@ +%% +%% This is file `xkvutils.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% xkeyval.dtx (with options: `xkvutils') +%% +%% --------------------------------------- +%% Copyright (C) 2004-2014 Hendri Adriaens +%% --------------------------------------- +%% +%% 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 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% This Current Maintainer of this work is Hendri Adriaens. +%% +%% This work consists of the file xkeyval.dtx and derived files +%% keyval.tex, xkvtxhdr.tex, xkeyval.sty, xkeyval.tex, xkvview.sty, +%% xkvltxp.sty, xkvutils.tex, pst-xkey.tex, pst-xkey.sty, xkveca.cls, +%% xkvecb.cls, xkvesa.sty, xkvesb.sty, xkvesc.sty, xkvex1.tex, +%% xkvex2.tex, xkvex3.tex and xkvex4.tex. +%% +%% The following files constitute the xkeyval bundle and must be +%% distributed as a whole: readme, xkeyval.pdf, keyval.tex, +%% pst-xkey.sty, pst-xkey.tex, xkeyval.sty, xkeyval.tex, xkvview.sty, +%% xkvltxp.sty, xkvtxhdr.tex, xkvutils.tex, pst-xkey.dtx and xkeyval.dtx. +%% +\csname XKeyValUtilsLoaded\endcsname +\let\XKeyValUtilsLoaded\endinput +\edef\XKeyValUtilsCatcodes{% + \catcode`\noexpand\@\the\catcode`\@\relax + \let\noexpand\XKeyValUtilsCatcodes\relax +} +\catcode`\@=11\relax +\newtoks\XKV@toks +\newtoks\XKV@tempa@toks +\long\def\@firstoftwo#1#2{#1} +\long\def\@secondoftwo#1#2{#2} +\long\def\XKV@afterfi#1\fi{\fi#1} +\long\def\XKV@afterelsefi#1\else#2\fi{\fi#1} +\ifx\ifcsname\@undefined\XKV@afterelsefi + \def\XKV@ifundefined#1{% + \begingroup\expandafter\expandafter\expandafter\endgroup + \expandafter\ifx\csname#1\endcsname\relax + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi + } +\else + \def\XKV@ifundefined#1{% + \ifcsname#1\endcsname + \expandafter\@secondoftwo + \else + \expandafter\@firstoftwo + \fi + } +\fi +\XKV@ifundefined{ver@keyval.sty}{ + \input keyval + \expandafter\def\csname ver@keyval.sty\endcsname{1999/03/16} +}{} +\long\def\@ifnextcharacter#1#2#3{% + \@ifnextchar\bgroup + {\@ifnextchar{#1}{#2}{#3}}% + {\@ifncharacter{#1}{#2}{#3}}% +} +\long\def\@ifncharacter#1#2#3#4{% + \if\string#1\string#4% + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi + {#2}{#3}#4% +} +\long\def\XKV@for@n#1#2#3{% + \XKV@tempa@toks{#1}\edef#2{\the\XKV@tempa@toks}% + \ifx#2\@empty + \XKV@for@break + \else + \expandafter\XKV@f@r + \fi + #2{#3}#1,\@nil,% +} +\long\def\XKV@f@r#1#2#3,{% + \XKV@tempa@toks{#3}\edef#1{\the\XKV@tempa@toks}% + \ifx#1\@nnil + \expandafter\@gobbletwo + \else + #2\expandafter\XKV@f@r + \fi + #1{#2}% +} +\long\def\XKV@for@break #1\@nil,{\fi} +\long\def\XKV@for@o#1{\expandafter\XKV@for@n\expandafter{#1}} +\long\def\XKV@for@en#1#2#3{\XKV@f@r#2{#3}#1,\@nil,} +\long\def\XKV@for@eo#1#2#3{% + \def#2{\XKV@f@r#2{#3}}\expandafter#2#1,\@nil,% +} +\long\def\XKV@whilist#1#2#3\fi#4{% + #3\expandafter\XKV@wh@list#1,\@nil,\@nil\@@#2#3\fi{#4}{}\fi +} +\long\def\XKV@wh@list#1,#2\@@#3#4\fi#5#6{% + \def#3{#1}% + \ifx#3\@nnil + \def#3{#6}\expandafter\XKV@wh@l@st + \else + #4% + #5\expandafter\expandafter\expandafter\XKV@wh@list + \else + \def#3{#6}\expandafter\expandafter\expandafter\XKV@wh@l@st + \fi + \fi + #2\@@#3#4\fi{#5}{#1}% +} +\long\def\XKV@wh@l@st#1\@@#2#3\fi#4#5{} +\long\def\XKV@addtomacro@n#1#2{% + \XKV@tempa@toks\expandafter{#1#2}% + \edef#1{\the\XKV@tempa@toks}% +} +\def\XKV@addtomacro@o#1#2{% + \expandafter\XKV@addtomacro@n\expandafter#1\expandafter{#2}% +} +\def\XKV@addtolist@n#1#2{% + \ifx#1\@empty + \XKV@addtomacro@n#1{#2}% + \else + \XKV@addtomacro@n#1{,#2}% + \fi +} +\def\XKV@addtolist@o#1#2{% + \ifx#1\@empty + \XKV@addtomacro@o#1#2% + \else + \XKV@addtomacro@o#1{\expandafter,#2}% + \fi +} +\def\XKV@addtolist@x#1#2{\edef#1{#1\ifx#1\@empty\else,\fi#2}} +\def\@selective@sanitize{\@testopt\@s@lective@sanitize\@M} +\def\@s@lective@sanitize[#1]#2#3{% + \begingroup + \count@#1\relax\advance\count@\@ne + \XKV@toks\expandafter{#3}% + \def#3{#2}\@onelevel@sanitize#3% + \edef#3{{#3}{\the\XKV@toks}}% + \expandafter\@s@l@ctive@sanitize\expandafter#3#3% + \expandafter\XKV@tempa@toks\expandafter{#3}% + \expandafter\endgroup\expandafter\toks@\expandafter{\the\XKV@tempa@toks}% + \edef#3{\the\toks@}% +} +\def\@s@l@ctive@sanitize#1#2#3{% + \def\@i{\futurelet\@@tok\@ii}% + \def\@ii{% + \expandafter\@iii\meaning\@@tok\relax + \ifx\@@tok\@s@l@ctive@sanitize + \let\@@cmd\@gobble + \else + \ifx\@@tok\@sptoken + \XKV@toks\expandafter{#1}\edef#1{\the\XKV@toks\space}% + \def\@@cmd{\afterassignment\@i\let\@@tok= }% + \else + \let\@@cmd\@iv + \fi + \fi + \@@cmd + }% + \def\@iii##1##2\relax{\if##1\@backslashchar\let\@@tok\relax\fi}% + \def\@iv##1{% + \toks@\expandafter{#1}\XKV@toks{##1}% + \ifx\@@tok\bgroup + \advance\count@\m@ne + \ifnum\count@>\z@ + \begingroup + \def#1{\expandafter\@s@l@ctive@sanitize + \csname\string#1\endcsname{#2}}% + \expandafter#1\expandafter{\the\XKV@toks}% + \XKV@toks\expandafter\expandafter\expandafter + {\csname\string#1\endcsname}% + \edef#1{\noexpand\XKV@toks{\the\XKV@toks}}% + \expandafter\endgroup#1% + \fi + \edef#1{\the\toks@{\the\XKV@toks}}% + \advance\count@\@ne + \let\@@cmd\@i + \else + \edef#1{\expandafter\string\the\XKV@toks}% + \expandafter\in@\expandafter{#1}{#2}% + \edef#1{\the\toks@\ifin@#1\else + \ifx\@@tok\@sptoken\space\else\the\XKV@toks\fi\fi}% + \edef\@@cmd{\noexpand\@i\ifx\@@tok\@sptoken\the\XKV@toks\fi}% + \fi + \@@cmd + }% + \let#1\@empty\@i#3\@s@l@ctive@sanitize +} +\long\def\XKV@checksanitizea#1#2{% + \XKV@ch@cksanitize{#1}#2=% + \ifin@\else\XKV@ch@cksanitize{#1}#2,\fi + \ifin@\@selective@sanitize[0]{,=}#2\fi +} +\def\XKV@checksanitizeb#1#2{% + \XKV@ch@cksanitize{#1}#2,% + \ifin@\@selective@sanitize[0],#2\fi +} +\long\def\XKV@ch@cksanitize#1#2#3{% + \XKV@tempa@toks{#1}\edef#2{\the\XKV@tempa@toks}% + \@onelevel@sanitize#2% + \@expandtwoargs\in@#3{#2}% + \ifin@ + \long\def#2##1#3##2\@nil{% + \XKV@tempa@toks{##2}\edef#2{\the\XKV@tempa@toks}% + \ifx#2\@empty\else\in@false\fi + }% + #2#1#3\@nil + \fi + \XKV@tempa@toks{#1}\edef#2{\the\XKV@tempa@toks}% +} +\def\XKV@sp@deflist#1#2{% + \let#1\@empty + \XKV@for@n{#2}\XKV@resa{% + \expandafter\KV@@sp@def\expandafter\XKV@resa\expandafter{\XKV@resa}% + \XKV@addtomacro@o#1{\expandafter,\XKV@resa}% + }% + \ifx#1\@empty\else + \def\XKV@resa,##1\@nil{\def#1{##1}}% + \expandafter\XKV@resa#1\@nil + \fi +} +\def\XKV@merge#1#2#3{% + \XKV@checksanitizea{#2}\XKV@tempa + \XKV@for@o\XKV@tempa\XKV@tempa{% + \XKV@pltrue + #3\XKV@tempa\XKV@tempb + \let\XKV@tempc#1% + \let#1\@empty + \XKV@for@o\XKV@tempc\XKV@tempc{% + #3\XKV@tempc\XKV@tempd + \ifx\XKV@tempb\XKV@tempd + \XKV@plfalse + \XKV@addtolist@o#1\XKV@tempa + \else + \XKV@addtolist@o#1\XKV@tempc + \fi + }% + \ifXKV@pl\XKV@addtolist@o#1\XKV@tempa\fi + }% + \ifXKV@st\global\let#1#1\fi +} +\def\XKV@delete#1#2#3{% + \XKV@checksanitizeb{#2}\XKV@tempa + \let\XKV@tempb#1% + \let#1\@empty + \XKV@for@o\XKV@tempb\XKV@tempb{% + #3\XKV@tempb\XKV@tempc + \@expandtwoargs\in@{,\XKV@tempc,}{,\XKV@tempa,}% + \ifin@\else\XKV@addtolist@o#1\XKV@tempb\fi + }% + \ifXKV@st\global\let#1#1\fi +} +\XKeyValUtilsCatcodes +\endinput +%% +%% End of file `xkvutils.tex'. |