diff options
author | Karl Berry <karl@freefriends.org> | 2007-09-16 00:07:34 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2007-09-16 00:07:34 +0000 |
commit | d85f248e3b38ea0ecda38c5340e3cadd08d65346 (patch) | |
tree | 52e17f32b395006895b3917bc7729c7ac1514ae3 /Master/texmf-dist/source/latex/oberdiek/kvsetkeys.dtx | |
parent | 2389552f283181e0d8c610037712ade989112da3 (diff) |
oberdiek update (14sep07)
git-svn-id: svn://tug.org/texlive/trunk@4947 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.dtx | 181 |
1 files changed, 116 insertions, 65 deletions
diff --git a/Master/texmf-dist/source/latex/oberdiek/kvsetkeys.dtx b/Master/texmf-dist/source/latex/oberdiek/kvsetkeys.dtx index 6af482fd905..6d9d13470f6 100644 --- a/Master/texmf-dist/source/latex/oberdiek/kvsetkeys.dtx +++ b/Master/texmf-dist/source/latex/oberdiek/kvsetkeys.dtx @@ -1,6 +1,6 @@ % \iffalse meta-comment % -% Copyright (C) 2006 by Heiko Oberdiek <oberdiek@uni-freiburg.de> +% Copyright (C) 2006, 2007 by Heiko Oberdiek <oberdiek@uni-freiburg.de> % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either @@ -17,7 +17,7 @@ % This work consists of the main source file kvsetkeys.dtx % and the derived files % kvsetkeys.sty, kvsetkeys.pdf, kvsetkeys.ins, kvsetkeys.drv, -% kvsetkeys-example.tex. +% kvsetkeys-example.tex, kvsetkeys-test1.tex. % % Distribution: % CTAN:macros/latex/contrib/oberdiek/kvsetkeys.dtx @@ -53,6 +53,7 @@ % TDS:tex/generic/oberdiek/kvsetkeys.sty % TDS:doc/latex/oberdiek/kvsetkeys.pdf % TDS:doc/latex/oberdiek/kvsetkeys-example.tex +% TDS:doc/latex/oberdiek/kvsetkeys-test1.tex % TDS:source/latex/oberdiek/kvsetkeys.dtx % %<*ignore> @@ -68,7 +69,7 @@ \input docstrip.tex \Msg{************************************************************************} \Msg{* Installation} -\Msg{* Package: kvsetkeys 2006/10/19 v1.1 Key value parser with default handler support (HO)} +\Msg{* Package: kvsetkeys 2007/09/09 v1.2 Key value parser with default handler support (HO)} \Msg{************************************************************************} \keepsilent @@ -78,7 +79,7 @@ This is a generated file. -Copyright (C) 2006 by Heiko Oberdiek <oberdiek@uni-freiburg.de> +Copyright (C) 2006, 2007 by Heiko Oberdiek <oberdiek@uni-freiburg.de> This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either @@ -95,7 +96,7 @@ This Current Maintainer of this work is Heiko Oberdiek. This work consists of the main source file kvsetkeys.dtx and the derived files kvsetkeys.sty, kvsetkeys.pdf, kvsetkeys.ins, kvsetkeys.drv, - kvsetkeys-example.tex. + kvsetkeys-example.tex, kvsetkeys-test1.tex. \endpreamble @@ -106,6 +107,7 @@ and the derived files \file{kvsetkeys.sty}{\from{kvsetkeys.dtx}{package}}% \usedir{doc/latex/oberdiek}% \file{kvsetkeys-example.tex}{\from{kvsetkeys.dtx}{example}}% + \file{kvsetkeys-test1.tex}{\from{kvsetkeys.dtx}{test1}}% } \obeyspaces @@ -131,7 +133,7 @@ and the derived files %<*driver> \NeedsTeXFormat{LaTeX2e} \ProvidesFile{kvsetkeys.drv}% - [2006/10/19 v1.1 Key value parser with default handler support (HO)]% + [2007/09/09 v1.2 Key value parser with default handler support (HO)]% \documentclass{ltxdoc} \usepackage{holtxdoc} \begin{document} @@ -140,7 +142,7 @@ and the derived files %</driver> % \fi % -% \CheckSum{598} +% \CheckSum{625} % % \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 @@ -161,7 +163,7 @@ and the derived files % \GetFileInfo{kvsetkeys.drv} % % \title{The \xpackage{kvsetkeys} package} -% \date{2006/10/19 v1.1} +% \date{2007/09/09 v1.2} % \author{Heiko Oberdiek\\\xemail{oberdiek@uni-freiburg.de}} % % \maketitle @@ -437,28 +439,29 @@ and the derived files \fi \expandafter\x\csname ver@kvsetkeys.sty\endcsname \ProvidesPackage{kvsetkeys}% - [2006/10/19 v1.1 Key value parser with default handler support (HO)] + [2007/09/09 v1.2 Key value parser with default handler support (HO)] % \end{macrocode} % % \begin{macrocode} -\expandafter\edef\csname KVS@endinput\endcsname{% - \catcode39 \the\catcode39 % ' - \catcode44 \the\catcode44 % , - \catcode61 \the\catcode61 % = - \catcode64 \the\catcode64 % @ - \catcode94 \the\catcode94 % ^ - \catcode96 \the\catcode96 % ` - \catcode126 \the\catcode126 % ~ - \relax - \noexpand\endinput +\expandafter\edef\csname KVS@AtEnd\endcsname{% + \catcode64 \the\catcode64\relax } -\catcode39 12 % ' -\catcode44 12 % , -\catcode61 12 % = \catcode64 11 % @ -\catcode94 7 % ^ -\catcode96 12 % ` -\catcode126 13 % ~ +\def\TMP@EnsureCode#1#2{% + \edef\KVS@AtEnd{% + \KVS@AtEnd + \catcode#1 \the\catcode#1\relax + }% + \catcode#1 #2\relax +} +\TMP@EnsureCode{39}{12}% ' +\TMP@EnsureCode{44}{12}% , +\TMP@EnsureCode{46}{12}% . +\TMP@EnsureCode{47}{12}% / +\TMP@EnsureCode{61}{12}% = +\TMP@EnsureCode{94}{7}% ^ (superscript) +\TMP@EnsureCode{96}{12}% ` +\TMP@EnsureCode{126}{13}% ~ (active) % \end{macrocode} % % \begin{macrocode} @@ -754,54 +757,40 @@ and the derived files % % \subsection{Error handling} % -% \begin{macro}{\kv@error@novalue} -% Only a poor \cs{PackageError} is provided by \xfile{miniltx.tex}. % \begin{macrocode} -\expandafter\ifx\csname MessageBreak\endcsname\relax - \def\MessageBreak{^^J}% -\fi -\expandafter\ifx\csname @ehc\endcsname\relax - \def\@ehc{% - Try typing \space\string<return\string> % - \space to proceed.\MessageBreak - If that doesn't work, type \space X % - \string<return\string> \space to quit\string.% - }% +\begingroup\expandafter\expandafter\expandafter\endgroup +\expandafter\ifx\csname RequirePackage\endcsname\relax + \input infwarerr.sty\relax +\else + \RequirePackage{infwarerr}[2007/09/09]% \fi +% \end{macrocode} +% +% \begin{macro}{\kv@error@novalue} +% \begin{macrocode} \def\kv@error@novalue{% \kv@error@generic{No value specified for}% } +% \end{macrocode} +% \end{macro} +% \begin{macro}{\kv@error@unknownkey} +% \begin{macrocode} \def\kv@error@unknownkey{% \kv@error@generic{Undefined}% } +% \end{macrocode} +% \end{macro} +% \begin{macro}{\kv@error@generic} +% \begin{macrocode} \def\kv@error@generic#1#2#3{% - \begingroup - \newlinechar=10 % - \def\MessageBreak{^^J}% - \expandafter\ifx\csname PackageError\endcsname\relax - \edef\x{% - \errhelp{% - The keyval family of the key `#3' is `#2'.\MessageBreak - \MessageBreak - \@ehc - }% - }% - \x - \errmessage{kvsetkeys: #1 key `#3'}% - \else - \edef\x{% - \noexpand\PackageError{kvsetkeys}{% - #1 key `#3'% - }{% - The keyval family of the key `#3' is `#2'.\MessageBreak - \MessageBreak - \@ehc - }% - }% - \x - \fi - \endgroup -}% + \@PackageError{kvsetkeys}{% + #1 key `#3'% + }{% + The keyval family of the key `#3' is `#2'.\MessageBreak + \MessageBreak + \@ehc + }% +} % \end{macrocode} % \end{macro} % @@ -816,9 +805,64 @@ and the derived files % \end{macro} % % \begin{macrocode} -\KVS@endinput +\KVS@AtEnd %</package> % \end{macrocode} +% +% \section{Test} +% +% \subsection{Catcode checks for loading} +% +% \begin{macrocode} +%<*test1> +% \end{macrocode} +% \begin{macrocode} +\catcode`\@=11 % +\def\RestoreCatcodes{} +\count@=0 % +\loop + \edef\RestoreCatcodes{% + \RestoreCatcodes + \catcode\the\count@=\the\catcode\count@\relax + }% +\ifnum\count@<255 % + \advance\count@\@ne +\repeat + +\def\RangeCatcodeInvalid#1#2{% + \count@=#1\relax + \loop + \catcode\count@=15 % + \ifnum\count@<#2\relax + \advance\count@\@ne + \repeat +} +\def\Test{% + \RangeCatcodeInvalid{0}{47}% + \RangeCatcodeInvalid{58}{64}% + \RangeCatcodeInvalid{91}{96}% + \RangeCatcodeInvalid{123}{255}% + \catcode`\@=12 % + \catcode`\\=0 % + \catcode`\{=1 % + \catcode`\}=2 % + \catcode`\#=6 % + \catcode`\[=12 % + \catcode`\]=12 % + \catcode`\%=14 % + \catcode`\ =10 % + \catcode13=5 % + \input kvsetkeys.sty\relax + \RestoreCatcodes +} +\Test +\csname @@end\endcsname +\end +% \end{macrocode} +% \begin{macrocode} +%</test1> +% \end{macrocode} +% % \section{Installation} % % \subsection{Download} @@ -881,6 +925,7 @@ and the derived files % kvsetkeys.sty & tex/generic/oberdiek/kvsetkeys.sty\\ % kvsetkeys.pdf & doc/latex/oberdiek/kvsetkeys.pdf\\ % kvsetkeys-example.tex & doc/latex/oberdiek/kvsetkeys-example.tex\\ +% kvsetkeys-test1.tex & doc/latex/oberdiek/kvsetkeys-test1.tex\\ % kvsetkeys.dtx & source/latex/oberdiek/kvsetkeys.dtx\\ % \end{tabular}^^A % }^^A @@ -1022,6 +1067,12 @@ and the derived files % \item % Example added. % \end{Version} +% \begin{Version}{2007/09/09 v1.2} +% \item +% Using package \xpackage{infwarerr} for error messages. +% \item +% Catcode section rewritten. +% \end{Version} % \end{History} % % \PrintIndex |