diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/keys3/keys3opts2.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/keys3/keys3opts2.sty | 90 |
1 files changed, 90 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/keys3/keys3opts2.sty b/Master/texmf-dist/tex/latex/keys3/keys3opts2.sty new file mode 100644 index 00000000000..4a2cd7eb090 --- /dev/null +++ b/Master/texmf-dist/tex/latex/keys3/keys3opts2.sty @@ -0,0 +1,90 @@ +%% +%% This is file `keys3opts2.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% keys3opts2.dtx (with options: `package') +%% --------------------------------------------------------------- +%% The keys3opts2 package --- Using keys3 for LaTeX2e options +%% Maintained by Joseph Wright +%% E-mail: joseph.wright@morningstar2.co.uk +%% Released under the LaTeX Project Public License v1.3c or later +%% See http://www.latex-project.org/lppl.txt +%% --------------------------------------------------------------- +%% +%% EXPERIMENTAL CODE +%% +%% Do not distribute this file without also distributing the +%% source files specified above. +%% +%% Do not distribute a modified version of this file. +%% +\RequirePackage{l3names} +\GetIdInfo$Id: keys3opts2.dtx 93 2009-05-03 20:34:46Z josephwright $ + {Using keys3 for LaTeX2e options} +\ProvidesExplPackage + {\filename}{\filedate}{\fileversion}{\filedescription} +\RequirePackage{keys3} +\clist_new:N \l_keys_options_ltx_clist +\cs_new:Nn \keys_options_ltx:n { + \tl_set:Nx \l_keys_current_key_tl {#1} + \keys_path_add:N \l_keys_current_key_tl + \clist_clear:N \l_keys_options_ltx_clist + \cs_if_eq:NNTF \@currext \@clsextension { + \cs_if_free:cF { opt@ \@currname . \@currext } { + \clist_map_function:cN { opt@ \@currname . \@currext } + \keys_options_ltx_cls:n + } + }{ + \cs_if_free:NF \@classoptionslist { + \clist_map_function:NN \@classoptionslist \keys_options_ltx_pkg:n + } + \cs_if_free:cF { opt@ \@currname . \@currext } { + \exp_args:NNc \clist_concat:NNN \l_keys_options_ltx_clist + { opt@ \@currname . \@currext } \l_keys_options_ltx_clist + } + } + \clist_put_left:Nn \l_keys_options_ltx_clist { #1 /.cd: } + \exp_args:NV \keys_manage:n \l_keys_options_ltx_clist + \AtEndOfPackage { \cs_set_eq:NN \@unprocessedoptions \scan_stop: } +} +\cs_new:Nn \keys_options_ltx_cls:n { + \keys_if_cmd_exist:nTF { + \l_keys_current_key_tl / \keys_options_ltx_strip_eq:w #1 = \q_stop + }{ + \clist_put_right:Nn \l_keys_options_ltx_clist {#1} + }{ + \clist_put_right:Nn \@unusedoptionlist {#1} + } +} +\cs_new:Nn \keys_options_ltx_pkg:n { + \keys_if_cmd_really_exist:nT { + \l_keys_current_key_tl / \keys_options_ltx_strip_eq:w #1 = \q_stop + }{ + \clist_put_right:Nn \l_keys_options_ltx_clist {#1} + \clist_remove_element:Nn \@unusedoptionlist {#1} + } +} +\cs_new:Npn \keys_options_ltx_strip_eq:w #1 = #2 \q_stop {#1} +%% +%% Copyright (C) 2008-2009 by +%% Joseph Wright <joseph.wright@morningstar2.co.uk> +%% +%% It may be distributed and/or modified under the conditions of +%% the LaTeX Project Public License (LPPL), either version 1.3c of +%% this license or (at your option) any later version. The latest +%% version of this license is in the file: +%% +%% http://www.latex-project.org/lppl.txt +%% +%% This work is "maintained" (as per LPPL maintenance status) by +%% Joseph Wright. +%% +%% This work consists of the file keys3opts2.dtx +%% and the derived files keys3opts2.pdf, +%% keys3opts2.sty and +%% keys3opts2.ins. +%% +%% +%% End of file `keys3opts2.sty'. |