From b774596c0632c5e6b3bb370b24d8e0331ec9baff Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 19 Apr 2010 22:51:43 +0000 Subject: keycommand update (19apr10) git-svn-id: svn://tug.org/texlive/trunk@17929 c570f23f-e606-0410-a88d-b1316a301751 --- .../doc/latex/keycommand/keycommand-example.tex | 2 +- .../texmf-dist/doc/latex/keycommand/keycommand.pdf | Bin 316176 -> 318075 bytes .../source/latex/keycommand/keycommand.drv | 6 +- .../source/latex/keycommand/keycommand.dtx | 109 ++++++++++++--------- .../source/latex/keycommand/keycommand.ins | 6 +- .../texmf-dist/tex/latex/keycommand/keycommand.sty | 11 ++- 6 files changed, 78 insertions(+), 56 deletions(-) (limited to 'Master/texmf-dist') diff --git a/Master/texmf-dist/doc/latex/keycommand/keycommand-example.tex b/Master/texmf-dist/doc/latex/keycommand/keycommand-example.tex index 14a6a2009fc..c418a22f86a 100644 --- a/Master/texmf-dist/doc/latex/keycommand/keycommand-example.tex +++ b/Master/texmf-dist/doc/latex/keycommand/keycommand-example.tex @@ -8,7 +8,7 @@ %% %% This is a generated file. %% -%% keycommand : key-value interface for commands and environments in LaTeX [v3.1 2010/04/15] +%% keycommand : key-value interface for commands and environments in LaTeX [v3.14 2010/04/18] %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either diff --git a/Master/texmf-dist/doc/latex/keycommand/keycommand.pdf b/Master/texmf-dist/doc/latex/keycommand/keycommand.pdf index 52a99e78580..14e627b040c 100644 Binary files a/Master/texmf-dist/doc/latex/keycommand/keycommand.pdf and b/Master/texmf-dist/doc/latex/keycommand/keycommand.pdf differ diff --git a/Master/texmf-dist/source/latex/keycommand/keycommand.drv b/Master/texmf-dist/source/latex/keycommand/keycommand.drv index 3b7caba7799..1ad3fda265e 100644 --- a/Master/texmf-dist/source/latex/keycommand/keycommand.drv +++ b/Master/texmf-dist/source/latex/keycommand/keycommand.drv @@ -8,7 +8,7 @@ %% %% This is a generated file. %% -%% keycommand : key-value interface for commands and environments in LaTeX [v3.1 2010/04/15] +%% keycommand : key-value interface for commands and environments in LaTeX [v3.14 2010/04/18] %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either @@ -26,8 +26,8 @@ %% \edef\thisfile{\jobname} \def\thisinfo{key-value interface for commands and environments in \LaTeX.} -\def\thisdate{2010/04/15} -\def\thisversion{3.1} +\def\thisdate{2010/04/18} +\def\thisversion{3.14} \let\loadclass\LoadClass \def\LoadClass#1{\loadclass[abstracton]{scrartcl}\let\scrmaketitle\maketitle\AtEndOfClass{\let\maketitle\scrmaketitle}} \documentclass[a4paper,oneside]{ltxdoc} diff --git a/Master/texmf-dist/source/latex/keycommand/keycommand.dtx b/Master/texmf-dist/source/latex/keycommand/keycommand.dtx index eff3c9cc34d..9caeb1b4d92 100644 --- a/Master/texmf-dist/source/latex/keycommand/keycommand.dtx +++ b/Master/texmf-dist/source/latex/keycommand/keycommand.dtx @@ -1,5 +1,5 @@ % \iffalse meta-comment -% keycommand : key-value interface for commands and environments in LaTeX v3.1 2010/04/15] +% keycommand : key-value interface for commands and environments in LaTeX v3.14 2010/04/18] % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either @@ -37,7 +37,7 @@ \input docstrip.tex \Msg{************************************************************************} \Msg{* Installation} -\Msg{* Package: keycommand 2010/04/15 v3.1 key-value interface for commands and environments in LaTeX} +\Msg{* Package: keycommand 2010/04/18 v3.14 key-value interface for commands and environments in LaTeX} \Msg{************************************************************************} \keepsilent @@ -48,7 +48,7 @@ This is a generated file. -keycommand : key-value interface for commands and environments in LaTeX [v3.1 2010/04/15] +keycommand : key-value interface for commands and environments in LaTeX [v3.14 2010/04/18] This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either @@ -100,8 +100,8 @@ Copyright (C) 2009-2010 by Florent Chervet %<*driver> \edef\thisfile{\jobname} \def\thisinfo{key-value interface for commands and environments in \LaTeX.} -\def\thisdate{2010/04/15} -\def\thisversion{3.1} +\def\thisdate{2010/04/18} +\def\thisversion{3.14} \let\loadclass\LoadClass \def\LoadClass#1{\loadclass[abstracton]{scrartcl}\let\scrmaketitle\maketitle\AtEndOfClass{\let\maketitle\scrmaketitle}} \documentclass[a4paper,oneside]{ltxdoc} @@ -131,7 +131,7 @@ Copyright (C) 2009-2010 by Florent Chervet % % \fi % -% \CheckSum{0} +% \CheckSum{960} % % \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 @@ -186,18 +186,21 @@ Copyright (C) 2009-2010 by Florent Chervet % \g@addto@macro\macro@font{\macrocodecolor\let\AltMacroFont\macro@font} % \g@addto@macro\@list@extra{\parsep\parskip\topsep\z@\itemsep\z@} % \def\smex{\leavevmode\hb@xt@2em{\hfil$\longrightarrow$\hfil}} -% \renewcommand\#[1]{{\usefont{T1}{pcr}{bx}{n}\char`\##1}} -% \newcommand\csred[1]{\textcolor{red}{\cs{#1}}} -% \newcommand\CSbf[1]{\textbf{\CS{#1}}} -% \newcommand\csbf[1]{\textbf{\cs{#1}}} -% \renewcommand*\bf{\bfseries}\newcommand\nnn{\normalfont\mdseries\upshape}\newcommand\nbf{\normalfont\bfseries\upshape} -% \newcommand*\blue{\color{blue}}\newcommand*\red{\color{dr}}\newcommand*\green{\color{green}}\newcommand\rred{\color{red}} -% \newcommand\rrbf{\color{red}\bfseries} +% \newrobustcmd\verbfont{\usefont{T1}{\ttdefault}{\f@series}{n}} \let\vb\verbfont +% \renewrobustcmd\#[1]{{\usefont{T1}{pcr}{bx}{n}\char`\##1}} +% \newrobustcmd\csred[1]{\textcolor{red}{\cs{#1}}} +% \renewrobustcmd\cs[2][]{\mbox{\vb#1\expandafter\@gobble\string\\#2}} +% \newrobustcmd\CSbf[1]{\textbf{\CS{#1}}} +% \newrobustcmd\csbf[2][]{\textbf{\cs[{#1}]{#2}}} +% \newrobustcmd\textttbf[1]{\textbf{\texttt{#1}}} +% \renewrobustcmd*\bf{\bfseries}\newcommand\nnn{\normalfont\mdseries\upshape}\newcommand\nbf{\normalfont\bfseries\upshape} +% \newrobustcmd*\blue{\color{blue}}\newcommand*\red{\color{dr}}\newcommand*\green{\color{green}}\newcommand\rred{\color{red}} +% \newrobustcmd\rrbf{\color{red}\bfseries} % \definecolor{copper}{rgb}{0.67,0.33,0.00} \newcommand\copper{\color{copper}} % \definecolor{dg}{rgb}{0.16,0.33,0.00} \newcommand\dg{\color{dg}} % \definecolor{db}{rgb}{0,0,0.502} \newcommand\db{\color{db}} % \definecolor{dr}{rgb}{0.49,0.00,0.00} \let\dr\red -% \newcommand\bk{\color{black}}\newcommand\md{\mdseries} +% \newrobustcmd\bk{\color{black}}\newcommand\md{\mdseries} % % \fancyhf{}\fancyhead[L]{The \thispackage package -- \thisinfo} % \fancyfoot[L]{\color[gray]{.35}\scriptsize\thispackage\quad[rev.\thisversion]\quad\copyright\oldstylenums{2009-2010}\,\lower.3ex\hbox{\NibRight}\,Florent Chervet} @@ -213,6 +216,9 @@ Copyright (C) 2009-2010 by Florent Chervet % \font\umrandA=umranda at 20pt % \def\@serp{\leavevmode\lower20pt\hbox{\umrandA\char'131}} % \def\serp#1{\@serp\hfil #1\hfil\reflectbox{\@serp}} +% \newrobustcmd\stform{\@ifnextchar*{\@stform[]\textasteriskcentered\@gobble}\@stform} +% \newrobustcmd\@stform[2][\string]{\textttbf{\rred#1#2}\xspace} +% % \makeatother % % \deffootnote{1em}{0pt}{\rlap{\textsuperscript{\thefootnotemark}}\kern1em} @@ -279,13 +285,13 @@ Copyright (C) 2009-2010 by Florent Chervet % \begin{declcs}{newkeycommand}% % \Underbrace{\textcolor{red}{\textasteriskcentered\string+[short-unexpand]}}_{\makecell[c]{modifiers \\ Optional}}\,% % \Underbrace{\M{command}}_{Required}\,% -% \Underbrace{\B{keys=defaults}\,\B{OptKey}\,\B{}}_{Optional}\,% +% {\color{db}\Underbrace{\B{keys=defaults}\,\B{OptKey}\,\B{}}_{Optional}\,}% % \Underbrace{\M{definition}}_{Required} % \end{declcs} % % \cs{newkeycommand} will define \cs{command} as a new key-command!\quad well... % -% Use the \textbf{\dr\textasteriskcentered} form when you do not want it to be a \cs{long} macro (as for \LaTeX{}-\cs{newcommand}). +% Use the \stform* form when you do not want it to be a \cs{long} macro (as for \LaTeX{}-\cs{newcommand}). % % The +[keys=defaults]+ argument define the keys with their default values. It is optional, but a key-command % without keys seems to be useless (at least for me...). Keys may be defined as : @@ -322,57 +328,58 @@ Copyright (C) 2009-2010 by Florent Chervet % % The key-command may have {\tt 0} up to {\tt 9} \textbf{mandatory} arguments : specify the number by ++ ({\tt 0} if omitted). % -% The \textbf{\dr\string+} form expands the \cs{commandkey} before executing the key-command itself, as explain in next section. +% The \stform+ form expands the \cs{commandkey} before executing the key-command itself, as explain in section \ref{sec:example:plus}. % % \subsection{First example :} % % \begin{tabbing}\label{textrule} -% \,\=+\new+\=+keycommand\textrule[raise=.4ex,width=3em,thick=.4pt][1]{%+\\ -% \>\>+\rule[\commandkey{raise}]{\commandkey{width}}{\commandkey{thick}}+\\ +% \,\=\csbf{new}\=\textttbf{keycommand}\cs[\copper]{textrule}+[+{\color{db}+raise=.4ex,width=3em,thick=.4pt+}+][1]{%+ \\ ^^A+][1]{%+}\\ +% \>\>\cs{rule}+[+\cs[\red]{commandkey}+{+{\db+raise+}+}]{+\cs[\red]{commandkey}+{+{\db+width+}+}{+\cs[\red]{commandkey}+{+{\db+thick+}+}}+\\ % \>\>\#1 \\ -% \>\>+\rule[\commandkey{raise}]{\commandkey{width}}{\commandkey{thick}}}+ +% \>\>\cs{rule}+[+\cs[\red]{commandkey}+{+{\db+raise+}+}]{+\cs[\red]{commandkey}+{+{\db+width+}+}}{+\cs[\red]{commandkey}+{+{\db+thick+}+}}}+ % \end{tabbing} % -% which defines the keys +width+, +thick+ and +raise+ with their default values (if not specified): -% +3em+, +.4pt+ and +.4ex+. Now \cs{textrule} can be used as follow: +% which defines the keys {\db+width+}, {\db+thick+} and {\db+raise+} with their default values (if not specified): +% {\db+3em+}, {\db+.4pt+} and {\db+.4ex+}. Now \cs[\copper]{textrule} can be used as follow: % \begin{tabbing} -% \=1:\quad\=+\textrule[width=2em]{hello}+\hskip2.5cm\=\smex\qquad\= \rule[.4ex]{2em}{.4pt}hello\rule[.4ex]{2em}{.4pt} \\ -% \>2:\>+\textrule[thick=5pt,width=2em]{hello}+\>\smex\> \rule[.4ex]{2em}{5pt}hello\rule[.4ex]{2em}{5pt}\\ -% \>3:\>+\textrule{hello}+\quad \>\smex\> \rule[.4ex]{3em}{.4pt}hello\rule[.4ex]{3em}{.4pt}\\ -% \>4:\>+\textrule[thick=2pt,raise=1ex]{hello}+\>\smex\> \rule[1ex]{3em}{2pt}hello\rule[1ex]{3em}{2pt} \\ +% \=1:\quad\=\cs[\copper]{textrule}+[width=2em]{hello}+\hskip2.5cm\=\smex\qquad\= \rule[.4ex]{2em}{.4pt}hello\rule[.4ex]{2em}{.4pt} \\ +% \>2:\>\cs[\copper]{textrule}+[thick=5pt,width=2em]{hello}+\>\smex\> \rule[.4ex]{2em}{5pt}hello\rule[.4ex]{2em}{5pt}\\ +% \>3:\>\cs[\copper]{textrule}+{hello}+\quad \>\smex\> \rule[.4ex]{3em}{.4pt}hello\rule[.4ex]{3em}{.4pt}\\ +% \>4:\>\cs[\copper]{textrule}+[thick=2pt,raise=1ex]{hello}+\>\smex\> \rule[1ex]{3em}{2pt}hello\rule[1ex]{3em}{2pt} \\ % \> \textit{et c\ae tera}. % \end{tabbing} % % \clearpage % -% \subsection{Second example : the \string+ form} +% \subsection{Second example : the {\rred\bf\string+} form} +% \label{sec:example:plus} % % \DeleteShortVerb{\+} % \begin{Verbatim}[gobble=1,commandchars=$(),frame=lines] -% ($bf\newkeycommand)($dr+[\|])($copper\myfigure)[image, +% ($bf\newkeycommand)($rred$bf+[\|])($copper\myfigure)[image, % caption, % enum placement={H,h,b,t,p}, % width=\textwidth, % label= % ][($db OtherKeys)]{% -% ($dr|)($bf\begin){figure}($dr|)[($red\commandkey){placement}] -% ($dr|)($bf\includegraphics)($dr|)[width=($red\commandkey){width},($red\commandkey){($db OtherKeys)}]{% +% ($rred|)($bf\begin){figure}($dr|)[($red\commandkey){placement}] +% ($rred|)($bf\includegraphics)($dr|)[width=($red\commandkey){width},($red\commandkey){($db OtherKeys)}]{% % ($red\commandkey){image}}% -% ($dg\ifcommandkey){caption}{($dr|)\caption($dr|){($red\commandkey){caption}}}{}% -% ($dg\ifcommandkey){label}{($dr|)\label($dr|){($red\commandkey){label}}}{}% -% ($dr|)($bf\end){figure}($dr|)} +% ($dg\ifcommandkey){caption}{($rred|)\caption($rred|){($red\commandkey){caption}}}{}% +% ($dg\ifcommandkey){label}{($rred|)\label($rred|){($red\commandkey){label}}}{}% +% ($rred|)($bf\end){figure}($rred|)} % \end{Verbatim} % \MakeShortVerb{\+} % -% With the {\bf\dr\string+} form of \cs{newkeycommand}, the definition will be expanded (at run time). The optional {\dr\bf+[\|]+} argument -% means that everything inside {\bf\dr+|+ ... +|+} is protected from expansion. +% With the \stform+ form of \cs{newkeycommand}, the definition will be expanded (at run time). The optional {\rred\bf+[\|]+} argument +% means that everything inside {\bf\rred+|+ ... +|+} is protected from expansion. % -% \cs{ifcommandkey}\{\meta{name}\}\{\meta{true}\}\{\meta{false}\}\quad expands \meta{true} if the commandkey \meta{name} is not blank. +% {\dg\cs{ifcommandkey}}\{\meta{name}\}\{\meta{true}\}\{\meta{false}\}\quad expands \meta{true} if the commandkey \meta{name} is not blank. % % {\db \meta{Otherkeys}} captures the keys given by the user but not declared: they are simply given back to \cs{includegraphics} here... % % -% \subsection{Explanation of the \string+ form} +% \subsection{Explanation of the {\rred\bf\string+} form} % \DeleteShortVerb{\+} % The |\commankey{|\meta{name}|}| stuff is expanded at run time using the following scheme:§§ % \begin{Verbatim}[gobble=1,commandchars=!(),frame=lines] @@ -387,9 +394,9 @@ Copyright (C) 2009-2010 by Florent Chervet % Therefore, the arguments of \cs{Macro} are ready: there is no more \cs{commandkey} stuff, but instead the values of the keys % as you gave them to the key-command. \cs{getcommandkey}\{A\} is expanded to \cs{defA}. % -% But \cs{defA} is not expanded of course: in the {\bf\dr\string+} form, \cs{commandkey} has the meaning of \cs{getcommandkey}. +% But \cs{defA} is not expanded of course: in the \stform+ form, \cs{commandkey} has the meaning of \cs{getcommandkey}. % -% As you can see, the mandatory arguments \#1, \#2 etc. are \textbf{never expanded}: there is no need to protect them inside the special (usually {\dr\bf\textbar}) character. +% As you can see, the mandatory arguments \#1, \#2 etc. are \textbf{never expanded}: there is no need to protect them inside the special (usually {\rred\bf\textbar}) character. % % % \MakeShortVerb{\+} @@ -397,7 +404,11 @@ Copyright (C) 2009-2010 by Florent Chervet % % \subsection{key-environments} % -% \begin{declcs}{newkeyenvironment}\,\M{envir name}\,\B{key-values pairs}\,\B{number of args}\,\M{begin}\,\M{end} +% \begin{declcs}{newkeyenvironment}% +% \Underbrace{\textcolor{red}{\textasteriskcentered\string+[short-unexpand]}}_{\makecell[c]{modifiers \\ Optional}}\,% +% \Underbrace{\M{envir name}}_{Required}\,% +% {\db\Underbrace{\B{keys=defaults}\,\B{OptKey}\,\B{}}_{Optional}\,}% +% \Underbrace{\M{begin}}_{Required}\Underbrace{\M{end}}_{Required} % \end{declcs} % % In the same way, you may define environments with optional keys as follow:§ @@ -409,7 +420,11 @@ Copyright (C) 2009-2010 by Florent Chervet % % Where $n$ is the number of mandatory other arguments (\emph{ie} without keys), if any. % -% There is no {\dr\bf\string+} form for key-environments. +% Key-environments may be defined with the \stform+ form in the same way as \cs{newkeycommand} is used. +% Be aware that each part of the environment: \meta{begin} and \meta{end} are then expanded, and the optional +% {\rred\bf+[\|]+} argument protects from expansion in each of those parts. +% +% % % % \DefineShortVerb{\+} @@ -506,7 +521,7 @@ Copyright (C) 2009-2010 by Florent Chervet \NeedsTeXFormat{LaTeX2e}% LaTeX 2.09 can't be used (nor non-LaTeX) [2005/12/01]% LaTeX must be 2005/12/01 or younger (see kvsetkeys.dtx). \ProvidesPackage{keycommand} - [2010/04/15 v3.1 - key-value interface for commands and environments in LaTeX] + [2010/04/18 v3.14 - key-value interface for commands and environments in LaTeX] % \end{macrocode} % % \subsection{Requirements} @@ -716,7 +731,7 @@ Copyright (C) 2009-2010 by Florent Chervet % Then it proceeds (\cs{kcmd@yargdef} (normal interface) or \cs{kcmd@yargedef} (when \cs{newkeycommand}\string+ is used)) % \begin{macrocode} \protected\long\def\kcmd@defcommand#1[#2][#3][#4]#5#6#7{% - \edef\kcmd@fam{\kcmd@keyfam{#1}}\let\commandkey\relax + \edef\kcmd@fam{\kcmd@keyfam{#1}}\let\commandkey\relax\let\getcommandkey\relax \edef\kcmd@defcommand{\endgroup \kcmd@undefinekeys{\kcmd@gbl}{\kcmd@fam}% undefines all keys for this keycommand family \kcmd@mount@unexpandchar{\kcmd@fam}{\expandonce\kcmd@unexpandchar}% @@ -725,7 +740,8 @@ Copyright (C) 2009-2010 by Florent Chervet \csdef{\kcmd@fam.getcommandkey}####1{% \unexpanded{\unexpanded\expandafter\expandafter\expandafter}{% \noexpand\csname\kcmd@fam @####1\endcsname}}% - \let\commandkey\noexpandcs{\kcmd@fam.\kcmd@plus get\fi commandkey}% + % \let\commandkey\noexpandcs{\kcmd@fam.\kcmd@plus get\fi commandkey}% + % \let\getcommandkey\noexpandcs{\kcmd@fam.getcommandkey}% \kcmd@plus% \newkeycommand+ \csdef{\kcmd@fam}{\kcmd@yargedef{\kcmd@gbl}{\kcmd@long}{\noexpandcs\kcmd@fam} {\number#4}{#6}{\csname\kcmd@fam.unexpandchar\endcsname}}% @@ -743,6 +759,8 @@ Copyright (C) 2009-2010 by Florent Chervet \kcmd@gbl\protected\edef#1{% entry point \let\noexpand\noexpand\commandkey\noexpand\noexpand\noexpandcs{% \kcmd@fam.\kcmd@plus get\fi commandkey}% + \let\noexpand\noexpand\getcommandkey\noexpand\noexpand\noexpandcs{% + \kcmd@fam.getcommandkey}% \noexpand\csvloop[\noexpand\kcmd@resetdefault{\kcmd@fam}]{\noexpandcs{\kcmd@fam.keylist}}% \noexpand\noexpand\noexpand\@testopt{% \kcmd@setkeys\noexpand\noexpand#1{\kcmd@fam}{\kcmd@otherkeys{#3}}}{}}% @@ -1109,9 +1127,10 @@ Copyright (C) 2009-2010 by Florent Chervet % \DeleteShortVerb{\+}^^A\UndefineShortVerb{\+} % \begin{History} % -% \begin{Version}{2010/04/15 v3.1} +% \begin{Version}{2010/04/18 v3.14} % \item Correction of bug in the normalization process. \\ % Correction of a bug in \cs{ifcommandkey} (undesirable space...) +% \item Modification of the pdf documentation for the \stform+ form of key-environments. % \end{Version} % % \begin{Version}{2010/03/28 v3.0} diff --git a/Master/texmf-dist/source/latex/keycommand/keycommand.ins b/Master/texmf-dist/source/latex/keycommand/keycommand.ins index 1345b89244a..07f1cd3e334 100644 --- a/Master/texmf-dist/source/latex/keycommand/keycommand.ins +++ b/Master/texmf-dist/source/latex/keycommand/keycommand.ins @@ -8,7 +8,7 @@ %% %% This is a generated file. %% -%% keycommand : key-value interface for commands and environments in LaTeX [v3.1 2010/04/15] +%% keycommand : key-value interface for commands and environments in LaTeX [v3.14 2010/04/18] %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either @@ -27,7 +27,7 @@ \input docstrip.tex \Msg{************************************************************************} \Msg{* Installation} -\Msg{* Package: keycommand 2010/04/15 v3.1 key-value interface for commands and environments in LaTeX} +\Msg{* Package: keycommand 2010/04/18 v3.14 key-value interface for commands and environments in LaTeX} \Msg{************************************************************************} \keepsilent @@ -38,7 +38,7 @@ This is a generated file. -keycommand : key-value interface for commands and environments in LaTeX [v3.1 2010/04/15] +keycommand : key-value interface for commands and environments in LaTeX [v3.14 2010/04/18] This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either diff --git a/Master/texmf-dist/tex/latex/keycommand/keycommand.sty b/Master/texmf-dist/tex/latex/keycommand/keycommand.sty index 8683f1fd7c2..9f79ac612aa 100644 --- a/Master/texmf-dist/tex/latex/keycommand/keycommand.sty +++ b/Master/texmf-dist/tex/latex/keycommand/keycommand.sty @@ -8,7 +8,7 @@ %% %% This is a generated file. %% -%% keycommand : key-value interface for commands and environments in LaTeX [v3.1 2010/04/15] +%% keycommand : key-value interface for commands and environments in LaTeX [v3.14 2010/04/18] %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either @@ -27,7 +27,7 @@ \NeedsTeXFormat{LaTeX2e}% LaTeX 2.09 can't be used (nor non-LaTeX) [2005/12/01]% LaTeX must be 2005/12/01 or younger (see kvsetkeys.dtx). \ProvidesPackage{keycommand} - [2010/04/15 v3.1 - key-value interface for commands and environments in LaTeX] + [2010/04/18 v3.14 - key-value interface for commands and environments in LaTeX] \def\kcmd@pkg@name{keycommand} \RequirePackage{etex,kvsetkeys,xkeyval,etoolbox,etextools} \def\kcmd@Xsetkeys{\XKV@testopta{\XKV@testoptc\XKV@setkeys}}% in case \setkeys was overwritten @@ -145,7 +145,7 @@ \protected\long\def\kcmd@def#1#2[#3][#4][#5]#6#7{% \@ifdefinable#1{\kcmd@defcommand#1[{#3}][{#4}][{#5}]{#6}{#2}{#7}}} \protected\long\def\kcmd@defcommand#1[#2][#3][#4]#5#6#7{% - \edef\kcmd@fam{\kcmd@keyfam{#1}}\let\commandkey\relax + \edef\kcmd@fam{\kcmd@keyfam{#1}}\let\commandkey\relax\let\getcommandkey\relax \edef\kcmd@defcommand{\endgroup \kcmd@undefinekeys{\kcmd@gbl}{\kcmd@fam}% undefines all keys for this keycommand family \kcmd@mount@unexpandchar{\kcmd@fam}{\expandonce\kcmd@unexpandchar}% @@ -154,7 +154,8 @@ \csdef{\kcmd@fam.getcommandkey}####1{% \unexpanded{\unexpanded\expandafter\expandafter\expandafter}{% \noexpand\csname\kcmd@fam @####1\endcsname}}% - \let\commandkey\noexpandcs{\kcmd@fam.\kcmd@plus get\fi commandkey}% + % \let\commandkey\noexpandcs{\kcmd@fam.\kcmd@plus get\fi commandkey}% + % \let\getcommandkey\noexpandcs{\kcmd@fam.getcommandkey}% \kcmd@plus% \newkeycommand+ \csdef{\kcmd@fam}{\kcmd@yargedef{\kcmd@gbl}{\kcmd@long}{\noexpandcs\kcmd@fam} {\number#4}{#6}{\csname\kcmd@fam.unexpandchar\endcsname}}% @@ -172,6 +173,8 @@ \kcmd@gbl\protected\edef#1{% entry point \let\noexpand\noexpand\commandkey\noexpand\noexpand\noexpandcs{% \kcmd@fam.\kcmd@plus get\fi commandkey}% + \let\noexpand\noexpand\getcommandkey\noexpand\noexpand\noexpandcs{% + \kcmd@fam.getcommandkey}% \noexpand\csvloop[\noexpand\kcmd@resetdefault{\kcmd@fam}]{\noexpandcs{\kcmd@fam.keylist}}% \noexpand\noexpand\noexpand\@testopt{% \kcmd@setkeys\noexpand\noexpand#1{\kcmd@fam}{\kcmd@otherkeys{#3}}}{}}% -- cgit v1.2.3