summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/l3kernel/l3keys.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-05-05 22:01:18 +0000
committerKarl Berry <karl@freefriends.org>2014-05-05 22:01:18 +0000
commitd78a5a4de1e73a2151e8ed2635a199d928ccb559 (patch)
treeca490a3efa7d3614793427f850ec1aeb6bf971f1 /Master/texmf-dist/tex/latex/l3kernel/l3keys.sty
parentb41cac6cebc8095cf8eaf7e84f8a2d5f63b7be38 (diff)
latex3 (5may14)
git-svn-id: svn://tug.org/texlive/trunk@33859 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3kernel/l3keys.sty')
-rw-r--r--Master/texmf-dist/tex/latex/l3kernel/l3keys.sty818
1 files changed, 0 insertions, 818 deletions
diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3keys.sty b/Master/texmf-dist/tex/latex/l3kernel/l3keys.sty
deleted file mode 100644
index 62baa8a027e..00000000000
--- a/Master/texmf-dist/tex/latex/l3kernel/l3keys.sty
+++ /dev/null
@@ -1,818 +0,0 @@
-%%
-%% This is file `l3keys.sty',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% l3keys.dtx (with options: `package')
-%%
-%% EXPERIMENTAL CODE
-%%
-%% Do not distribute this file without also distributing the
-%% source files specified above.
-%%
-%% Do not distribute a modified version of this file.
-%%
-%% File: l3keys.dtx Copyright (C) 2006-2013 The LaTeX3 Project
-%%
-%% 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 file is part of the "l3kernel bundle" (The Work in LPPL)
-%% and all files in that bundle must be distributed together.
-%%
-%% The released version of this bundle is available from CTAN.
-%%
-%% -----------------------------------------------------------------------
-%%
-%% The development version of the bundle can be found at
-%%
-%% http://www.latex-project.org/svnroot/experimental/trunk/
-%%
-%% for those people who are interested.
-%%
-%%%%%%%%%%%
-%% NOTE: %%
-%%%%%%%%%%%
-%%
-%% Snapshots taken from the repository represent work in progress and may
-%% not work or may contain conflicting material! We therefore ask
-%% people _not_ to put them into distributions, archives, etc. without
-%% prior consultation with the LaTeX3 Project.
-%%
-%% -----------------------------------------------------------------------
-\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3keys.dtx 4614 2013-12-08 17:07:31Z joseph $
- {L3 Experimental key-value interfaces}
-\ProvidesExplPackage
- {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
-\__expl_package_check:
-\int_new:N \g__keyval_level_int
-\tl_new:N \l__keyval_key_tl
-\tl_new:N \l__keyval_value_tl
-\tl_new:N \l__keyval_sanitise_tl
-\tl_new:N \l__keyval_parse_tl
-\group_begin:
- \char_set_catcode_active:n { `\= }
- \char_set_catcode_active:n { `\, }
- \char_set_lccode:nn { `\8 } { `\= }
- \char_set_lccode:nn { `\9 } { `\, }
-\tl_to_lowercase:n
- {
- \group_end:
- \cs_new_protected:Npn \__keyval_parse:n #1
- {
- \group_begin:
- \tl_clear:N \l__keyval_sanitise_tl
- \tl_set:Nn \l__keyval_sanitise_tl {#1}
- \tl_replace_all:Nnn \l__keyval_sanitise_tl { = } { 8 }
- \tl_replace_all:Nnn \l__keyval_sanitise_tl { , } { 9 }
- \tl_clear:N \l__keyval_parse_tl
- \exp_after:wN \__keyval_parse_elt:w \exp_after:wN
- \q_nil \l__keyval_sanitise_tl 9 \q_recursion_tail 9 \q_recursion_stop
- \exp_after:wN \group_end:
- \l__keyval_parse_tl
- }
- }
-\cs_new_protected:Npn \__keyval_parse_elt:w #1 ,
- {
- \tl_if_blank:oTF { \use_none:n #1 }
- { \__keyval_parse_elt:w \q_nil }
- {
- \quark_if_recursion_tail_stop:o { \use_ii:nn #1 }
- \__keyval_split_key_value:w #1 = = \q_stop
- \__keyval_parse_elt:w \q_nil
- }
- }
-\cs_new_protected:Npn \__keyval_split_key_value:w #1 = #2 \q_stop
- {
- \__keyval_split_key:n {#1}
- \str_if_eq:nnTF {#2} { = }
- {
- \tl_put_right:Nx \l__keyval_parse_tl
- {
- \exp_not:c
- { __keyval_key_no_value_elt_ \int_use:N \g__keyval_level_int :n }
- { \exp_not:o \l__keyval_key_tl }
- }
- }
- {
- \__keyval_split_key_value:wTF #2 \q_no_value \q_stop
- { \__keyval_split_value:w \q_nil #2 }
- { \__msg_kernel_error:nn { kernel } { misplaced-equals-sign } }
- }
- }
-\cs_new:Npn \__keyval_split_key_value:wTF #1 = #2#3 \q_stop
- { \tl_if_head_eq_meaning:nNTF {#3} \q_no_value }
-\cs_new_protected:Npn \__keyval_split_key:n #1
- {
- \quark_if_nil:oTF { \use_none:nnn #1 \q_nil \q_nil }
- { \tl_set:Nx \l__keyval_key_tl { \exp_not:o { \use_ii:nnn #1 \q_nil } } }
- { \__keyval_split_key:w #1 \q_stop }
- }
-\cs_new_protected:Npn \__keyval_split_key:w \q_nil #1 \q_stop
- { \tl_set:Nx \l__keyval_key_tl { \tl_trim_spaces:n {#1} } }
-\cs_new_protected:Npn \__keyval_split_value:w #1 = =
- {
- \tl_put_right:Nx \l__keyval_parse_tl
- {
- \exp_not:c
- { __keyval_key_value_elt_ \int_use:N \g__keyval_level_int :nn }
- { \exp_not:o \l__keyval_key_tl }
- }
- \tl_set:Nx \l__keyval_value_tl
- { \exp_not:o { \use_none:nnn #1 \q_nil \q_nil } }
- \tl_if_empty:NTF \l__keyval_value_tl
- { \tl_put_right:Nn \l__keyval_parse_tl { { } } }
- {
- \quark_if_nil:NTF \l__keyval_value_tl
- {
- \tl_put_right:Nx \l__keyval_parse_tl
- { { \exp_not:o { \use_ii:nnn #1 \q_nil } } }
- }
- { \__keyval_split_value_aux:w #1 \q_stop }
- }
- }
-\cs_new_protected:Npn \__keyval_split_value_aux:w \q_nil #1 \q_stop
- {
- \tl_set:Nx \l__keyval_value_tl { \tl_trim_spaces:n {#1} }
- \tl_put_right:Nx \l__keyval_parse_tl
- { { \exp_not:o \l__keyval_value_tl } }
- }
-\cs_new_protected:Npn \keyval_parse:NNn #1#2#3
- {
- \int_gincr:N \g__keyval_level_int
- \cs_gset_eq:cN
- { __keyval_key_no_value_elt_ \int_use:N \g__keyval_level_int :n } #1
- \cs_gset_eq:cN
- { __keyval_key_value_elt_ \int_use:N \g__keyval_level_int :nn } #2
- \__keyval_parse:n {#3}
- \int_gdecr:N \g__keyval_level_int
- }
-\__msg_kernel_new:nnnn { kernel } { misplaced-equals-sign }
- { Misplaced~equals~sign~in~key-value~input~\msg_line_number: }
- {
- LaTeX~is~attempting~to~parse~some~key-value~input~but~found~
- two~equals~signs~not~separated~by~a~comma.
- }
-\tl_const:Nn \c__keys_code_root_tl { key~code~>~ }
-\tl_const:Nn \c__keys_info_root_tl { key~info~>~ }
-\tl_const:Nn \c__keys_props_root_tl { key~prop~>~ }
-\int_new:N \l_keys_choice_int
-\tl_new:N \l_keys_choice_tl
-\clist_new:N \l__keys_groups_clist
-\tl_new:N \l_keys_key_tl
-\tl_new:N \l__keys_module_tl
-\bool_new:N \l__keys_no_value_bool
-\bool_new:N \l__keys_only_known_bool
-\tl_new:N \l_keys_path_tl
-\tl_new:N \l__keys_property_tl
-\bool_new:N \l__keys_selective_bool
-\bool_new:N \l__keys_filtered_bool
-\seq_new:N \l__keys_selective_seq
-\tl_new:N \l__keys_unused_clist
-\tl_new:N \l_keys_value_tl
-\bool_new:N \l__keys_tmp_bool
-\cs_new_protected:Npn \keys_define:nn
- { \__keys_define:onn \l__keys_module_tl }
-\cs_new_protected:Npn \__keys_define:nnn #1#2#3
- {
- \tl_set:Nx \l__keys_module_tl { \tl_to_str:n {#2} }
- \keyval_parse:NNn \__keys_define_elt:n \__keys_define_elt:nn {#3}
- \tl_set:Nn \l__keys_module_tl {#1}
- }
-\cs_generate_variant:Nn \__keys_define:nnn { o }
-\cs_new_protected:Npn \__keys_define_elt:n #1
- {
- \bool_set_true:N \l__keys_no_value_bool
- \__keys_define_elt_aux:nn {#1} { }
- }
-\cs_new_protected:Npn \__keys_define_elt:nn #1#2
- {
- \bool_set_false:N \l__keys_no_value_bool
- \__keys_define_elt_aux:nn {#1} {#2}
- }
-\cs_new_protected:Npn \__keys_define_elt_aux:nn #1#2
- {
- \__keys_property_find:n {#1}
- \cs_if_exist:cTF { \c__keys_props_root_tl \l__keys_property_tl }
- { \__keys_define_key:n {#2} }
- {
- \str_if_eq_x:nnF { \l__keys_property_tl } { .abort: }
- {
- \__msg_kernel_error:nnxx { kernel } { property-unknown }
- { \l__keys_property_tl } { \l_keys_path_tl }
- }
- }
- }
-\cs_new_protected:Npn \__keys_property_find:n #1
- {
- \tl_set:Nx \l_keys_path_tl { \l__keys_module_tl / }
- \tl_if_in:nnTF {#1} { . }
- { \__keys_property_find:w #1 \q_stop }
- {
- \__msg_kernel_error:nnx { kernel } { key-no-property } {#1}
- \tl_set:Nn \l__keys_property_tl { .abort: }
- }
- }
-\cs_new_protected:Npn \__keys_property_find:w #1 . #2 \q_stop
- {
- \tl_set:Nx \l_keys_path_tl { \l_keys_path_tl \tl_to_str:n {#1} }
- \tl_if_in:nnTF {#2} { . }
- {
- \tl_set:Nx \l_keys_path_tl { \l_keys_path_tl . }
- \__keys_property_find:w #2 \q_stop
- }
- { \tl_set:Nn \l__keys_property_tl { . #2 } }
- }
-\cs_new_protected:Npn \__keys_define_key:n #1
- {
- \bool_if:NTF \l__keys_no_value_bool
- {
- \exp_after:wN \__keys_define_key:w
- \l__keys_property_tl \q_stop
- { \use:c { \c__keys_props_root_tl \l__keys_property_tl } }
- {
- \__msg_kernel_error:nnxx { kernel }
- { property-requires-value } { \l__keys_property_tl }
- { \l_keys_path_tl }
- }
- }
- { \use:c { \c__keys_props_root_tl \l__keys_property_tl } {#1} }
- }
-\cs_new_protected:Npn \__keys_define_key:w #1 : #2 \q_stop
- { \tl_if_empty:nTF {#2} }
-\cs_new_protected:Npn \__keys_bool_set:Nn #1#2
- {
- \bool_if_exist:NF #1 { \bool_new:N #1 }
- \__keys_choice_make:
- \__keys_cmd_set:nx { \l_keys_path_tl / true }
- { \exp_not:c { bool_ #2 set_true:N } \exp_not:N #1 }
- \__keys_cmd_set:nx { \l_keys_path_tl / false }
- { \exp_not:c { bool_ #2 set_false:N } \exp_not:N #1 }
- \__keys_cmd_set:nn { \l_keys_path_tl / unknown }
- {
- \__msg_kernel_error:nnx { kernel } { boolean-values-only }
- { \l_keys_key_tl }
- }
- \__keys_default_set:n { true }
- }
-\cs_generate_variant:Nn \__keys_bool_set:Nn { c }
-\cs_new_protected:Npn \__keys_bool_set_inverse:Nn #1#2
- {
- \bool_if_exist:NF #1 { \bool_new:N #1 }
- \__keys_choice_make:
- \__keys_cmd_set:nx { \l_keys_path_tl / true }
- { \exp_not:c { bool_ #2 set_false:N } \exp_not:N #1 }
- \__keys_cmd_set:nx { \l_keys_path_tl / false }
- { \exp_not:c { bool_ #2 set_true:N } \exp_not:N #1 }
- \__keys_cmd_set:nn { \l_keys_path_tl / unknown }
- {
- \__msg_kernel_error:nnx { kernel } { boolean-values-only }
- { \l_keys_key_tl }
- }
- \__keys_default_set:n { true }
- }
-\cs_generate_variant:Nn \__keys_bool_set_inverse:Nn { c }
-\cs_new_protected_nopar:Npn \__keys_choice_make:
- {
- \__keys_cmd_set:nn { \l_keys_path_tl }
- { \__keys_choice_find:n {##1} }
- \__keys_cmd_set:nn { \l_keys_path_tl / unknown }
- {
- \__msg_kernel_error:nnxx { kernel } { key-choice-unknown }
- { \l_keys_path_tl } {##1}
- }
- }
-\cs_new_protected:Npn \__keys_choices_make:nn #1#2
- {
- \__keys_choice_make:
- \int_zero:N \l_keys_choice_int
- \clist_map_inline:nn {#1}
- {
- \int_incr:N \l_keys_choice_int
- \__keys_cmd_set:nx { \l_keys_path_tl / ##1 }
- {
- \tl_set:Nn \exp_not:N \l_keys_choice_tl {##1}
- \int_set:Nn \exp_not:N \l_keys_choice_int
- { \int_use:N \l_keys_choice_int }
- \exp_not:n {#2}
- }
- }
- }
-\cs_new_protected:Npn \__keys_cmd_set:nn #1#2
- {
- \prop_clear_new:c { \c__keys_info_root_tl #1 }
- \cs_set:cpn { \c__keys_code_root_tl #1 } ##1 {#2}
- }
-\cs_generate_variant:Nn \__keys_cmd_set:nn { nx , Vn , Vo }
-\cs_new_protected:Npn \__keys_default_set:n #1
- {
- \prop_if_exist:cT { \c__keys_info_root_tl \l_keys_path_tl }
- { \prop_put:cnn { \c__keys_info_root_tl \l_keys_path_tl } { default } {#1} }
- }
-\cs_new_protected:Npn \__keys_groups_set:n #1
- {
- \prop_if_exist:cT { \c__keys_info_root_tl \l_keys_path_tl }
- {
- \clist_set:Nn \l__keys_groups_clist {#1}
- \prop_put:cnV { \c__keys_info_root_tl \l_keys_path_tl }
- { groups } \l__keys_groups_clist
- }
- }
-\cs_new_protected:Npn \__keys_initialise:n #1
- { \exp_after:wN \__keys_initialise:wn \l_keys_path_tl \q_stop {#1} }
-\cs_new_protected:Npn \__keys_initialise:wn #1 / #2 \q_stop #3
- { \keys_set:nn {#1} { #2 = {#3} } }
-\cs_new_protected:Npn \__keys_meta_make:n #1
- {
- \__keys_cmd_set:Vo \l_keys_path_tl
- { \exp_after:wN \keys_set:nn \exp_after:wN { \l__keys_module_tl } {#1} }
- }
-\cs_new_protected:Npn \__keys_meta_make:nn #1#2
- { \__keys_cmd_set:Vn \l_keys_path_tl { \keys_set:nn {#1} {#2} } }
-\cs_new:Npn \__keys_multichoice_find:n #1
- { \clist_map_function:nN {#1} \__keys_choice_find:n }
-\cs_new_protected_nopar:Npn \__keys_multichoice_make:
- {
- \__keys_cmd_set:nn { \l_keys_path_tl }
- { \__keys_multichoice_find:n {##1} }
- \__keys_cmd_set:nn { \l_keys_path_tl / unknown }
- {
- \__msg_kernel_error:nnxx { kernel } { key-choice-unknown }
- { \l_keys_path_tl } {##1}
- }
- }
-\cs_new_protected:Npn \__keys_multichoices_make:nn #1#2
- {
- \__keys_multichoice_make:
- \int_zero:N \l_keys_choice_int
- \clist_map_inline:nn {#1}
- {
- \int_incr:N \l_keys_choice_int
- \__keys_cmd_set:nx { \l_keys_path_tl / ##1 }
- {
- \tl_set:Nn \exp_not:N \l_keys_choice_tl {##1}
- \int_set:Nn \exp_not:N \l_keys_choice_int
- { \int_use:N \l_keys_choice_int }
- \exp_not:n {#2}
- }
- }
- }
-\cs_new_protected:Npn \__keys_value_requirement:n #1
- {
- \prop_if_exist:cT { \c__keys_info_root_tl \l_keys_path_tl }
- {
- \prop_remove:cn { \c__keys_info_root_tl \l_keys_path_tl } { required }
- \prop_remove:cn { \c__keys_info_root_tl \l_keys_path_tl } { forbidden }
- \prop_put:cnn { \c__keys_info_root_tl \l_keys_path_tl } {#1} { true }
- }
- }
-\cs_new_protected:Npn \__keys_variable_set:NnnN #1#2#3#4
- {
- \use:c { #2_if_exist:NF } #1 { \use:c { #2 _new:N } #1 }
- \__keys_cmd_set:nx { \l_keys_path_tl }
- { \exp_not:c { #2 _ #3 set:N #4 } \exp_not:N #1 \exp_not:n { {##1} } }
- }
-\cs_generate_variant:Nn \__keys_variable_set:NnnN { c }
-\cs_new_protected:cpn { \c__keys_props_root_tl .bool_set:N } #1
- { \__keys_bool_set:Nn #1 { } }
-\cs_new_protected:cpn { \c__keys_props_root_tl .bool_set:c } #1
- { \__keys_bool_set:cn {#1} { } }
-\cs_new_protected:cpn { \c__keys_props_root_tl .bool_gset:N } #1
- { \__keys_bool_set:Nn #1 { g } }
-\cs_new_protected:cpn { \c__keys_props_root_tl .bool_gset:c } #1
- { \__keys_bool_set:cn {#1} { g } }
-\cs_new_protected:cpn { \c__keys_props_root_tl .bool_set_inverse:N } #1
- { \__keys_bool_set_inverse:Nn #1 { } }
-\cs_new_protected:cpn { \c__keys_props_root_tl .bool_set_inverse:c } #1
- { \__keys_bool_set_inverse:cn {#1} { } }
-\cs_new_protected:cpn { \c__keys_props_root_tl .bool_gset_inverse:N } #1
- { \__keys_bool_set_inverse:Nn #1 { g } }
-\cs_new_protected:cpn { \c__keys_props_root_tl .bool_gset_inverse:c } #1
- { \__keys_bool_set_inverse:cn {#1} { g } }
-\cs_new_protected_nopar:cpn { \c__keys_props_root_tl .choice: }
- { \__keys_choice_make: }
-\cs_new_protected:cpn { \c__keys_props_root_tl .choices:nn } #1
- { \__keys_choices_make:nn #1 }
-\cs_new_protected:cpn { \c__keys_props_root_tl .choices:Vn } #1
- { \exp_args:NV \__keys_choices_make:nn #1 }
-\cs_new_protected:cpn { \c__keys_props_root_tl .choices:on } #1
- { \exp_args:No \__keys_choices_make:nn #1 }
-\cs_new_protected:cpn { \c__keys_props_root_tl .choices:xn } #1
- { \exp_args:Nx \__keys_choices_make:nn #1 }
-\cs_new_protected:cpn { \c__keys_props_root_tl .code:n } #1
- { \__keys_cmd_set:nn { \l_keys_path_tl } {#1} }
-\cs_new_protected:cpn { \c__keys_props_root_tl .clist_set:N } #1
- { \__keys_variable_set:NnnN #1 { clist } { } n }
-\cs_new_protected:cpn { \c__keys_props_root_tl .clist_set:c } #1
- { \__keys_variable_set:cnnN {#1} { clist } { } n }
-\cs_new_protected:cpn { \c__keys_props_root_tl .clist_gset:N } #1
- { \__keys_variable_set:NnnN #1 { clist } { g } n }
-\cs_new_protected:cpn { \c__keys_props_root_tl .clist_gset:c } #1
- { \__keys_variable_set:cnnN {#1} { clist } { g } n }
-\cs_new_protected:cpn { \c__keys_props_root_tl .default:n } #1
- { \__keys_default_set:n {#1} }
-\cs_new_protected:cpn { \c__keys_props_root_tl .default:V } #1
- { \exp_args:NV \__keys_default_set:n #1 }
-\cs_new_protected:cpn { \c__keys_props_root_tl .default:o } #1
- { \exp_args:No \__keys_default_set:n {#1} }
-\cs_new_protected:cpn { \c__keys_props_root_tl .default:x } #1
- { \exp_args:Nx \__keys_default_set:n {#1} }
-\cs_new_protected:cpn { \c__keys_props_root_tl .dim_set:N } #1
- { \__keys_variable_set:NnnN #1 { dim } { } n }
-\cs_new_protected:cpn { \c__keys_props_root_tl .dim_set:c } #1
- { \__keys_variable_set:cnnN {#1} { dim } { } n }
-\cs_new_protected:cpn { \c__keys_props_root_tl .dim_gset:N } #1
- { \__keys_variable_set:NnnN #1 { dim } { g } n }
-\cs_new_protected:cpn { \c__keys_props_root_tl .dim_gset:c } #1
- { \__keys_variable_set:cnnN {#1} { dim } { g } n }
-\cs_new_protected:cpn { \c__keys_props_root_tl .fp_set:N } #1
- { \__keys_variable_set:NnnN #1 { fp } { } n }
-\cs_new_protected:cpn { \c__keys_props_root_tl .fp_set:c } #1
- { \__keys_variable_set:cnnN {#1} { fp } { } n }
-\cs_new_protected:cpn { \c__keys_props_root_tl .fp_gset:N } #1
- { \__keys_variable_set:NnnN #1 { fp } { g } n }
-\cs_new_protected:cpn { \c__keys_props_root_tl .fp_gset:c } #1
- { \__keys_variable_set:cnnN {#1} { fp } { g } n }
-\cs_new_protected:cpn { \c__keys_props_root_tl .groups:n } #1
- { \__keys_groups_set:n {#1} }
-\cs_new_protected:cpn { \c__keys_props_root_tl .initial:n } #1
- { \__keys_initialise:n {#1} }
-\cs_new_protected:cpn { \c__keys_props_root_tl .initial:V } #1
- { \exp_args:NV \__keys_initialise:n #1 }
-\cs_new_protected:cpn { \c__keys_props_root_tl .initial:o } #1
- { \exp_args:No \__keys_initialise:n {#1} }
-\cs_new_protected:cpn { \c__keys_props_root_tl .initial:x } #1
- { \exp_args:Nx \__keys_initialise:n {#1} }
-\cs_new_protected:cpn { \c__keys_props_root_tl .int_set:N } #1
- { \__keys_variable_set:NnnN #1 { int } { } n }
-\cs_new_protected:cpn { \c__keys_props_root_tl .int_set:c } #1
- { \__keys_variable_set:cnnN {#1} { int } { } n }
-\cs_new_protected:cpn { \c__keys_props_root_tl .int_gset:N } #1
- { \__keys_variable_set:NnnN #1 { int } { g } n }
-\cs_new_protected:cpn { \c__keys_props_root_tl .int_gset:c } #1
- { \__keys_variable_set:cnnN {#1} { int } { g } n }
-\cs_new_protected:cpn { \c__keys_props_root_tl .meta:n } #1
- { \__keys_meta_make:n {#1} }
-\cs_new_protected:cpn { \c__keys_props_root_tl .meta:nn } #1
- { \__keys_meta_make:nn #1 }
-\cs_new_protected_nopar:cpn { \c__keys_props_root_tl .multichoice: }
- { \__keys_multichoice_make: }
-\cs_new_protected:cpn { \c__keys_props_root_tl .multichoices:nn } #1
- { \__keys_multichoices_make:nn #1 }
-\cs_new_protected:cpn { \c__keys_props_root_tl .multichoices:Vn } #1
- { \exp_args:NV \__keys_multichoices_make:nn #1 }
-\cs_new_protected:cpn { \c__keys_props_root_tl .multichoices:on } #1
- { \exp_args:No \__keys_multichoices_make:nn #1 }
-\cs_new_protected:cpn { \c__keys_props_root_tl .multichoices:xn } #1
- { \exp_args:Nx \__keys_multichoices_make:nn #1 }
-\cs_new_protected:cpn { \c__keys_props_root_tl .skip_set:N } #1
- { \__keys_variable_set:NnnN #1 { skip } { } n }
-\cs_new_protected:cpn { \c__keys_props_root_tl .skip_set:c } #1
- { \__keys_variable_set:cnnN {#1} { skip } { } n }
-\cs_new_protected:cpn { \c__keys_props_root_tl .skip_gset:N } #1
- { \__keys_variable_set:NnnN #1 { skip } { g } n }
-\cs_new_protected:cpn { \c__keys_props_root_tl .skip_gset:c } #1
- { \__keys_variable_set:cnnN {#1} { skip } { g } n }
-\cs_new_protected:cpn { \c__keys_props_root_tl .tl_set:N } #1
- { \__keys_variable_set:NnnN #1 { tl } { } n }
-\cs_new_protected:cpn { \c__keys_props_root_tl .tl_set:c } #1
- { \__keys_variable_set:cnnN {#1} { tl } { } n }
-\cs_new_protected:cpn { \c__keys_props_root_tl .tl_set_x:N } #1
- { \__keys_variable_set:NnnN #1 { tl } { } x }
-\cs_new_protected:cpn { \c__keys_props_root_tl .tl_set_x:c } #1
- { \__keys_variable_set:cnnN {#1} { tl } { } x }
-\cs_new_protected:cpn { \c__keys_props_root_tl .tl_gset:N } #1
- { \__keys_variable_set:NnnN #1 { tl } { g } n }
-\cs_new_protected:cpn { \c__keys_props_root_tl .tl_gset:c } #1
- { \__keys_variable_set:cnnN {#1} { tl } { g } n }
-\cs_new_protected:cpn { \c__keys_props_root_tl .tl_gset_x:N } #1
- { \__keys_variable_set:NnnN #1 { tl } { g } x }
-\cs_new_protected:cpn { \c__keys_props_root_tl .tl_gset_x:c } #1
- { \__keys_variable_set:cnnN {#1} { tl } { g } x }
-\cs_new_protected_nopar:cpn { \c__keys_props_root_tl .value_forbidden: }
- { \__keys_value_requirement:n { forbidden } }
-\cs_new_protected_nopar:cpn { \c__keys_props_root_tl .value_required: }
- { \__keys_value_requirement:n { required } }
-\cs_new_protected_nopar:Npn \keys_set:nn
- { \__keys_set:onn { \l__keys_module_tl } }
-\cs_new_protected:Npn \__keys_set:nnn #1#2#3
- {
- \tl_set:Nx \l__keys_module_tl { \tl_to_str:n {#2} }
- \keyval_parse:NNn \__keys_set_elt:n \__keys_set_elt:nn {#3}
- \tl_set:Nn \l__keys_module_tl {#1}
- }
-\cs_generate_variant:Nn \keys_set:nn { nV , nv , no }
-\cs_generate_variant:Nn \__keys_set:nnn { o }
-\cs_new_protected:Npn \keys_set_known:nnN #1#2#3
- {
- \clist_clear:N \l__keys_unused_clist
- \keys_set_known:nn {#1} {#2}
- \tl_set:Nx #3 { \exp_not:o { \l__keys_unused_clist } }
- }
-\cs_generate_variant:Nn \keys_set_known:nnN { nV , nv , no }
-\cs_new_protected:Npn \keys_set_known:nn #1#2
- {
- \bool_set_true:N \l__keys_only_known_bool
- \keys_set:nn {#1} {#2}
- \bool_set_false:N \l__keys_only_known_bool
- }
-\cs_generate_variant:Nn \keys_set_known:nn { nV , nv , no }
-\cs_new_protected:Npn \keys_set_filter:nnnN #1#2#3#4
- {
- \clist_clear:N \l__keys_unused_clist
- \keys_set_filter:nnn {#1} {#2} {#3}
- \tl_set:Nx #4 { \exp_not:o { \l__keys_unused_clist } }
- }
-\cs_generate_variant:Nn \keys_set_filter:nnnN { nnV , nnv , nno }
-\cs_new_protected:Npn \keys_set_filter:nnn #1#2#3
- {
- \bool_set_true:N \l__keys_selective_bool
- \bool_set_true:N \l__keys_filtered_bool
- \seq_set_from_clist:Nn \l__keys_selective_seq {#2}
- \keys_set:nn {#1} {#3}
- \bool_set_false:N \l__keys_selective_bool
- }
-\cs_generate_variant:Nn \keys_set_filter:nnn { nnV , nnv , nno }
-\cs_new_protected:Npn \keys_set_groups:nnn #1#2#3
- {
- \bool_set_true:N \l__keys_selective_bool
- \bool_set_false:N \l__keys_filtered_bool
- \seq_set_from_clist:Nn \l__keys_selective_seq {#2}
- \keys_set:nn {#1} {#3}
- \bool_set_false:N \l__keys_selective_bool
- }
-\cs_generate_variant:Nn \keys_set_groups:nnn { nnV , nnv , nno }
-\cs_new_protected:Npn \__keys_set_elt:n #1
- {
- \bool_set_true:N \l__keys_no_value_bool
- \__keys_set_elt_aux:nn {#1} { }
- }
-\cs_new_protected:Npn \__keys_set_elt:nn #1#2
- {
- \bool_set_false:N \l__keys_no_value_bool
- \__keys_set_elt_aux:nn {#1} {#2}
- }
-\cs_new_protected:Npn \__keys_set_elt_aux:nn #1#2
- {
- \tl_set:Nx \l_keys_key_tl { \tl_to_str:n {#1} }
- \tl_set:Nx \l_keys_path_tl { \l__keys_module_tl / \l_keys_key_tl }
- \__keys_value_or_default:n {#2}
- \bool_if:NTF \l__keys_selective_bool
- { \__keys_set_elt_selective: }
- { \__keys_set_elt_aux: }
- }
-\cs_new_protected_nopar:Npn \__keys_set_elt_aux:
- {
- \bool_if:nTF
- {
- \__keys_if_value_p:n { required } &&
- \l__keys_no_value_bool
- }
- {
- \__msg_kernel_error:nnx { kernel } { value-required }
- { \l_keys_path_tl }
- }
- {
- \bool_if:nTF
- {
- \__keys_if_value_p:n { forbidden } &&
- ! \l__keys_no_value_bool
- }
- {
- \__msg_kernel_error:nnxx { kernel } { value-forbidden }
- { \l_keys_path_tl } { \l_keys_value_tl }
- }
- { \__keys_execute: }
- }
- }
-\cs_new_protected_nopar:Npn \__keys_set_elt_selective:
- {
- \prop_if_exist:cTF { \c__keys_info_root_tl \l_keys_path_tl }
- {
- \prop_get:cnNTF { \c__keys_info_root_tl \l_keys_path_tl }
- { groups } \l__keys_groups_clist
- { \__keys_check_groups: }
- {
- \bool_if:NTF \l__keys_filtered_bool
- { \__keys_set_elt_aux: }
- { \__keys_store_unused: }
- }
- }
- {
- \bool_if:NTF \l__keys_filtered_bool
- { \__keys_set_elt_aux: }
- { \__keys_store_unused: }
- }
- }
-\cs_new_protected_nopar:Npn \__keys_check_groups:
- {
- \bool_set_false:N \l__keys_tmp_bool
- \seq_map_inline:Nn \l__keys_selective_seq
- {
- \clist_map_inline:Nn \l__keys_groups_clist
- {
- \str_if_eq:nnT {##1} {####1}
- {
- \bool_set_true:N \l__keys_tmp_bool
- \clist_map_break:n { \seq_map_break: }
- }
- }
- }
- \bool_if:NTF \l__keys_tmp_bool
- {
- \bool_if:NTF \l__keys_filtered_bool
- { \__keys_store_unused: }
- { \__keys_set_elt_aux: }
- }
- {
- \bool_if:NTF \l__keys_filtered_bool
- { \__keys_set_elt_aux: }
- { \__keys_store_unused: }
- }
- }
-\cs_new_protected:Npn \__keys_value_or_default:n #1
- {
- \bool_if:NTF \l__keys_no_value_bool
- {
- \prop_get:cnNF { \c__keys_info_root_tl \l_keys_path_tl }
- { default } \l_keys_value_tl
- { \tl_clear:N \l_keys_value_tl }
- }
- { \tl_set:Nn \l_keys_value_tl {#1} }
- }
-\prg_new_conditional:Npnn \__keys_if_value:n #1 { p }
- {
- \prop_if_exist:cTF { \c__keys_info_root_tl \l_keys_path_tl }
- {
- \prop_if_in:cnTF { \c__keys_info_root_tl \l_keys_path_tl } {#1}
- { \prg_return_true: }
- { \prg_return_false: }
- }
- { \prg_return_false: }
- }
-\cs_new_protected_nopar:Npn \__keys_execute:
- { \__keys_execute:nn { \l_keys_path_tl } { \__keys_execute_unknown: } }
-\cs_new_protected_nopar:Npn \__keys_execute_unknown:
- {
- \bool_if:NTF \l__keys_only_known_bool
- { \__keys_store_unused: }
- {
- \__keys_execute:nn { \l__keys_module_tl / unknown }
- {
- \__msg_kernel_error:nnxx { kernel } { key-unknown }
- { \l_keys_path_tl } { \l__keys_module_tl }
- }
- }
- }
-\cs_new:Npn \__keys_execute:nn #1#2
- {
- \cs_if_exist:cTF { \c__keys_code_root_tl #1 }
- {
- \exp_args:Nc \exp_args:No { \c__keys_code_root_tl #1 }
- \l_keys_value_tl
- }
- {#2}
- }
-\cs_new_protected_nopar:Npn \__keys_store_unused:
- {
- \clist_put_right:Nx \l__keys_unused_clist
- {
- \exp_not:o \l_keys_key_tl
- \bool_if:NF \l__keys_no_value_bool
- { = { \exp_not:o \l_keys_value_tl } }
- }
- }
-\cs_new:Npn \__keys_choice_find:n #1
- {
- \__keys_execute:nn { \l_keys_path_tl / \tl_to_str:n {#1} }
- { \__keys_execute:nn { \l_keys_path_tl / unknown } { } }
- }
-\prg_new_conditional:Npnn \keys_if_exist:nn #1#2 { p , T , F , TF }
- {
- \cs_if_exist:cTF { \c__keys_code_root_tl #1 / #2 }
- { \prg_return_true: }
- { \prg_return_false: }
- }
-\prg_new_conditional:Npnn \keys_if_choice_exist:nnn #1#2#3 { p , T , F , TF }
- {
- \cs_if_exist:cTF { \c__keys_code_root_tl #1 / #2 / #3 }
- { \prg_return_true: }
- { \prg_return_false: }
- }
-\cs_new_protected:Npn \keys_show:nn #1#2
- { \cs_show:c { \c__keys_code_root_tl #1 / \tl_to_str:n {#2} } }
-\__msg_kernel_new:nnnn { kernel } { boolean-values-only }
- { Key~'#1'~accepts~boolean~values~only. }
- { The~key~'#1'~only~accepts~the~values~'true'~and~'false'. }
-\__msg_kernel_new:nnnn { kernel } { choice-unknown }
- { Choice~'#2'~unknown~for~key~'#1'. }
- {
- The~key~'#1'~takes~a~limited~number~of~values.\\
- The~input~given,~'#2',~is~not~on~the~list~accepted.
- }
-\__msg_kernel_new:nnnn { kernel } { key-choice-unknown }
- { Key~'#1'~accepts~only~a~fixed~set~of~choices. }
- {
- The~key~'#1'~only~accepts~predefined~values,~and~'#2'~is~not~one~of~these.
- }
-\__msg_kernel_new:nnnn { kernel } { key-no-property }
- { No~property~given~in~definition~of~key~'#1'. }
- {
- \c_msg_coding_error_text_tl
- Inside~\keys_define:nn each~key~name~
- needs~a~property: \\ \\
- \iow_indent:n { #1 .<property> } \\ \\
- LaTeX~did~not~find~a~'.'~to~indicate~the~start~of~a~property.
- }
-\__msg_kernel_new:nnnn { kernel } { key-unknown }
- { The~key~'#1'~is~unknown~and~is~being~ignored. }
- {
- The~module~'#2'~does~not~have~a~key~called~#1'.\\
- Check~that~you~have~spelled~the~key~name~correctly.
- }
-\__msg_kernel_new:nnnn { kernel } { property-requires-value }
- { The~property~'#1'~requires~a~value. }
- {
- \c_msg_coding_error_text_tl
- LaTeX~was~asked~to~set~property~'#1'~for~key~'#2'.\\
- No~value~was~given~for~the~property,~and~one~is~required.
- }
-\__msg_kernel_new:nnnn { kernel } { property-unknown }
- { The~key~property~'#1'~is~unknown. }
- {
- \c_msg_coding_error_text_tl
- LaTeX~has~been~asked~to~set~the~property~'#1'~for~key~'#2':~
- this~property~is~not~defined.
- }
-\__msg_kernel_new:nnnn { kernel } { value-forbidden }
- { The~key~'#1'~does~not~taken~a~value. }
- {
- The~key~'#1'~should~be~given~without~a~value.\\
- LaTeX~will~ignore~the~given~value~'#2'.
- }
-\__msg_kernel_new:nnnn { kernel } { value-required }
- { The~key~'#1'~requires~a~value. }
- {
- The~key~'#1'~must~have~a~value.\\
- No~value~was~present:~the~key~will~be~ignored.
- }
-\cs_new_protected:Npn \__keys_choice_code_store:n #1
- {
- \cs_if_exist:cF
- { \c__keys_info_root_tl \l_keys_path_tl .choice~code }
- {
- \tl_new:c
- { \c__keys_info_root_tl \l_keys_path_tl .choice~code }
- }
- \tl_set:cn { \c__keys_info_root_tl \l_keys_path_tl .choice~code }
- {#1}
- }
-\cs_generate_variant:Nn \__keys_choice_code_store:n { x }
-\cs_new_protected:cpn { \c__keys_props_root_tl .choice_code:n } #1
- { \__keys_choice_code_store:n {#1} }
-\cs_new_protected:cpn { \c__keys_props_root_tl .choice_code:x } #1
- { \__keys_choice_code_store:x {#1} }
-\cs_new_protected:Npn \__keys_choices_generate:n #1
- {
- \cs_if_exist:cTF
- { \c__keys_info_root_tl \l_keys_path_tl .choice~code }
- {
- \__keys_choice_make:
- \int_zero:N \l_keys_choice_int
- \clist_map_function:nN {#1} \__keys_choices_generate_aux:n
- }
- {
- \__msg_kernel_error:nnx { kernel }
- { generate-choices-before-code } { \l_keys_path_tl }
- }
- }
-\cs_new_protected:Npn \__keys_choices_generate_aux:n #1
- {
- \int_incr:N \l_keys_choice_int
- \__keys_cmd_set:nx { \l_keys_path_tl / #1 }
- {
- \tl_set:Nn \exp_not:N \l_keys_choice_tl {#1}
- \int_set:Nn \exp_not:N \l_keys_choice_int
- { \int_use:N \l_keys_choice_int }
- \exp_not:v
- { \c__keys_info_root_tl \l_keys_path_tl .choice~code }
- }
- }
-\__msg_kernel_new:nnnn { kernel } { generate-choices-before-code }
- { No~code~available~to~generate~choices~for~key~'#1'. }
- {
- \c_msg_coding_error_text_tl
- Before~using~.generate_choices:n~the~code~should~be~defined~
- with~'.choice_code:n'~or~'.choice_code:x'.
- }
-\cs_new_protected:cpn { \c__keys_props_root_tl .generate_choices:n } #1
- { \__keys_choices_generate:n {#1} }
-%%
-%%
-%% End of file `l3keys.sty'.