summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/oberdiek/kvsetkeys.dtx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-12-04 22:54:28 +0000
committerKarl Berry <karl@freefriends.org>2019-12-04 22:54:28 +0000
commit892c21b6bddf968f85a4de0de3d289ff9f27da5f (patch)
treed5a8870e9518c9a9bd53b56e2f1ddc18e8f5f1b1 /Master/texmf-dist/source/latex/oberdiek/kvsetkeys.dtx
parent70220b77fcae855692634cec42e89f758fd050d4 (diff)
oberdiek trimmed more; move some of the new packages among collections per usage
git-svn-id: svn://tug.org/texlive/trunk@53027 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/oberdiek/kvsetkeys.dtx')
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/kvsetkeys.dtx462
1 files changed, 1 insertions, 461 deletions
diff --git a/Master/texmf-dist/source/latex/oberdiek/kvsetkeys.dtx b/Master/texmf-dist/source/latex/oberdiek/kvsetkeys.dtx
index b7377aaaa60..7bbd4fe568e 100644
--- a/Master/texmf-dist/source/latex/oberdiek/kvsetkeys.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/kvsetkeys.dtx
@@ -69,10 +69,6 @@
% TDS:tex/generic/oberdiek/kvsetkeys.sty
% TDS:doc/latex/oberdiek/kvsetkeys.pdf
% TDS:doc/latex/oberdiek/kvsetkeys-example.tex
-% TDS:doc/latex/oberdiek/test/kvsetkeys-test1.tex
-% TDS:doc/latex/oberdiek/test/kvsetkeys-test2.tex
-% TDS:doc/latex/oberdiek/test/kvsetkeys-test3.tex
-% TDS:doc/latex/oberdiek/test/kvsetkeys-test4.tex
% TDS:source/latex/oberdiek/kvsetkeys.dtx
%
%<*ignore>
@@ -150,10 +146,6 @@ and the derived files
% \file{kvsetkeys-test2.tex}{\from{kvsetkeys.dtx}{test2}}%
% \file{kvsetkeys-test3.tex}{\from{kvsetkeys.dtx}{test2,noetex}}%
% \file{kvsetkeys-test4.tex}{\from{kvsetkeys.dtx}{test4}}%
- \nopreamble
- \nopostamble
-% \usedir{source/latex/oberdiek/catalogue}%
-% \file{kvsetkeys.xml}{\from{kvsetkeys.dtx}{catalogue}}%
}
\catcode32=13\relax% active space
@@ -190,21 +182,6 @@ and the derived files
% \fi
%
%
-% \CharacterTable
-% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
-% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
-% Digits \0\1\2\3\4\5\6\7\8\9
-% Exclamation \! Double quote \" Hash (number) \#
-% Dollar \$ Percent \% Ampersand \&
-% Acute accent \' Left paren \( Right paren \)
-% Asterisk \* Plus \+ Comma \,
-% Minus \- Point \. Solidus \/
-% Colon \: Semicolon \; Less than \<
-% Equals \= Greater than \> Question mark \?
-% Commercial at \@ Left bracket \[ Backslash \\
-% Right bracket \] Circumflex \^ Underscore \_
-% Grave accent \` Left brace \{ Vertical bar \|
-% Right brace \} Tilde \~}
%
% \GetFileInfo{kvsetkeys.drv}
%
@@ -1426,440 +1403,7 @@ $ \x
\KVS@AtEnd%
%</package>
% \end{macrocode}
-%
-% \section{Test}
-%
-% \subsection{Catcode checks for loading}
-%
-% \begin{macrocode}
-%<*test1>
-% \end{macrocode}
-% \begin{macrocode}
-\catcode`\{=1 %
-\catcode`\}=2 %
-\catcode`\#=6 %
-\catcode`\@=11 %
-\expandafter\ifx\csname count@\endcsname\relax
- \countdef\count@=255 %
-\fi
-\expandafter\ifx\csname @gobble\endcsname\relax
- \long\def\@gobble#1{}%
-\fi
-\expandafter\ifx\csname @firstofone\endcsname\relax
- \long\def\@firstofone#1{#1}%
-\fi
-\expandafter\ifx\csname loop\endcsname\relax
- \expandafter\@firstofone
-\else
- \expandafter\@gobble
-\fi
-{%
- \def\loop#1\repeat{%
- \def\body{#1}%
- \iterate
- }%
- \def\iterate{%
- \body
- \let\next\iterate
- \else
- \let\next\relax
- \fi
- \next
- }%
- \let\repeat=\fi
-}%
-\def\RestoreCatcodes{}
-\count@=0 %
-\loop
- \edef\RestoreCatcodes{%
- \RestoreCatcodes
- \catcode\the\count@=\the\catcode\count@\relax
- }%
-\ifnum\count@<255 %
- \advance\count@ 1 %
-\repeat
-
-\def\RangeCatcodeInvalid#1#2{%
- \count@=#1\relax
- \loop
- \catcode\count@=15 %
- \ifnum\count@<#2\relax
- \advance\count@ 1 %
- \repeat
-}
-\def\RangeCatcodeCheck#1#2#3{%
- \count@=#1\relax
- \loop
- \ifnum#3=\catcode\count@
- \else
- \errmessage{%
- Character \the\count@\space
- with wrong catcode \the\catcode\count@\space
- instead of \number#3%
- }%
- \fi
- \ifnum\count@<#2\relax
- \advance\count@ 1 %
- \repeat
-}
-\def\space{ }
-\expandafter\ifx\csname LoadCommand\endcsname\relax
- \def\LoadCommand{\input kvsetkeys.sty\relax}%
-\fi
-\def\Test{%
- \RangeCatcodeInvalid{0}{47}%
- \RangeCatcodeInvalid{58}{64}%
- \RangeCatcodeInvalid{91}{96}%
- \RangeCatcodeInvalid{123}{255}%
- \catcode`\@=12 %
- \catcode`\\=0 %
- \catcode`\%=14 %
- \LoadCommand
- \RangeCatcodeCheck{0}{36}{15}%
- \RangeCatcodeCheck{37}{37}{14}%
- \RangeCatcodeCheck{38}{47}{15}%
- \RangeCatcodeCheck{48}{57}{12}%
- \RangeCatcodeCheck{58}{63}{15}%
- \RangeCatcodeCheck{64}{64}{12}%
- \RangeCatcodeCheck{65}{90}{11}%
- \RangeCatcodeCheck{91}{91}{15}%
- \RangeCatcodeCheck{92}{92}{0}%
- \RangeCatcodeCheck{93}{96}{15}%
- \RangeCatcodeCheck{97}{122}{11}%
- \RangeCatcodeCheck{123}{255}{15}%
- \RestoreCatcodes
-}
-\Test
-\csname @@end\endcsname
-\end
-% \end{macrocode}
-% \begin{macrocode}
-%</test1>
-% \end{macrocode}
-%
-% \subsection{Macro tests}
-%
-% \subsubsection{Preamble}
-%
-% \begin{macrocode}
-%<*test2>
-\NeedsTeXFormat{LaTeX2e}
-\nofiles
-\documentclass{article}
-%<noetex>\let\SavedUnexpanded\unexpanded
-%<noetex>\let\unexpanded\UNDEFINED
-\makeatletter
-\chardef\KVS@TestMode=1 %
-\makeatother
-\usepackage{kvsetkeys}[2016/05/16]
-%<noetex>\let\unexpanded\SavedUnexpanded
-\usepackage{qstest}
-\IncludeTests{*}
-\LogTests{log}{*}{*}
-% \end{macrocode}
-%
-% \subsubsection{Time}
-%
-% \begin{macrocode}
-\begingroup\expandafter\expandafter\expandafter\endgroup
-\expandafter\ifx\csname pdfresettimer\endcsname\relax
-\else
- \makeatletter
- \newcount\SummaryTime
- \newcount\TestTime
- \SummaryTime=\z@
- \newcommand*{\PrintTime}[2]{%
- \typeout{%
- [Time #1: \strip@pt\dimexpr\number#2sp\relax\space s]%
- }%
- }%
- \newcommand*{\StartTime}[1]{%
- \renewcommand*{\TimeDescription}{#1}%
- \pdfresettimer
- }%
- \newcommand*{\TimeDescription}{}%
- \newcommand*{\StopTime}{%
- \TestTime=\pdfelapsedtime
- \global\advance\SummaryTime\TestTime
- \PrintTime\TimeDescription\TestTime
- }%
- \let\saved@qstest\qstest
- \let\saved@endqstest\endqstest
- \def\qstest#1#2{%
- \saved@qstest{#1}{#2}%
- \StartTime{#1}%
- }%
- \def\endqstest{%
- \StopTime
- \saved@endqstest
- }%
- \AtEndDocument{%
- \PrintTime{summary}\SummaryTime
- }%
- \makeatother
-\fi
-% \end{macrocode}
-%
-% \subsubsection{Test sets}
-%
-% \begin{macrocode}
-\makeatletter
-\def\@makeactive#1{%
- \catcode`#1=13\relax
-}
-\@makeactive\,
-\def,{\errmessage{COMMA}}
-\@makeother\,
-\@makeactive\=
-\def={\errmessage{EQUALS}}
-\@makeother\=
-
-\begin{qstest}{normalize}{normalize,active-chars,space-removal}%
- \long\def\Test#1#2{%
- \@makeother\,%
- \@makeother\=%
- \scantokens{\toks@={#2}}%
- \edef\Result{\the\toks@}%
- \@makeother\,%
- \@makeother\=%
- \@Test{#1}%
- \@makeactive\,%
- \@Test{#1}%
- \@makeactive\=%
- \@Test{#1}%
- \@makeother\,%
- \@Test{#1}%
- \@makeother\=%
- }%
- \long\def\@Test#1{%
- \scantokens{\kv@normalize{#1}}%
- \expandafter\expandafter\expandafter\Expect
- \expandafter\expandafter\expandafter
- {\expandafter\kv@list\expandafter}\expandafter{\Result}%
- \Expect*{\ifx\kv@list\Result true\else false\fi}{true}%
- }%
- \Test{}{,}%
- \Test{,}{,}%
- \Test{,,}{,}%
- \Test{,,,}{,}%
- \Test{ , }{,}%
- \Test{{a}}{,{a},}%
- \Test{,{a}}{,{a},}%
- \Test{{a},}{,{a},}%
- \Test{{a},{b}}{,{a},{b},}%
- \Test{{b}={c},{}=,{}={},{d}=}{,{b}={c},{}=,{}={},{d}=,}%
- \Test{{}}{,{},}%
- \Test{{},{},{}}{,{},{},{},}%
- \Test{=}{,=,}%
- \Test{=,=,=}{,=,=,=,}%
- \Test{a=\par}{,a=\par,}%
- \Test{\par}{,\par,}%
- \def\TestSet#1{%
- \Test{#1#1}{,}%
- \Test{#1#1,#1#1}{,}%
- \Test{#1#1,#1#1,#1#1}{,}%
- \Test{#1#1#1#1#1}{,}%
- \Test{{a}#1#1=#1#1{b}}{,{a}={b},}%
- }%
- \TestSet{ }%
- \begingroup
- \let\saved@normalize\kv@normalize
- \def\kv@normalize#1{%
- \saved@normalize{#1}%
- \@onelevel@sanitize\kv@list
- \@onelevel@sanitize\Result
- }%
- \Test{#,#=#,{#}={#},{#}=,{#}}{,#,#=#,{#}={#},{#}=,{#},}%
- \endgroup
- \begingroup
- \def\Test#1#2{%
- \edef\Result{#2}%
- \@Test{#1}%
- }%
- \Test{{ a = b }}{,{ a = b },}%
- \@makeactive\,%
- \Test{{,}}{\string,{\noexpand,}\string,}%
- \@makeother\,%
- \@makeactive\=%
- \Test{a={=}}{,a\string={\noexpand=},}%
- \endgroup
- \Test{a=b}{,a=b,}%
- \Test{a={b}}{,a={b},}%
- \Test{a ={b}}{,a={b},}%
- \Test{a= {b}}{,a={b},}%
- \Test{a = {b}}{,a={b},}%
- \Test{a = {b} ,}{,a={b},}%
- \Test{a}{,a,}%
- \Test{ a}{,a,}%
- \Test{a }{,a,}%
- \Test{ a }{,a,}%
- \Test{, a ,}{,a,}%
- \Test{, a b ,}{,a b,}%
- \Test{,a ,}{,a,}%
- \Test{ a =}{,a=,}%
- \Test{ a = }{,a=,}%
- \Test{a =}{,a=,}%
- \Test{{a} =}{,{a}=,}%
- \Test{{a}= {}}{,{a}={},}%
- \Test{, a = {}}{,a={},}%
- \Test{a,,b}{,a,b,}%
- \Test{a=\fi}{,a=\fi,}%
- \Test{a=\iffalse}{,a=\iffalse,}%
- \Test{a=\iffalse,b=\fi}{,a=\iffalse,b=\fi,}%
-\end{qstest}
-
-\begin{qstest}{parse}{parse,brace-removal}
- \def\Processor#1#2{%
- \expandafter\Expect\expandafter{\kv@key}{#1}%
- \toks@{#2}%
- \edef\x{\the\toks@}%
- \ifx\kv@value\relax
- \Expect*{\the\toks@}{}%
- \def\Value{<>}%
- \else
- \edef\Value{[\the\toks@]}%
- \@onelevel@sanitize\Value
- \fi
- \toks@{#1}%
- \ifx\Result\@empty
- \edef\Result{[\the\toks@]=\Value}%
- \else
- \edef\Result{\Result,[\the\toks@]=\Value}%
- \fi
- \@onelevel@sanitize\Result
- }%
- \def\Test#1#2{%
- \sbox0{%
- \let\Result\@empty
- \kv@parse{#1}\Processor
- \Expect*{\Result}{#2}%
- }%
- \Expect*{\the\wd0}{0.0pt}%
- }%
- \Test{}{}%
- \Test{{}}{}%
- \Test{{{}}}{[]=<>}%
- \Test{{{{}}}}{[{}]=<>}%
- \Test{a}{[a]=<>}%
- \Test{{a}}{[a]=<>}%
- \Test{{a}}{[a]=<>}%
- \Test{{{a}}}{[a]=<>}%
- \Test{{{{a}}}}{[{a}]=<>}%
- \Test{a=}{[a]=[]}%
- \Test{{a}=}{[a]=[]}%
- \Test{{{a}}=}{[{a}]=[]}%
- \Test{a={}}{[a]=[]}%
- \Test{{a}={{}}}{[a]=[{}]}%
- \Test{a=b}{[a]=[b]}%
- \Test{a=\fi}{[a]=[\fi]}%
- \Test{a=\iffalse}{[a]=[\iffalse]}%
- \Test{a=\iffalse,b=\fi}{[a]=[\iffalse],[b]=[\fi]}%
- \Test{{ a = b }}{[ a ]=[ b ]}%
- \Test{{{ a = b }}}{[ a = b ]=<>}%
-\end{qstest}
-
-\begin{qstest}{comma}{comma,parse}
- \def\Processor#1{%
- \expandafter\Expect\expandafter{\comma@entry}{#1}%
- \toks@{#1}%
- \ifx\Result\@empty
- \edef\Result{[\the\toks@]}%
- \else
- \edef\Result{\Result,[\the\toks@]}%
- \fi
- \@onelevel@sanitize\Result
- }%
- \def\Test#1#2{%
- \sbox0{%
- \let\Result\@empty
- \comma@parse{#1}\Processor
- \Expect*{\Result}{#2}%
- }%
- \Expect*{\the\wd0}{0.0pt}%
- }%
- \Test{}{}%
- \Test{{}}{}%
- \Test{{{}}}{[{}]}%
- \Test{a}{[a]}%
- \Test{{a}}{[a]}%
- \Test{{{a}}}{[{a}]}%
- \Test{a=}{[a=]}%
- \Test{a\fi}{[a\fi]}%
- \Test{a\iffalse}{[a\iffalse]}%
- \Test{\iffalse,\fi}{[\iffalse],[\fi]}%
- \Test{ a , b , c }{[a],[b],[c]}%
- \Test{ { } ,{ }, { }, { } , { } }{[ ],[ ],[ ],[ ],[ ]}%
- \Test{ {{}} ,{{}}, {{}}, {{}} , {{}} }{[{}],[{}],[{}],[{}],[{}]}%
-\end{qstest}
-
-\begin{document}
-\end{document}
-%</test2>
-% \end{macrocode}
-%
-% \subsection{Tests for key value processing handler}
-%
-% \begin{macrocode}
-%<*test4>
-\catcode`\{=1
-\catcode`\}=2
-\catcode`\#=6
-\catcode`\@=11
-\input kvdefinekeys.sty\relax
-\input kvsetkeys.sty\relax
-\input infwarerr.sty\relax
-\def\Error#1{%
- \@PackageError{test}{#1}\@ehc
-}
-% \end{macrocode}
-% \begin{macrocode}
-\def\temp#1#2{%
- \kv@define@key{#1}{#2}{%
- \edef\result{%
- \result
- [#1:#2=##1]% hash-ok
- }%
- }%
-}
-\temp{FA}{key1}
-\temp{FA}{key2}
-\temp{FB}{key3}
-\temp{FB}{key3}
-% \end{macrocode}
-% \begin{macrocode}
-\setbox0=\hbox{%
- \def\result{}%
- \kvsetknownkeys{FA}\cmd{key1=234,key3=456}%
- \def\expected{[FA:key1=234]}%
- \ifx\expected\result
- \else
- \Error{%
- \string\kvsetknownkeys/\string\result\MessageBreak
- Expected: \expected\MessageBreak
- Result: \space\result
- }%
- \fi
- \def\expected{{key3}={456}}%
- \ifx\cmd\expected
- \else
- \Error{%
- \string\kvsetknownkeys/\string\cmd\MessageBreak
- Expected: \expected\MessageBreak
- Result: \space\cmd
- }%
- \fi
-}
-\ifdim\wd0=0pt %
-\else
- \Error{Spurious spaces?}%
-\fi
-% \end{macrocode}
-% \begin{macrocode}
-\csname @@end\endcsname\end
-%</test4>
-% \end{macrocode}
-%
-% \section{Installation}
+%% \section{Installation}
%
% \subsection{Download}
%
@@ -1909,10 +1453,6 @@ $ \x
% kvsetkeys.sty & tex/generic/oberdiek/kvsetkeys.sty\\
% kvsetkeys.pdf & doc/latex/oberdiek/kvsetkeys.pdf\\
% kvsetkeys-example.tex & doc/latex/oberdiek/kvsetkeys-example.tex\\
-% test/kvsetkeys-test1.tex & doc/latex/oberdiek/test/kvsetkeys-test1.tex\\
-% test/kvsetkeys-test2.tex & doc/latex/oberdiek/test/kvsetkeys-test2.tex\\
-% test/kvsetkeys-test3.tex & doc/latex/oberdiek/test/kvsetkeys-test3.tex\\
-% test/kvsetkeys-test4.tex & doc/latex/oberdiek/test/kvsetkeys-test4.tex\\
% kvsetkeys.dtx & source/latex/oberdiek/kvsetkeys.dtx\\
% \end{tabular}^^A
% }^^A