diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/knowledge/knowledge.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/knowledge/knowledge.sty | 78 |
1 files changed, 34 insertions, 44 deletions
diff --git a/Master/texmf-dist/tex/latex/knowledge/knowledge.sty b/Master/texmf-dist/tex/latex/knowledge/knowledge.sty index a040cc7fc42..b566866f7fa 100644 --- a/Master/texmf-dist/tex/latex/knowledge/knowledge.sty +++ b/Master/texmf-dist/tex/latex/knowledge/knowledge.sty @@ -23,7 +23,7 @@ %% %%%%%%%%%% \usepackage{expl3} -\ProvidesExplPackage{knowledge}{2017/06/08}{1.0}{first release} +\ProvidesExplPackage{knowledge}{2017/06/11}{v1.01}{} \RequirePackage{l3keys2e} \RequirePackage{etoolbox} \RequirePackage[log-declarations=false]{xparse} @@ -38,14 +38,12 @@ \cs_new:Nn\knowledge_end_module: {} -\NeedsTeXFormat{LaTeX2e}[1999/12/01] -\ProvidesPackage{knowledgeutils} - [2016/02/26 v2.0 first codes of the new version] \usepackage{xparse} \usepackage{currfile} -\ExplSyntaxOn -\tl_if_exist:cF{c_job_name_tl} - {\tl_set_eq:NN\c_job_name_tl\c_sys_jobname_str} +\tl_if_exist:NTF + \c_sys_jobname_str + {} + {\tl_set_eq:Nc\c_sys_jobname_str{c_job_name_tl}} \cs_new_protected:Nn\cs_new_protected_with_variants:Nnn {\cs_new_protected:Nn#1{#3} \cs_generate_variant:Nn#1{#2}} @@ -145,7 +143,7 @@ \tl_gclear:N\kaux_pretreatment_tl \iow_open:Nn \knowledge_kaux_iow - {\c_job_name_tl.kaux} + {\c_sys_jobname_str.kaux} \KAuxWrite*{} \kaux_inittreatment_tl \tl_gclear:N\kaux_inittreatment_tl @@ -257,14 +255,14 @@ \bool_new:N\kaux_can_be_used_bool \bool_gset_false:N\kaux_can_be_used_bool -\file_if_exist:nT{\c_job_name_tl.aux} -{\file_if_exist:nT{\c_job_name_tl.kaux} +\file_if_exist:nT{\c_sys_jobname_str.aux} +{\file_if_exist:nT{\c_sys_jobname_str.kaux} {\bool_gset_true:N\kaux_can_be_used_bool}} \NewDocumentCommand\KAuxProcess{m} { \bool_if:NT\kaux_can_be_used_bool {\ActivateKAuxPhase{#1} - \input{\c_job_name_tl.kaux}}} + \input{\c_sys_jobname_str.kaux}}} \cs_new:Nn\cell_new_type:nnn { \cs_new:cn{#1_id:#2}{#3} @@ -738,9 +736,6 @@ {\tl_map_function:nN{#1}\kutils_latex_to_vault:N} \cs_new:Nn\kutils_latex_to_obsolete:n {\tl_map_function:nN{#1}\kutils_latex_to_obsolete:N} -\NeedsTeXFormat{LaTeX2e}[1999/12/01] -\ProvidesPackage{knowledge} - [2016/02/26 v2.0 first codes of the new version] %%%%%%%%%% \cs_set_eq:Nc\klparse_ifnextchar:NTF{@ifnextchar} @@ -1360,7 +1355,7 @@ \cs_generate_variant:Nn\knowledge_diagnose:n{x} \NewDocumentCommand\KnowledgeDiagnoseOutput{}{ - \iow_open:Nn\knowledge_diagnosefile_iow{\c_job_name_tl.diagnose} + \iow_open:Nn\knowledge_diagnosefile_iow{\c_sys_jobname_str.diagnose} % compute first the list of warnings and important information \KAuxProcess{diagnose~digest} % @@ -2226,34 +2221,33 @@ autoref .code:n = {\catcode`"12\relax} \let\quotationmark" - +\ExplSyntaxOn \makequotationactive -\makeatletter -\NewDocumentCommand\klactivequotationmark{} - {\@ifnextchar"% - \klactivequotationmarkdouble - \klactivequotationmarksimple} -\def \introabsorbquote - {\@ifnextchar"\@gobble\kl@errordoublequotemissing} +\edef\klactivequotationmark#1"{ + \noexpand\tl_if_empty:nTF{#1} + {\noexpand\klactivedoublequotationmark} + {\noexpand\klquotation_parse_arobas_sep:Nw + \noexpand\klquotation_expand:nnn #1 + @\klparse_novalue_tl + @\klparse_novalue_tl + @\noexpand\kl_end} +} +\edef\klactivedoublequotationmark#1""{ + \noexpand\klquotation_parse_arobas_sep:Nw + \noexpand\kldoublequotation_expand:nnn #1 + @\klparse_novalue_tl + @\klparse_novalue_tl + @\noexpand\kl_end +} +\cs_new:Npx\klquotation_parse_arobas_sep:Nw #1#2@#3@#4@#5\kl_end + {#1{#2}{#3}{#4}} -\makeatother +\cs_set_eq:NN\tl_if_novalue:nTF\IfNoValueTF -\edef\klactivequotationmarksimple#1"% - {\noexpand\klquotationparseinternal#1\noexpand @% - \csname klparse_novalue_tl\endcsname\noexpand @% - \csname klparse_novalue_tl\endcsname\noexpand @% - \noexpand\klendmarker} -\edef\klactivequotationmarkdouble"#1"% - {\noexpand\introquotationparseinternal#1\noexpand @% - \csname klparse_novalue_tl\endcsname\noexpand @% - \csname klparse_novalue_tl\endcsname\noexpand @% - \noexpand\klendmarker - \noexpand\introabsorbquote} - -\def\klquotationparseinternal#1@#2@#3@#4\klendmarker - {\IfNoValueTF{#2}{\kl{#1}}{\kl[{#2}]{#1}}} -\def\introquotationparseinternal#1@#2@#3@#4\klendmarker - {\IfNoValueTF{#2}{\intro{#1}}{\intro[{#2}]{#1}}} +\cs_new:Nn\kldoublequotation_expand:nnn + {\tl_if_novalue:nTF{#2}{\intro{#1}}{\intro[{#2}]{#1}}} +\cs_new:Nn\klquotation_expand:nnn + {\tl_if_novalue:nTF{#2}{\kl{#1}}{\kl[{#2}]{#1}}} \def\klactivatequotation {\makequotationactive @@ -2262,7 +2256,6 @@ autoref .code:n = {\makequotationletter} \kldeactivatequotation -\ExplSyntaxOn \cs_new:Nn\kl_protect_environment_quotation:n {\clist_map_inline:nn{#1} {\scope_area_set:nn{#1} @@ -2510,9 +2503,6 @@ autoref .code:n = \exp_args:NNV\ExplSyntaxOff\knowledgeconfigure\knowledge_configuration_pending_tl \ScopeActivate -\NeedsTeXFormat{LaTeX2e}[1999/12/01] -\ProvidesPackage{scopearticle} - [2016/02/26 v2.0 first codes of the new version] \ExplSyntaxOn \knowledge_begin_module_if:N\knowledge_option_scope_bool \scope_area_set:nn{base} |