diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/knowledge')
-rw-r--r-- | Master/texmf-dist/source/latex/knowledge/knowledge-code.dtx | 64 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/knowledge/knowledge-utils.dtx | 15 |
2 files changed, 44 insertions, 35 deletions
diff --git a/Master/texmf-dist/source/latex/knowledge/knowledge-code.dtx b/Master/texmf-dist/source/latex/knowledge/knowledge-code.dtx index 1828e3d2aa6..44378e07573 100644 --- a/Master/texmf-dist/source/latex/knowledge/knowledge-code.dtx +++ b/Master/texmf-dist/source/latex/knowledge/knowledge-code.dtx @@ -23,7 +23,7 @@ % % \iffalse %<head>\usepackage{expl3} -%<head>\ProvidesExplPackage{knowledge}{2018/05/17}{1.11}{} +%<head>\ProvidesExplPackage{knowledge}{2018/07/26}{1.12}{} %<*driver> \def\knowledgecode{active} \input{knowledge.tex} @@ -44,6 +44,7 @@ % \changes{1.09}{2017/10/31}{minor changes} % % \changes{1.10}{2018/02/17}{bug fixes} % % \changes{1.11}{2018/05/17}{bug fixes} % +% \changes{1.12}{2018/07/26}{bug fixes} % % \GetFileInfo{knowledge.sty} % % \DoNotIndex{} % @@ -63,8 +64,8 @@ This directory contains the package name: knowledge license: LaTeX Project Public License version 1.2 or above - version: v1.11 - date: 2018/05/17 + version: v1.12 + date: 2018/07/26 author: Thomas Colcombet mail: thomas.colcombet@irif.fr web: https://www.irif.fr/~colcombe/knowledge_en.html @@ -408,9 +409,10 @@ Content of the file knowledge-sources.zip: \KnowledgeConfigureTrigger{protect~quotation}{\kl_protect_environment_quotation:n{#1}} % \end{macrocode} % +% Activates or deactivates the line numbering in the "diagnose file". % \begin{macrocode} \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} % \end{macrocode} % @@ -955,11 +957,12 @@ Content of the file knowledge-sources.zip: % \begin{macrocode} \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}{}} @@ -1065,7 +1068,7 @@ Content of the file knowledge-sources.zip: {\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} @@ -1081,7 +1084,7 @@ Content of the file knowledge-sources.zip: \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} @@ -1201,7 +1204,7 @@ Content of the file knowledge-sources.zip: \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}} @@ -1230,8 +1233,8 @@ Content of the file knowledge-sources.zip: \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}}} % \end{macrocode} % \begin{macrocode} \cs_new:Npn\scopept_label_instance_if_exist:nTF#1 @@ -1382,6 +1385,9 @@ Content of the file knowledge-sources.zip: % % \subsubsection{Diagnose file} % +% \csintro{\knowledge_diagnose_lastline_tl} contains the text +% of the last line that has been diagnosed. If it did not change, it will +% not be output again. % \begin{macrocode} \iow_new:N\knowledge_diagnosefile_iow \cs_new:Nn\knowledge_diagnose:n @@ -1395,12 +1401,12 @@ Content of the file knowledge-sources.zip: \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} @@ -1760,10 +1766,10 @@ Content of the file knowledge-sources.zip: \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}} @@ -2109,7 +2115,7 @@ Content of the file knowledge-sources.zip: \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} % \end{macrocode} % \begin{macrocode} \NewDocumentCommand\klTKS{}{\knowledge_klTKS:nnn} @@ -2118,10 +2124,10 @@ Content of the file knowledge-sources.zip: \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 % @@ -2883,15 +2889,15 @@ Content of the file knowledge-sources.zip: {\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 @@ -3425,10 +3431,10 @@ Content of the file knowledge-sources.zip: % \begin{macrocode} \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{} @@ -3513,7 +3519,7 @@ Content of the file knowledge-sources.zip: % \subsubsection{Basic configuration} % % \begin{macrocode} -\tl_gset_eq:NN\knowledge_kl_namespace_tl\knowledge_default_namespace_tl +\tl_set_eq:NN\knowledge_kl_namespace_tl\knowledge_default_namespace_tl % \end{macrocode} % % \begin{macrocode} diff --git a/Master/texmf-dist/source/latex/knowledge/knowledge-utils.dtx b/Master/texmf-dist/source/latex/knowledge/knowledge-utils.dtx index 9e8ede9bd8b..af2d372a40d 100644 --- a/Master/texmf-dist/source/latex/knowledge/knowledge-utils.dtx +++ b/Master/texmf-dist/source/latex/knowledge/knowledge-utils.dtx @@ -113,16 +113,19 @@ % \begin{macrocode} \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} @@ -332,11 +335,11 @@ % code to be executed before the opening, at the beginning and after the writing of the KAUX file. % \begin{macrocode} \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}} % \end{macrocode} % \begin{macrocode} \tl_new:N\kaux_pretreatment_tl |