diff options
author | Karl Berry <karl@freefriends.org> | 2012-02-28 00:40:31 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2012-02-28 00:40:31 +0000 |
commit | e20ea4bdd670e0418363a2a38a54b422a4d83231 (patch) | |
tree | e75e065101424a1535a03f6d071b8cc17d22eb2d /Master/texmf-dist/source/latex/l3packages/l3keys2e/l3keys2e.dtx | |
parent | ed49b3dfe19b91f9fd96ab70fe95dcda8fba24c8 (diff) |
l3packages 3471 (26feb12)
git-svn-id: svn://tug.org/texlive/trunk@25524 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/l3packages/l3keys2e/l3keys2e.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/l3packages/l3keys2e/l3keys2e.dtx | 76 |
1 files changed, 38 insertions, 38 deletions
diff --git a/Master/texmf-dist/source/latex/l3packages/l3keys2e/l3keys2e.dtx b/Master/texmf-dist/source/latex/l3packages/l3keys2e/l3keys2e.dtx index de1850a183e..9d754ee9e80 100644 --- a/Master/texmf-dist/source/latex/l3packages/l3keys2e/l3keys2e.dtx +++ b/Master/texmf-dist/source/latex/l3packages/l3keys2e/l3keys2e.dtx @@ -1,5 +1,5 @@ % \iffalse meta-comment -% +% %% File: l3keys2e.dtx (C) Copyright 2009,2011,2012 The LaTeX3 Project %% %% It may be distributed and/or modified under the conditions of the @@ -37,8 +37,8 @@ %<*driver|package> % The version of expl3 required is tested as early as possible, as % some really old versions do not define \ProvidesExplPackage. -\RequirePackage{expl3}[2012/02/08] -%<package>\@ifpackagelater{expl3}{2012/02/08} +\RequirePackage{expl3}[2012/02/26] +%<package>\@ifpackagelater{expl3}{2012/02/26} %<package> {} %<package> { %<package> \PackageError{l3keys2e}{Support package l3kernel too old.} @@ -50,7 +50,7 @@ %<package> \endinput %<package> } \RequirePackage{xparse} -\GetIdInfo$Id: l3keys2e.dtx 3342 2012-02-08 19:34:51Z joseph $ +\GetIdInfo$Id: l3keys2e.dtx 3471 2012-02-26 20:12:23Z joseph $ {LaTeX2e option processing using LaTeX3 keys} %</driver|package> %<*driver> @@ -61,14 +61,14 @@ \end{document} %</driver> % \fi -% +% % \title{^^A % The \textsf{l3keys2e} package\\ % \LaTeXe{} option processing using \LaTeX3 keys^^A % \thanks{This file describes v\ExplFileVersion, % last revised \ExplFileDate.}^^A % } -% +% % \author{^^A % The \LaTeX3 Project\thanks % {^^A @@ -90,28 +90,28 @@ % base code includes the module \pkg{l3keys} for defining keys, but % to use these when loading \LaTeXe\ packages and classes requires % extra support. That support is provided by this small package, which -% is intended to enable \LaTeXe\ packages to benefit from the power of +% is intended to enable \LaTeXe\ packages to benefit from the power of % the \LaTeX3 key--value system. -% +% % \subsection{Creating and using keyval options} % % As with any key--value input, using key--value pairs as package or % class options has two parts. The first stage is to define one or -% more keys, using the \cs{keys_define:nn} function. For example, an +% more keys, using the \cs{keys_define:nn} function. For example, an % option which simply stores a value would be created using: -% \begin{verbatim} +% \begin{verbatim} % \keys_define:nn { module } % { option .set:N = \l_module_variable_tl } % \end{verbatim} % On its own, this will not make the key an option for the package or -% class containing the definition. The second stage is therefore to +% class containing the definition. The second stage is therefore to % process the current options, searching for applicable keys. -% +% % \begin{function}{\ProcessKeysOptions} % \begin{syntax} % \cs{ProcessKeysOptions} \Arg{module} % \end{syntax} -% The \cs{ProcessKeysOptions} function is used to check the current +% The \cs{ProcessKeysOptions} function is used to check the current % option list against the keys defined for \Arg{module}. Global (class) % options and local (package) options are checked when this function % is called in a package. Each option which does match a key name is @@ -130,12 +130,12 @@ % This function works in a similar manner to \cs{ProcessKeysOptions}. % When used in a \LaTeXe{} package, \cs{ProcessKeysPackageOptions} % will not examine any class options available. In contrast, -% \cs{ProcessKeysOptions} does parse class options (in common with the +% \cs{ProcessKeysOptions} does parse class options (in common with the % \LaTeXe{} kernel function \cs{ProcessOptions}). % \end{function} % %\end{documentation} -% +% %\begin{implementation} % %\subsection{\pkg{l3keys2e} Implementation} @@ -148,7 +148,7 @@ \ProvidesExplPackage {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} % \end{macrocode} -% +% % \begin{macro}{\keys_latexe_options_clist} % A single list is used for all options, into which they are collected % before processing. @@ -167,10 +167,10 @@ % % \begin{macro}{\keys_latexe_options:n} % The main function calls functions to collect up the global and local -% options into \cs{keys_latexe_options_clist} before calling the +% options into \cs{keys_latexe_options_clist} before calling the % underlying functions to actually do the processing. So that a suitable -% message is produced if the option is unknown, the special -% \texttt{unknown} key is set if it does not already exist for the +% message is produced if the option is unknown, the special +% \texttt{unknown} key is set if it does not already exist for the % current module. % \begin{macrocode} \cs_new_protected:Npn \keys_latexe_options:n #1 @@ -180,10 +180,10 @@ \keys_latexe_options_local: \keys_if_exist:nnF {#1} { unknown } { - \keys_define:nn {#1} + \keys_define:nn {#1} { - unknown .code:n = - { + unknown .code:n = + { \msg_error:nnxx { keyvalue } { option-unknown } { \l_keys_key_tl } { \@currname } } @@ -203,9 +203,9 @@ % \begin{macrocode} \cs_new_protected:Npn \keys_latexe_options_global:n #1 { - \cs_if_eq:NNF \@classoptionslist \scan_stop: + \cs_if_eq:NNF \@classoptionslist \scan_stop: { - \cs_if_eq:NNTF \@currext \@clsextension + \cs_if_eq:NNTF \@currext \@clsextension { \keys_latexe_options_class:n {#1} } { \bool_if:NT \_l_keys_process_class_bool @@ -214,11 +214,11 @@ } } % \end{macrocode} -% \end{macro} -% +% \end{macro} +% % \begin{macro}{\keys_latexe_options_class:n} % For classes, each option (stripped of any content after |=|) -% is checked for existence as a key. If found, the option is added to +% is checked for existence as a key. If found, the option is added to % the combined list for processing. On the other hand, unused options % are stored up in \cs{@unusedoptionlist}. Before any of that, though, % there is a simple check to see if there is an |unknown| key. If there @@ -229,7 +229,7 @@ \keys_if_exist:nnTF {#1} { unknown } { \clist_put_right:No \keys_latexe_options_clist \@classoptionslist } { - \clist_map_inline:Nn \@classoptionslist + \clist_map_inline:Nn \@classoptionslist { \keys_if_exist:nnTF {#1} { \keys_latexe_remove_equals:n {##1} } { \clist_put_right:Nn \keys_latexe_options_clist {##1} } @@ -248,7 +248,7 @@ % \begin{macrocode} \cs_new_protected:Npn \keys_latexe_options_package:n #1 { - \clist_map_inline:Nn \@classoptionslist + \clist_map_inline:Nn \@classoptionslist { \keys_if_exist:nnT {#1} { \keys_latexe_remove_equals:n {##1} } { @@ -267,18 +267,18 @@ % \begin{macrocode} \cs_new_protected_nopar:Npn \keys_latexe_options_local: { - \cs_if_eq:NNF \@currext \@clsextension + \cs_if_eq:NNF \@currext \@clsextension { - \cs_if_exist:cT { opt@ \@currname . \@currext } + \cs_if_exist:cT { opt@ \@currname . \@currext } { - \exp_args:NNc \clist_put_right:NV \keys_latexe_options_clist + \exp_args:NNc \clist_put_right:NV \keys_latexe_options_clist { opt@ \@currname . \@currext } } } } % \end{macrocode} -% \end{macro} -% +% \end{macro} +% % \begin{macro}{\keys_latexe_remove_equals:n} % \begin{macro}{\keys_latexe_remove_equals:w} % As the name suggests, this is a simple function to remove an equals @@ -291,7 +291,7 @@ % \end{macrocode} % \end{macro} % \end{macro} -% +% % \begin{macro}{\ProcessKeysOptions} % \begin{macro}{\ProcessKeysOptions} % The user macro are simply wrappers around the internal process. In @@ -316,11 +316,11 @@ % % One message to give. % \begin{macrocode} -\msg_new:nnnn { keyvalue } { option-unknown } +\msg_new:nnnn { keyvalue } { option-unknown } { Unknown~option~'#1'~for~package~#2. } { LaTeX~has~been~asked~to~set~an~option~called~'#1'~ - but~the~#2~package~has~not~created~an~option~with~this~name. + but~the~#2~package~has~not~created~an~option~with~this~name. } % \end{macrocode} % @@ -329,5 +329,5 @@ % \end{macrocode} % % \end{implementation} -% +% % \PrintIndex |