diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r-- | Master/texmf-dist/tex/latex/knowledge/knowledge.sty | 70 |
1 files changed, 37 insertions, 33 deletions
diff --git a/Master/texmf-dist/tex/latex/knowledge/knowledge.sty b/Master/texmf-dist/tex/latex/knowledge/knowledge.sty index e575f417c54..991e6a7dc6e 100644 --- a/Master/texmf-dist/tex/latex/knowledge/knowledge.sty +++ b/Master/texmf-dist/tex/latex/knowledge/knowledge.sty @@ -23,7 +23,7 @@ %% LaTeX version 1999/12/01 or later. %% \usepackage{expl3} -\ProvidesExplPackage{knowledge}{2018/05/17}{1.11}{} +\ProvidesExplPackage{knowledge}{2018/07/26}{1.12}{} %%%%%%%%%% \RequirePackage{l3keys2e} \RequirePackage{etoolbox} @@ -42,16 +42,19 @@ {\tl_set_eq:Nc\c_sys_jobname_str{c_job_name_tl}} \cs_new:Nn\tl_new:Nn {\tl_new:N#1 + \tl_set:Nn#1{#2}} +\cs_new:Nn\tl_gnew:Nn + {\tl_new:N#1 \tl_gset:Nn#1{#2}} \cs_new:Nn\tl_new_eq:NN {\tl_new:N#1 - \tl_gset_eq:NN#1#2} + \tl_set_eq:NN#1#2} \cs_new:Nn\bool_new_true:N {\bool_new:N#1 - \bool_gset_true:N#1} + \bool_set_true:N#1} \cs_new:Nn\bool_new_false:N {\bool_new:N#1 - \bool_gset_false:N#1} + \bool_set_false:N#1} \cs_new:Nn\bool_set_text:Nn {\use:c{bool_set_#2:N}#1} \cs_generate_variant:Nn\tl_new:Nn{Nx,cn,cx} @@ -162,11 +165,11 @@ \kaux_posttreatment_tl } \NewDocumentCommand\KAuxBefore{m} - {\tl_put_right:Nn\kaux_pretreatment_tl{#1}} + {\tl_gput_right:Nn\kaux_pretreatment_tl{#1}} \NewDocumentCommand\KAuxAfter{m} - {\tl_put_right:Nn\kaux_posttreatment_tl{#1}} + {\tl_gput_right:Nn\kaux_posttreatment_tl{#1}} \NewDocumentCommand\KAuxInit{m} - {\tl_put_right:Nn\kaux_inittreatment_tl{#1}} + {\tl_gput_right:Nn\kaux_inittreatment_tl{#1}} \tl_new:N\kaux_pretreatment_tl \tl_gset:Nn\kaux_pretreatment_tl{} \tl_new:N\kaux_posttreatment_tl @@ -920,7 +923,7 @@ \KnowledgeConfigureBooleanOptionTF[\knowledge_configuration_quotation_bool]{quotation}{\klactivatequotation}{\kldeactivatequotation} \KnowledgeConfigureTrigger{protect~quotation}{\kl_protect_environment_quotation:n{#1}} \bool_new:N\knowledge_configuration_diagnoseline_bool -\bool_gset_false:N\knowledge_configuration_diagnoseline_bool +\bool_set_false:N\knowledge_configuration_diagnoseline_bool \KnowledgeConfigureBooleanOption[\knowledge_configuration_diagnoseline_bool]{diagnose~line} \bool_new:N\knowledge_configuration_visibleAP_bool \KnowledgeConfigureBooleanOption[\knowledge_configuration_visibleAP_bool]{visible~anchor~points}\KnowledgeConfigureBooleanOption[\knowledge_configuration_visibleAP_bool]{visible~AP} @@ -1213,11 +1216,12 @@ {\msg_error:nn{scope}{no~popping~here}}}} \cs_new:Nn\scope_internal_pop: { \use:c{\scope_tl.area[\scope_top_area_tl].popcode_tl} - \seq_gpop:NNTF\scope_instances_stack_seq\scope_top_instance_tl - {\int_gdecr:c{\scope_tl.area[\scope_top_area_tl].nesting_int} + \seq_gpop:NNTF\scope_instances_stack_seq\l_tmpa_tl + {\tl_gset_eq:NN\scope_top_instance_tl\l_tmpa_tl + \int_gdecr:c{\scope_tl.area[\scope_top_area_tl].nesting_int} \exp_args:NV\knowledge_pop_visible_instances_to:n\scope_top_instance_tl - \seq_get:NN\scope_instances_stack_seq\scope_top_instance_tl - \tl_gset_eq:NN\scope_top_instance_tl\scope_top_instance_tl + \seq_get:NN\scope_instances_stack_seq\l_tmpa_tl + \tl_gset_eq:NN\scope_top_instance_tl\l_tmpa_tl \tl_gset:Nx\scope_top_area_tl {\tl_use:c{\scope_tl.instance[\scope_top_instance_tl].area_tl}}} {\msg_error:nnn{scope}{empty~pop}{}} @@ -1314,7 +1318,7 @@ {\tl_gset_eq:NN\scope_top_instance_tl\scope_top_area_tl} % \exp_args:Nx\knowledge_push_visible_instance:n{\scope_top_instance_tl} - \seq_push:Nx\scope_instances_stack_seq{\scope_top_instance_tl} + \seq_gpush:Nx\scope_instances_stack_seq{\scope_top_instance_tl} % \tl_new:c {\scope_tl.instance[\scope_top_instance_tl].area_tl} @@ -1330,7 +1334,7 @@ \seq_if_exist:cTF{\scopept_tl.instance[\l_tmpa_tl].context_seq} {\seq_set_eq:Nc\l_tmpa_seq{\scopept_tl.instance[\l_tmpa_tl].context_seq}} {\seq_clear_new:N\l_tmpa_seq} - \exp_args:NNx\seq_gpush:Nn + \exp_args:NNx\seq_push:Nn \l_tmpa_seq{\scope_top_instance_tl} \seq_new:c {\scopept_tl.instance[\scope_top_instance_tl].context_seq} @@ -1411,7 +1415,7 @@ \NewDocumentCommand\scopeLabel{m} { \kl_hide_begin: \scope_get_labelizable_instance:N\l_tmpb_tl - \KAuxWriteX*{\exp_not:n{\KAuxScopeLabel}{#1}{\l_tmpb_tl}} + \KAuxWriteX*{\exp_not:n{\KAuxScopeLabel}{\exp_not:n{#1}}{\l_tmpb_tl}} %\tl_new:cx{\scopept_tl.label[#1].instance_tl}{\l_tmpb_tl} \kl_hide_end: \cs_if_exist:NTF\LaTeXlabel\LaTeXlabel\use_none:n{#1}} @@ -1427,8 +1431,8 @@ \NewKAuxCommand\KAuxScopeLabel{mm} {Package~scope:~Links~a~label~to~the~scope~of~its~definition.} \DeclareKAuxPhaseCommand\KAuxScopeLabel{init} - {\tl_if_exist:cTF{\scopept_tl.label[#1].instance_tl}{} - {\tl_new:cn{\scopept_tl.label[#1].instance_tl}{#2}}} + {\tl_if_exist:cTF{\scopept_tl.label[\tl_to_str:n{#1}].instance_tl}{} + {\tl_new:cn{\scopept_tl.label[\tl_to_str:n{#1}].instance_tl}{#2}}} \cs_new:Npn\scopept_label_instance_if_exist:nTF#1 {\tl_if_exist:cTF{\scopept_tl.label[#1].instance_tl}} \cs_new:Nn\scopept_label_instance_use:n @@ -1545,12 +1549,12 @@ \cs_new:Nn\knowledge_diagnose_line: {\bool_if:NT\knowledge_configuration_diagnoseline_bool - {\tl_set:Nx\g_tmpa_tl + {\tl_set:Nx\l_tmpa_tl {\c_percent_str\space\kauxCurrentFile : \kauxCurrentLine} - \tl_if_eq:NNTF\g_tmpa_tl\knowledge_diagnose_lastline_tl + \tl_if_eq:NNTF\l_tmpa_tl\knowledge_diagnose_lastline_tl {} - {\tl_gset_eq:NN\knowledge_diagnose_lastline_tl\g_tmpa_tl - \knowledge_diagnose:V\g_tmpa_tl}}} + {\tl_gset_eq:NN\knowledge_diagnose_lastline_tl\l_tmpa_tl + \knowledge_diagnose:V\knowledge_diagnose_lastline_tl}}} \NewDocumentCommand\KnowledgeDiagnoseOutput{}{ \iow_open:Nn\knowledge_diagnosefile_iow{\c_sys_jobname_str.diagnose} @@ -1745,10 +1749,10 @@ \cs_new:Nn\knowledge_push_visible_instance:n {\seq_gpush:Nn\knowledge_visible_instances_seq{#1}} \cs_new:Npn\knowledge_pop_visible_instance: - {\seq_gpop:NN\knowledge_visible_instances_seq\g_tmpa_tl} + {\seq_gpop:NN\knowledge_visible_instances_seq\l_tmpa_tl} \cs_new:Nn\knowledge_pop_visible_instances_to:n - {\seq_gpop:NNTF\knowledge_visible_instances_seq\g_tmpa_tl - {\exp_args:NV\tl_if_eq:nnTF\g_tmpa_tl{#1} + {\seq_gpop:NNTF\knowledge_visible_instances_seq\l_tmpa_tl + {\exp_args:NV\tl_if_eq:nnTF\l_tmpa_tl{#1} {} {\knowledge_pop_visible_instances_to:n{#1}}} {\INTERNAL_ERROR_EMPTY_POP_VISIBLE}} @@ -2001,15 +2005,15 @@ \tl_clear_new:N\knowledge_kl_display_process_tl \tl_clear_new:N\knowledge_kl_display_sequence_tl \tl_new:N\knowledge_namespace_tl -\tl_new:Nn\knowledge_display_code_tl{INTERNAL~ERROR~DISPLAY~CODE} +\tl_gnew:Nn\knowledge_display_code_tl{INTERNAL~ERROR~DISPLAY~CODE} \NewDocumentCommand\klTKS{}{\knowledge_klTKS:nnn} \cs_new:Nn\knowledge_klTKS:nnn{ \group_begin: % - \tl_set:Nn\knowledge_kl_linkscope_tl{#3} + \tl_set:Nx\knowledge_kl_linkscope_tl{\tl_to_str:n{#3}} \tl_set:Nn\knowledge_kl_instance_tl{} \tl_set:Nn\knowledge_kl_text_tl{#1} - \tl_set:Nn\knowledge_kl_base_key_tl{#2} + \tl_set:Nx\knowledge_kl_base_key_tl{\tl_to_str:n{#2}} \tl_set_eq:NN\knowledge_kl_key_tl\knowledge_kl_base_key_tl \int_set_eq:NN\knowledge_kl_recursion_int\knowledge_kl_max_recursion_int % @@ -2558,15 +2562,15 @@ {\tl_gset_eq:NN\knowledge_display_code_tl\knowledge_kl_forcedtext_tl} {\tl_gset_eq:NN\knowledge_display_code_tl\knowledge_kl_text_tl} \bool_if:NT\kl_detokenize_bool - {\tl_set:Nx\knowledge_display_code_tl + {\tl_gset:Nx\knowledge_display_code_tl {\tl_to_str:V\knowledge_display_code_tl}} \bool_if:NT\kl_removespace_bool {\tl_remove_all:Nn\knowledge_display_code_tl{~}} \bool_if:NT\kl_lowercase_bool - {\tl_set:Nx\knowledge_display_code_tl + {\tl_gset:Nx\knowledge_display_code_tl {\exp_args:NV\tl_lower_case:n\knowledge_display_code_tl}} \bool_if:NT\kl_uppercase_bool - {\tl_set:Nx\knowledge_display_code_tl + {\tl_gset:Nx\knowledge_display_code_tl {\exp_args:NV\tl_upper_case:n\knowledge_display_code_tl}} % \tl_if_empty:NTF\knowledge_kl_wrap_tl @@ -2954,10 +2958,10 @@ \makeatother \bool_if:NF\knowledge_option_composition_bool {\bool_if:NF\knowledge_option_paper_bool} - {\bool_gset_true:N\knowledge_option_composition_bool} + {\bool_set_true:N\knowledge_option_composition_bool} \bool_if:NT\knowledge_option_composition_bool {\bool_if:NT\knowledge_option_paper_bool} - {\bool_gset_false:N\knowledge_option_composition_bool} + {\bool_set_false:N\knowledge_option_composition_bool} \DeclareExpandableDocumentCommand\IfKnowledgeCompositionModeTF{} {\bool_if:NTF\knowledge_option_composition_bool} @@ -3029,7 +3033,7 @@ \knowledgevariantmodifier{\reintro*\kl}{\reintro} \ExplSyntaxOn -\tl_gset_eq:NN\knowledge_kl_namespace_tl\knowledge_default_namespace_tl +\tl_set_eq:NN\knowledge_kl_namespace_tl\knowledge_default_namespace_tl \newcommand\robustdisplay[1] {\expandafter\use:n%\tl_trim_spaces:n \expandafter{\tl_to_str:n{#1}}} |