diff options
author | Karl Berry <karl@freefriends.org> | 2017-12-06 23:56:06 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-12-06 23:56:06 +0000 |
commit | cc862e582aa0dd7c0dee16bb5475394338a07641 (patch) | |
tree | b03dbc5b6657d47f5c61b8fcc26f04a564ad6afd /Master/texmf-dist/tex | |
parent | 7ffad570b11726b0ca150867d23878fc1a949865 (diff) |
l3 (7dec17)
git-svn-id: svn://tug.org/texlive/trunk@46003 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
42 files changed, 1278 insertions, 894 deletions
diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex b/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex index a4bfbf009c9..08d62f4eab5 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex +++ b/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex @@ -56,13 +56,13 @@ %% 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 +%% https://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. %% %% File: expl3.dtx Copyright (C) 1990-2017 The LaTeX3 Project -\def\ExplFileDate{2017/11/14}% +\def\ExplFileDate{2017/12/05}% \begingroup \def\next{\endgroup}% \expandafter\ifx\csname PackageError\endcsname\relax @@ -1547,10 +1547,34 @@ } \__debug:TF { + \cs_set_nopar:Npn \l__debug_suspended_tl { } + \cs_set_protected:Npn \debug_suspend: + { + \tl_put_right:Nn \l__debug_suspended_tl { . } + \cs_set_eq:NN \__debug_suspended:T \use:n + } + \cs_set_protected:Npn \debug_resume: + { + \tl_set:Nx \l__debug_suspended_tl + { \tl_tail:N \l__debug_suspended_tl } + \tl_if_empty:NT \l__debug_suspended_tl + { + \cs_set_eq:NN \__debug_suspended:T \use_none:n + } + } + \cs_set:Npn \__debug_suspended:T #1 { } + } + { + \cs_set_protected:Npn \debug_suspend: { } + \cs_set_protected:Npn \debug_resume: { } + } +\__debug:TF + { \exp_args:Nc \cs_set_protected:Npn { __debug_check-declarations_on: } { \cs_set_protected:Npn \__debug_chk_var_exist:N ##1 { + \__debug_suspended:T \use_none:nnn \cs_if_exist:NF ##1 { \__msg_kernel_error:nnx { kernel } { non-declared-variable } @@ -1559,17 +1583,38 @@ } \cs_set_protected:Npn \__debug_chk_cs_exist:N ##1 { + \__debug_suspended:T \use_none:nnn \cs_if_exist:NF ##1 { \__msg_kernel_error:nnx { kernel } { command-not-defined } { \token_to_str:N ##1 } } } + \cs_set_protected:Npn \__debug_chk_var_scope:NN + { + \__debug_suspended:T \use_none:nnn + \__debug_chk_var_scope_aux:NN + } + \cs_set_protected:Npn \__debug_chk_var_local:N ##1 + { + \__debug_suspended:T \use_none:nnnnn + \__debug_chk_var_exist:N ##1 + \__debug_chk_var_scope_aux:NN l ##1 + } + \cs_set_protected:Npn \__debug_chk_var_global:N ##1 + { + \__debug_suspended:T \use_none:nnnnn + \__debug_chk_var_exist:N ##1 + \__debug_chk_var_scope_aux:NN g ##1 + } } \exp_args:Nc \cs_set_protected:Npn { __debug_check-declarations_off: } { \cs_set_protected:Npn \__debug_chk_var_exist:N ##1 { } \cs_set_protected:Npn \__debug_chk_cs_exist:N ##1 { } + \cs_set_protected:Npn \__debug_chk_var_local:N ##1 { } + \cs_set_protected:Npn \__debug_chk_var_global:N ##1 { } + \cs_set_protected:Npn \__debug_chk_var_scope:NN ##1##2 { } } \cs_set_protected:Npn \__debug_chk_cs_exist:c { \exp_args:Nc \__debug_chk_cs_exist:N } @@ -1582,10 +1627,41 @@ { } \__debug:TF { + \cs_set_protected:Npn \__debug_chk_var_scope_aux:NN #1#2 + { \exp_args:NNf \__debug_chk_var_scope_aux:Nn #1 { \cs_to_str:N #2 } } + \cs_set_protected:Npn \__debug_chk_var_scope_aux:Nn #1#2 + { + \if:w _ \use_i:nn \use_i_delimit_by_q_stop:nw #2 ? ? \q_stop + \exp_after:wN \__debug_chk_var_scope_aux:NNn + \use_i_delimit_by_q_stop:nw #2 ? \q_stop + #1 {#2} + \else: + \exp_args:Nc \__debug_chk_var_scope_aux:NNn + { __debug_chk_/ #2 } + #1 {#2} + \fi: + } + \cs_set_protected:Npn \__debug_chk_var_scope_aux:NNn #1#2#3 + { + \if:w #1 #2 + \else: + \if:w #1 \scan_stop: + \cs_gset_nopar:Npn #1 {#2} + \else: + \__msg_kernel_error:nnxxx { kernel } { local-global } + {#1} {#2} { \iow_char:N \\ #3 } + \fi: + \fi: + } + } + { } +\__debug:TF + { \exp_args:Nc \cs_set_protected:Npn { __debug_check-expressions_on: } { \cs_set:Npn \__debug_chk_expr:nNnN ##1##2 { + \__debug_suspended:T { ##1 \use_none:nnnnnnn } \exp_after:wN \__debug_chk_expr_aux:nNnN \exp_after:wN { \tex_the:D ##2 ##1 \tex_relax:D } ##2 @@ -1614,26 +1690,11 @@ { \exp_args:Nc \cs_set_protected:Npn { __debug_log-functions_on: } { - \cs_set_protected:Npn \__debug_log:x { \iow_log:x } - \cs_set_protected:Npn \__debug_suspend_log: - { - \cs_set_protected:Npx \__debug_resume_log: - { - \cs_set_protected:Npn \__debug_resume_log: - { \exp_not:o { \__debug_resume_log: } } - \cs_set_protected:Npn \__debug_log:x - { \exp_not:o { \__debug_log:x } } - } - \cs_set_protected:Npn \__debug_log:x { \use_none:n } - } - \cs_set_protected:Npn \__debug_resume_log: { } + \cs_set_protected:Npn \__debug_log:x + { \__debug_suspended:T \use_none:nn \iow_log:x } } \exp_args:Nc \cs_set_protected:Npn { __debug_log-functions_off: } - { - \cs_set_protected:Npn \__debug_log:x { \use_none:n } - \cs_set_protected:Npn \__debug_suspend_log: { } - \cs_set_protected:Npn \__debug_resume_log: { } - } + { \cs_set_protected:Npn \__debug_log:x { \use_none:n } } \tex_ifodd:D \l@expl@log@functions@bool \use:c { __debug_log-functions_on: } \else: @@ -1688,40 +1749,46 @@ \__debug:TF { \cs_set_protected:Npn \__debug_patch:nnNNpn #1#2#3#4#5# - { \__debug_patch_aux:nnNNnn {#1} {#2} #3 #4 {#5} } + { \__debug_patch_aux:nnnn {#1} {#2} { #3 #4 #5 } } \cs_set_protected:Npn \__debug_patch_conditional:nNNpnn #1#2#3#4# - { \__debug_patch_aux:nNNnnn {#1} #2 #3 {#4} } - \cs_set_protected:Npn \__debug_patch_aux:nnNNnn #1#2#3#4#5#6 - { #3 #4 #5 { #1 #6 #2 } } - \cs_set_protected:Npn \__debug_patch_aux:nNNnnn #1#2#3#4#5#6 - { #2 #3 #4 {#5} { #1 #6 } } + { \__debug_patch_auxii:nnnn {#1} { #2 #3 #4 } } + \cs_set_protected:Npn \__debug_patch_aux:nnnn #1#2#3#4 + { #3 { #1 #4 #2 } } + \cs_set_protected:Npn \__debug_patch_auxii:nnnn #1#2#3#4 + { #2 {#3} { #1 #4 } } } { \cs_set_protected:Npn \__debug_patch:nnNNpn #1#2 { } \cs_set_protected:Npn \__debug_patch_conditional:nNNpnn #1 { } } +\cs_set_protected:Npn \__debug_patch_args:nNNpn + { \__debug_patch_args:nnnNNpn { } { } } +\cs_set_protected:Npn \__debug_patch_conditional_args:nNNpnn + { \__debug_patch_conditional_args:nnnNNpnn { } { } } \__debug:TF { - \cs_set_protected:Npn \__debug_patch_args:nNNpn #1#2#3#4# - { \__debug_patch_args_aux:nNNnn {#1} #2 #3 {#4} } - \cs_set_protected:Npn \__debug_patch_conditional_args:nNNpnn #1#2#3#4# - { \__debug_patch_args_aux:nNNnnn {#1} #2 #3 {#4} } - \cs_set_protected:Npn \__debug_patch_args_aux:nNNnn #1#2#3#4#5 + \cs_set_protected:Npn \__debug_patch_args:nnnNNpn #1#2#3#4#5#6# + { \__debug_patch_args_aux:nnnNNnn {#1} {#2} {#3} #4 #5 {#6} } + \cs_set_protected:Npn \__debug_patch_conditional_args:nnnNNpnn #1#2#3#4#5#6# + { \__debug_patch_args_aux:nnnNNnnn {#1} {#2} {#3} #4 #5 {#6} } + \cs_set_protected:Npn \__debug_patch_args_aux:nnnNNnn #1#2#3#4#5#6#7 { - \cs_set:Npn \__debug_tmp:w #4 {#5} - \exp_after:wN \__debug_patch_aux:nnNNnn \exp_after:wN - { \__debug_tmp:w #1 } { } #2 #3 {#4} { } + \cs_set:Npn \__debug_tmp:w #6 {#7} + \exp_after:wN \__debug_patch_args_aux:nnnn \exp_after:wN + { \__debug_tmp:w #3 } { #4 #5 #6 } {#1} {#2} } - \cs_set_protected:Npn \__debug_patch_args_aux:nNNnnn #1#2#3#4#5#6 + \cs_set_protected:Npn \__debug_patch_args_aux:nnnNNnnn #1#2#3#4#5#6#7#8 { - \cs_set:Npn \__debug_tmp:w #4 {#6} - \exp_after:wN \__debug_patch_aux:nNNnnn \exp_after:wN - { \__debug_tmp:w #1 } #2 #3 {#4} {#5} { } + \cs_set:Npn \__debug_tmp:w #6 {#8} + \exp_after:wN \__debug_patch_args_aux:nnnn \exp_after:wN + { \__debug_tmp:w #3 } { #4 #5 #6 {#7} } {#1} {#2} } + \cs_set_protected:Npn \__debug_patch_args_aux:nnnn #1#2#3#4 + { #2 { #3 #1 #4 } } } { - \cs_set_protected:Npn \__debug_patch_args:nNNpn #1 { } - \cs_set_protected:Npn \__debug_patch_conditional_args:nNNpnn #1 { } + \cs_set_protected:Npn \__debug_patch_args:nnnNNpn #1#2#3 { } + \cs_set_protected:Npn \__debug_patch_conditional_args:nnnNNpnn #1#2#3 { } } \cs_set:Npn \prg_return_true: { \exp_after:wN \use_i:nn \exp:w } @@ -2107,7 +2174,7 @@ \exp_args:Nx \__cs_parm_from_arg_count_test:nnF { \exp_after:wN \exp_not:n - \if_case:w \__int_eval:w (#2) \__int_eval_end: + \if_case:w \__int_eval:n {#2} { } \or: { ##1 } \or: { ##1##2 } @@ -2267,31 +2334,47 @@ \cs_new:Npn \cs_if_eq:ccTF { \exp_args:Ncc \cs_if_eq:NNTF } \cs_new:Npn \cs_if_eq:ccT { \exp_args:Ncc \cs_if_eq:NNT } \cs_new:Npn \cs_if_eq:ccF { \exp_args:Ncc \cs_if_eq:NNF } -\cs_new_protected:Npn \__kernel_register_show:N #1 - { \exp_args:No \__kernel_register_show_aux:nN { \tex_the:D #1 } #1 } -\cs_new_protected:Npn \__kernel_register_show_aux:nN #1#2 +\cs_new_protected:Npn \__kernel_check_defined:NT #1#2 { - \__msg_show_variable:NNNnn #2 \cs_if_exist:NTF ? { } - { > ~ \token_to_str:N #2 = #1 } + \cs_if_exist:NTF #1 + {#2} + { + \__msg_kernel_error:nnx { kernel } { variable-not-defined } + { \token_to_str:N #1 } + } } +\cs_new_protected:Npn \__kernel_register_show:N + { \__kernel_register_show_aux:NN \tl_show:n } \cs_new_protected:Npn \__kernel_register_show:c { \exp_args:Nc \__kernel_register_show:N } \cs_new_protected:Npn \__kernel_register_log:N - { \__msg_log_next: \__kernel_register_show:N } + { \__kernel_register_show_aux:NN \tl_log:n } \cs_new_protected:Npn \__kernel_register_log:c { \exp_args:Nc \__kernel_register_log:N } -\cs_new_protected:Npn \cs_show:N #1 +\cs_new_protected:Npn \__kernel_register_show_aux:NN #1#2 + { + \__kernel_check_defined:NT #2 + { + \exp_args:No \__kernel_register_show_aux:nNN + { \tex_the:D #2 } #2 #1 + } + } +\cs_new_protected:Npn \__kernel_register_show_aux:nNN #1#2#3 + { \exp_args:No #3 { \token_to_str:N #2 = #1 } } +\cs_new_protected:Npn \cs_show:N { \__kernel_show:NN \tl_show:n } +\cs_new_protected:Npn \cs_show:c + { \group_begin: \exp_args:NNc \group_end: \cs_show:N } +\cs_new_protected:Npn \cs_log:N { \__kernel_show:NN \tl_log:n } +\cs_new_protected:Npn \cs_log:c + { \group_begin: \exp_args:NNc \group_end: \cs_log:N } +\cs_new_protected:Npn \__kernel_show:NN #1#2 { \group_begin: \int_set:Nn \tex_escapechar:D { `\\ } \exp_args:NNx \group_end: - \__msg_show_wrap:n { > ~ \token_to_str:N #1 = \cs_meaning:N #1 } + #1 { \token_to_str:N #2 = \cs_meaning:N #2 } } -\cs_new_protected:Npn \cs_show:c - { \group_begin: \exp_args:NNc \group_end: \cs_show:N } -\cs_new_protected:Npn \cs_log:N { \__msg_log_next: \cs_show:N } -\cs_new_protected:Npn \cs_log:c { \__msg_log_next: \cs_show:c } \cs_new_nopar:Npn \prg_do_nothing: { } \cs_new_eq:NN \__prg_break_point:Nn \use_ii:nn \cs_new:Npn \__prg_map_break:Nn #1#2#3 \__prg_break_point:Nn #4#5 @@ -2360,11 +2443,6 @@ \__msg_kernel_expandable_error:nnn { kernel } { bad-variable } {#2} \exp_end: } -\cs_new:Npn \exp_args:No #1#2 { \exp_after:wN #1 \exp_after:wN {#2} } -\cs_new:Npn \exp_args:NNo #1#2#3 - { \exp_after:wN #1 \exp_after:wN #2 \exp_after:wN {#3} } -\cs_new:Npn \exp_args:NNNo #1#2#3#4 - { \exp_after:wN #1 \exp_after:wN#2 \exp_after:wN #3 \exp_after:wN {#4} } \cs_new:Npn \exp_args:NNc #1#2#3 { \exp_after:wN #1 \exp_after:wN #2 \cs:w # 3\cs_end: } \cs_new:Npn \exp_args:Ncc #1#2#3 @@ -2376,6 +2454,11 @@ \cs:w #3 \exp_after:wN \cs_end: \cs:w #4 \cs_end: } +\cs_new:Npn \exp_args:No #1#2 { \exp_after:wN #1 \exp_after:wN {#2} } +\cs_new:Npn \exp_args:NNo #1#2#3 + { \exp_after:wN #1 \exp_after:wN #2 \exp_after:wN {#3} } +\cs_new:Npn \exp_args:NNNo #1#2#3#4 + { \exp_after:wN #1 \exp_after:wN#2 \exp_after:wN #3 \exp_after:wN {#4} } \cs_new:Npn \exp_args:Nf #1#2 { \exp_after:wN #1 \exp_after:wN { \exp:w \exp_end_continue_f:w #2 } } \cs_new:Npn \exp_args:Nv #1#2 @@ -2388,11 +2471,11 @@ \exp_after:wN #1 \exp_after:wN { \exp:w \__exp_eval_register:N #2 } } -\cs_new:Npn \exp_args:NNf #1#2#3 +\cs_new:Npn \exp_args:NNV #1#2#3 { \exp_after:wN #1 \exp_after:wN #2 - \exp_after:wN { \exp:w \exp_end_continue_f:w #3 } + \exp_after:wN { \exp:w \__exp_eval_register:N #3 } } \cs_new:Npn \exp_args:NNv #1#2#3 { @@ -2400,11 +2483,11 @@ \exp_after:wN #2 \exp_after:wN { \exp:w \__exp_eval_register:c {#3} } } -\cs_new:Npn \exp_args:NNV #1#2#3 +\cs_new:Npn \exp_args:NNf #1#2#3 { \exp_after:wN #1 \exp_after:wN #2 - \exp_after:wN { \exp:w \__exp_eval_register:N #3 } + \exp_after:wN { \exp:w \exp_end_continue_f:w #3 } } \cs_new:Npn \exp_args:Nco #1#2#3 { @@ -2412,6 +2495,18 @@ \cs:w #2 \exp_after:wN \cs_end: \exp_after:wN {#3} } +\cs_new:Npn \exp_args:NcV #1#2#3 + { + \exp_after:wN #1 + \cs:w #2 \exp_after:wN \cs_end: + \exp_after:wN { \exp:w \__exp_eval_register:N #3 } + } +\cs_new:Npn \exp_args:Ncv #1#2#3 + { + \exp_after:wN #1 + \cs:w #2 \exp_after:wN \cs_end: + \exp_after:wN { \exp:w \__exp_eval_register:c {#3} } + } \cs_new:Npn \exp_args:Ncf #1#2#3 { \exp_after:wN #1 @@ -2455,25 +2550,38 @@ } \cs_new_protected:Npn \exp_args:Nx { \::x \::: } \cs_new:Npn \exp_args:Nnc { \::n \::c \::: } -\cs_new:Npn \exp_args:Nfo { \::f \::o \::: } -\cs_new:Npn \exp_args:Nff { \::f \::f \::: } -\cs_new:Npn \exp_args:Nnf { \::n \::f \::: } \cs_new:Npn \exp_args:Nno { \::n \::o \::: } \cs_new:Npn \exp_args:NnV { \::n \::V \::: } +\cs_new:Npn \exp_args:Nnv { \::n \::v \::: } +\cs_new:Npn \exp_args:Nnf { \::n \::f \::: } +\cs_new:Npn \exp_args:Noc { \::o \::c \::: } \cs_new:Npn \exp_args:Noo { \::o \::o \::: } \cs_new:Npn \exp_args:Nof { \::o \::f \::: } -\cs_new:Npn \exp_args:Noc { \::o \::c \::: } +\cs_new:Npn \exp_args:NVo { \::V \::o \::: } +\cs_new:Npn \exp_args:Nfo { \::f \::o \::: } +\cs_new:Npn \exp_args:Nff { \::f \::f \::: } \cs_new_protected:Npn \exp_args:NNx { \::N \::x \::: } \cs_new_protected:Npn \exp_args:Ncx { \::c \::x \::: } \cs_new_protected:Npn \exp_args:Nnx { \::n \::x \::: } \cs_new_protected:Npn \exp_args:Nox { \::o \::x \::: } \cs_new_protected:Npn \exp_args:Nxo { \::x \::o \::: } \cs_new_protected:Npn \exp_args:Nxx { \::x \::x \::: } +\cs_new:Npn \exp_args:NNcf { \::N \::c \::f \::: } \cs_new:Npn \exp_args:NNno { \::N \::n \::o \::: } +\cs_new:Npn \exp_args:NNnV { \::N \::n \::V \::: } \cs_new:Npn \exp_args:NNoo { \::N \::o \::o \::: } +\cs_new:Npn \exp_args:NNVV { \::N \::V \::V \::: } +\cs_new:Npn \exp_args:Ncno { \::c \::n \::o \::: } +\cs_new:Npn \exp_args:NcnV { \::c \::n \::V \::: } +\cs_new:Npn \exp_args:Ncoo { \::c \::o \::o \::: } +\cs_new:Npn \exp_args:NcVV { \::c \::V \::V \::: } \cs_new:Npn \exp_args:Nnnc { \::n \::n \::c \::: } \cs_new:Npn \exp_args:Nnno { \::n \::n \::o \::: } +\cs_new:Npn \exp_args:Nnnf { \::n \::n \::f \::: } +\cs_new:Npn \exp_args:Nnff { \::n \::f \::f \::: } \cs_new:Npn \exp_args:Nooo { \::o \::o \::o \::: } +\cs_new:Npn \exp_args:Noof { \::o \::o \::f \::: } +\cs_new:Npn \exp_args:Nffo { \::f \::f \::o \::: } \cs_new_protected:Npn \exp_args:NNNx { \::N \::N \::x \::: } \cs_new_protected:Npn \exp_args:NNnx { \::N \::n \::x \::: } \cs_new_protected:Npn \exp_args:NNox { \::N \::o \::x \::: } @@ -2483,11 +2591,6 @@ \cs_new_protected:Npn \exp_args:Ncnx { \::c \::n \::x \::: } \cs_new_protected:Npn \exp_args:Noox { \::o \::o \::x \::: } \cs_new:Npn \__exp_arg_last_unbraced:nn #1#2 { #2#1 } -\cs_new:Npn \::f_unbraced \::: #1#2 - { - \exp_after:wN \__exp_arg_last_unbraced:nn - \exp_after:wN { \exp:w \exp_end_continue_f:w #2 } {#1} - } \cs_new:Npn \::o_unbraced \::: #1#2 { \exp_after:wN \__exp_arg_last_unbraced:nn \exp_after:wN {#2} {#1} } \cs_new:Npn \::V_unbraced \::: #1#2 @@ -2500,34 +2603,41 @@ \exp_after:wN \__exp_arg_last_unbraced:nn \exp_after:wN { \exp:w \__exp_eval_register:c {#2} } {#1} } +\cs_new:Npn \::f_unbraced \::: #1#2 + { + \exp_after:wN \__exp_arg_last_unbraced:nn + \exp_after:wN { \exp:w \exp_end_continue_f:w #2 } {#1} + } \cs_new_protected:Npn \::x_unbraced \::: #1#2 { \cs_set_nopar:Npx \l__exp_internal_tl { \exp_not:n {#1} #2 } \l__exp_internal_tl } +\cs_new:Npn \exp_last_unbraced:No #1#2 { \exp_after:wN #1 #2 } \cs_new:Npn \exp_last_unbraced:NV #1#2 { \exp_after:wN #1 \exp:w \__exp_eval_register:N #2 } \cs_new:Npn \exp_last_unbraced:Nv #1#2 { \exp_after:wN #1 \exp:w \__exp_eval_register:c {#2} } -\cs_new:Npn \exp_last_unbraced:No #1#2 { \exp_after:wN #1 #2 } \cs_new:Npn \exp_last_unbraced:Nf #1#2 { \exp_after:wN #1 \exp:w \exp_end_continue_f:w #2 } -\cs_new:Npn \exp_last_unbraced:Nco #1#2#3 - { \exp_after:wN #1 \cs:w #2 \exp_after:wN \cs_end: #3 } -\cs_new:Npn \exp_last_unbraced:NcV #1#2#3 +\cs_new:Npn \exp_last_unbraced:NNo #1#2#3 + { \exp_after:wN #1 \exp_after:wN #2 #3 } +\cs_new:Npn \exp_last_unbraced:NNV #1#2#3 { \exp_after:wN #1 - \cs:w #2 \exp_after:wN \cs_end: + \exp_after:wN #2 \exp:w \__exp_eval_register:N #3 } -\cs_new:Npn \exp_last_unbraced:NNV #1#2#3 +\cs_new:Npn \exp_last_unbraced:Nco #1#2#3 + { \exp_after:wN #1 \cs:w #2 \exp_after:wN \cs_end: #3 } +\cs_new:Npn \exp_last_unbraced:NcV #1#2#3 { \exp_after:wN #1 - \exp_after:wN #2 + \cs:w #2 \exp_after:wN \cs_end: \exp:w \__exp_eval_register:N #3 } -\cs_new:Npn \exp_last_unbraced:NNo #1#2#3 - { \exp_after:wN #1 \exp_after:wN #2 #3 } +\cs_new:Npn \exp_last_unbraced:NNNo #1#2#3#4 + { \exp_after:wN #1 \exp_after:wN #2 \exp_after:wN #3 #4 } \cs_new:Npn \exp_last_unbraced:NNNV #1#2#3#4 { \exp_after:wN #1 @@ -2535,19 +2645,19 @@ \exp_after:wN #3 \exp:w \__exp_eval_register:N #4 } -\cs_new:Npn \exp_last_unbraced:NNNo #1#2#3#4 - { \exp_after:wN #1 \exp_after:wN #2 \exp_after:wN #3 #4 } \cs_new:Npn \exp_last_unbraced:Nno { \::n \::o_unbraced \::: } \cs_new:Npn \exp_last_unbraced:Noo { \::o \::o_unbraced \::: } \cs_new:Npn \exp_last_unbraced:Nfo { \::f \::o_unbraced \::: } \cs_new:Npn \exp_last_unbraced:NnNo { \::n \::N \::o_unbraced \::: } +\cs_new:Npn \exp_last_unbraced:NNNNo #1#2#3#4#5 + { \exp_after:wN #1 \exp_after:wN #2 \exp_after:wN #3 \exp_after:wN #4 #5 } \cs_new_protected:Npn \exp_last_unbraced:Nx { \::x_unbraced \::: } \cs_new:Npn \exp_last_two_unbraced:Noo #1#2#3 { \exp_after:wN \__exp_last_two_unbraced:noN \exp_after:wN {#3} {#2} #1 } \cs_new:Npn \__exp_last_two_unbraced:noN #1#2#3 { \exp_after:wN #3 #2 #1 } -\cs_new:Npn \exp_not:o #1 { \etex_unexpanded:D \exp_after:wN {#1} } \cs_new:Npn \exp_not:c #1 { \exp_after:wN \exp_not:N \cs:w #1 \cs_end: } +\cs_new:Npn \exp_not:o #1 { \etex_unexpanded:D \exp_after:wN {#1} } \cs_new:Npn \exp_not:f #1 { \etex_unexpanded:D \exp_after:wN { \exp:w \exp_end_continue_f:w #1 } } \cs_new:Npn \exp_not:V #1 @@ -2560,11 +2670,13 @@ \etex_unexpanded:D \exp_after:wN { \exp:w \__exp_eval_register:c {#1} } } -\tex_catcode:D `\^^@=13 -\cs_new_protected:Npn \exp_end_continue_f:w {`^^@} -\cs_new:Npn ^^@{\expansionERROR} -\cs_new:Npn \exp_end_continue_f:nw #1 { `^^@ #1 } -\tex_catcode:D `\^^@=15 +\group_begin: + \tex_catcode:D `\^^@ = 13 + \cs_new_protected:Npn \exp_end_continue_f:w { `^^@ } + \cs_new:Npn ^^@ + { \__msg_kernel_expandable_error:nn { kernel } { bad-exp-end-f } } + \cs_new:Npn \exp_end_continue_f:nw #1 { `^^@ #1 } +\group_end: \__debug_patch:nnNNpn { \__debug_chk_cs_exist:N #1 } { } \cs_new_protected:Npn \cs_generate_variant:Nn #1#2 { @@ -2590,19 +2702,14 @@ \exp_not:N \q_stop \exp_not:N \fi: } -\use:x - { - \cs_new_protected:Npn \exp_not:N \__cs_generate_variant:ww - ##1 \tl_to_str:n { ma } ##2 \exp_not:N \q_mark - } - { \__cs_generate_variant:wwNw #1 } -\use:x - { - \cs_new_protected:Npn \exp_not:N \__cs_generate_variant:wwNw - ##1 \tl_to_str:n { pr } ##2 \exp_not:N \q_mark - ##3 ##4 \exp_not:N \q_stop - } - { \cs_set_eq:NN \__cs_tmp:w #3 } +\exp_last_unbraced:NNNNo + \cs_new_protected:Npn \__cs_generate_variant:ww + #1 { \tl_to_str:n { ma } } #2 \q_mark + { \__cs_generate_variant:wwNw #1 } +\exp_last_unbraced:NNNNo + \cs_new_protected:Npn \__cs_generate_variant:wwNw + #1 { \tl_to_str:n { pr } } #2 \q_mark #3 #4 \q_stop + { \cs_set_eq:NN \__cs_tmp:w #3 } \cs_new_protected:Npn \__cs_generate_variant:nnNN #1#2#3#4 { \if_meaning:w \c_false_bool #3 @@ -2637,8 +2744,13 @@ \if:w #2 #4 \exp_after:wN \__cs_generate_variant_loop_same:w \else: - \if:w N #4 \else: - \if:w n #4 \else: + \if:w #4 \__cs_generate_variant_loop_base:N #2 \else: + \if:w 0 + \if:w N #4 \else: \if:w n #4 \else: 1 \fi: \fi: + \if:w \scan_stop: \__cs_generate_variant_loop_base:N #2 1 \fi: + 0 + \__cs_generate_variant_loop_special:NNwNNnn #4#2 + \else: \__cs_generate_variant_loop_invalid:NNwNNnn #4#2 \fi: \fi: @@ -2648,11 +2760,29 @@ #2 \__cs_generate_variant_loop:nNwN { } #3 \q_mark } +\cs_new:Npn \__cs_generate_variant_loop_base:N #1 + { + \if:w c #1 N \else: + \if:w o #1 n \else: + \if:w V #1 n \else: + \if:w v #1 n \else: + \if:w f #1 n \else: + \if:w x #1 n \else: + \if:w n #1 n \else: + \if:w N #1 N \else: + \scan_stop: + \fi: + \fi: + \fi: + \fi: + \fi: + \fi: + \fi: + \fi: + } \cs_new:Npn \__cs_generate_variant_loop_same:w #1 \prg_do_nothing: #2#3#4 - { - #3 { #1 \__cs_generate_variant_same:N #2 } - } + { #3 { #1 \__cs_generate_variant_same:N #2 } } \cs_new:Npn \__cs_generate_variant_loop_end:nwwwNNnn #1#2 \q_mark #3 ~ #4 \q_stop #5#6#7#8 { @@ -2690,15 +2820,25 @@ #5 } } +\cs_new:Npn \__cs_generate_variant_loop_special:NNwNNnn #1#2#3 \q_stop #4#5#6#7 + { + #3 \q_stop #4 #5 {#6} {#7} + \exp_not:n + { + \__cs_generate_variant_loop_warning:nnxxxx { kernel } { invalid-variant } + {#7} { \token_to_str:N #5 } {#1} {#2} + } + } +\cs_new_protected:Npn \__cs_generate_variant_loop_warning:nnxxxx + { \__msg_kernel_warning:nnxxxx } \cs_new:Npn \__cs_generate_variant_same:N #1 { - \if:w N #1 - N - \else: - \if:w p #1 - p - \else: + \if:w N #1 N \else: + \if:w p #1 p \else: n + \if:w n #1 \else: + \__cs_generate_variant_loop_special:NNwNNnn #1#1 + \fi: \fi: \fi: } @@ -2764,11 +2904,13 @@ \cs_gset_eq:NN #1 \c_empty_tl } \cs_generate_variant:Nn \tl_new:N { c } +\__debug_patch:nnNNpn { \__debug_chk_var_scope:NN c #1 } { } \cs_new_protected:Npn \tl_const:Nn #1#2 { \__chk_if_free_cs:N #1 \cs_gset_nopar:Npx #1 { \exp_not:n {#2} } } +\__debug_patch:nnNNpn { \__debug_chk_var_scope:NN c #1 } { } \cs_new_protected:Npn \tl_const:Nx #1#2 { \__chk_if_free_cs:N #1 @@ -2791,13 +2933,13 @@ \tex_ifodd:D \l@expl@enable@debug@bool \cs_new_protected:Npn \tl_set_eq:NN #1#2 { - \__debug_chk_var_exist:N #1 + \__debug_chk_var_local:N #1 \__debug_chk_var_exist:N #2 \cs_set_eq:NN #1 #2 } \cs_new_protected:Npn \tl_gset_eq:NN #1#2 { - \__debug_chk_var_exist:N #1 + \__debug_chk_var_global:N #1 \__debug_chk_var_exist:N #2 \cs_gset_eq:NN #1 #2 } @@ -2809,7 +2951,6 @@ \cs_generate_variant:Nn \tl_gset_eq:NN { cN, Nc, cc } \__debug_patch:nnNNpn { - \__debug_chk_var_exist:N #1 \__debug_chk_var_exist:N #2 \__debug_chk_var_exist:N #3 } @@ -2818,7 +2959,6 @@ { \tl_set:Nx #1 { \exp_not:o {#2} \exp_not:o {#3} } } \__debug_patch:nnNNpn { - \__debug_chk_var_exist:N #1 \__debug_chk_var_exist:N #2 \__debug_chk_var_exist:N #3 } @@ -2840,22 +2980,22 @@ \tl_const:Nn \c_novalue_tl { ANoValue- } } \tl_const:Nn \c_space_tl { ~ } -\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { } +\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { } \cs_new_protected:Npn \tl_set:Nn #1#2 { \cs_set_nopar:Npx #1 { \exp_not:n {#2} } } -\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { } +\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { } \cs_new_protected:Npn \tl_set:No #1#2 { \cs_set_nopar:Npx #1 { \exp_not:o {#2} } } -\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { } +\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { } \cs_new_protected:Npn \tl_set:Nx #1#2 { \cs_set_nopar:Npx #1 {#2} } -\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { } +\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { } \cs_new_protected:Npn \tl_gset:Nn #1#2 { \cs_gset_nopar:Npx #1 { \exp_not:n {#2} } } -\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { } +\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { } \cs_new_protected:Npn \tl_gset:No #1#2 { \cs_gset_nopar:Npx #1 { \exp_not:o {#2} } } -\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { } +\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { } \cs_new_protected:Npn \tl_gset:Nx #1#2 { \cs_gset_nopar:Npx #1 {#2} } \cs_generate_variant:Nn \tl_set:Nn { NV , Nv , Nf } @@ -2864,28 +3004,28 @@ \cs_generate_variant:Nn \tl_gset:Nn { NV , Nv , Nf } \cs_generate_variant:Nn \tl_gset:Nx { c } \cs_generate_variant:Nn \tl_gset:Nn { c, co , cV , cv , cf } -\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { } +\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { } \cs_new_protected:Npn \tl_put_left:Nn #1#2 { \cs_set_nopar:Npx #1 { \exp_not:n {#2} \exp_not:o #1 } } -\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { } +\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { } \cs_new_protected:Npn \tl_put_left:NV #1#2 { \cs_set_nopar:Npx #1 { \exp_not:V #2 \exp_not:o #1 } } -\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { } +\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { } \cs_new_protected:Npn \tl_put_left:No #1#2 { \cs_set_nopar:Npx #1 { \exp_not:o {#2} \exp_not:o #1 } } -\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { } +\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { } \cs_new_protected:Npn \tl_put_left:Nx #1#2 { \cs_set_nopar:Npx #1 { #2 \exp_not:o #1 } } -\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { } +\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { } \cs_new_protected:Npn \tl_gput_left:Nn #1#2 { \cs_gset_nopar:Npx #1 { \exp_not:n {#2} \exp_not:o #1 } } -\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { } +\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { } \cs_new_protected:Npn \tl_gput_left:NV #1#2 { \cs_gset_nopar:Npx #1 { \exp_not:V #2 \exp_not:o #1 } } -\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { } +\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { } \cs_new_protected:Npn \tl_gput_left:No #1#2 { \cs_gset_nopar:Npx #1 { \exp_not:o {#2} \exp_not:o #1 } } -\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { } +\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { } \cs_new_protected:Npn \tl_gput_left:Nx #1#2 { \cs_gset_nopar:Npx #1 { #2 \exp_not:o {#1} } } \cs_generate_variant:Nn \tl_put_left:Nn { c } @@ -2896,28 +3036,28 @@ \cs_generate_variant:Nn \tl_gput_left:NV { c } \cs_generate_variant:Nn \tl_gput_left:No { c } \cs_generate_variant:Nn \tl_gput_left:Nx { c } -\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { } +\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { } \cs_new_protected:Npn \tl_put_right:Nn #1#2 { \cs_set_nopar:Npx #1 { \exp_not:o #1 \exp_not:n {#2} } } -\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { } +\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { } \cs_new_protected:Npn \tl_put_right:NV #1#2 { \cs_set_nopar:Npx #1 { \exp_not:o #1 \exp_not:V #2 } } -\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { } +\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { } \cs_new_protected:Npn \tl_put_right:No #1#2 { \cs_set_nopar:Npx #1 { \exp_not:o #1 \exp_not:o {#2} } } -\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { } +\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { } \cs_new_protected:Npn \tl_put_right:Nx #1#2 { \cs_set_nopar:Npx #1 { \exp_not:o #1 #2 } } -\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { } +\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { } \cs_new_protected:Npn \tl_gput_right:Nn #1#2 { \cs_gset_nopar:Npx #1 { \exp_not:o #1 \exp_not:n {#2} } } -\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { } +\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { } \cs_new_protected:Npn \tl_gput_right:NV #1#2 { \cs_gset_nopar:Npx #1 { \exp_not:o #1 \exp_not:V #2 } } -\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { } +\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { } \cs_new_protected:Npn \tl_gput_right:No #1#2 { \cs_gset_nopar:Npx #1 { \exp_not:o #1 \exp_not:o {#2} } } -\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { } +\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { } \cs_new_protected:Npn \tl_gput_right:Nx #1#2 { \cs_gset_nopar:Npx #1 { \exp_not:o {#1} #2 } } \cs_generate_variant:Nn \tl_put_right:Nn { c } @@ -3645,19 +3785,32 @@ } \cs_new:Npn \tl_item:Nn { \exp_args:No \tl_item:nn } \cs_generate_variant:Nn \tl_item:Nn { c } -\cs_new_protected:Npn \tl_show:N #1 +\cs_new_protected:Npn \tl_show:N { \__tl_show:NN \tl_show:n } +\cs_generate_variant:Nn \tl_show:N { c } +\cs_new_protected:Npn \tl_log:N { \__tl_show:NN \tl_log:n } +\cs_generate_variant:Nn \tl_log:N { c } +\cs_new_protected:Npn \__tl_show:NN #1#2 { - \__msg_show_variable:NNNnn #1 \tl_if_exist:NTF ? { } - { > ~ \token_to_str:N #1 = \tl_to_str:N #1 } + \__kernel_check_defined:NT #2 + { \exp_args:Nx #1 { \token_to_str:N #2 = \exp_not:o {#2} } } } -\cs_generate_variant:Nn \tl_show:N { c } \cs_new_protected:Npn \tl_show:n #1 - { \__msg_show_wrap:n { > ~ \tl_to_str:n {#1} } } -\cs_new_protected:Npn \tl_log:N - { \__msg_log_next: \tl_show:N } -\cs_generate_variant:Nn \tl_log:N { c } -\cs_new_protected:Npn \tl_log:n - { \__msg_log_next: \tl_show:n } + { \iow_wrap:nnnN { >~ \tl_to_str:n {#1} . } { } { } \__tl_show:n } +\cs_new_protected:Npn \__tl_show:n #1 + { + \tl_set:Nf \l__tl_internal_a_tl { \__tl_show:w #1 \q_stop } + \__iow_with:Nnn \tex_newlinechar:D { 10 } + { + \__iow_with:Nnn \tex_errorcontextlines:D { -1 } + { + \etex_showtokens:D \exp_after:wN \exp_after:wN \exp_after:wN + { \exp_after:wN \l__tl_internal_a_tl } + } + } + } +\cs_new:Npn \__tl_show:w #1 > #2 . \q_stop {#2} +\cs_new_protected:Npn \tl_log:n #1 + { \iow_wrap:nnnN { > ~ \tl_to_str:n {#1} . } { } { } \iow_log:n } \tl_new:N \g_tmpa_tl \tl_new:N \g_tmpb_tl \tl_new:N \l_tmpa_tl @@ -3908,17 +4061,22 @@ \cs_new_eq:NN \__str_case_end:nw \__prg_case_end:nw \cs_new:Npn \str_map_function:nN #1#2 { + \exp_after:wN \__str_map_function:w \exp_after:wN \__str_map_function:Nn \exp_after:wN #2 - \etex_detokenize:n {#1} - \q_recursion_tail + \etex_detokenize:D {#1} + \q_recursion_tail ? ~ \__prg_break_point:Nn \str_map_break: { } } \cs_new:Npn \str_map_function:NN { \exp_args:No \str_map_function:nN } +\cs_new:Npn \__str_map_function:w #1 ~ + { #1 { ~ { ~ } \__str_map_function:w } } \cs_new:Npn \__str_map_function:Nn #1#2 { - \__quark_if_recursion_tail_break:nN {#2} \str_map_break: - #1 {#2} \__str_map_function:Nn #1 + \if_meaning:w \q_recursion_tail #2 + \exp_after:wN \str_map_break: + \fi: + #1 #2 \__str_map_function:Nn #1 } \cs_generate_variant:Nn \str_map_function:NN { c } \cs_new_protected:Npn \str_map_inline:nn #1#2 @@ -3926,28 +4084,42 @@ \int_gincr:N \g__prg_map_int \cs_gset_protected:cpn { __prg_map_ \int_use:N \g__prg_map_int :w } ##1 {#2} - \exp_args:Nc \__str_map_function:Nn - { __prg_map_ \int_use:N \g__prg_map_int :w } - #1 \q_recursion_tail + \use:x + { + \exp_not:N \__str_map_inline:NN + \exp_not:c { __prg_map_ \int_use:N \g__prg_map_int :w } + \__str_to_other_fast:n {#1} + } + \q_recursion_tail \__prg_break_point:Nn \str_map_break: { \int_gdecr:N \g__prg_map_int } } \cs_new_protected:Npn \str_map_inline:Nn { \exp_args:No \str_map_inline:nn } \cs_generate_variant:Nn \str_map_inline:Nn { c } +\cs_new:Npn \__str_map_inline:NN #1#2 + { + \__quark_if_recursion_tail_break:NN #2 \str_map_break: + \exp_args:No #1 { \token_to_str:N #2 } + \__str_map_inline:NN #1 + } \cs_new_protected:Npn \str_map_variable:nNn #1#2#3 { - \__str_map_variable:Nnn #2 {#3} #1 + \use:x + { + \exp_not:n { \__str_map_variable:NnN #2 {#3} } + \__str_to_other_fast:n {#1} + } \q_recursion_tail \__prg_break_point:Nn \str_map_break: { } } \cs_new_protected:Npn \str_map_variable:NNn { \exp_args:No \str_map_variable:nNn } -\cs_new_protected:Npn \__str_map_variable:Nnn #1#2#3 +\cs_new_protected:Npn \__str_map_variable:NnN #1#2#3 { + \__quark_if_recursion_tail_break:NN #3 \str_map_break: \str_set:Nn #1 {#3} - \__quark_if_recursion_tail_break:NN #1 \str_map_break: \use:n {#2} - \__str_map_variable:Nnn #1 {#2} + \__str_map_variable:NnN #1 {#2} } \cs_generate_variant:Nn \str_map_variable:NNn { c } \cs_new:Npn \str_map_break: @@ -4011,7 +4183,7 @@ } \cs_new:Npn \str_item_ignore_spaces:nn #1 { \exp_args:No \__str_item:nn { \tl_to_str:n {#1} } } -\__debug_patch_args:nNNpn { {#1} { (#2) } } +\__debug_patch_args:nNNpn { {#1} { \__int_eval:n {#2} } } \cs_new:Npn \__str_item:nn #1#2 { \exp_after:wN \__str_item:w @@ -4070,7 +4242,8 @@ } \cs_new:Npn \str_range_ignore_spaces:nnn #1 { \exp_args:No \__str_range:nnn { \tl_to_str:n {#1} } } -\__debug_patch_args:nNNpn { {#1} { (#2) } { (#3) } } +\__debug_patch_args:nNNpn + { {#1} { \__int_eval:n {#2} } { \__int_eval:n {#3} } } \cs_new:Npn \__str_range:nnn #1#2#3 { \exp_after:wN \__str_range:w @@ -4949,16 +5122,20 @@ \prg_new_eq_conditional:NNn \seq_pop:cN \seq_pop_left:cN { T , F , TF } \prg_new_eq_conditional:NNn \seq_gpop:NN \seq_gpop_left:NN { T , F , TF } \prg_new_eq_conditional:NNn \seq_gpop:cN \seq_gpop_left:cN { T , F , TF } -\cs_new_protected:Npn \seq_show:N #1 - { - \__msg_show_variable:NNNnn #1 - \seq_if_exist:NTF \seq_if_empty:NTF { seq } - { \seq_map_function:NN #1 \__msg_show_item:n } - } +\cs_new_protected:Npn \seq_show:N { \__seq_show:NN \msg_show:nnxxxx } \cs_generate_variant:Nn \seq_show:N { c } -\cs_new_protected:Npn \seq_log:N - { \__msg_log_next: \seq_show:N } +\cs_new_protected:Npn \seq_log:N { \__seq_show:NN \msg_log:nnxxxx } \cs_generate_variant:Nn \seq_log:N { c } +\cs_new_protected:Npn \__seq_show:NN #1#2 + { + \__kernel_check_defined:NT #2 + { + #1 { LaTeX/kernel } { show-seq } + { \token_to_str:N #2 } + { \seq_map_function:NN #2 \msg_show_item:n } + { } { } + } + } \seq_new:N \l_tmpa_seq \seq_new:N \l_tmpb_seq \seq_new:N \g_tmpa_seq @@ -4974,6 +5151,9 @@ \cs_new:Npn \int_eval:n #1 { \__int_value:w \__int_eval:w #1 \__int_eval_end: } \__debug_patch_args:nNNpn + { { \__debug_chk_expr:nNnN {#1} \__int_eval:w { } \__int_eval:n } } +\cs_new:Npn \__int_eval:n #1 { \__int_eval:w #1 \__int_eval_end: } +\__debug_patch_args:nNNpn { { \__debug_chk_expr:nNnN {#1} \__int_eval:w { } \int_abs:n } } \cs_new:Npn \int_abs:n #1 { @@ -5065,27 +5245,29 @@ \cs:w newcount \cs_end: #1 } \cs_generate_variant:Nn \int_new:N { c } -\__debug_patch_args:nNNpn +\__debug_patch_args:nnnNNpn + { \__debug_chk_var_scope:NN c #1 } + { } { {#1} { \__debug_chk_expr:nNnN {#2} \__int_eval:w { } \int_const:Nn } } \cs_new_protected:Npn \int_const:Nn #1#2 { \int_compare:nNnTF {#2} < \c_zero { \int_new:N #1 - \int_gset:Nn #1 {#2} + \tex_global:D } { \int_compare:nNnTF {#2} > \c__max_constdef_int { \int_new:N #1 - \int_gset:Nn #1 {#2} + \tex_global:D } { \__chk_if_free_cs:N #1 - \tex_global:D \__int_constdef:Nw #1 = - \__int_eval:w #2 \__int_eval_end: + \tex_global:D \__int_constdef:Nw } } + #1 = \__int_eval:w #2 \__int_eval_end: } \cs_generate_variant:Nn \int_const:Nn { c } \if_int_odd:w 0 @@ -5101,7 +5283,9 @@ \cs_new_eq:NN \__int_constdef:Nw \tex_mathchardef:D \tex_mathchardef:D \c__max_constdef_int 32767 ~ \fi: +\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { } \cs_new_protected:Npn \int_zero:N #1 { #1 = \c_zero } +\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { } \cs_new_protected:Npn \int_gzero:N #1 { \tex_global:D #1 = \c_zero } \cs_generate_variant:Nn \int_zero:N { c } \cs_generate_variant:Nn \int_gzero:N { c } @@ -5111,9 +5295,11 @@ { \int_if_exist:NTF #1 { \int_gzero:N #1 } { \int_new:N #1 } } \cs_generate_variant:Nn \int_zero_new:N { c } \cs_generate_variant:Nn \int_gzero_new:N { c } +\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { } \cs_new_protected:Npn \int_set_eq:NN #1#2 { #1 = #2 } \cs_generate_variant:Nn \int_set_eq:NN { c } \cs_generate_variant:Nn \int_set_eq:NN { Nc , cc } +\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { } \cs_new_protected:Npn \int_gset_eq:NN #1#2 { \tex_global:D #1 = #2 } \cs_generate_variant:Nn \int_gset_eq:NN { c } \cs_generate_variant:Nn \int_gset_eq:NN { Nc , cc } @@ -5121,39 +5307,52 @@ { TF , T , F , p } \prg_new_eq_conditional:NNn \int_if_exist:c \cs_if_exist:c { TF , T , F , p } -\__debug_patch_args:nNNpn - { {#1} { \__debug_chk_expr:nNnN {#2} \__int_eval:w { } \int_add:Nn } } +\cs_set_protected:Npn \__int_tmp:w #1#2#3 + { + \__debug_patch_args:nnnNNpn + { #1 ##1 } + { } + { {##1} { \__debug_chk_expr:nNnN {##2} \__int_eval:w { } #3 } } + #2 #3 + } +\__int_tmp:w \__debug_chk_var_local:N \cs_new_protected:Npn \int_add:Nn #1#2 { \tex_advance:D #1 by \__int_eval:w #2 \__int_eval_end: } -\__debug_patch_args:nNNpn - { {#1} { \__debug_chk_expr:nNnN {#2} \__int_eval:w { } \int_sub:Nn } } +\__int_tmp:w \__debug_chk_var_local:N \cs_new_protected:Npn \int_sub:Nn #1#2 { \tex_advance:D #1 by - \__int_eval:w #2 \__int_eval_end: } -\cs_new_protected:Npn \int_gadd:Nn - { \tex_global:D \int_add:Nn } -\cs_new_protected:Npn \int_gsub:Nn - { \tex_global:D \int_sub:Nn } +\__int_tmp:w \__debug_chk_var_global:N +\cs_new_protected:Npn \int_gadd:Nn #1#2 + { \tex_global:D \tex_advance:D #1 by \__int_eval:w #2 \__int_eval_end: } +\__int_tmp:w \__debug_chk_var_global:N +\cs_new_protected:Npn \int_gsub:Nn #1#2 + { \tex_global:D \tex_advance:D #1 by - \__int_eval:w #2 \__int_eval_end: } \cs_generate_variant:Nn \int_add:Nn { c } \cs_generate_variant:Nn \int_gadd:Nn { c } \cs_generate_variant:Nn \int_sub:Nn { c } \cs_generate_variant:Nn \int_gsub:Nn { c } +\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { } \cs_new_protected:Npn \int_incr:N #1 { \tex_advance:D #1 \c_one } +\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { } \cs_new_protected:Npn \int_decr:N #1 { \tex_advance:D #1 - \c_one } -\cs_new_protected:Npn \int_gincr:N - { \tex_global:D \int_incr:N } -\cs_new_protected:Npn \int_gdecr:N - { \tex_global:D \int_decr:N } +\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { } +\cs_new_protected:Npn \int_gincr:N #1 + { \tex_global:D \tex_advance:D #1 \c_one } +\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { } +\cs_new_protected:Npn \int_gdecr:N #1 + { \tex_global:D \tex_advance:D #1 - \c_one } \cs_generate_variant:Nn \int_incr:N { c } \cs_generate_variant:Nn \int_decr:N { c } \cs_generate_variant:Nn \int_gincr:N { c } \cs_generate_variant:Nn \int_gdecr:N { c } -\__debug_patch_args:nNNpn - { {#1} { \__debug_chk_expr:nNnN {#2} \__int_eval:w { } \int_set:Nn } } +\__int_tmp:w \__debug_chk_var_local:N \cs_new_protected:Npn \int_set:Nn #1#2 { #1 ~ \__int_eval:w #2 \__int_eval_end: } -\cs_new_protected:Npn \int_gset:Nn { \tex_global:D \int_set:Nn } +\__int_tmp:w \__debug_chk_var_global:N +\cs_new_protected:Npn \int_gset:Nn #1#2 + { \tex_global:D #1 ~ \__int_eval:w #2 \__int_eval_end: } \cs_generate_variant:Nn \int_set:Nn { c } \cs_generate_variant:Nn \int_gset:Nn { c } \cs_new_eq:NN \int_use:N \tex_the:D @@ -5765,11 +5964,11 @@ \cs_new_eq:NN \int_show:N \__kernel_register_show:N \cs_generate_variant:Nn \int_show:N { c } \cs_new_protected:Npn \int_show:n - { \__msg_show_wrap:Nn \int_eval:n } + { \msg_show_eval:Nn \int_eval:n } \cs_new_eq:NN \int_log:N \__kernel_register_log:N \cs_generate_variant:Nn \int_log:N { c } \cs_new_protected:Npn \int_log:n - { \__msg_log_next: \int_show:n } + { \msg_log_eval:Nn \int_eval:n } \int_const:Nn \c_one { 1 } \int_const:Nn \c_two { 2 } \int_const:Nn \c_three { 3 } @@ -5871,7 +6070,7 @@ 0 } } -%% File: l3flag.dtx Copyright (C) 2011-2012,2014-2017 The LaTeX3 Project +%% File: l3flag.dtx Copyright (C) 2011-2017 The LaTeX3 Project \cs_new_protected:Npn \flag_new:n #1 { \cs_new:cpn { flag~#1 } ##1 ; @@ -5893,13 +6092,16 @@ } \cs_new_protected:Npn \flag_clear_new:n #1 { \flag_if_exist:nTF {#1} { \flag_clear:n } { \flag_new:n } {#1} } -\cs_new_protected:Npn \flag_show:n #1 +\cs_new_protected:Npn \flag_show:n { \__flag_show:Nn \tl_show:n } +\cs_new_protected:Npn \flag_log:n { \__flag_show:Nn \tl_log:n } +\cs_new_protected:Npn \__flag_show:Nn #1#2 { - \exp_args:Nc \__msg_show_variable:NNNnn { flag~#1 } \cs_if_exist:NTF ? { } - { > ~ flag ~ #1 ~ height = \flag_height:n {#1} } + \exp_args:Nc \__kernel_check_defined:NT { flag~#2 } + { + \exp_args:Nx #1 + { \tl_to_str:n { flag~#2~height } = \flag_height:n {#2} } + } } -\cs_new_protected:Npn \flag_log:n - { \__msg_log_next: \flag_show:n } \tex_ifodd:D \l@expl@enable@debug@bool \cs_new:Npn \__flag_chk_exist:n #1 { @@ -5942,7 +6144,12 @@ \__int_value:w \flag_height:n {#1} ; } %% File: l3quark.dtx Copyright (C) 1990-2017 The LaTeX3 Project -\cs_new_protected:Npn \quark_new:N #1 { \tl_const:Nn #1 {#1} } +\__debug_patch:nnNNpn { \__debug_chk_var_scope:NN q #1 } { } +\cs_new_protected:Npn \quark_new:N #1 + { + \__chk_if_free_cs:N #1 + \cs_gset_nopar:Npn #1 {#1} + } \quark_new:N \q_nil \quark_new:N \q_mark \quark_new:N \q_no_value @@ -6053,16 +6260,16 @@ \cs_new_eq:NN \if_predicate:w \tex_ifodd:D \cs_new_protected:Npn \bool_new:N #1 { \cs_new_eq:NN #1 \c_false_bool } \cs_generate_variant:Nn \bool_new:N { c } -\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { } +\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { } \cs_new_protected:Npn \bool_set_true:N #1 { \cs_set_eq:NN #1 \c_true_bool } -\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { } +\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { } \cs_new_protected:Npn \bool_set_false:N #1 { \cs_set_eq:NN #1 \c_false_bool } -\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { } +\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { } \cs_new_protected:Npn \bool_gset_true:N #1 { \cs_gset_eq:NN #1 \c_true_bool } -\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { } +\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { } \cs_new_protected:Npn \bool_gset_false:N #1 { \cs_gset_eq:NN #1 \c_false_bool } \cs_generate_variant:Nn \bool_set_true:N { c } @@ -6073,10 +6280,10 @@ \cs_new_eq:NN \bool_gset_eq:NN \tl_gset_eq:NN \cs_generate_variant:Nn \bool_set_eq:NN { Nc, cN, cc } \cs_generate_variant:Nn \bool_gset_eq:NN { Nc, cN, cc } -\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { } +\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { } \cs_new_protected:Npn \bool_set:Nn #1#2 { \tex_chardef:D #1 = \bool_if_p:n {#2} } -\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { } +\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { } \cs_new_protected:Npn \bool_gset:Nn #1#2 { \tex_global:D \tex_chardef:D #1 = \bool_if_p:n {#2} } \cs_generate_variant:Nn \bool_set:Nn { c } @@ -6093,21 +6300,21 @@ \cs_generate_variant:Nn \bool_if:NT { c } \cs_generate_variant:Nn \bool_if:NF { c } \cs_generate_variant:Nn \bool_if:NTF { c } -\cs_new_protected:Npn \bool_show:N #1 - { - \__msg_show_variable:NNNnn #1 \bool_if_exist:NTF ? { } - { > ~ \token_to_str:N #1 = \__bool_to_str:n {#1} } - } \cs_new_protected:Npn \bool_show:n - { \__msg_show_wrap:Nn \__bool_to_str:n } + { \msg_show_eval:Nn \__bool_to_str:n } +\cs_new_protected:Npn \bool_log:n + { \msg_log_eval:Nn \__bool_to_str:n } \cs_new:Npn \__bool_to_str:n #1 { \bool_if:nTF {#1} { true } { false } } +\cs_new_protected:Npn \bool_show:N { \__bool_show:NN \tl_show:n } \cs_generate_variant:Nn \bool_show:N { c } -\cs_new_protected:Npn \bool_log:N - { \__msg_log_next: \bool_show:N } -\cs_new_protected:Npn \bool_log:n - { \__msg_log_next: \bool_show:n } +\cs_new_protected:Npn \bool_log:N { \__bool_show:NN \tl_log:n } \cs_generate_variant:Nn \bool_log:N { c } +\cs_new_protected:Npn \__bool_show:NN #1#2 + { + \__kernel_check_defined:NT #2 + { \exp_args:Nx #1 { \token_to_str:N #2 = \__bool_to_str:n {#2} } } + } \bool_new:N \l_tmpa_bool \bool_new:N \l_tmpb_bool \bool_new:N \g_tmpa_bool @@ -6246,12 +6453,11 @@ #2 \bool_if:nF {#1} { \bool_do_until:nn {#1} {#2} } } -\__debug_patch_args:nNNpn { { (#1) } } \cs_new:Npn \prg_replicate:nn #1 { \exp:w \exp_after:wN \__prg_replicate_first:N - \__int_value:w \__int_eval:w #1 \__int_eval_end: + \__int_value:w \__int_eval:n {#1} \cs_end: } \cs_new:Npn \__prg_replicate:N #1 @@ -6830,41 +7036,38 @@ { \exp_last_unbraced:No \__clist_item_n_strip:w } , } \cs_new:Npn \__clist_item_n_strip:w #1 , { \exp_not:n {#1} } -\cs_new_protected:Npn \clist_show:N #1 +\cs_new_protected:Npn \clist_show:N { \__clist_show:NN \msg_show:nnxxxx } +\cs_generate_variant:Nn \clist_show:N { c } +\cs_new_protected:Npn \clist_log:N { \__clist_show:NN \msg_log:nnxxxx } +\cs_generate_variant:Nn \clist_log:N { c } +\cs_new_protected:Npn \__clist_show:NN #1#2 { - \__msg_show_variable:NNNnn #1 - \clist_if_exist:NTF \clist_if_empty:NTF { clist } - { \clist_map_function:NN #1 \__msg_show_item:n } + \__kernel_check_defined:NT #2 + { + #1 { LaTeX/kernel } { show-clist } + { \token_to_str:N #2 } + { \clist_map_function:NN #2 \msg_show_item:n } + { } { } + } } -\cs_new_protected:Npn \clist_show:n #1 +\cs_new_protected:Npn \clist_show:n { \__clist_show:Nn \msg_show:nnxxxx } +\cs_new_protected:Npn \clist_log:n { \__clist_show:Nn \msg_log:nnxxxx } +\cs_new_protected:Npn \__clist_show:Nn #1#2 { - \__msg_show_pre:nnxxxx { LaTeX / kernel } { show-clist } - { } { \clist_if_empty:nF {#1} { ? } } { } { } - \__msg_show_wrap:n - { \clist_map_function:nN {#1} \__msg_show_item:n } + #1 { LaTeX/kernel } { show-clist } + { } { \clist_map_function:nN {#2} \msg_show_item:n } { } { } } -\cs_generate_variant:Nn \clist_show:N { c } -\cs_new_protected:Npn \clist_log:N - { \__msg_log_next: \clist_show:N } -\cs_new_protected:Npn \clist_log:n - { \__msg_log_next: \clist_show:n } -\cs_generate_variant:Nn \clist_log:N { c } \clist_new:N \l_tmpa_clist \clist_new:N \l_tmpb_clist \clist_new:N \g_tmpa_clist \clist_new:N \g_tmpb_clist %% File: l3token.dtx Copyright (C) 2005-2017 The LaTeX3 Project -\__debug_patch_args:nNNpn { { (#1) } { (#2) } } \cs_new_protected:Npn \char_set_catcode:nn #1#2 - { - \tex_catcode:D \__int_eval:w #1 \__int_eval_end: - = \__int_eval:w #2 \__int_eval_end: - } -\__debug_patch_args:nNNpn { { (#1) } } + { \tex_catcode:D \__int_eval:n {#1} = \__int_eval:n {#2} } \cs_new:Npn \char_value_catcode:n #1 - { \tex_the:D \tex_catcode:D \__int_eval:w #1 \__int_eval_end: } + { \tex_the:D \tex_catcode:D \__int_eval:n {#1} } \cs_new_protected:Npn \char_show_value_catcode:n #1 - { \__msg_show_wrap:n { > ~ \char_value_catcode:n {#1} } } + { \exp_args:Nf \tl_show:n { \char_value_catcode:n {#1} } } \cs_new_protected:Npn \char_set_catcode_escape:N #1 { \char_set_catcode:nn { `#1 } { 0 } } \cs_new_protected:Npn \char_set_catcode_group_begin:N #1 @@ -6929,50 +7132,30 @@ { \char_set_catcode:nn {#1} { 14 } } \cs_new_protected:Npn \char_set_catcode_invalid:n #1 { \char_set_catcode:nn {#1} { 15 } } -\__debug_patch_args:nNNpn { { (#1) } { (#2) } } \cs_new_protected:Npn \char_set_mathcode:nn #1#2 - { - \tex_mathcode:D \__int_eval:w #1 \__int_eval_end: - = \__int_eval:w #2 \__int_eval_end: - } -\__debug_patch_args:nNNpn { { (#1) } } + { \tex_mathcode:D \__int_eval:n {#1} = \__int_eval:n {#2} } \cs_new:Npn \char_value_mathcode:n #1 - { \tex_the:D \tex_mathcode:D \__int_eval:w #1 \__int_eval_end: } + { \tex_the:D \tex_mathcode:D \__int_eval:n {#1} } \cs_new_protected:Npn \char_show_value_mathcode:n #1 - { \__msg_show_wrap:n { > ~ \char_value_mathcode:n {#1} } } -\__debug_patch_args:nNNpn { { (#1) } { (#2) } } + { \exp_args:Nf \tl_show:n { \char_value_mathcode:n {#1} } } \cs_new_protected:Npn \char_set_lccode:nn #1#2 - { - \tex_lccode:D \__int_eval:w #1 \__int_eval_end: - = \__int_eval:w #2 \__int_eval_end: - } -\__debug_patch_args:nNNpn { { (#1) } } + { \tex_lccode:D \__int_eval:n {#1} = \__int_eval:n {#2} } \cs_new:Npn \char_value_lccode:n #1 - { \tex_the:D \tex_lccode:D \__int_eval:w #1 \__int_eval_end: } + { \tex_the:D \tex_lccode:D \__int_eval:n {#1} } \cs_new_protected:Npn \char_show_value_lccode:n #1 - { \__msg_show_wrap:n { > ~ \char_value_lccode:n {#1} } } -\__debug_patch_args:nNNpn { { (#1) } { (#2) } } + { \exp_args:Nf \tl_show:n { \char_value_lccode:n {#1} } } \cs_new_protected:Npn \char_set_uccode:nn #1#2 - { - \tex_uccode:D \__int_eval:w #1 \__int_eval_end: - = \__int_eval:w #2 \__int_eval_end: - } -\__debug_patch_args:nNNpn { { (#1) } } + { \tex_uccode:D \__int_eval:n {#1} = \__int_eval:n {#2} } \cs_new:Npn \char_value_uccode:n #1 - { \tex_the:D \tex_uccode:D \__int_eval:w #1 \__int_eval_end: } + { \tex_the:D \tex_uccode:D \__int_eval:n {#1} } \cs_new_protected:Npn \char_show_value_uccode:n #1 - { \__msg_show_wrap:n { > ~ \char_value_uccode:n {#1} } } -\__debug_patch_args:nNNpn { { (#1) } { (#2) } } + { \exp_args:Nf \tl_show:n { \char_value_uccode:n {#1} } } \cs_new_protected:Npn \char_set_sfcode:nn #1#2 - { - \tex_sfcode:D \__int_eval:w #1 \__int_eval_end: - = \__int_eval:w #2 \__int_eval_end: - } -\__debug_patch_args:nNNpn { { (#1) } } + { \tex_sfcode:D \__int_eval:n {#1} = \__int_eval:n {#2} } \cs_new:Npn \char_value_sfcode:n #1 - { \tex_the:D \tex_sfcode:D \__int_eval:w #1 \__int_eval_end: } + { \tex_the:D \tex_sfcode:D \__int_eval:n {#1} } \cs_new_protected:Npn \char_show_value_sfcode:n #1 - { \__msg_show_wrap:n { > ~ \char_value_sfcode:n {#1} } } + { \exp_args:Nf \tl_show:n { \char_value_sfcode:n {#1} } } \seq_new:N \l_char_special_seq \seq_set_split:Nnn \l_char_special_seq { } { \ \" \# \$ \% \& \\ \^ \_ \{ \} \~ } @@ -6999,7 +7182,7 @@ \cs_generate_variant:Nn \char_gset_active_eq:NN { Nc } \cs_generate_variant:Nn \char_set_active_eq:nN { nc } \cs_generate_variant:Nn \char_gset_active_eq:nN { nc } -\__debug_patch_args:nNNpn { { (#1) } { (#2) } } +\__debug_patch_args:nNNpn { { \__int_eval:n {#1} } { \__int_eval:n {#2} } } \cs_new:Npn \char_generate:nn #1#2 { \exp:w \exp_after:wN \__char_generate_aux:w @@ -7135,7 +7318,6 @@ \fi: \group_end: \tl_const:Nx \c_catcode_other_space_tl { \char_generate:nn { `\ } { 12 } } -\cs_new_protected:Npn \token_new:Nn #1#2 { \cs_new_eq:NN #1 #2 } \group_begin: \__chk_if_free_cs:N \c_group_begin_token \tex_global:D \tex_let:D \c_group_begin_token { @@ -7588,6 +7770,8 @@ } { \scan_stop: } } +\__debug_deprecation:nnNNpn { 2018-12-31 } { \cs_new_eq:NN } +\cs_new_protected:Npn \token_new:Nn #1#2 { \cs_new_eq:NN #1 #2 } %% File: l3prop.dtx Copyright (C) 1990-2017 The LaTeX3 Project \__scan_new:N \s__prop \cs_new:Npn \__prop_pair:wn #1 \s__prop #2 @@ -7624,6 +7808,53 @@ \prop_new:N \l_tmpb_prop \prop_new:N \g_tmpa_prop \prop_new:N \g_tmpb_prop +\cs_new_protected:Npn \prop_set_from_keyval:Nn #1#2 + { \tl_set:Nx #1 { \__prop_from_keyval:n {#2} } } +\cs_generate_variant:Nn \prop_set_from_keyval:Nn { c } +\cs_new_protected:Npn \prop_gset_from_keyval:Nn #1#2 + { \tl_gset:Nx #1 { \__prop_from_keyval:n {#2} } } +\cs_generate_variant:Nn \prop_gset_from_keyval:Nn { c } +\cs_new_protected:Npn \prop_const_from_keyval:Nn #1#2 + { \tl_const:Nx #1 { \__prop_from_keyval:n {#2} } } +\cs_generate_variant:Nn \prop_const_from_keyval:Nn { c } +\cs_new:Npn \__prop_from_keyval:n #1 + { + \s__prop + \__prop_from_keyval_loop:w \q_mark #1 , + \q_recursion_tail , \q_recursion_stop + } +\cs_new:Npn \__prop_from_keyval_loop:w #1 , + { + \quark_if_recursion_tail_stop:o { \use_none:n #1 } + \__prop_from_keyval_split:Nw \__prop_from_keyval_key:w + #1 = = \q_stop { \use_none:n #1 } + \__prop_from_keyval_loop:w \q_mark + } +\cs_new:Npn \__prop_from_keyval_split:Nw #1#2 = + { + \__tl_trim_spaces:nn {#2} + { \exp_last_unbraced:No #1 } \q_nil + } +\cs_new:Npn \__prop_from_keyval_key:w #1 \q_nil #2 \q_stop + { + \__prop_from_keyval_split:Nw \__prop_from_keyval_value:w + \q_mark #2 \q_stop {#1} + } +\cs_new:Npn \__prop_from_keyval_value:w #1 \q_nil #2 \q_stop #3#4 + { + \tl_if_empty:nF { #3 #1 #2 } + { + \str_if_eq:nnTF {#2} { = } + { + \exp_not:N \__prop_pair:wn \tl_to_str:n {#3} + \s__prop { \exp_not:n {#1} } + } + { + \exp_args:Nnno \__msg_kernel_expandable_error:nnn + { kernel } { prop-keyval } {#4} + } + } + } \cs_new_protected:Npn \__prop_split:NnTF #1#2 { \exp_args:NNo \__prop_split_aux:NnTF #1 { \tl_to_str:n {#2} } } \cs_new_protected:Npn \__prop_split_aux:NnTF #1#2#3#4 @@ -7851,16 +8082,20 @@ { \__prg_map_break:Nn \prop_map_break: { } } \cs_new:Npn \prop_map_break:n { \__prg_map_break:Nn \prop_map_break: } -\cs_new_protected:Npn \prop_show:N #1 - { - \__msg_show_variable:NNNnn #1 - \prop_if_exist:NTF \prop_if_empty:NTF { prop } - { \prop_map_function:NN #1 \__msg_show_item:nn } - } +\cs_new_protected:Npn \prop_show:N { \__prop_show:NN \msg_show:nnxxxx } \cs_generate_variant:Nn \prop_show:N { c } -\cs_new_protected:Npn \prop_log:N - { \__msg_log_next: \prop_show:N } +\cs_new_protected:Npn \prop_log:N { \__prop_show:NN \msg_log:nnxxxx } \cs_generate_variant:Nn \prop_log:N { c } +\cs_new_protected:Npn \__prop_show:NN #1#2 + { + \__kernel_check_defined:NT #2 + { + #1 { LaTeX/kernel } { show-prop } + { \token_to_str:N #2 } + { \prop_map_function:NN #2 \msg_show_item:nn } + { } { } + } + } %% File: l3msg.dtx Copyright (C) 2009-2017 The LaTeX3 Project \tl_new:N \l__msg_internal_tl \bool_new:N \l__msg_line_context_bool @@ -8157,6 +8392,40 @@ { } { } \iow_log:n } \__msg_class_new:nn { none } { } + \__msg_class_new:nn { show } + { + \iow_wrap:nnnN + { \use:c { \c__msg_text_prefix_tl #1 / #2 } {#3} {#4} {#5} {#6} } + { } { } \__msg_show:n + } + \cs_new_protected:Npn \__msg_show:n #1 + { + \tl_if_in:nnTF { ^^J #1 } { ^^J > ~ } + { + \tl_if_in:nnTF { #1 \q_mark } { . \q_mark } + { \__msg_show_dot:w } { \__msg_show:w } + ^^J #1 \q_stop + } + { \__msg_show:nn { ? #1 } { } } + } + \cs_new:Npn \__msg_show_dot:w #1 ^^J > ~ #2 . \q_stop + { \__msg_show:nn {#1} {#2} } + \cs_new:Npn \__msg_show:w #1 ^^J > ~ #2 \q_stop + { \__msg_show:nn {#1} {#2} } + \cs_new_protected:Npn \__msg_show:nn #1#2 + { + \tl_if_empty:nF {#1} + { \exp_args:No \iow_term:n { \use_none:n #1 } } + \tl_set:Nn \l__msg_internal_tl {#2} + \__iow_with:Nnn \tex_newlinechar:D { 10 } + { + \__iow_with:Nnn \tex_errorcontextlines:D { -1 } + { + \etex_showtokens:D \exp_after:wN \exp_after:wN \exp_after:wN + { \exp_after:wN \l__msg_internal_tl } + } + } + } \group_end: \cs_new:Npn \__msg_class_chk_exist:nT #1 { @@ -8515,6 +8784,15 @@ 'check-declarations',~'deprecation',~'log-functions',~not~'#1'. } \__msg_kernel_new:nnn { kernel } { expr } { '#2'~in~#1 } + \__msg_kernel_new:nnnn { kernel } { local-global } + { Inconsistent~local/global~assignment } + { + \c__msg_coding_error_text_tl + \if:w l #2 Local \else: Global \fi: \ + assignment~to~a~ + \if:w l #1 local \else: \if:w g #1 global \else: constant \fi: \fi: \ + variable~'#3'. + } \__msg_kernel_new:nnnn { kernel } { non-declared-variable } { The~variable~#1~has~not~been~declared~\msg_line_context:. } { @@ -8537,6 +8815,8 @@ given~when~loading~expl3. } } +\__msg_kernel_new:nnn { kernel } { bad-exp-end-f } + { Misused~\exp_end_continue_f:w or~:nw } \__msg_kernel_new:nnn { kernel } { bad-variable } { Erroneous~variable~#1 used! } \__msg_kernel_new:nnn { kernel } { misused-sequence } @@ -8545,6 +8825,8 @@ { A~property~list~was~misused. } \__msg_kernel_new:nnn { kernel } { negative-replication } { Negative~argument~for~\prg_replicate:nn. } +\__msg_kernel_new:nnn { kernel } { prop-keyval } + { Missing/extra~'='~in~'#1'~(in~'..._keyval:Nn') } \__msg_kernel_new:nnn { kernel } { unknown-comparison } { Relation~'#1'~unknown:~use~=,~<,~>,~==,~!=,~<=,~>=. } \__msg_kernel_new:nnn { kernel } { zero-step } @@ -8553,22 +8835,22 @@ { The~comma~list~ \tl_if_empty:nF {#1} { #1 ~ } \tl_if_empty:nTF {#2} - { is~empty } - { contains~the~items~(without~outer~braces): } + { is~empty \\>~ . } + { contains~the~items~(without~outer~braces): #2 . } } \__msg_kernel_new:nnn { kernel } { show-prop } { The~property~list~#1~ \tl_if_empty:nTF {#2} - { is~empty } - { contains~the~pairs~(without~outer~braces): } + { is~empty \\>~ . } + { contains~the~pairs~(without~outer~braces): #2 . } } \__msg_kernel_new:nnn { kernel } { show-seq } { The~sequence~#1~ \tl_if_empty:nTF {#2} - { is~empty } - { contains~the~items~(without~outer~braces): } + { is~empty \\>~ . } + { contains~the~items~(without~outer~braces): #2 . } } \__msg_kernel_new:nnn { kernel } { show-streams } { @@ -8579,7 +8861,7 @@ { iow } { output ~ } } streams~are~ - \tl_if_empty:nTF {#2} { open } { in~use: } + \tl_if_empty:nTF {#2} { open } { in~use: #2 . } } \group_begin: \cs_set_protected:Npn \__msg_tmp:w #1#2 @@ -8627,92 +8909,6 @@ \__msg_kernel_expandable_error:nnnnnn {#1} {#2} { } { } { } { } } -\bool_new:N \g__msg_log_next_bool -\cs_new_protected:Npn \__msg_log_next: - { \bool_gset_true:N \g__msg_log_next_bool } -\cs_new_protected:Npn \__msg_show_pre:nnnnnn #1#2#3#4#5#6 - { - \exp_args:Nx \iow_wrap:nnnN - { - \exp_not:c { \c__msg_text_prefix_tl #1 / #2 } - { \tl_to_str:n {#3} } - { \tl_to_str:n {#4} } - { \tl_to_str:n {#5} } - { \tl_to_str:n {#6} } - } - { } { } \__msg_show_pre_aux:n - } -\cs_new_protected:Npn \__msg_show_pre:nnxxxx #1#2#3#4#5#6 - { - \use:x - { \exp_not:n { \__msg_show_pre:nnnnnn {#1} {#2} } {#3} {#4} {#5} {#6} } - } -\cs_generate_variant:Nn \__msg_show_pre:nnnnnn { nnnnnV } -\cs_new_protected:Npn \__msg_show_pre_aux:n - { \bool_if:NTF \g__msg_log_next_bool { \iow_log:n } { \iow_term:n } } -\cs_new_protected:Npn \__msg_show_variable:NNNnn #1#2#3#4#5 - { - #2 #1 - { - \tl_if_empty:nF {#4} - { - \__msg_show_pre:nnxxxx { LaTeX / kernel } { show- #4 } - { \token_to_str:N #1 } { #3 #1 { } { ? } } { } { } - } - \__msg_show_wrap:n {#5} - } - { - \__msg_kernel_error:nnx { kernel } { variable-not-defined } - { \token_to_str:N #1 } - \bool_gset_false:N \g__msg_log_next_bool - } - } -\cs_new_protected:Npn \__msg_show_wrap:Nn #1#2 - { - \exp_args:Nx \__msg_show_wrap:n - { - > ~ \exp_not:n { \tl_to_str:n {#2} } = - \exp_not:N \tl_to_str:n { #1 {#2} } - } - } -\cs_new_protected:Npn \__msg_show_wrap:n #1 - { \iow_wrap:nnnN { #1 . } { } { } \__msg_show_wrap_aux:n } -\cs_new_protected:Npn \__msg_show_wrap_aux:n #1 - { - \tl_if_single:nTF {#1} - { \tl_clear:N \l__msg_internal_tl } - { \tl_set:Nf \l__msg_internal_tl { \__msg_show_wrap_aux:w #1 \q_stop } } - \bool_if:NTF \g__msg_log_next_bool - { - \iow_log:x { > ~ \l__msg_internal_tl . } - \bool_gset_false:N \g__msg_log_next_bool - } - { - \__iow_with:Nnn \tex_newlinechar:D { 10 } - { - \__iow_with:Nnn \tex_errorcontextlines:D { -1 } - { - \etex_showtokens:D \exp_after:wN \exp_after:wN \exp_after:wN - { \exp_after:wN \l__msg_internal_tl } - } - } - } - } -\cs_new:Npn \__msg_show_wrap_aux:w #1 > #2 . \q_stop {#2} -\cs_new:Npn \__msg_show_item:n #1 - { - \\ > \ \ \{ \tl_to_str:n {#1} \} - } -\cs_new:Npn \__msg_show_item:nn #1#2 - { - \\ > \ \ \{ \tl_to_str:n {#1} \} - \ \ => \ \ \{ \tl_to_str:n {#2} \} - } -\cs_new:Npn \__msg_show_item_unbraced:nn #1#2 - { - \\ > \ \ \tl_to_str:n {#1} - \ \ => \ \ \tl_to_str:n {#2} - } %% File: l3file.dtx Copyright (C) 1990-2017 The LaTeX3 Project \str_new:N \g_file_curr_dir_str \str_new:N \g_file_curr_ext_str @@ -8908,7 +9104,9 @@ } \__file_tmp:w { } #1 #2 \q_stop } -\cs_new_protected:Npn \file_show_list: +\cs_new_protected:Npn \file_show_list: { \__file_list:N \msg_show:nnxxxx } +\cs_new_protected:Npn \file_log_list: { \__file_list:N \msg_log:nnxxxx } +\cs_new_protected:Npn \__file_list:N #1 { \seq_clear:N \l__file_tmp_seq \clist_if_exist:NT \@filelist @@ -8918,16 +9116,10 @@ } \seq_concat:NNN \l__file_tmp_seq \l__file_tmp_seq \g__file_record_seq \seq_remove_duplicates:N \l__file_tmp_seq - \__msg_show_wrap:n - { - >~File~List~< \\ - \seq_map_function:NN \l__file_tmp_seq \__file_list_aux:n - ............ - } + #1 { LaTeX/kernel } { file-list } + { \seq_map_function:NN \l__file_tmp_seq \__file_list_aux:n } { } { } { } } -\cs_new:Npn \__file_list_aux:n #1 { #1 \\ } -\cs_new_protected:Npn \file_log_list: - { \__msg_log_next: \file_show_list: } +\cs_new:Npn \__file_list_aux:n #1 { \iow_newline: #1 } \AtBeginDocument { \exp_args:NNx \seq_set_from_clist:Nn \l__file_tmp_seq @@ -9002,16 +9194,17 @@ } } \cs_generate_variant:Nn \ior_close:N { c } -\cs_new_protected:Npn \ior_show_list: - { \__ior_list:Nn \g__ior_streams_prop { ior } } -\cs_new_protected:Npn \ior_log_list: - { \__msg_log_next: \ior_show_list: } -\cs_new_protected:Npn \__ior_list:Nn #1#2 +\cs_new_protected:Npn \ior_show_list: { \__ior_list:N \msg_show:nnxxxx } +\cs_new_protected:Npn \ior_log_list: { \__ior_list:N \msg_log:nnxxxx } +\cs_new_protected:Npn \__ior_list:N #1 { - \__msg_show_pre:nnxxxx { LaTeX / kernel } { show-streams } - {#2} { \prop_if_empty:NF #1 { ? } } { } { } - \__msg_show_wrap:n - { \prop_map_function:NN #1 \__msg_show_item_unbraced:nn } + #1 { LaTeX / kernel } { show-streams } + { ior } + { + \prop_map_function:NN \g__ior_streams_prop + \msg_show_item_unbraced:nn + } + { } { } } \cs_new_eq:NN \if_eof:w \tex_ifeof:D \prg_new_conditional:Npnn \ior_if_eof:N #1 { p , T , F , TF } @@ -9137,11 +9330,18 @@ } } \cs_generate_variant:Nn \iow_close:N { c } -\cs_new_protected:Npn \iow_show_list: - { \__iow_list:Nn \g__iow_streams_prop { iow } } -\cs_new_protected:Npn \iow_log_list: - { \__msg_log_next: \iow_show_list: } -\cs_new_eq:NN \__iow_list:Nn \__ior_list:Nn +\cs_new_protected:Npn \iow_show_list: { \__iow_list:N \msg_show:nnxxxx } +\cs_new_protected:Npn \iow_log_list: { \__iow_list:N \msg_log:nnxxxx } +\cs_new_protected:Npn \__iow_list:N #1 + { + #1 { LaTeX / kernel } { show-streams } + { iow } + { + \prop_map_function:NN \g__iow_streams_prop + \msg_show_item_unbraced:nn + } + { } { } + } \cs_new_protected:Npn \iow_shipout_x:Nn #1#2 { \tex_write:D #1 {#2} } \cs_generate_variant:Nn \iow_shipout_x:Nn { c, Nx, cx } @@ -9237,7 +9437,7 @@ \cs_set:Npx \% { \token_to_str:N \% } \cs_set:Npx \~ { \token_to_str:N \~ } \int_set:Nn \tex_escapechar:D { 92 } - \cs_set_eq:NN \\ \c__iow_wrap_newline_marker_tl + \cs_set_eq:NN \\ \iow_newline: \cs_set_eq:NN \ \c_catcode_other_space_tl \cs_set_eq:NN \iow_indent:n \__iow_indent:n #3 @@ -9259,8 +9459,22 @@ \exp_args:No \__str_to_other_fast:n \l__iow_wrap_tl \c__iow_wrap_end_marker_tl } + \tl_set:Nx \l__iow_wrap_tl + { + \exp_after:wN \__iow_wrap_fix_newline:w \l__iow_wrap_tl + ^^J \q_nil ^^J \q_stop + } \exp_after:wN \__iow_wrap_start:w \l__iow_wrap_tl } +\cs_new:Npn \__iow_wrap_fix_newline:w #1 ^^J #2 ^^J + { + #1 + \if_meaning:w \q_nil #2 + \use_i_delimit_by_q_stop:nw + \fi: + \c__iow_wrap_newline_marker_tl + \__iow_wrap_fix_newline:w #2 ^^J + } \cs_new_protected:Npn \__iow_wrap_start:w { \bool_set_false:N \l__iow_line_break_bool @@ -9455,6 +9669,12 @@ The~requested~file~could~not~be~found~in~the~current~directory,~ in~the~TeX~search~path~or~in~the~LaTeX~search~path. } +\__msg_kernel_new:nnn { kernel } { file-list } + { + >~File~List~< + #1 \\ + ............. + } \__msg_kernel_new:nnnn { kernel } { input-streams-exhausted } { Input~streams~exhausted } { @@ -9539,14 +9759,18 @@ \cs:w newdimen \cs_end: #1 } \cs_generate_variant:Nn \dim_new:N { c } -\cs_new_protected:Npn \dim_const:Nn #1 +\__debug_patch:nnNNpn { \__debug_chk_var_scope:NN c #1 } { } +\cs_new_protected:Npn \dim_const:Nn #1#2 { \dim_new:N #1 - \dim_gset:Nn #1 + \tex_global:D #1 ~ \dim_eval:n {#2} \scan_stop: } \cs_generate_variant:Nn \dim_const:Nn { c } -\cs_new_protected:Npn \dim_zero:N #1 { #1 \c_zero_dim } -\cs_new_protected:Npn \dim_gzero:N { \tex_global:D \dim_zero:N } +\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { } +\cs_new_protected:Npn \dim_zero:N #1 { #1 \c_zero_skip } +\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { } +\cs_new_protected:Npn \dim_gzero:N #1 + { \tex_global:D #1 \c_zero_skip } \cs_generate_variant:Nn \dim_zero:N { c } \cs_generate_variant:Nn \dim_gzero:N { c } \cs_new_protected:Npn \dim_zero_new:N #1 @@ -9559,31 +9783,46 @@ { TF , T , F , p } \prg_new_eq_conditional:NNn \dim_if_exist:c \cs_if_exist:c { TF , T , F , p } -\__debug_patch_args:nNNpn - { {#1} { \__debug_chk_expr:nNnN {#2} \__dim_eval:w { } \dim_set:Nn } } +\cs_set_protected:Npn \__dim_tmp:w #1#2#3 + { + \__debug_patch_args:nnnNNpn + { #1 ##1 } + { } + { {##1} { \__debug_chk_expr:nNnN {##2} \__dim_eval:w { } #3 } } + #2 #3 + } +\__dim_tmp:w \__debug_chk_var_local:N \cs_new_protected:Npn \dim_set:Nn #1#2 - { #1 ~ \__dim_eval:w #2 \__dim_eval_end: } -\cs_new_protected:Npn \dim_gset:Nn { \tex_global:D \dim_set:Nn } + { #1 ~ \__dim_eval:w #2 \__dim_eval_end: \scan_stop: } +\__dim_tmp:w \__debug_chk_var_global:N +\cs_new_protected:Npn \dim_gset:Nn #1#2 + { \tex_global:D #1 ~ \__dim_eval:w #2 \__dim_eval_end: \scan_stop: } \cs_generate_variant:Nn \dim_set:Nn { c } \cs_generate_variant:Nn \dim_gset:Nn { c } -\cs_new_protected:Npn \dim_set_eq:NN #1#2 { #1 = #2 } +\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { } +\cs_new_protected:Npn \dim_set_eq:NN #1#2 + { #1 = #2 \scan_stop: } \cs_generate_variant:Nn \dim_set_eq:NN { c } \cs_generate_variant:Nn \dim_set_eq:NN { Nc , cc } -\cs_new_protected:Npn \dim_gset_eq:NN #1#2 { \tex_global:D #1 = #2 } +\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { } +\cs_new_protected:Npn \dim_gset_eq:NN #1#2 + { \tex_global:D #1 = #2 \scan_stop: } \cs_generate_variant:Nn \dim_gset_eq:NN { c } \cs_generate_variant:Nn \dim_gset_eq:NN { Nc , cc } -\__debug_patch_args:nNNpn - { {#1} { \__debug_chk_expr:nNnN {#2} \__dim_eval:w { } \dim_add:Nn } } +\__dim_tmp:w \__debug_chk_var_local:N \cs_new_protected:Npn \dim_add:Nn #1#2 - { \tex_advance:D #1 by \__dim_eval:w #2 \__dim_eval_end: } -\cs_new_protected:Npn \dim_gadd:Nn { \tex_global:D \dim_add:Nn } + { \tex_advance:D #1 by \__dim_eval:w #2 \__dim_eval_end: \scan_stop: } +\__dim_tmp:w \__debug_chk_var_global:N +\cs_new_protected:Npn \dim_gadd:Nn #1#2 + { \tex_global:D \tex_advance:D #1 by \__dim_eval:w #2 \__dim_eval_end: \scan_stop: } \cs_generate_variant:Nn \dim_add:Nn { c } \cs_generate_variant:Nn \dim_gadd:Nn { c } -\__debug_patch_args:nNNpn - { {#1} { \__debug_chk_expr:nNnN {#2} \__dim_eval:w { } \dim_sub:Nn } } +\__dim_tmp:w \__debug_chk_var_local:N \cs_new_protected:Npn \dim_sub:Nn #1#2 - { \tex_advance:D #1 by - \__dim_eval:w #2 \__dim_eval_end: } -\cs_new_protected:Npn \dim_gsub:Nn { \tex_global:D \dim_sub:Nn } + { \tex_advance:D #1 by - \__dim_eval:w #2 \__dim_eval_end: \scan_stop: } +\__dim_tmp:w \__debug_chk_var_global:N +\cs_new_protected:Npn \dim_gsub:Nn #1#2 + { \tex_global:D \tex_advance:D #1 by - \__dim_eval:w #2 \__dim_eval_end: \scan_stop: } \cs_generate_variant:Nn \dim_sub:Nn { c } \cs_generate_variant:Nn \dim_gsub:Nn { c } \__debug_patch_args:nNNpn @@ -9655,9 +9894,7 @@ \__dim_compare:wNN #1 ? { = \__dim_compare_end:w \else: } \q_stop } \exp_args:Nno \use:nn - { \cs_new:Npn \__dim_compare:wNN #1 } - { \tl_to_str:n {pt} } - #2#3 + { \cs_new:Npn \__dim_compare:wNN #1 } { \tl_to_str:n {pt} #2#3 } { \if_meaning:w = #3 \use:c { __dim_compare_#2:w } @@ -9769,6 +10006,9 @@ { { \__debug_chk_expr:nNnN {#1} \__dim_eval:w { } \dim_eval:n } } \cs_new:Npn \dim_eval:n #1 { \dim_use:N \__dim_eval:w #1 \__dim_eval_end: } +\__debug_patch_args:nNNpn + { { \__debug_chk_expr:nNnN {#1} \__dim_eval:w { } \__dim_eval:n } } +\cs_new:Npn \__dim_eval:n #1 { \__dim_eval:w #1 \__dim_eval_end: } \cs_new_eq:NN \dim_use:N \tex_the:D \cs_new:Npn \dim_use:c #1 { \tex_the:D \cs:w #1 \cs_end: } \__debug_patch_args:nNNpn @@ -9805,11 +10045,11 @@ \cs_new_eq:NN \dim_show:N \__kernel_register_show:N \cs_generate_variant:Nn \dim_show:N { c } \cs_new_protected:Npn \dim_show:n - { \__msg_show_wrap:Nn \dim_eval:n } + { \msg_show_eval:Nn \dim_eval:n } \cs_new_eq:NN \dim_log:N \__kernel_register_log:N \cs_new_eq:NN \dim_log:c \__kernel_register_log:c \cs_new_protected:Npn \dim_log:n - { \__msg_log_next: \dim_show:n } + { \msg_log_eval:Nn \dim_eval:n } \dim_const:Nn \c_zero_dim { 0 pt } \dim_const:Nn \c_max_dim { 16383.99999 pt } \dim_new:N \l_tmpa_dim @@ -9822,14 +10062,17 @@ \cs:w newskip \cs_end: #1 } \cs_generate_variant:Nn \skip_new:N { c } -\cs_new_protected:Npn \skip_const:Nn #1 +\__debug_patch:nnNNpn { \__debug_chk_var_scope:NN c #1 } { } +\cs_new_protected:Npn \skip_const:Nn #1#2 { \skip_new:N #1 - \skip_gset:Nn #1 + \tex_global:D #1 ~ \skip_eval:n {#2} \scan_stop: } \cs_generate_variant:Nn \skip_const:Nn { c } +\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { } \cs_new_protected:Npn \skip_zero:N #1 { #1 \c_zero_skip } -\cs_new_protected:Npn \skip_gzero:N { \tex_global:D \skip_zero:N } +\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { } +\cs_new_protected:Npn \skip_gzero:N #1 { \tex_global:D #1 \c_zero_skip } \cs_generate_variant:Nn \skip_zero:N { c } \cs_generate_variant:Nn \skip_gzero:N { c } \cs_new_protected:Npn \skip_zero_new:N #1 @@ -9842,11 +10085,20 @@ { TF , T , F , p } \prg_new_eq_conditional:NNn \skip_if_exist:c \cs_if_exist:c { TF , T , F , p } -\__debug_patch_args:nNNpn - { {#1} { \__debug_chk_expr:nNnN {#2} \etex_glueexpr:D { } \skip_set:Nn } } +\cs_set_protected:Npn \__dim_tmp:w #1#2#3 + { + \__debug_patch_args:nnnNNpn + { #1 ##1 } + { } + { {##1} { \__debug_chk_expr:nNnN {##2} \etex_glueexpr:D { } #3 } } + #2 #3 + } +\__dim_tmp:w \__debug_chk_var_local:N \cs_new_protected:Npn \skip_set:Nn #1#2 { #1 ~ \etex_glueexpr:D #2 \scan_stop: } -\cs_new_protected:Npn \skip_gset:Nn { \tex_global:D \skip_set:Nn } +\__dim_tmp:w \__debug_chk_var_global:N +\cs_new_protected:Npn \skip_gset:Nn #1#2 + { \tex_global:D #1 ~ \etex_glueexpr:D #2 \scan_stop: } \cs_generate_variant:Nn \skip_set:Nn { c } \cs_generate_variant:Nn \skip_gset:Nn { c } \cs_new_protected:Npn \skip_set_eq:NN #1#2 { #1 = #2 } @@ -9855,18 +10107,20 @@ \cs_new_protected:Npn \skip_gset_eq:NN #1#2 { \tex_global:D #1 = #2 } \cs_generate_variant:Nn \skip_gset_eq:NN { c } \cs_generate_variant:Nn \skip_gset_eq:NN { Nc , cc } -\__debug_patch_args:nNNpn - { {#1} { \__debug_chk_expr:nNnN {#2} \etex_glueexpr:D { } \skip_add:Nn } } +\__dim_tmp:w \__debug_chk_var_local:N \cs_new_protected:Npn \skip_add:Nn #1#2 { \tex_advance:D #1 by \etex_glueexpr:D #2 \scan_stop: } -\cs_new_protected:Npn \skip_gadd:Nn { \tex_global:D \skip_add:Nn } +\__dim_tmp:w \__debug_chk_var_global:N +\cs_new_protected:Npn \skip_gadd:Nn #1#2 + { \tex_global:D \tex_advance:D #1 by \etex_glueexpr:D #2 \scan_stop: } \cs_generate_variant:Nn \skip_add:Nn { c } \cs_generate_variant:Nn \skip_gadd:Nn { c } -\__debug_patch_args:nNNpn - { {#1} { \__debug_chk_expr:nNnN {#2} \etex_glueexpr:D { } \skip_sub:Nn } } +\__dim_tmp:w \__debug_chk_var_local:N \cs_new_protected:Npn \skip_sub:Nn #1#2 { \tex_advance:D #1 by - \etex_glueexpr:D #2 \scan_stop: } -\cs_new_protected:Npn \skip_gsub:Nn { \tex_global:D \skip_sub:Nn } +\__dim_tmp:w \__debug_chk_var_global:N +\cs_new_protected:Npn \skip_gsub:Nn #1#2 + { \tex_global:D \tex_advance:D #1 by - \etex_glueexpr:D #2 \scan_stop: } \cs_generate_variant:Nn \skip_sub:Nn { c } \cs_generate_variant:Nn \skip_gsub:Nn { c } \prg_new_conditional:Npnn \skip_if_eq:nn #1#2 { p , T , F , TF } @@ -9879,7 +10133,7 @@ \prg_return_false: \fi: } -\cs_set_protected:Npn \__cs_tmp:w #1 +\cs_set_protected:Npn \__dim_tmp:w #1 { \__debug_patch_conditional_args:nNNpnn { @@ -9896,7 +10150,7 @@ } \cs_new:Npn \__skip_if_finite:wwNw ##1 #1 ##2 ; ##3 ##4 \q_stop {##3} } -\exp_args:No \__cs_tmp:w { \tl_to_str:n { fil } } +\exp_args:No \__dim_tmp:w { \tl_to_str:n { fil } } \__debug_patch_args:nNNpn { { \__debug_chk_expr:nNnN {#1} \etex_glueexpr:D { } \skip_eval:n } } \cs_new:Npn \skip_eval:n #1 @@ -9918,11 +10172,11 @@ \cs_new_eq:NN \skip_show:N \__kernel_register_show:N \cs_generate_variant:Nn \skip_show:N { c } \cs_new_protected:Npn \skip_show:n - { \__msg_show_wrap:Nn \skip_eval:n } + { \msg_show_eval:Nn \skip_eval:n } \cs_new_eq:NN \skip_log:N \__kernel_register_log:N \cs_new_eq:NN \skip_log:c \__kernel_register_log:c \cs_new_protected:Npn \skip_log:n - { \__msg_log_next: \skip_show:n } + { \msg_log_eval:Nn \skip_eval:n } \skip_const:Nn \c_zero_skip { \c_zero_dim } \skip_const:Nn \c_max_skip { \c_max_dim } \skip_new:N \l_tmpa_skip @@ -9935,15 +10189,19 @@ \cs:w newmuskip \cs_end: #1 } \cs_generate_variant:Nn \muskip_new:N { c } -\cs_new_protected:Npn \muskip_const:Nn #1 +\__debug_patch:nnNNpn { \__debug_chk_var_scope:NN c #1 } { } +\cs_new_protected:Npn \muskip_const:Nn #1#2 { \muskip_new:N #1 - \muskip_gset:Nn #1 + \tex_global:D #1 ~ \muskip_eval:n {#2} \scan_stop: } \cs_generate_variant:Nn \muskip_const:Nn { c } +\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { } \cs_new_protected:Npn \muskip_zero:N #1 { #1 \c_zero_muskip } -\cs_new_protected:Npn \muskip_gzero:N { \tex_global:D \muskip_zero:N } +\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { } +\cs_new_protected:Npn \muskip_gzero:N #1 + { \tex_global:D #1 \c_zero_muskip } \cs_generate_variant:Nn \muskip_zero:N { c } \cs_generate_variant:Nn \muskip_gzero:N { c } \cs_new_protected:Npn \muskip_zero_new:N #1 @@ -9956,49 +10214,50 @@ { TF , T , F , p } \prg_new_eq_conditional:NNn \muskip_if_exist:c \cs_if_exist:c { TF , T , F , p } -\__debug_patch_args:nNNpn +\cs_set_protected:Npn \__dim_tmp:w #1#2#3 { - {#1} - { - \__debug_chk_expr:nNnN {#2} \etex_muexpr:D - { \etex_mutoglue:D } \muskip_set:Nn - } + \__debug_patch_args:nnnNNpn + { #1 ##1 } + { } + { + {##1} + { + \__debug_chk_expr:nNnN {##2} + \etex_muexpr:D { \etex_mutoglue:D } #3 + } + } + #2 #3 } +\__dim_tmp:w \__debug_chk_var_local:N \cs_new_protected:Npn \muskip_set:Nn #1#2 { #1 ~ \etex_muexpr:D #2 \scan_stop: } -\cs_new_protected:Npn \muskip_gset:Nn { \tex_global:D \muskip_set:Nn } +\__dim_tmp:w \__debug_chk_var_global:N +\cs_new_protected:Npn \muskip_gset:Nn #1#2 + { \tex_global:D #1 ~ \etex_muexpr:D #2 \scan_stop: } \cs_generate_variant:Nn \muskip_set:Nn { c } \cs_generate_variant:Nn \muskip_gset:Nn { c } +\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { } \cs_new_protected:Npn \muskip_set_eq:NN #1#2 { #1 = #2 } \cs_generate_variant:Nn \muskip_set_eq:NN { c } \cs_generate_variant:Nn \muskip_set_eq:NN { Nc , cc } +\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { } \cs_new_protected:Npn \muskip_gset_eq:NN #1#2 { \tex_global:D #1 = #2 } \cs_generate_variant:Nn \muskip_gset_eq:NN { c } \cs_generate_variant:Nn \muskip_gset_eq:NN { Nc , cc } -\__debug_patch_args:nNNpn - { - {#1} - { - \__debug_chk_expr:nNnN {#2} \etex_muexpr:D - { \etex_mutoglue:D } \muskip_add:Nn - } - } +\__dim_tmp:w \__debug_chk_var_local:N \cs_new_protected:Npn \muskip_add:Nn #1#2 { \tex_advance:D #1 by \etex_muexpr:D #2 \scan_stop: } -\cs_new_protected:Npn \muskip_gadd:Nn { \tex_global:D \muskip_add:Nn } +\__dim_tmp:w \__debug_chk_var_global:N +\cs_new_protected:Npn \muskip_gadd:Nn #1#2 + { \tex_global:D \tex_advance:D #1 by \etex_muexpr:D #2 \scan_stop: } \cs_generate_variant:Nn \muskip_add:Nn { c } \cs_generate_variant:Nn \muskip_gadd:Nn { c } -\__debug_patch_args:nNNpn - { - {#1} - { - \__debug_chk_expr:nNnN {#2} \etex_muexpr:D - { \etex_mutoglue:D } \muskip_sub:Nn - } - } +\__dim_tmp:w \__debug_chk_var_local:N \cs_new_protected:Npn \muskip_sub:Nn #1#2 { \tex_advance:D #1 by - \etex_muexpr:D #2 \scan_stop: } -\cs_new_protected:Npn \muskip_gsub:Nn { \tex_global:D \muskip_sub:Nn } +\__dim_tmp:w \__debug_chk_var_global:N +\cs_new_protected:Npn \muskip_gsub:Nn #1#2 + { \tex_global:D \tex_advance:D #1 by - \etex_muexpr:D #2 \scan_stop: } \cs_generate_variant:Nn \muskip_sub:Nn { c } \cs_generate_variant:Nn \muskip_gsub:Nn { c } \__debug_patch_args:nNNpn @@ -10015,11 +10274,11 @@ \cs_new_eq:NN \muskip_show:N \__kernel_register_show:N \cs_generate_variant:Nn \muskip_show:N { c } \cs_new_protected:Npn \muskip_show:n - { \__msg_show_wrap:Nn \muskip_eval:n } + { \msg_show_eval:Nn \muskip_eval:n } \cs_new_eq:NN \muskip_log:N \__kernel_register_log:N \cs_new_eq:NN \muskip_log:c \__kernel_register_log:c \cs_new_protected:Npn \muskip_log:n - { \__msg_log_next: \muskip_show:n } + { \msg_log_eval:Nn \muskip_eval:n } \muskip_const:Nn \c_zero_muskip { 0 mu } \muskip_const:Nn \c_max_muskip { 16383.99999 mu } \muskip_new:N \l_tmpa_muskip @@ -10883,34 +11142,26 @@ { \prg_return_true: } { \prg_return_false: } } -\cs_new_protected:Npn \keys_show:nn #1#2 - { - \keys_if_exist:nnTF {#1} {#2} - { - \__msg_show_pre:nnxxxx { LaTeX / kernel } { show-key } - { \__keys_remove_spaces:n { #1 / #2 } } { t } { } { } - \exp_args:Nc \__keys_show:N - { \c__keys_code_root_tl \__keys_remove_spaces:n { #1 / #2 } } - } - { - \__msg_show_pre:nnxxxx { LaTeX / kernel } { show-key } - { \__keys_remove_spaces:n { #1 / #2 } } { f } { } { } - \__msg_show_wrap:n { } - } - } -\cs_new_protected:Npn \__keys_show:N #1 +\cs_new_protected:Npn \keys_show:nn + { \__keys_show:Nnn \msg_show:nnxxxx } +\cs_new_protected:Npn \keys_log:nn + { \__keys_show:Nnn \msg_log:nnxxxx } +\cs_new_protected:Npn \__keys_show:Nnn #1#2#3 { - \use:x + #1 { LaTeX / kernel } { show-key } + { \__keys_remove_spaces:n { #2 / #3 } } { - \__msg_show_wrap:n + \keys_if_exist:nnT {#2} {#3} { - \exp_not:N \__msg_show_item_unbraced:nn { code } - { \token_get_replacement_spec:N #1 } + \exp_args:Nnf \msg_show_item_unbraced:nn { code } + { + \exp_args:Nc \token_get_replacement_spec:N + { \c__keys_code_root_tl \__keys_remove_spaces:n { #2 / #3 } } + } } } + { } { } } -\cs_new_protected:Npn \keys_log:nn - { \__msg_log_next: \keys_show:nn } \__msg_kernel_new:nnnn { kernel } { boolean-values-only } { Key~'#1'~accepts~boolean~values~only. } { The~key~'#1'~only~accepts~the~values~'true'~and~'false'. } @@ -10976,12 +11227,12 @@ \__msg_kernel_new:nnn { kernel } { show-key } { The~key~#1~ - \str_if_eq:nnTF {#2} { t } - { has~the~properties: } + \tl_if_empty:nTF {#2} { is~undefined. } + { has~the~properties: #2 . } } %% File: l3fp.dtx Copyright (C) 2011-2017 The LaTeX3 Project -%% File: l3fp-aux.dtx Copyright(C) 2011-2014,2016-2017 The LaTeX3 Project +%% File: l3fp-aux.dtx Copyright(C) 2011-2017 The LaTeX3 Project \cs_new:Npn \__fp_use_none_stop_f:n #1 { \exp_stop_f: } \cs_new:Npn \__fp_use_s:n #1 { #1; } \cs_new:Npn \__fp_use_s:nn #1#2 { #1#2; } @@ -11451,7 +11702,7 @@ { Invalid~operation~ #1 (#2) } \__msg_kernel_new:nnn { kernel } { fp-invalid-ii } { Invalid~operation~ (#1) #3 (#2) } -%% File: l3fp-round.dtx Copyright(C) 2011-2012,2014-2017 The LaTeX3 Project +%% File: l3fp-round.dtx Copyright(C) 2011-2017 The LaTeX3 Project \cs_new:Npn \__fp_parse_word_trunc:N { \__fp_parse_function:NNN \__fp_round_o:Nw \__fp_round_to_zero:NNN } \cs_new:Npn \__fp_parse_word_floor:N @@ -11898,15 +12149,14 @@ . \tl_to_str:n { pt } ; \exp_not:N \__fp_parse_one_register_int:www \exp_not:N \q_stop } -\use:x - { - \cs_new:Npn \exp_not:N \__fp_parse_one_register_auxii:wwwNw - ##1 . ##2 \tl_to_str:n { pt } ##3 ; ##4##5 \exp_not:N \q_stop - { ##4 ##1.##2; } - \cs_new:Npn \exp_not:N \__fp_parse_one_register_mu:www - ##1 \tl_to_str:n { mu } ; ##2 ; - { \exp_not:N \__fp_parse_one_register_dim:ww ##1 ; } - } +\exp_args:Nno \use:nn + { \cs_new:Npn \__fp_parse_one_register_auxii:wwwNw #1 . #2 } + { \tl_to_str:n { pt } #3 ; #4#5 \q_stop } + { #4 #1.#2; } +\exp_args:Nno \use:nn + { \cs_new:Npn \__fp_parse_one_register_mu:www #1 } + { \tl_to_str:n { mu } ; #2 ; } + { \__fp_parse_one_register_dim:ww #1 ; } \cs_new:Npn \__fp_parse_one_register_int:www #1; #2.; #3; { \__fp_parse:n { #1 e #3 } } \cs_new:Npn \__fp_parse_one_register_dim:ww #1; #2; @@ -12969,7 +13219,7 @@ \__msg_kernel_new:nnn { kernel } { fp-robust-cmd } { Robust~command~#1 invalid~in~fp~expression! } } -%% File: l3fp-logic.dtx Copyright (C) 2011-2014,2016,2017 The LaTeX3 Project +%% File: l3fp-logic.dtx Copyright (C) 2011-2017 The LaTeX3 Project \cs_new:Npn \__fp_parse_word_max:N { \__fp_parse_function:NNN \__fp_minmax_o:Nw 2 } \cs_new:Npn \__fp_parse_word_min:N @@ -14061,7 +14311,7 @@ \if_case:w #3 \exp_stop_f: #1 \or: 1 \or: 0 \fi: \exp_stop_f: #4; } -%% File: l3fp-extended.dtx Copyright (C) 2011-2014,2016,2017 The LaTeX3 Project +%% File: l3fp-extended.dtx Copyright (C) 2011-2017 The LaTeX3 Project \tl_const:Nn \c__fp_one_fixed_tl { {10000} {0000} {0000} {0000} {0000} {0000} ; } \cs_new:Npn \__fp_fixed_continue:wn #1; #2 { #2 #1; } @@ -14498,7 +14748,7 @@ \exp_after:wN \__fp_basics_pack_low:NNNNNw \__int_value:w \__int_eval:w 1 #3#4 + 1 ; } -%% File: l3fp-expo.dtx Copyright (C) 2011-2014,2016,2017 The LaTeX3 Project +%% File: l3fp-expo.dtx Copyright (C) 2011-2017 The LaTeX3 Project \cs_new:Npn \__fp_parse_word_exp:N { \__fp_parse_unary_function:NNN \__fp_exp_o:w ? } \cs_new:Npn \__fp_parse_word_ln:N @@ -15171,7 +15421,7 @@ 1 \fi: } -%% File: l3fp-trig.dtx Copyright (C) 2011-2014,2016,2017 The LaTeX3 Project +%% File: l3fp-trig.dtx Copyright (C) 2011-2017 The LaTeX3 Project \tl_map_inline:nn { {acos} {acsc} {asec} {asin} @@ -15977,7 +16227,7 @@ { \__fp_asin_auxi_o:NnNww #1 {#3} #4 } } } -%% File: l3fp-convert.dtx Copyright(C) 2011-2014,2016,2017 The LaTeX3 Project +%% File: l3fp-convert.dtx Copyright(C) 2011-2017 The LaTeX3 Project \cs_new:Npn \__fp_trim_zeros:w #1 ; { \__fp_trim_zeros_loop:w #1 @@ -16414,19 +16664,19 @@ \cs_generate_variant:Nn \fp_gadd:Nn { c } \cs_generate_variant:Nn \fp_sub:Nn { c } \cs_generate_variant:Nn \fp_gsub:Nn { c } -\cs_new_protected:Npn \fp_show:N #1 +\cs_new_protected:Npn \fp_show:N { \__fp_show:NN \tl_show:n } +\cs_generate_variant:Nn \fp_show:N { c } +\cs_new_protected:Npn \fp_log:N { \__fp_show:NN \tl_log:n } +\cs_generate_variant:Nn \fp_log:N { c } +\cs_new_protected:Npn \__fp_show:NN #1#2 { - \__msg_show_variable:NNNnn #1 \fp_if_exist:NTF ? { } - { > ~ \token_to_str:N #1 = \fp_to_tl:N #1 } + \__kernel_check_defined:NT #2 + { \exp_args:Nx #1 { \token_to_str:N #2 = \fp_to_tl:N #2 } } } \cs_new_protected:Npn \fp_show:n - { \__msg_show_wrap:Nn \fp_to_tl:n } -\cs_generate_variant:Nn \fp_show:N { c } -\cs_new_protected:Npn \fp_log:N - { \__msg_log_next: \fp_show:N } + { \msg_show_eval:Nn \fp_to_tl:n } \cs_new_protected:Npn \fp_log:n - { \__msg_log_next: \fp_show:n } -\cs_generate_variant:Nn \fp_log:N { c } + { \msg_log_eval:Nn \fp_to_tl:n } \fp_const:Nn \c_e_fp { 2.718 2818 2845 9045 } \fp_const:Nn \c_one_fp { 1 } \fp_const:Nn \c_pi_fp { 3.141 5926 5358 9793 } @@ -16435,7 +16685,7 @@ \fp_new:N \l_tmpb_fp \fp_new:N \g_tmpa_fp \fp_new:N \g_tmpb_fp -%% File l3sort.dtx (C) Copyright 2012,2014-2017 The LaTeX3 Project +%% File l3sort.dtx (C) Copyright 2012-2017 The LaTeX3 Project \int_new:N \l__sort_length_int \int_new:N \l__sort_min_int \int_new:N \l__sort_top_int @@ -16900,7 +17150,7 @@ } \cs_new_protected:Npn \__tl_build_one:x #1 { \use:x { \__tl_build_one:n {#1} } } -%% File: l3tl-analysis.dtx Copyright (C) 2011-2012,2015-2017 The LaTeX3 Project% +%% File: l3tl-analysis.dtx Copyright (C) 2011-2017 The LaTeX3 Project% \__scan_new:N \s__tl \tl_new:N \l__tl_analysis_internal_tl \cs_new_eq:NN \l__tl_analysis_token ? @@ -17227,35 +17477,27 @@ \tl_if_exist:NTF #1 { \exp_args:No \__tl_analysis:n {#1} - \__msg_show_pre:nnxxxx { LaTeX / kernel } { show-tl-analysis } - { \token_to_str:N #1 } { \tl_if_empty:NTF #1 { } { ? } } { } { } - \__tl_analysis_show: + \msg_show:nnxxxx { LaTeX / kernel } { show-tl-analysis } + { \token_to_str:N #1 } { \__tl_analysis_show: } { } { } } { \tl_show:N #1 } } \cs_new_protected:Npn \tl_show_analysis:n #1 { \__tl_analysis:n {#1} - \__msg_show_pre:nnxxxx { LaTeX / kernel } { show-tl-analysis } - { } { \tl_if_empty:nTF {#1} { } { ? } } { } { } - \__tl_analysis_show: + \msg_show:nnxxxx { LaTeX / kernel } { show-tl-analysis } + { } { \__tl_analysis_show: } { } { } } -\cs_new_protected:Npn \__tl_analysis_show: +\cs_new:Npn \__tl_analysis_show: { - \group_begin: - \exp_args:NNx - \group_end: - \__msg_show_wrap:n - { - \exp_after:wN \__tl_analysis_show_loop:wNw \g__tl_analysis_result_tl - \s__tl { ? \__prg_break: } \s__tl - \__prg_break_point: - } + \exp_after:wN \__tl_analysis_show_loop:wNw \g__tl_analysis_result_tl + \s__tl { ? \__prg_break: } \s__tl + \__prg_break_point: } \cs_new:Npn \__tl_analysis_show_loop:wNw #1 \s__tl #2 #3 \s__tl { \use_none:n #2 - \exp_not:n { \\ > \ \ } + \iow_newline: > \use:nn { ~ } { ~ } \if_int_compare:w "#2 = 0 \exp_stop_f: \exp_after:wN \__tl_analysis_show_cs:n \else: @@ -17324,7 +17566,7 @@ The~token~list~ \tl_if_empty:nF {#1} { #1 ~ } \tl_if_empty:nTF {#2} { is~empty } - { contains~the~tokens: } + { contains~the~tokens: #2 } } %% File: l3regex.dtx Copyright (C) 2011-2017 The LaTeX3 Project \cs_new_protected:Npn \__regex_standard_escapechar: @@ -17465,7 +17707,7 @@ } \cs_new_protected:Npn \__regex_item_catcode:nT #1 { - \if_int_odd:w \__int_eval:w #1 / \__regex_item_catcode: \__int_eval_end: + \if_int_odd:w \__int_eval:n { #1 / \__regex_item_catcode: } \exp_after:wN \use:n \else: \exp_after:wN \use_none:n @@ -17730,9 +17972,8 @@ \if_int_compare:w 1 < "1 \token_to_str:N #1 \exp_stop_f: #1 \prg_return_true: \else: - \if_case:w \__int_eval:w - \exp_after:wN ` \token_to_str:N #1 - `a - \__int_eval_end: + \if_case:w + \__int_eval:n { \exp_after:wN ` \token_to_str:N #1 - `a } A \or: B \or: C @@ -18546,7 +18787,7 @@ } \cs_new_protected:Npn \__regex_compile_c_lbrack_add:N #1 { - \if_int_odd:w \__int_eval:w \l__regex_catcodes_int / #1 \__int_eval_end: + \if_int_odd:w \__int_eval:n { \l__regex_catcodes_int / #1 } \else: \int_add:Nn \l__regex_catcodes_int {#1} \fi: @@ -18714,7 +18955,7 @@ { \__tl_build_one:n { \__regex_command_K: } } { \__regex_compile_raw_error:N K } } -\cs_new_protected:Npn \__regex_show:Nn #1#2 +\cs_new_protected:Npn \__regex_show:N #1 { \__tl_build:Nw \l__regex_internal_a_tl \cs_set_protected:Npn \__regex_branch:n @@ -18764,15 +19005,13 @@ \__regex_show_push:n { ~ } \cs_if_exist_use:N #1 \__tl_build_end: - \__msg_show_variable:NNNnn #1 \cs_if_exist:NTF ? { } - { >~Compiled~regex~#2: \l__regex_internal_a_tl } } \cs_new_protected:Npn \__regex_show_one:n #1 { \int_incr:N \l__regex_show_lines_int \__tl_build_one:x { - \exp_not:N \\ + \exp_not:N \iow_newline: \seq_map_function:NN \l__regex_show_prefix_seq \use:n #1 } @@ -19116,7 +19355,7 @@ \l__regex_right_state_int \l__regex_max_state_int \int_set_eq:NN \l__regex_internal_a_int \l__regex_left_state_int \int_set_eq:NN \l__regex_internal_b_int \l__regex_max_state_int - \if_int_compare:w \__int_eval:w #1 > 1 \exp_stop_f: + \if_int_compare:w \__int_eval:n {#1} > 1 \exp_stop_f: \int_set:Nn \l__regex_internal_c_int { ( #1 - 1 ) @@ -19446,7 +19685,7 @@ \cs_new_protected:Npn \__regex_action_cost:n #1 { \exp_args:No \__regex_store_state:n - { \__int_value:w \__int_eval:w \l__regex_curr_state_int + #1 } + { \__int_value:w \__int_eval:n { \l__regex_curr_state_int + #1 } } } \cs_new_protected:Npn \__regex_store_state:n #1 { @@ -19521,7 +19760,8 @@ } \cs_new_protected:Npn \__regex_submatch_balance:n #1 { - \__int_eval:w + \__int_eval:n + { \int_compare:nNnTF { \__intarray_item_fast:Nn \g__regex_submatch_end_intarray {#1} } = 0 { 0 } @@ -19537,7 +19777,7 @@ \__intarray_item_fast:Nn \g__regex_balance_intarray { \__intarray_item_fast:Nn \g__regex_submatch_begin_intarray {#1} } } - \__int_eval_end: + } } \__debug_patch:nnNNpn { \__debug_trace_push:nnN { regex } { 1 } \__regex_replacement:n } @@ -19625,7 +19865,7 @@ \__tl_build_one:n { \__regex_query_submatch:n { #1 + ##1 } } \if_int_compare:w \l__regex_replacement_csnames_int = 0 \exp_stop_f: \tl_put_right:Nn \l__regex_balance_tl - { + \__regex_submatch_balance:n { \__int_eval:w #1+##1 \__int_eval_end: } } + { + \__regex_submatch_balance:n { \__int_eval:n { #1+##1 } } } \fi: \fi: } @@ -19821,11 +20061,21 @@ \cs_new_protected:Npn \regex_show:n #1 { \__regex_compile:n {#1} - \__regex_show:Nn \l__regex_internal_regex - { { \tl_to_str:n {#1} } } + \__regex_show:N \l__regex_internal_regex + \msg_show:nnxxxx { LaTeX / kernel } { show-regex } + { \tl_to_str:n {#1} } { } + { \l__regex_internal_a_tl } { } } \cs_new_protected:Npn \regex_show:N #1 - { \__regex_show:Nn #1 { variable~\token_to_str:N #1 } } + { + \__kernel_check_defined:NT #1 + { + \__regex_show:N #1 + \msg_show:nnxxxx { LaTeX / kernel } { show-regex } + { } { \token_to_str:N #1 } + { \l__regex_internal_a_tl } { } + } + } \prg_new_protected_conditional:Npnn \regex_match:nn #1#2 { T , F , TF } { \__regex_if_match:nn { \__regex_build:n {#1} } {#2} @@ -20374,6 +20624,12 @@ There~ \int_compare:nTF { #1 = 1 } { was } { were } ~ #1~ missing~right~\int_compare:nTF { #1 = 1 } { parenthesis } { parentheses } . } +\__msg_kernel_new:nnn { kernel } { show-regex } + { + >~Compiled~regex~ + \tl_if_empty:nTF {#1} { variable~ #2 } { {#1} } : + #3 + } \cs_new:Npn \__regex_msg_repeated:nnN #1#2#3 { \str_if_eq_x:nnF { #1 #2 } { 1 0 } @@ -20439,16 +20695,20 @@ { \box_if_exist:NTF #1 { \box_gclear:N #1 } { \box_new:N #1 } } \cs_generate_variant:Nn \box_clear_new:N { c } \cs_generate_variant:Nn \box_gclear_new:N { c } +\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { } \cs_new_protected:Npn \box_set_eq:NN #1#2 { \tex_setbox:D #1 \tex_copy:D #2 } -\cs_new_protected:Npn \box_gset_eq:NN - { \tex_global:D \box_set_eq:NN } +\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { } +\cs_new_protected:Npn \box_gset_eq:NN #1#2 + { \tex_global:D \tex_setbox:D #1 \tex_copy:D #2 } \cs_generate_variant:Nn \box_set_eq:NN { c , Nc , cc } \cs_generate_variant:Nn \box_gset_eq:NN { c , Nc , cc } +\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { } \cs_new_protected:Npn \box_set_eq_clear:NN #1#2 { \tex_setbox:D #1 \tex_box:D #2 } -\cs_new_protected:Npn \box_gset_eq_clear:NN - { \tex_global:D \box_set_eq_clear:NN } +\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { } +\cs_new_protected:Npn \box_gset_eq_clear:NN #1#2 + { \tex_global:D \tex_setbox:D #1 \tex_box:D #2 } \cs_generate_variant:Nn \box_set_eq_clear:NN { c , Nc , cc } \cs_generate_variant:Nn \box_gset_eq_clear:NN { c , Nc , cc } \prg_new_eq_conditional:NNn \box_if_exist:N \cs_if_exist:N @@ -20461,15 +20721,12 @@ \cs_generate_variant:Nn \box_ht:N { c } \cs_generate_variant:Nn \box_dp:N { c } \cs_generate_variant:Nn \box_wd:N { c } -\__debug_patch_args:nNNpn { {#1} { (#2) } } \cs_new_protected:Npn \box_set_dp:Nn #1#2 - { \box_dp:N #1 \__dim_eval:w #2 \__dim_eval_end: } -\__debug_patch_args:nNNpn { {#1} { (#2) } } + { \box_dp:N #1 \__dim_eval:n {#2} } \cs_new_protected:Npn \box_set_ht:Nn #1#2 - { \box_ht:N #1 \__dim_eval:w #2 \__dim_eval_end: } -\__debug_patch_args:nNNpn { {#1} { (#2) } } + { \box_ht:N #1 \__dim_eval:n {#2} } \cs_new_protected:Npn \box_set_wd:Nn #1#2 - { \box_wd:N #1 \__dim_eval:w #2 \__dim_eval_end: } + { \box_wd:N #1 \__dim_eval:n {#2} } \cs_generate_variant:Nn \box_set_ht:Nn { c } \cs_generate_variant:Nn \box_set_dp:Nn { c } \cs_generate_variant:Nn \box_set_wd:Nn { c } @@ -20477,18 +20734,14 @@ \cs_new_eq:NN \box_use:N \tex_copy:D \cs_generate_variant:Nn \box_use_drop:N { c } \cs_generate_variant:Nn \box_use:N { c } -\__debug_patch_args:nNNpn { { (#1) } {#2} } \cs_new_protected:Npn \box_move_left:nn #1#2 - { \tex_moveleft:D \__dim_eval:w #1 \__dim_eval_end: #2 } -\__debug_patch_args:nNNpn { { (#1) } {#2} } + { \tex_moveleft:D \__dim_eval:n {#1} #2 } \cs_new_protected:Npn \box_move_right:nn #1#2 - { \tex_moveright:D \__dim_eval:w #1 \__dim_eval_end: #2 } -\__debug_patch_args:nNNpn { { (#1) } {#2} } + { \tex_moveright:D \__dim_eval:n {#1} #2 } \cs_new_protected:Npn \box_move_up:nn #1#2 - { \tex_raise:D \__dim_eval:w #1 \__dim_eval_end: #2 } -\__debug_patch_args:nNNpn { { (#1) } {#2} } + { \tex_raise:D \__dim_eval:n {#1} #2 } \cs_new_protected:Npn \box_move_down:nn #1#2 - { \tex_lower:D \__dim_eval:w #1 \__dim_eval_end: #2 } + { \tex_lower:D \__dim_eval:n {#1} #2 } \cs_new_eq:NN \if_hbox:N \tex_ifhbox:D \cs_new_eq:NN \if_vbox:N \tex_ifvbox:D \cs_new_eq:NN \if_box_empty:N \tex_ifvoid:D @@ -20510,10 +20763,12 @@ \cs_generate_variant:Nn \box_if_empty:NT { c } \cs_generate_variant:Nn \box_if_empty:NF { c } \cs_generate_variant:Nn \box_if_empty:NTF { c } +\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { } \cs_new_protected:Npn \box_set_to_last:N #1 { \tex_setbox:D #1 \tex_lastbox:D } -\cs_new_protected:Npn \box_gset_to_last:N - { \tex_global:D \box_set_to_last:N } +\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { } +\cs_new_protected:Npn \box_gset_to_last:N #1 + { \tex_global:D \tex_setbox:D #1 \tex_lastbox:D } \cs_generate_variant:Nn \box_set_to_last:N { c } \cs_generate_variant:Nn \box_gset_to_last:N { c } \box_new:N \c_empty_box @@ -20559,29 +20814,42 @@ \cs_generate_variant:Nn \__box_show:NNnn { NNff } \cs_new_protected:Npn \hbox:n #1 { \tex_hbox:D \scan_stop: { \group_begin: #1 \group_end: } } +\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { } \cs_new_protected:Npn \hbox_set:Nn #1#2 { \tex_setbox:D #1 \tex_hbox:D { \group_begin: #2 \group_end: } } -\cs_new_protected:Npn \hbox_gset:Nn { \tex_global:D \hbox_set:Nn } +\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { } +\cs_new_protected:Npn \hbox_gset:Nn #1#2 + { \tex_global:D \tex_setbox:D #1 \tex_hbox:D { \group_begin: #2 \group_end: } } \cs_generate_variant:Nn \hbox_set:Nn { c } \cs_generate_variant:Nn \hbox_gset:Nn { c } -\__debug_patch_args:nNNpn { {#1} { (#2) } {#3} } +\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { } \cs_new_protected:Npn \hbox_set_to_wd:Nnn #1#2#3 { - \tex_setbox:D #1 \tex_hbox:D to \__dim_eval:w #2 \__dim_eval_end: + \tex_setbox:D #1 \tex_hbox:D to \__dim_eval:n {#2} + { \group_begin: #3 \group_end: } + } +\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { } +\cs_new_protected:Npn \hbox_gset_to_wd:Nnn #1#2#3 + { + \tex_global:D \tex_setbox:D #1 \tex_hbox:D to \__dim_eval:n {#2} { \group_begin: #3 \group_end: } } -\cs_new_protected:Npn \hbox_gset_to_wd:Nnn - { \tex_global:D \hbox_set_to_wd:Nnn } \cs_generate_variant:Nn \hbox_set_to_wd:Nnn { c } \cs_generate_variant:Nn \hbox_gset_to_wd:Nnn { c } +\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { } \cs_new_protected:Npn \hbox_set:Nw #1 { \tex_setbox:D #1 \tex_hbox:D \c_group_begin_token \group_begin: } -\cs_new_protected:Npn \hbox_gset:Nw - { \tex_global:D \hbox_set:Nw } +\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { } +\cs_new_protected:Npn \hbox_gset:Nw #1 + { + \tex_global:D \tex_setbox:D #1 \tex_hbox:D + \c_group_begin_token + \group_begin: + } \cs_generate_variant:Nn \hbox_set:Nw { c } \cs_generate_variant:Nn \hbox_gset:Nw { c } \cs_new_protected:Npn \hbox_set_end: @@ -20590,21 +20858,25 @@ \c_group_end_token } \cs_new_eq:NN \hbox_gset_end: \hbox_set_end: -\__debug_patch_args:nNNpn { {#1} { (#2) } } +\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { } \cs_new_protected:Npn \hbox_set_to_wd:Nnw #1#2 { - \tex_setbox:D #1 \tex_hbox:D to \__dim_eval:w #2 \__dim_eval_end: + \tex_setbox:D #1 \tex_hbox:D to \__dim_eval:n {#2} + \c_group_begin_token + \group_begin: + } +\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { } +\cs_new_protected:Npn \hbox_gset_to_wd:Nnw #1#2 + { + \tex_global:D \tex_setbox:D #1 \tex_hbox:D to \__dim_eval:n {#2} \c_group_begin_token \group_begin: } -\cs_new_protected:Npn \hbox_gset_to_wd:Nnw - { \tex_global:D \hbox_set_to_wd:Nnw } \cs_generate_variant:Nn \hbox_set_to_wd:Nnw { c } \cs_generate_variant:Nn \hbox_gset_to_wd:Nnw { c } -\__debug_patch_args:nNNpn { { (#1) } {#2} } \cs_new_protected:Npn \hbox_to_wd:nn #1#2 { - \tex_hbox:D to \__dim_eval:w #1 \__dim_eval_end: + \tex_hbox:D to \__dim_eval:n {#1} { \group_begin: #2 \group_end: } } \cs_new_protected:Npn \hbox_to_zero:n #1 @@ -20621,10 +20893,9 @@ { \tex_vbox:D { \group_begin: #1 \par \group_end: } } \cs_new_protected:Npn \vbox_top:n #1 { \tex_vtop:D { \group_begin: #1 \par \group_end: } } -\__debug_patch_args:nNNpn { { (#1) } {#2} } \cs_new_protected:Npn \vbox_to_ht:nn #1#2 { - \tex_vbox:D to \__dim_eval:w #1 \__dim_eval_end: + \tex_vbox:D to \__dim_eval:n {#1} { \group_begin: #2 \par \group_end: } } \cs_new_protected:Npn \vbox_to_zero:n #1 @@ -20632,41 +20903,62 @@ \tex_vbox:D to \c_zero_dim { \group_begin: #1 \par \group_end: } } +\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { } \cs_new_protected:Npn \vbox_set:Nn #1#2 { \tex_setbox:D #1 \tex_vbox:D { \group_begin: #2 \par \group_end: } } -\cs_new_protected:Npn \vbox_gset:Nn { \tex_global:D \vbox_set:Nn } +\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { } +\cs_new_protected:Npn \vbox_gset:Nn #1#2 + { + \tex_global:D \tex_setbox:D #1 \tex_vbox:D + { \group_begin: #2 \par \group_end: } + } \cs_generate_variant:Nn \vbox_set:Nn { c } \cs_generate_variant:Nn \vbox_gset:Nn { c } +\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { } \cs_new_protected:Npn \vbox_set_top:Nn #1#2 { \tex_setbox:D #1 \tex_vtop:D { \group_begin: #2 \par \group_end: } } -\cs_new_protected:Npn \vbox_gset_top:Nn - { \tex_global:D \vbox_set_top:Nn } +\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { } +\cs_new_protected:Npn \vbox_gset_top:Nn #1#2 + { + \tex_global:D \tex_setbox:D #1 \tex_vtop:D + { \group_begin: #2 \par \group_end: } + } \cs_generate_variant:Nn \vbox_set_top:Nn { c } \cs_generate_variant:Nn \vbox_gset_top:Nn { c } -\__debug_patch_args:nNNpn { {#1} { (#2) } {#3} } +\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { } \cs_new_protected:Npn \vbox_set_to_ht:Nnn #1#2#3 { - \tex_setbox:D #1 \tex_vbox:D to \__dim_eval:w #2 \__dim_eval_end: + \tex_setbox:D #1 \tex_vbox:D to \__dim_eval:n {#2} + { \group_begin: #3 \par \group_end: } + } +\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { } +\cs_new_protected:Npn \vbox_gset_to_ht:Nnn #1#2#3 + { + \tex_global:D \tex_setbox:D #1 \tex_vbox:D to \__dim_eval:n {#2} { \group_begin: #3 \par \group_end: } } -\cs_new_protected:Npn \vbox_gset_to_ht:Nnn - { \tex_global:D \vbox_set_to_ht:Nnn } \cs_generate_variant:Nn \vbox_set_to_ht:Nnn { c } \cs_generate_variant:Nn \vbox_gset_to_ht:Nnn { c } +\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { } \cs_new_protected:Npn \vbox_set:Nw #1 { \tex_setbox:D #1 \tex_vbox:D \c_group_begin_token \group_begin: } -\cs_new_protected:Npn \vbox_gset:Nw - { \tex_global:D \vbox_set:Nw } +\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { } +\cs_new_protected:Npn \vbox_gset:Nw #1 + { + \tex_global:D \tex_setbox:D #1 \tex_vbox:D + \c_group_begin_token + \group_begin: + } \cs_generate_variant:Nn \vbox_set:Nw { c } \cs_generate_variant:Nn \vbox_gset:Nw { c } \cs_new_protected:Npn \vbox_set_end: @@ -20676,24 +20968,29 @@ \c_group_end_token } \cs_new_eq:NN \vbox_gset_end: \vbox_set_end: -\__debug_patch_args:nNNpn { {#1} { (#2) } } +\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { } \cs_new_protected:Npn \vbox_set_to_ht:Nnw #1#2 { - \tex_setbox:D #1 \tex_vbox:D to \__dim_eval:w #2 \__dim_eval_end: + \tex_setbox:D #1 \tex_vbox:D to \__dim_eval:n {#2} + \c_group_begin_token + \group_begin: + } +\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { } +\cs_new_protected:Npn \vbox_gset_to_ht:Nnw #1#2 + { + \tex_global:D \tex_setbox:D #1 \tex_vbox:D to \__dim_eval:n {#2} \c_group_begin_token \group_begin: } -\cs_new_protected:Npn \vbox_gset_to_ht:Nnw - { \tex_global:D \vbox_set_to_ht:Nnw } \cs_generate_variant:Nn \vbox_set_to_ht:Nnw { c } \cs_generate_variant:Nn \vbox_gset_to_ht:Nnw { c } \cs_new_eq:NN \vbox_unpack:N \tex_unvcopy:D \cs_new_eq:NN \vbox_unpack_clear:N \tex_unvbox:D \cs_generate_variant:Nn \vbox_unpack:N { c } \cs_generate_variant:Nn \vbox_unpack_clear:N { c } -\__debug_patch_args:nNNpn { {#1} {#2} { (#3) } } +\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { } \cs_new_protected:Npn \vbox_set_split_to_ht:NNn #1#2#3 - { \tex_setbox:D #1 \tex_vsplit:D #2 to \__dim_eval:w #3 \__dim_eval_end: } + { \tex_setbox:D #1 \tex_vsplit:D #2 to \__dim_eval:n {#3} } \fp_new:N \l__box_angle_fp \fp_new:N \l__box_cos_fp \fp_new:N \l__box_sin_fp @@ -21011,23 +21308,25 @@ \box_new:N \l__coffin_internal_box \dim_new:N \l__coffin_internal_dim \tl_new:N \l__coffin_internal_tl -\prop_new:N \c__coffin_corners_prop -\prop_put:Nnn \c__coffin_corners_prop { tl } { { 0pt } { 0pt } } -\prop_put:Nnn \c__coffin_corners_prop { tr } { { 0pt } { 0pt } } -\prop_put:Nnn \c__coffin_corners_prop { bl } { { 0pt } { 0pt } } -\prop_put:Nnn \c__coffin_corners_prop { br } { { 0pt } { 0pt } } -\prop_new:N \c__coffin_poles_prop -\tl_set:Nn \l__coffin_internal_tl { { 0pt } { 0pt } { 0pt } { 1000pt } } -\prop_put:Nno \c__coffin_poles_prop { l } { \l__coffin_internal_tl } -\prop_put:Nno \c__coffin_poles_prop { hc } { \l__coffin_internal_tl } -\prop_put:Nno \c__coffin_poles_prop { r } { \l__coffin_internal_tl } -\tl_set:Nn \l__coffin_internal_tl { { 0pt } { 0pt } { 1000pt } { 0pt } } -\prop_put:Nno \c__coffin_poles_prop { b } { \l__coffin_internal_tl } -\prop_put:Nno \c__coffin_poles_prop { vc } { \l__coffin_internal_tl } -\prop_put:Nno \c__coffin_poles_prop { t } { \l__coffin_internal_tl } -\prop_put:Nno \c__coffin_poles_prop { B } { \l__coffin_internal_tl } -\prop_put:Nno \c__coffin_poles_prop { H } { \l__coffin_internal_tl } -\prop_put:Nno \c__coffin_poles_prop { T } { \l__coffin_internal_tl } +\prop_const_from_keyval:Nn \c__coffin_corners_prop + { + tl = { 0pt } { 0pt } , + tr = { 0pt } { 0pt } , + bl = { 0pt } { 0pt } , + br = { 0pt } { 0pt } , + } +\prop_const_from_keyval:Nn \c__coffin_poles_prop + { + l = { 0pt } { 0pt } { 0pt } { 1000pt } , + hc = { 0pt } { 0pt } { 0pt } { 1000pt } , + r = { 0pt } { 0pt } { 0pt } { 1000pt } , + b = { 0pt } { 0pt } { 1000pt } { 0pt } , + vc = { 0pt } { 0pt } { 1000pt } { 0pt } , + t = { 0pt } { 0pt } { 1000pt } { 0pt } , + B = { 0pt } { 0pt } { 1000pt } { 0pt } , + H = { 0pt } { 0pt } { 1000pt } { 0pt } , + T = { 0pt } { 0pt } { 1000pt } { 0pt } , + } \fp_new:N \l__coffin_slope_x_fp \fp_new:N \l__coffin_slope_y_fp \bool_new:N \l__coffin_error_bool @@ -21071,32 +21370,17 @@ } } \cs_generate_variant:Nn \coffin_clear:N { c } -\__debug:TF - { - \cs_new_protected:Npn \coffin_new:N #1 - { - \box_new:N #1 - \__debug_suspend_log: - \prop_clear_new:c { l__coffin_corners_ \__int_value:w #1 _prop } - \prop_clear_new:c { l__coffin_poles_ \__int_value:w #1 _prop } - \prop_gset_eq:cN { l__coffin_corners_ \__int_value:w #1 _prop } - \c__coffin_corners_prop - \prop_gset_eq:cN { l__coffin_poles_ \__int_value:w #1 _prop } - \c__coffin_poles_prop - \__debug_resume_log: - } - } +\cs_new_protected:Npn \coffin_new:N #1 { - \cs_new_protected:Npn \coffin_new:N #1 - { - \box_new:N #1 - \prop_clear_new:c { l__coffin_corners_ \__int_value:w #1 _prop } - \prop_clear_new:c { l__coffin_poles_ \__int_value:w #1 _prop } - \prop_gset_eq:cN { l__coffin_corners_ \__int_value:w #1 _prop } - \c__coffin_corners_prop - \prop_gset_eq:cN { l__coffin_poles_ \__int_value:w #1 _prop } - \c__coffin_poles_prop - } + \box_new:N #1 + \debug_suspend: + \prop_clear_new:c { l__coffin_corners_ \__int_value:w #1 _prop } + \prop_clear_new:c { l__coffin_poles_ \__int_value:w #1 _prop } + \prop_gset_eq:cN { l__coffin_corners_ \__int_value:w #1 _prop } + \c__coffin_corners_prop + \prop_gset_eq:cN { l__coffin_poles_ \__int_value:w #1 _prop } + \c__coffin_poles_prop + \debug_resume: } \cs_generate_variant:Nn \coffin_new:N { c } \cs_new_protected:Npn \hcoffin_set:Nn #1#2 @@ -21200,7 +21484,9 @@ } \cs_generate_variant:Nn \coffin_set_eq:NN { c , Nc , cc } \coffin_new:N \c_empty_coffin +\debug_suspend: \hbox_set:Nn \c_empty_coffin { } +\debug_resume: \coffin_new:N \l__coffin_aligned_coffin \coffin_new:N \l__coffin_aligned_internal_coffin \coffin_new:N \l_tmpa_coffin @@ -21774,27 +22060,31 @@ { \box_wd:N \l__coffin_display_coffin } \box_set_eq:NN \l__coffin_display_coffin \l__coffin_aligned_coffin } -\cs_new_protected:Npn \coffin_show_structure:N #1 +\cs_new_protected:Npn \coffin_show_structure:N + { \__coffin_show_structure:NN \msg_show:nnxxxx } +\cs_generate_variant:Nn \coffin_show_structure:N { c } +\cs_new_protected:Npn \coffin_log_structure:N + { \__coffin_show_structure:NN \msg_log:nnxxxx } +\cs_generate_variant:Nn \coffin_log_structure:N { c } +\cs_new_protected:Npn \__coffin_show_structure:NN #1#2 { - \__coffin_if_exist:NT #1 + \__coffin_if_exist:NT #2 { - \__msg_show_pre:nnxxxx { LaTeX / kernel } { show-coffin } - { \token_to_str:N #1 } - { \dim_eval:n { \coffin_ht:N #1 } } - { \dim_eval:n { \coffin_dp:N #1 } } - { \dim_eval:n { \coffin_wd:N #1 } } - \__msg_show_wrap:n + #1 { LaTeX / kernel } { show-coffin } + { \token_to_str:N #2 } + { + \iow_newline: >~ ht ~=~ \dim_eval:n { \coffin_ht:N #2 } + \iow_newline: >~ dp ~=~ \dim_eval:n { \coffin_dp:N #2 } + \iow_newline: >~ wd ~=~ \dim_eval:n { \coffin_wd:N #2 } + } { \prop_map_function:cN - { l__coffin_poles_ \__int_value:w #1 _prop } - \__msg_show_item_unbraced:nn + { l__coffin_poles_ \int_eval:n {#2} _prop } + \msg_show_item_unbraced:nn } + { } } } -\cs_generate_variant:Nn \coffin_show_structure:N { c } -\cs_new_protected:Npn \coffin_log_structure:N - { \__msg_log_next: \coffin_show_structure:N } -\cs_generate_variant:Nn \coffin_log_structure:N { c } \__msg_kernel_new:nnnn { kernel } { no-pole-intersection } { No~intersection~between~coffin~poles. } { @@ -21815,11 +22105,8 @@ } \__msg_kernel_new:nnn { kernel } { show-coffin } { - Size~of~coffin~#1 : \\ - > ~ ht~=~#2 \\ - > ~ dp~=~#3 \\ - > ~ wd~=~#4 \\ - Poles~of~coffin~#1 : + Size~of~coffin~#1 : #2 \\ + Poles~of~coffin~#1 : #3 . } %% File: l3color.dtx Copyright(C) 2011,2012,2014,2016,2017 The LaTeX3 Project \cs_new_eq:NN \color_group_begin: \group_begin: @@ -21964,6 +22251,20 @@ \__deprecation_error:Nnn \xetex_if_engine:F { \sys_if_engine_xetex:F } { 2017-01-01 } \__deprecation_error:Nnn \xetex_if_engine:T { \sys_if_engine_xetex:T } { 2017-01-01 } \__deprecation_error:Nnn \xetex_if_engine:TF { \sys_if_engine_xetex:TF } { 2017-01-01 } +\__debug:TF + { + \tl_gput_right:Nn \g__debug_deprecation_on_tl + { + \cs_set_protected:Npn \__cs_generate_variant_loop_warning:nnxxxx + { \__msg_kernel_error:nnxxxx } + } + \tl_gput_right:Nn \g__debug_deprecation_off_tl + { + \cs_set_protected:Npn \__cs_generate_variant_loop_warning:nnxxxx + { \__msg_kernel_warning:nnxxxx } + } + } + { } %% File: l3candidates.dtx Copyright (C) 2012-2017 The LaTeX3 Project \cs_new_protected:Npx \mode_leave_vertical: { @@ -21981,14 +22282,13 @@ \cs_new_protected:Npn \box_clip:N #1 { \hbox_set:Nn #1 { \__driver_box_use_clip:N #1 } } \cs_generate_variant:Nn \box_clip:N { c } -\__debug_patch_args:nNNpn { {#1} { (#2) } {#3} { (#4) } {#5} } \cs_new_protected:Npn \box_trim:Nnnnn #1#2#3#4#5 { \hbox_set:Nn \l__box_internal_box { - \tex_kern:D -\__dim_eval:w #2 \__dim_eval_end: + \tex_kern:D - \__dim_eval:n {#2} \box_use:N #1 - \tex_kern:D -\__dim_eval:w #4 \__dim_eval_end: + \tex_kern:D - \__dim_eval:n {#4} } \dim_compare:nNnTF { \box_dp:N #1 } > {#3} { @@ -22028,14 +22328,13 @@ \box_set_eq:NN #1 \l__box_internal_box } \cs_generate_variant:Nn \box_trim:Nnnnn { c } -\__debug_patch_args:nNNpn { {#1} { (#2) } {#3} { (#4) } {#5} } \cs_new_protected:Npn \box_viewport:Nnnnn #1#2#3#4#5 { \hbox_set:Nn \l__box_internal_box { - \tex_kern:D -\__dim_eval:w #2 \__dim_eval_end: + \tex_kern:D - \__dim_eval:n {#2} \box_use:N #1 - \tex_kern:D \__dim_eval:w #4 - \box_wd:N #1 \__dim_eval_end: + \tex_kern:D \__dim_eval:n { #4 - \box_wd:N #1 } } \dim_compare:nNnTF {#3} < \c_zero_dim { @@ -22044,7 +22343,7 @@ \box_move_down:nn \c_zero_dim { \box_use:N \l__box_internal_box } } - \box_set_dp:Nn \l__box_internal_box { -\dim_eval:n {#3} } + \box_set_dp:Nn \l__box_internal_box { - \__dim_eval:n {#3} } } { \hbox_set:Nn \l__box_internal_box @@ -22068,7 +22367,7 @@ { \hbox_set:Nn \l__box_internal_box { - \box_move_up:nn { -\dim_eval:n {#5} } + \box_move_up:nn { - \__dim_eval:n {#5} } { \box_use:N \l__box_internal_box } } \box_set_ht:Nn \l__box_internal_box \c_zero_dim @@ -22114,9 +22413,8 @@ \hbox_set:Nn \l__coffin_internal_box { \tex_kern:D - \__dim_eval:w - \l__coffin_bounding_shift_dim - \l__coffin_left_corner_dim - \__dim_eval_end: + \__dim_eval:n + { \l__coffin_bounding_shift_dim - \l__coffin_left_corner_dim } \box_move_down:nn { \l__coffin_bottom_corner_dim } { \box_use:N #1 } } @@ -22407,7 +22705,11 @@ \cs_new_protected:Npn \file_input_stop: { \tex_endinput:D } \cs_if_exist:NTF \pdftex_uniformdeviate:D { - \__debug_patch_args:nNNpn { { (#1) } { (#2) } } + \__debug_patch_args:nNNpn + { + { \__debug_chk_expr:nNnN {#1} \__int_eval:w { } \int_rand:nn } + { \__debug_chk_expr:nNnN {#2} \__int_eval:w { } \int_rand:nn } + } \cs_new:Npn \int_rand:nn #1#2 { \exp_after:wN \__int_rand:ww @@ -22489,6 +22791,36 @@ \exp_after:wN \use_none_delimit_by_q_stop:w \use:n { \::error ! ~ #2 : ~ #1 } \q_stop } +\cs_new_protected:Npn \msg_show_eval:Nn #1#2 + { \exp_args:Nf \__msg_show_eval:nnN { #1 {#2} } {#2} \tl_show:n } +\cs_new_protected:Npn \msg_log_eval:Nn #1#2 + { \exp_args:Nf \__msg_show_eval:nnN { #1 {#2} } {#2} \tl_log:n } +\cs_new_protected:Npn \__msg_show_eval:nnN #1#2#3 { #3 { #2 = #1 } } +\cs_new:Npx \msg_show_item:n #1 + { \iow_newline: > ~ \c_space_tl \exp_not:N \tl_to_str:n { {#1} } } +\cs_new:Npx \msg_show_item_unbraced:n #1 + { \iow_newline: > ~ \c_space_tl \exp_not:N \tl_to_str:n {#1} } +\cs_new:Npx \msg_show_item:nn #1#2 + { + \iow_newline: > \use:nn { ~ } { ~ } + \exp_not:N \tl_to_str:n { {#1} } + \use:nn { ~ } { ~ } => \use:nn { ~ } { ~ } + \exp_not:N \tl_to_str:n { {#2} } + } +\cs_new:Npx \msg_show_item_unbraced:nn #1#2 + { + \iow_newline: > \use:nn { ~ } { ~ } + \exp_not:N \tl_to_str:n {#1} + \use:nn { ~ } { ~ } => \use:nn { ~ } { ~ } + \exp_not:N \tl_to_str:n {#2} + } +\__debug_patch:nnNNpn { \__debug_chk_var_scope:NN c #1 } { } +\cs_new_protected:Npn \bool_const:Nn #1#2 + { + \__chk_if_free_cs:N #1 + \tex_global:D \tex_chardef:D #1 = \bool_if_p:n {#2} + } +\cs_generate_variant:Nn \bool_const:Nn { c } \cs_new:Npn \prop_count:N #1 { \int_eval:n @@ -22582,6 +22914,12 @@ { \seq_item:Nn #1 { \int_rand:nn { 1 } { \seq_count:N #1 } } } } \cs_generate_variant:Nn \seq_rand_item:N { c } +\cs_new_protected:Npn \seq_const_from_clist:Nn #1#2 + { + \tl_const:Nx #1 + { \s__seq \clist_map_function:nN {#2} \__seq_wrap_item:n } + } +\cs_generate_variant:Nn \seq_const_from_clist:Nn { c } \cs_new:Npn \skip_split_finite_else_action:nnNN #1#2#3#4 { \skip_if_finite:nTF {#1} @@ -22607,9 +22945,8 @@ \cs_new:Npn \sys_rand_seed: { \tex_the:D \pdftex_randomseed:D } \cs_if_exist:NF \pdftex_randomseed:D { \cs_set:Npn \sys_rand_seed: { 0 } } -\__debug_patch_args:nNNpn { { (#1) } } \cs_new_protected:Npn \sys_gset_rand_seed:n #1 - { \pdftex_setrandomseed:D \__int_eval:w #1 \__int_eval_end: } + { \pdftex_setrandomseed:D \__int_eval:n {#1} } \int_const:Nn \c_sys_shell_escape_int { \sys_if_engine_luatex:TF diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex b/Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex index 7c8e09b787a..9ff1d71bc63 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex +++ b/Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex @@ -13,13 +13,13 @@ %% 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 +%% https://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. %% %% File: expl3.dtx Copyright (C) 1990-2017 The LaTeX3 Project -\def\ExplFileDate{2017/11/14}% +\def\ExplFileDate{2017/12/05}% \let\ExplLoaderFileDate\ExplFileDate \begingroup \def\tempa{LaTeX2e}% diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3.lua b/Master/texmf-dist/tex/latex/l3kernel/expl3.lua index c9b04b10d65..81421b5e8fa 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/expl3.lua +++ b/Master/texmf-dist/tex/latex/l3kernel/expl3.lua @@ -13,7 +13,7 @@ -- 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 +-- https://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. diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3.sty b/Master/texmf-dist/tex/latex/l3kernel/expl3.sty index ca4498c864a..df455795330 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/expl3.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/expl3.sty @@ -13,13 +13,13 @@ %% 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 +%% https://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. %% %% File: expl3.dtx Copyright (C) 1990-2017 The LaTeX3 Project -\def\ExplFileDate{2017/11/14}% +\def\ExplFileDate{2017/12/05}% \let\ExplLoaderFileDate\ExplFileDate \ProvidesPackage{expl3} [% @@ -232,32 +232,29 @@ } \cs_set_protected:Npn \box_rotate:Nn #1#2 { \hbox_set:Nn #1 { \rotatebox {#2} { \box_use:N #1 } } } - \__debug_patch_args:nNNpn { {#1} { (#2) } { (#3) } } \cs_set_protected:Npn \box_resize_to_wd_and_ht_plus_dp:Nnn #1#2#3 { \hbox_set:Nn #1 { \resizebox * - { \__dim_eval:w #2 \__dim_eval_end: } - { \__dim_eval:w #3 \__dim_eval_end: } + { \__dim_eval:n {#2} } + { \__dim_eval:n {#3} } { \box_use:N #1 } } } - \__debug_patch_args:nNNpn { {#1} { (#2) } } \cs_set_protected:Npn \box_resize_to_ht_plus_dp:Nn #1#2 { \hbox_set:Nn #1 { - \resizebox * { ! } { \__dim_eval:w #2 \__dim_eval_end: } + \resizebox * { ! } { \__dim_eval:n {#2} } { \box_use:N #1 } } } - \__debug_patch_args:nNNpn { {#1} { (#2) } } \cs_set_protected:Npn \box_resize_to_wd:Nn #1#2 { \hbox_set:Nn #1 { - \resizebox * { \__dim_eval:w #2 \__dim_eval_end: } { ! } + \resizebox * { \__dim_eval:n {#2} } { ! } { \box_use:N #1 } } } diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3basics.sty b/Master/texmf-dist/tex/latex/l3kernel/l3basics.sty index 01247fc3cc7..83546093332 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3basics.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3basics.sty @@ -13,12 +13,12 @@ %% 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 +%% https://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. %% -%% File: l3oldmodules.dtx Copyright (C) 2014,2016,2017 The LaTeX3 Project +%% File: l3oldmodules.dtx Copyright (C) 2014-2017 The LaTeX3 Project \def\old@liii@module@name {l3basics} \ProvidesPackage\old@liii@module@name diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3bootstrap.sty b/Master/texmf-dist/tex/latex/l3kernel/l3bootstrap.sty index 10179692ae8..ab73fb16f17 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3bootstrap.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3bootstrap.sty @@ -13,12 +13,12 @@ %% 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 +%% https://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. %% -%% File: l3oldmodules.dtx Copyright (C) 2014,2016,2017 The LaTeX3 Project +%% File: l3oldmodules.dtx Copyright (C) 2014-2017 The LaTeX3 Project \def\old@liii@module@name {l3bootstrap} \ProvidesPackage\old@liii@module@name diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3box.sty b/Master/texmf-dist/tex/latex/l3kernel/l3box.sty index 772f216bda4..f2921c27952 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3box.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3box.sty @@ -13,12 +13,12 @@ %% 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 +%% https://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. %% -%% File: l3oldmodules.dtx Copyright (C) 2014,2016,2017 The LaTeX3 Project +%% File: l3oldmodules.dtx Copyright (C) 2014-2017 The LaTeX3 Project \def\old@liii@module@name {l3box} \ProvidesPackage\old@liii@module@name diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3candidates.sty b/Master/texmf-dist/tex/latex/l3kernel/l3candidates.sty index b285554a278..2cb30d74231 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3candidates.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3candidates.sty @@ -13,12 +13,12 @@ %% 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 +%% https://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. %% -%% File: l3oldmodules.dtx Copyright (C) 2014,2016,2017 The LaTeX3 Project +%% File: l3oldmodules.dtx Copyright (C) 2014-2017 The LaTeX3 Project \def\old@liii@module@name {l3candidates} \ProvidesPackage\old@liii@module@name diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3clist.sty b/Master/texmf-dist/tex/latex/l3kernel/l3clist.sty index 398a0a2c985..7fde726a15c 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3clist.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3clist.sty @@ -13,12 +13,12 @@ %% 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 +%% https://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. %% -%% File: l3oldmodules.dtx Copyright (C) 2014,2016,2017 The LaTeX3 Project +%% File: l3oldmodules.dtx Copyright (C) 2014-2017 The LaTeX3 Project \def\old@liii@module@name {l3clist} \ProvidesPackage\old@liii@module@name diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3coffins.sty b/Master/texmf-dist/tex/latex/l3kernel/l3coffins.sty index ec1a9cc35b5..f93caa6358d 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3coffins.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3coffins.sty @@ -13,12 +13,12 @@ %% 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 +%% https://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. %% -%% File: l3oldmodules.dtx Copyright (C) 2014,2016,2017 The LaTeX3 Project +%% File: l3oldmodules.dtx Copyright (C) 2014-2017 The LaTeX3 Project \def\old@liii@module@name {l3coffins} \ProvidesPackage\old@liii@module@name diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3color.sty b/Master/texmf-dist/tex/latex/l3kernel/l3color.sty index 61cbb081a93..bb0cd8200dc 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3color.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3color.sty @@ -13,12 +13,12 @@ %% 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 +%% https://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. %% -%% File: l3oldmodules.dtx Copyright (C) 2014,2016,2017 The LaTeX3 Project +%% File: l3oldmodules.dtx Copyright (C) 2014-2017 The LaTeX3 Project \def\old@liii@module@name {l3color} \ProvidesPackage\old@liii@module@name diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3doc.cls b/Master/texmf-dist/tex/latex/l3kernel/l3doc.cls index 3b94767ca26..d03dd25b8ea 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3doc.cls +++ b/Master/texmf-dist/tex/latex/l3kernel/l3doc.cls @@ -13,14 +13,14 @@ %% 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 +%% https://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. %% %% File: l3doc.dtx Copyright (C) 1990-2017 The LaTeX3 project \RequirePackage{expl3,xparse,calc} -\ProvidesExplClass{l3doc}{2017/11/14}{} +\ProvidesExplClass{l3doc}{2017/12/05}{} {L3 Experimental documentation class} \clist_new:N \g_docinput_clist \seq_new:N \g_doc_functions_seq @@ -42,8 +42,8 @@ \prop_new:N \g__codedoc_missing_tests_prop \seq_new:N \g__codedoc_not_tested_seq \seq_new:N \g__codedoc_testfiles_seq +\bool_new:N \l__codedoc_macro_internal_set_bool \bool_new:N \l__codedoc_macro_internal_bool -\bool_new:N \l__codedoc_macro_aux_bool \bool_new:N \l__codedoc_macro_TF_bool \bool_new:N \l__codedoc_macro_pTF_bool \bool_new:N \l__codedoc_macro_noTF_bool @@ -56,6 +56,7 @@ \bool_new:N \g__codedoc_lmodern_bool \bool_new:N \g__codedoc_checkfunc_bool \bool_new:N \g__codedoc_checktest_bool +\bool_new:N \g__codedoc_kernel_bool \tl_new:N \l__codedoc_tmpa_tl \tl_new:N \l__codedoc_tmpb_tl \int_new:N \l__codedoc_tmpa_int @@ -100,9 +101,11 @@ \cs_new_eq:NN \__codedoc_tmpa:w ? \cs_new_eq:NN \__codedoc_tmpb:w ? \cs_generate_variant:Nn \seq_set_split:Nnn { NoV } +\cs_generate_variant:Nn \seq_gput_right:Nn { Nf } \cs_generate_variant:Nn \str_case:nn { fn } \cs_generate_variant:Nn \tl_count:n { f } \cs_generate_variant:Nn \tl_greplace_all:Nnn { Nx , Nno } +\cs_generate_variant:Nn \tl_if_empty:nTF { f } \cs_generate_variant:Nn \tl_if_head_eq_charcode:nNTF { o } \cs_generate_variant:Nn \tl_if_head_eq_charcode:nNT { o } \cs_generate_variant:Nn \tl_if_head_eq_charcode:nNF { o } @@ -177,10 +180,19 @@ { \str_if_eq:NNF \l__codedoc_detect_internals_tl \g__codedoc_module_name_tl { - \msg_warning:nnxxx { l3doc } { foreign-internal } - { \tl_to_str:N \l__codedoc_detect_internals_cs_tl } - { \tl_to_str:N \l__codedoc_detect_internals_tl } - { \tl_to_str:N \g__codedoc_module_name_tl } + \bool_lazy_and:nnF + { \g__codedoc_kernel_bool } + { + \str_if_eq_x_p:nn + { \tl_to_str:N \l__codedoc_detect_internals_tl } + { kernel } + } + { + \msg_warning:nnxxx { l3doc } { foreign-internal } + { \tl_to_str:N \l__codedoc_detect_internals_cs_tl } + { \tl_to_str:N \l__codedoc_detect_internals_tl } + { \tl_to_str:N \g__codedoc_module_name_tl } + } } } } @@ -355,6 +367,8 @@ The~'syntax'~environment~should~only~be~used~once~in~ a~'function'~environment. } +\msg_new:nnn { l3doc } { deprecated-option } + { The~option~'#1'~has~been~deprecated~for~'#2'. } \msg_new:nnn { l3doc } { foreign-internal } { A~control~sequence~of~the~form~'...__#1'~was~used.~ @@ -380,12 +394,16 @@ { \bool_gset_true:N \g__codedoc_checktest_bool } \DeclareOption { nochecktest } { \bool_gset_false:N \g__codedoc_checktest_bool } +\DeclareOption { kernel } + { \bool_gset_true:N \g__codedoc_kernel_bool } +\DeclareOption { stdmodule } + { \bool_gset_false:N \g__codedoc_kernel_bool } \DeclareOption { cm-default } { \bool_gset_false:N \g__codedoc_lmodern_bool } \DeclareOption { lm-default } { \bool_gset_true:N \g__codedoc_lmodern_bool } \DeclareOption* { \PassOptionsToClass { \CurrentOption } { article } } -\ExecuteOptions { full, nocheck, nochecktest, lm-default } +\ExecuteOptions { full, kernel, nocheck, nochecktest, lm-default } \PassOptionsToClass { a4paper } { article } \msg_new:nnn { l3doc } { input-cfg } { Local~config~file~l3doc.cfg~loaded. } @@ -663,11 +681,16 @@ } \tl_replace_all:Nnn \l__codedoc_cmd_tl { ~ } { \@xobeysp } \l__codedoc_cmd_tl + \@ } \bool_if:NF \l__codedoc_cmd_noindex_bool { \quark_if_no_value:NF \l__codedoc_cmd_index_tl - { \tl_set_eq:NN \l__codedoc_cmd_tl \l__codedoc_cmd_index_tl } + { + \tl_set:Nx \l__codedoc_cmd_tl + { \c_backslash_str \exp_not:o { \l__codedoc_cmd_index_tl } } + } + \exp_args:No \__codedoc_key_get:n { \l__codedoc_cmd_tl } \quark_if_no_value:NF \l__codedoc_cmd_module_tl { @@ -732,7 +755,7 @@ } \cs_new_protected:Npn \__codedoc_typeset_aux:n #1 { - { \color[gray]{0.7} #1 } + { \color[gray]{0.5} #1 } } \cs_new_protected:Npn \__codedoc_get_hyper_target:nN #1#2 { @@ -848,6 +871,43 @@ { \__codedoc_macro_typeset_block:nN } } \cs_generate_variant:Nn \__codedoc_names_typeset_block:nN { x } +\prg_new_conditional:Npnn \__codedoc_if_macro_internal:n #1 { p , T , F , TF } + { + \bool_if:NTF \l__codedoc_macro_internal_set_bool + { + \bool_if:NTF \l__codedoc_macro_internal_bool + { \prg_return_true: } { \prg_return_false: } + } + { + \tl_if_empty:fTF + { + \exp_after:wN \__codedoc_if_macro_internal_aux:w + \tl_to_str:n { #1 ~ __ } + } + { \prg_return_false: } { \prg_return_true: } + } + } +\exp_last_unbraced:NNNNo + \cs_new:Npn \__codedoc_if_macro_internal_aux:w #1 { \tl_to_str:n { __ } } { } +\cs_new_protected:Npn \__codedoc_names_block_base_map:N #1 + { + \tl_map_inline:Nn \l__codedoc_names_block_tl + { + \group_begin: + \seq_set_eq:NN \l__codedoc_tmpa_seq ##1 + \seq_pop:NN \l__codedoc_tmpa_seq \l__codedoc_tmpa_tl + \seq_get:NN \l__codedoc_tmpa_seq \l__codedoc_tmpb_tl + \exp_args:NNx + \group_end: + #1 + { + \l__codedoc_tmpa_tl + \str_if_eq_x:nnF { \l__codedoc_tmpb_tl } { \scan_stop: } + { : \l__codedoc_tmpb_tl } + \bool_if:NT \l__codedoc_macro_TF_bool { TF } + } + } + } \keys_define:nn { l3doc/function } { TF .value_forbidden:n = true , @@ -915,6 +975,7 @@ { \l__codedoc_tmpa_tl } } \bool_set_true:N \l__codedoc_macro_internal_bool + \bool_set_true:N \l__codedoc_macro_internal_set_bool } \cs_new_protected:Npn \__codedoc_function:nnw #1#2 { @@ -1165,13 +1226,22 @@ { aux .value_forbidden:n = true , aux .code:n = - { \bool_set_true:N \l__codedoc_macro_aux_bool } , + { + \msg_warning:nnnn { l3doc } { deprecated-option } + { aux } { function/macro } + } , internal .value_forbidden:n = true , internal .code:n = - { \bool_set_true:N \l__codedoc_macro_internal_bool } , + { + \bool_set_true:N \l__codedoc_macro_internal_bool + \bool_set_true:N \l__codedoc_macro_internal_set_bool + } , int .value_forbidden:n = true , int .code:n = - { \bool_set_true:N \l__codedoc_macro_internal_bool } , + { + \bool_set_true:N \l__codedoc_macro_internal_bool + \bool_set_true:N \l__codedoc_macro_internal_set_bool + } , var .value_forbidden:n = true , var .code:n = { \bool_set_true:N \l__codedoc_macro_var_bool } , @@ -1222,7 +1292,6 @@ \keys_set:nn { l3doc/macro } {#1} \__codedoc_names_get_seq:nN {#2} \l__codedoc_names_seq \__codedoc_names_parse: - \__codedoc_macro_adjust_internal: \__codedoc_macro_save_names: \__codedoc_names_typeset: \__codedoc_macro_dump: @@ -1231,8 +1300,8 @@ \cs_new_protected:Npn \__codedoc_macro_init: { \int_incr:N \l__codedoc_nested_macro_int - \bool_set_false:N \l__codedoc_macro_aux_bool \bool_set_false:N \l__codedoc_macro_internal_bool + \bool_set_false:N \l__codedoc_macro_internal_set_bool \bool_set_false:N \l__codedoc_macro_TF_bool \bool_set_false:N \l__codedoc_macro_pTF_bool \bool_set_false:N \l__codedoc_macro_noTF_bool @@ -1260,37 +1329,17 @@ { \tl_set:Nn \l__codedoc_override_module_tl { \q_no_value } } -\cs_new_protected:Npn \__codedoc_macro_adjust_internal: - { - \bool_if:NF \l__codedoc_macro_internal_bool - { - \bool_if:NF \l__codedoc_macro_aux_bool - { - \bool_set_true:N \l__codedoc_macro_internal_bool - \seq_map_inline:Nn \l__codedoc_names_seq - { - \tl_if_in:noF {##1} { \tl_to_str:n { __ } } - { \bool_set_false:N \l__codedoc_macro_internal_bool } - } - } - } - } \cs_new_protected:Npn \__codedoc_macro_save_names: { - \tl_map_inline:Nn \l__codedoc_names_block_tl + \tl_if_empty:NTF \l__codedoc_macro_documented_tl + { \__codedoc_names_block_base_map:N \__codedoc_macro_save_names_aux:n } { - \seq_set_eq:NN \l__codedoc_tmpa_seq ##1 - \seq_pop:NN \l__codedoc_tmpa_seq \l__codedoc_tmpa_tl - \seq_get:NN \l__codedoc_tmpa_seq \l__codedoc_tmpb_tl - \seq_gput_right:Nx \g__codedoc_nested_names_seq - { - \l__codedoc_tmpa_tl - \str_if_eq_x:nnF { \l__codedoc_tmpb_tl } { \scan_stop: } - { : \l__codedoc_tmpb_tl } - \bool_if:NT \l__codedoc_macro_TF_bool { TF } - } + \seq_gput_right:Nf \g__codedoc_nested_names_seq + { \exp_after:wN \token_to_str:N \l__codedoc_macro_documented_tl } } } +\cs_new_protected:Npn \__codedoc_macro_save_names_aux:n #1 + { \seq_gput_right:Nn \g__codedoc_nested_names_seq {#1} } \cs_new_protected:Npn \__codedoc_macro_dump: { \topsep\MacroTopsep @@ -1339,7 +1388,7 @@ \DoNotIndex {#1} \bool_if:NT #2 { - \bool_if:NF \l__codedoc_macro_aux_bool + \__codedoc_if_macro_internal:nF {#1} { \seq_gput_right:Nn \g_doc_macros_seq {#1} } \hbox_set:Nw \l__codedoc_macro_index_box \hbox_unpack_clear:N \l__codedoc_macro_index_box @@ -1383,7 +1432,7 @@ } \cs_new_protected:Npn \__codedoc_macroname_prefix:n #1 { - \bool_if:NTF \l__codedoc_macro_aux_bool + \__codedoc_if_macro_internal:nTF {#1} { \__codedoc_typeset_aux:n {#1} } {#1} } \cs_generate_variant:Nn \__codedoc_macroname_prefix:n { o } @@ -1450,24 +1499,22 @@ \endtrivlist \__codedoc_macro_end_check_tested: \int_compare:nNnT \l__codedoc_nested_macro_int = 1 - { - \__codedoc_macro_end_style:n { \__codedoc_print_end_definition: } - \seq_gclear:N \g__codedoc_nested_names_seq - } + { \__codedoc_macro_end_style:n { \__codedoc_print_end_definition: } } } \cs_new_protected:Npn \__codedoc_macro_end_check_tested: { \bool_lazy_all:nT { { \g__codedoc_checktest_bool } - { ! \l__codedoc_macro_aux_bool } { ! \l__codedoc_macro_var_bool } { ! \l__codedoc_macro_tested_bool } } { + \seq_set_filter:NNn \l__codedoc_tmpa_seq \l__codedoc_names_seq + { ! \__codedoc_if_macro_internal_p:n {##1} } \seq_gput_right:Nx \g__codedoc_not_tested_seq { - \seq_use:Nn \l__codedoc_names_seq { , } + \seq_use:Nn \l__codedoc_tmpa_seq { , } \bool_if:NTF \l__codedoc_macro_pTF_bool {~(pTF)} { \bool_if:NT \l__codedoc_macro_TF_bool {~(TF)} } } @@ -1502,33 +1549,23 @@ } \cs_new_protected:Npn \__codedoc_print_documented: { - \bool_lazy_or:nnF - { \l__codedoc_macro_aux_bool } - { \l__codedoc_macro_internal_bool } + \seq_gset_filter:NNn \g__codedoc_nested_names_seq + \g__codedoc_nested_names_seq + { ! \__codedoc_if_macro_internal_p:n {##1} } + \seq_if_empty:NF \g__codedoc_nested_names_seq { \int_set:Nn \l__codedoc_tmpa_int { \seq_count:N \g__codedoc_nested_names_seq } - \tl_if_empty:NTF \l__codedoc_macro_documented_tl - { - \tl_set:Nx \l__codedoc_macro_documented_tl - { \seq_item:Nn \g__codedoc_nested_names_seq { 1 } } - } - { - \tl_set:Nf \l__codedoc_macro_documented_tl - { - \exp_after:wN \token_to_str:N - \l__codedoc_macro_documented_tl - } - } \int_compare:nNnTF \l__codedoc_tmpa_int = 1 {~This~} {~These~} \bool_if:NTF \l__codedoc_macro_var_bool {variable} {function} \int_compare:nNnTF \l__codedoc_tmpa_int = 1 {~is~} {s~are~} documented~on~page~ - \__codedoc_get_hyper_target:oN - \l__codedoc_macro_documented_tl + \__codedoc_get_hyper_target:xN + { \seq_item:Nn \g__codedoc_nested_names_seq { 1 } } \l__codedoc_tmpa_tl \exp_args:Nx \pageref { \l__codedoc_tmpa_tl } . } + \seq_gclear:N \g__codedoc_nested_names_seq } \newcommand*{\DescribeOption} { diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3docstrip.tex b/Master/texmf-dist/tex/latex/l3kernel/l3docstrip.tex index ce36a54a4ec..e95c14de641 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3docstrip.tex +++ b/Master/texmf-dist/tex/latex/l3kernel/l3docstrip.tex @@ -13,12 +13,12 @@ %% 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 +%% https://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. %% -%% File l3dosctrip.dtx Copyright (C) 2012,2016,2017 The LaTeX3 Project +%% File l3dosctrip.dtx Copyright (C) 2012,2014-2017 The LaTeX3 Project \input docstrip % \def\checkOption<#1{% \ifcase diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3dvipdfmx.def b/Master/texmf-dist/tex/latex/l3kernel/l3dvipdfmx.def index ab0a0fbc664..5d3c33f35d6 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3dvipdfmx.def +++ b/Master/texmf-dist/tex/latex/l3kernel/l3dvipdfmx.def @@ -13,7 +13,7 @@ %% 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 +%% https://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. @@ -375,7 +375,7 @@ { \hbox_set:Nn \l__driver_tmp_box { - \tex_kern:D \__dim_eval:w #6 \__dim_eval_end: + \tex_kern:D \__dim_eval:n {#6} \__driver_scope_begin: \__driver_draw_transformcm:nnnnnn {#2} {#3} {#4} {#5} { 0pt } { 0pt } diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3dvips.def b/Master/texmf-dist/tex/latex/l3kernel/l3dvips.def index 046edf1d5a7..3b47c20fcb5 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3dvips.def +++ b/Master/texmf-dist/tex/latex/l3kernel/l3dvips.def @@ -13,7 +13,7 @@ %% 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 +%% https://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. diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3dvisvgm.def b/Master/texmf-dist/tex/latex/l3kernel/l3dvisvgm.def index c3a180544da..24b83d7a834 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3dvisvgm.def +++ b/Master/texmf-dist/tex/latex/l3kernel/l3dvisvgm.def @@ -13,7 +13,7 @@ %% 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 +%% https://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. diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3expan.sty b/Master/texmf-dist/tex/latex/l3kernel/l3expan.sty index d359460c6a9..7abf782a148 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3expan.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3expan.sty @@ -13,12 +13,12 @@ %% 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 +%% https://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. %% -%% File: l3oldmodules.dtx Copyright (C) 2014,2016,2017 The LaTeX3 Project +%% File: l3oldmodules.dtx Copyright (C) 2014-2017 The LaTeX3 Project \def\old@liii@module@name {l3expan} \ProvidesPackage\old@liii@module@name diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3file.sty b/Master/texmf-dist/tex/latex/l3kernel/l3file.sty index e3885146b5b..b911996ddd0 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3file.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3file.sty @@ -13,12 +13,12 @@ %% 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 +%% https://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. %% -%% File: l3oldmodules.dtx Copyright (C) 2014,2016,2017 The LaTeX3 Project +%% File: l3oldmodules.dtx Copyright (C) 2014-2017 The LaTeX3 Project \def\old@liii@module@name {l3file} \ProvidesPackage\old@liii@module@name diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3fp.sty b/Master/texmf-dist/tex/latex/l3kernel/l3fp.sty index 25d5f463f93..8e67cfcd40c 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3fp.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3fp.sty @@ -13,12 +13,12 @@ %% 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 +%% https://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. %% -%% File: l3oldmodules.dtx Copyright (C) 2014,2016,2017 The LaTeX3 Project +%% File: l3oldmodules.dtx Copyright (C) 2014-2017 The LaTeX3 Project \def\old@liii@module@name {l3fp} \ProvidesPackage\old@liii@module@name diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3int.sty b/Master/texmf-dist/tex/latex/l3kernel/l3int.sty index 2cf8d17adaf..30f88f5264a 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3int.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3int.sty @@ -13,12 +13,12 @@ %% 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 +%% https://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. %% -%% File: l3oldmodules.dtx Copyright (C) 2014,2016,2017 The LaTeX3 Project +%% File: l3oldmodules.dtx Copyright (C) 2014-2017 The LaTeX3 Project \def\old@liii@module@name {l3int} \ProvidesPackage\old@liii@module@name diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3keys.sty b/Master/texmf-dist/tex/latex/l3kernel/l3keys.sty index f70076e7624..163534d9220 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3keys.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3keys.sty @@ -13,12 +13,12 @@ %% 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 +%% https://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. %% -%% File: l3oldmodules.dtx Copyright (C) 2014,2016,2017 The LaTeX3 Project +%% File: l3oldmodules.dtx Copyright (C) 2014-2017 The LaTeX3 Project \def\old@liii@module@name {l3keys} \ProvidesPackage\old@liii@module@name diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3msg.sty b/Master/texmf-dist/tex/latex/l3kernel/l3msg.sty index a69bed4d629..5e7846eb1d1 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3msg.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3msg.sty @@ -13,12 +13,12 @@ %% 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 +%% https://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. %% -%% File: l3oldmodules.dtx Copyright (C) 2014,2016,2017 The LaTeX3 Project +%% File: l3oldmodules.dtx Copyright (C) 2014-2017 The LaTeX3 Project \def\old@liii@module@name {l3msg} \ProvidesPackage\old@liii@module@name diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3names.sty b/Master/texmf-dist/tex/latex/l3kernel/l3names.sty index 70dfa8a8f9e..626e8e776b0 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3names.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3names.sty @@ -13,12 +13,12 @@ %% 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 +%% https://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. %% -%% File: l3oldmodules.dtx Copyright (C) 2014,2016,2017 The LaTeX3 Project +%% File: l3oldmodules.dtx Copyright (C) 2014-2017 The LaTeX3 Project \def\old@liii@module@name {l3names} \ProvidesPackage\old@liii@module@name diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3pdfmode.def b/Master/texmf-dist/tex/latex/l3kernel/l3pdfmode.def index 981badea00d..d218e1f3741 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3pdfmode.def +++ b/Master/texmf-dist/tex/latex/l3kernel/l3pdfmode.def @@ -13,7 +13,7 @@ %% 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 +%% https://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. @@ -433,7 +433,7 @@ { \hbox_set:Nn \l__driver_tmp_box { - \tex_kern:D \__dim_eval:w #6 \__dim_eval_end: + \tex_kern:D \__dim_eval:n {#6} \__driver_scope_begin: \__driver_draw_transformcm:nnnnnn {#2} {#3} {#4} {#5} { 0pt } { 0pt } diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3prg.sty b/Master/texmf-dist/tex/latex/l3kernel/l3prg.sty index 0dd86d4d6fa..bc6ffc38cf8 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3prg.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3prg.sty @@ -13,12 +13,12 @@ %% 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 +%% https://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. %% -%% File: l3oldmodules.dtx Copyright (C) 2014,2016,2017 The LaTeX3 Project +%% File: l3oldmodules.dtx Copyright (C) 2014-2017 The LaTeX3 Project \def\old@liii@module@name {l3prg} \ProvidesPackage\old@liii@module@name diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3prop.sty b/Master/texmf-dist/tex/latex/l3kernel/l3prop.sty index ee0bec1c87e..28609aef962 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3prop.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3prop.sty @@ -13,12 +13,12 @@ %% 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 +%% https://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. %% -%% File: l3oldmodules.dtx Copyright (C) 2014,2016,2017 The LaTeX3 Project +%% File: l3oldmodules.dtx Copyright (C) 2014-2017 The LaTeX3 Project \def\old@liii@module@name {l3prop} \ProvidesPackage\old@liii@module@name diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3quark.sty b/Master/texmf-dist/tex/latex/l3kernel/l3quark.sty index 40673cd62b0..1136c32252b 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3quark.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3quark.sty @@ -13,12 +13,12 @@ %% 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 +%% https://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. %% -%% File: l3oldmodules.dtx Copyright (C) 2014,2016,2017 The LaTeX3 Project +%% File: l3oldmodules.dtx Copyright (C) 2014-2017 The LaTeX3 Project \def\old@liii@module@name {l3quark} \ProvidesPackage\old@liii@module@name diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3regex.sty b/Master/texmf-dist/tex/latex/l3kernel/l3regex.sty index df800bc4fa9..0763c3c9365 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3regex.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3regex.sty @@ -13,12 +13,12 @@ %% 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 +%% https://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. %% -%% File: l3oldmodules.dtx Copyright (C) 2014,2016,2017 The LaTeX3 Project +%% File: l3oldmodules.dtx Copyright (C) 2014-2017 The LaTeX3 Project \def\old@liii@module@name {l3regex} \ProvidesPackage\old@liii@module@name diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3seq.sty b/Master/texmf-dist/tex/latex/l3kernel/l3seq.sty index dbd89d0a301..5f37ffd88fc 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3seq.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3seq.sty @@ -13,12 +13,12 @@ %% 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 +%% https://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. %% -%% File: l3oldmodules.dtx Copyright (C) 2014,2016,2017 The LaTeX3 Project +%% File: l3oldmodules.dtx Copyright (C) 2014-2017 The LaTeX3 Project \def\old@liii@module@name {l3seq} \ProvidesPackage\old@liii@module@name diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3skip.sty b/Master/texmf-dist/tex/latex/l3kernel/l3skip.sty index bff54263790..f5fdce901ea 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3skip.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3skip.sty @@ -13,12 +13,12 @@ %% 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 +%% https://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. %% -%% File: l3oldmodules.dtx Copyright (C) 2014,2016,2017 The LaTeX3 Project +%% File: l3oldmodules.dtx Copyright (C) 2014-2017 The LaTeX3 Project \def\old@liii@module@name {l3skip} \ProvidesPackage\old@liii@module@name diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3sort.sty b/Master/texmf-dist/tex/latex/l3kernel/l3sort.sty index 9c562ad9755..bc8f4894f9b 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3sort.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3sort.sty @@ -13,12 +13,12 @@ %% 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 +%% https://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. %% -%% File: l3oldmodules.dtx Copyright (C) 2014,2016,2017 The LaTeX3 Project +%% File: l3oldmodules.dtx Copyright (C) 2014-2017 The LaTeX3 Project \def\old@liii@module@name {l3sort} \ProvidesPackage\old@liii@module@name diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3str.sty b/Master/texmf-dist/tex/latex/l3kernel/l3str.sty index 1f7effda4f6..2c41ec36ed2 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3str.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3str.sty @@ -13,12 +13,12 @@ %% 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 +%% https://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. %% -%% File: l3oldmodules.dtx Copyright (C) 2014,2016,2017 The LaTeX3 Project +%% File: l3oldmodules.dtx Copyright (C) 2014-2017 The LaTeX3 Project \def\old@liii@module@name {l3str} \ProvidesPackage\old@liii@module@name diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3tl-analysis.sty b/Master/texmf-dist/tex/latex/l3kernel/l3tl-analysis.sty index 48d41ba5b36..0c992d55880 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3tl-analysis.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3tl-analysis.sty @@ -13,12 +13,12 @@ %% 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 +%% https://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. %% -%% File: l3oldmodules.dtx Copyright (C) 2014,2016,2017 The LaTeX3 Project +%% File: l3oldmodules.dtx Copyright (C) 2014-2017 The LaTeX3 Project \def\old@liii@module@name {l3tl-analysis} \ProvidesPackage\old@liii@module@name diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3tl-build.sty b/Master/texmf-dist/tex/latex/l3kernel/l3tl-build.sty index 545409662d2..b657fadce15 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3tl-build.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3tl-build.sty @@ -13,12 +13,12 @@ %% 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 +%% https://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. %% -%% File: l3oldmodules.dtx Copyright (C) 2014,2016,2017 The LaTeX3 Project +%% File: l3oldmodules.dtx Copyright (C) 2014-2017 The LaTeX3 Project \def\old@liii@module@name {l3tl-build} \ProvidesPackage\old@liii@module@name diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3tl.sty b/Master/texmf-dist/tex/latex/l3kernel/l3tl.sty index 4faa54e46e2..13ae3bf734a 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3tl.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3tl.sty @@ -13,12 +13,12 @@ %% 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 +%% https://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. %% -%% File: l3oldmodules.dtx Copyright (C) 2014,2016,2017 The LaTeX3 Project +%% File: l3oldmodules.dtx Copyright (C) 2014-2017 The LaTeX3 Project \def\old@liii@module@name {l3tl} \ProvidesPackage\old@liii@module@name diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3token.sty b/Master/texmf-dist/tex/latex/l3kernel/l3token.sty index 53f89cae6fc..5ad017f1462 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3token.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3token.sty @@ -13,12 +13,12 @@ %% 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 +%% https://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. %% -%% File: l3oldmodules.dtx Copyright (C) 2014,2016,2017 The LaTeX3 Project +%% File: l3oldmodules.dtx Copyright (C) 2014-2017 The LaTeX3 Project \def\old@liii@module@name {l3token} \ProvidesPackage\old@liii@module@name diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3xdvipdfmx.def b/Master/texmf-dist/tex/latex/l3kernel/l3xdvipdfmx.def index 228038f2c43..80962a52608 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3xdvipdfmx.def +++ b/Master/texmf-dist/tex/latex/l3kernel/l3xdvipdfmx.def @@ -13,7 +13,7 @@ %% 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 +%% https://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. @@ -427,7 +427,7 @@ { \hbox_set:Nn \l__driver_tmp_box { - \tex_kern:D \__dim_eval:w #6 \__dim_eval_end: + \tex_kern:D \__dim_eval:n {#6} \__driver_scope_begin: \__driver_draw_transformcm:nnnnnn {#2} {#3} {#4} {#5} { 0pt } { 0pt } diff --git a/Master/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty b/Master/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty index bbac837377c..6c0707d5696 100644 --- a/Master/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty +++ b/Master/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty @@ -6,7 +6,7 @@ %% %% l3keys2e.dtx (with options: `package') %% -%% Copyright (C) 2009-2016 The LaTeX3 Project +%% Copyright (C) 2009-2017 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 @@ -19,8 +19,8 @@ %% and all files in that bundle must be distributed together. %% %% File: l3keys2e.dtx (C) Copyright 2009,2011-2017 The LaTeX3 Project -\RequirePackage{expl3}[2017/11/14] -\@ifpackagelater{expl3}{2017/11/14} +\RequirePackage{expl3}[2017/12/05] +\@ifpackagelater{expl3}{2017/12/05} {} {% \PackageError{l3keys2e}{Support package l3kernel too old} @@ -32,7 +32,7 @@ }% \endinput } -\ProvidesExplPackage{l3keys2e}{2017/11/14}{} +\ProvidesExplPackage{l3keys2e}{2017/12/05}{} {LaTeX2e option processing using LaTeX3 keys} \cs_generate_variant:Nn \clist_put_right:Nn { Nv } \cs_generate_variant:Nn \keys_if_exist:nnT { nx } diff --git a/Master/texmf-dist/tex/latex/l3packages/xfp/xfp.sty b/Master/texmf-dist/tex/latex/l3packages/xfp/xfp.sty index 00dd9d47c91..64d690c620e 100644 --- a/Master/texmf-dist/tex/latex/l3packages/xfp/xfp.sty +++ b/Master/texmf-dist/tex/latex/l3packages/xfp/xfp.sty @@ -19,8 +19,8 @@ %% and all files in that bundle must be distributed together. %% %% File: xfp.dtx (C) Copyright 2017 The LaTeX3 Project -\RequirePackage{expl3}[2017/11/14] -\@ifpackagelater{expl3}{2017/11/14} +\RequirePackage{expl3}[2017/12/05] +\@ifpackagelater{expl3}{2017/12/05} {} {% \PackageError{xfp}{Support package l3kernel too old} @@ -33,7 +33,7 @@ \endinput } \RequirePackage{xparse} -\ProvidesExplPackage{xfp}{2017/11/14}{} +\ProvidesExplPackage{xfp}{2017/12/05}{} {L3 Floating point unit} \NewExpandableDocumentCommand \fpeval { m } { \fp_eval:n {#1} } \NewExpandableDocumentCommand \inteval { m } { \int_eval:n {#1} } diff --git a/Master/texmf-dist/tex/latex/l3packages/xfrac/xfrac.sty b/Master/texmf-dist/tex/latex/l3packages/xfrac/xfrac.sty index 0f74a741190..2005d08a748 100644 --- a/Master/texmf-dist/tex/latex/l3packages/xfrac/xfrac.sty +++ b/Master/texmf-dist/tex/latex/l3packages/xfrac/xfrac.sty @@ -6,7 +6,7 @@ %% %% xfrac.dtx (with options: `package') %% -%% Copyright (C) 2011-2016 The LaTeX3 Project +%% Copyright (C) 2011-2017 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 @@ -20,8 +20,8 @@ %% %% File: xfrac.dtx Copyright (C) 2004, 2008-2010 Morten Hoegholm %% (C) 2011,2012,2014-2017 The LaTeX3 Project -\RequirePackage{expl3}[2017/11/14] -\@ifpackagelater{expl3}{2017/11/14} +\RequirePackage{expl3}[2017/12/05] +\@ifpackagelater{expl3}{2017/12/05} {} {% \PackageError{xfrac}{Support package l3kernel too old} @@ -34,7 +34,7 @@ \endinput } \RequirePackage{amstext,graphicx,l3keys2e,textcomp,xparse,xtemplate} -\ProvidesExplPackage{xfrac}{2017/11/14}{} +\ProvidesExplPackage{xfrac}{2017/12/05}{} {L3 Experimental split-level fractions} \keys_define:nn { xfrac } { @@ -127,9 +127,8 @@ false = \cs_set:Npn \__xfrac_relscale: { - \__dim_eval:w - \box_ht:N \l__xfrac_tmp_box + \box_dp:N \l__xfrac_tmp_box - \__dim_eval_end: + \__dim_eval:n + { \box_ht:N \l__xfrac_tmp_box + \box_dp:N \l__xfrac_tmp_box } }, true = \cs_set:Npn \__xfrac_relscale: @@ -210,11 +209,12 @@ { \raisebox { - \__dim_eval:w + \__dim_eval:n + { \box_ht:N \l__xfrac_slash_box - - \box_dp:N \l__xfrac_slash_box - - \height - \__dim_eval_end: + - \box_dp:N \l__xfrac_slash_box + - \height + } } } \dim_compare:nNnTF @@ -238,11 +238,12 @@ { \raisebox { - \__dim_eval:w + \__dim_eval:n + { \box_ht:N \l__xfrac_slash_box - - \dim_use:N \l__xfrac_numerator_top_sep_dim - - \height - \__dim_eval_end: + - \dim_use:N \l__xfrac_numerator_top_sep_dim + - \height + } } } } diff --git a/Master/texmf-dist/tex/latex/l3packages/xparse/xparse.sty b/Master/texmf-dist/tex/latex/l3packages/xparse/xparse.sty index b6b5fed0410..f228093d00f 100644 --- a/Master/texmf-dist/tex/latex/l3packages/xparse/xparse.sty +++ b/Master/texmf-dist/tex/latex/l3packages/xparse/xparse.sty @@ -6,7 +6,7 @@ %% %% xparse.dtx (with options: `package') %% -%% Copyright (C) 2009-2016 The LaTeX3 Project +%% Copyright (C) 2009-2017 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 @@ -23,8 +23,8 @@ %% (C) Copyright 2004-2008 Frank Mittelbach, %% The LaTeX3 Project %% (C) Copyright 2009-2017 The LaTeX3 Project -\RequirePackage{expl3}[2017/11/14] -\@ifpackagelater{expl3}{2017/11/14} +\RequirePackage{expl3}[2017/12/05] +\@ifpackagelater{expl3}{2017/12/05} {} {% \PackageError{xparse}{Support package l3kernel too old} @@ -36,7 +36,7 @@ }% \endinput } -\ProvidesExplPackage{xparse}{2017/11/14}{} +\ProvidesExplPackage{xparse}{2017/12/05}{} {L3 Experimental document command parser} \tl_new:N \l__xparse_arg_spec_tl \tl_new:N \l__xparse_args_tl diff --git a/Master/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate.sty b/Master/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate.sty index 5da4faae5da..cd69d098f64 100644 --- a/Master/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate.sty +++ b/Master/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate.sty @@ -6,7 +6,7 @@ %% %% xtemplate.dtx (with options: `package') %% -%% Copyright (C) 2011-2016 The LaTeX3 Project +%% Copyright (C) 2011-2017 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 @@ -22,9 +22,9 @@ %% David Carlisle %% (C) Copyright 2004-2010 Frank Mittelbach, %% The LaTeX3 Project -%% (C) Copyright 2011-2016 The LaTeX3 Project -\RequirePackage{expl3}[2017/11/14] -\@ifpackagelater{expl3}{2017/11/14} +%% (C) Copyright 2011-2017 The LaTeX3 Project +\RequirePackage{expl3}[2017/12/05] +\@ifpackagelater{expl3}{2017/12/05} {} {% \PackageError{xtemplate}{Support package l3kernel too old} @@ -36,7 +36,7 @@ }% \endinput } -\ProvidesExplPackage{xtemplate}{2017/11/14}{} +\ProvidesExplPackage{xtemplate}{2017/12/05}{} {L3 Experimental prototype document functions} \tl_const:Nn \c__xtemplate_code_root_tl { template~code~>~ } \tl_const:Nn \c__xtemplate_defaults_root_tl { template~defaults~>~ } @@ -46,10 +46,8 @@ \tl_const:Nn \c__xtemplate_restrict_root_tl { template~restrictions~>~ } \tl_const:Nn \c__xtemplate_values_root_tl { template~values~>~ } \tl_const:Nn \c__xtemplate_vars_root_tl { template~vars~>~ } -\seq_new:N \c__xtemplate_keytypes_arg_seq -\seq_put_right:Nn \c__xtemplate_keytypes_arg_seq { choice } -\seq_put_right:Nn \c__xtemplate_keytypes_arg_seq { function } -\seq_put_right:Nn \c__xtemplate_keytypes_arg_seq { instance } +\seq_const_from_clist:Nn \c__xtemplate_keytypes_arg_seq + { choice , function , instance } \prop_new:N \g__xtemplate_object_type_prop \tl_new:N \l__xtemplate_assignments_tl \tl_new:N \l__xtemplate_collection_tl @@ -181,30 +179,59 @@ } \cs_new_protected:Npn \__xtemplate_recover_defaults:n #1 { - \prop_set_eq:Nc \l__xtemplate_values_prop + \prop_if_exist:cTF { \c__xtemplate_defaults_root_tl #1 } + { + \prop_set_eq:Nc \l__xtemplate_values_prop + { \c__xtemplate_defaults_root_tl #1 } + } + { \prop_clear:N \l__xtemplate_values_prop } } \cs_new_protected:Npn \__xtemplate_recover_keytypes:n #1 { - \prop_set_eq:Nc \l__xtemplate_keytypes_prop + \prop_if_exist:cTF { \c__xtemplate_keytypes_root_tl #1 } - \seq_set_eq:Nc \l__xtemplate_key_order_seq - { \c__xtemplate_key_order_root_tl #1 } + { + \prop_set_eq:Nc \l__xtemplate_keytypes_prop + { \c__xtemplate_keytypes_root_tl #1 } + } + { \prop_clear:N \l__xtemplate_keytypes_prop } + \seq_if_exist:cTF { \c__xtemplate_key_order_root_tl #1 } + { + \seq_set_eq:Nc \l__xtemplate_key_order_seq + { \c__xtemplate_key_order_root_tl #1 } + } + { \seq_clear:N \l__xtemplate_key_order_seq } } \cs_new_protected:Npn \__xtemplate_recover_restrictions:n #1 { - \clist_set_eq:Nc \l__xtemplate_restrict_clist + \clist_if_exist:cTF { \c__xtemplate_restrict_root_tl #1 } + { + \clist_set_eq:Nc \l__xtemplate_restrict_clist + { \c__xtemplate_restrict_root_tl #1 } + } + { \clist_clear:N \l__xtemplate_restrict_clist } } \cs_new_protected:Npn \__xtemplate_recover_values:n #1 { - \prop_set_eq:Nc \l__xtemplate_values_prop + \prop_if_exist:cTF { \c__xtemplate_values_root_tl #1 } + { + \prop_set_eq:Nc \l__xtemplate_values_prop + { \c__xtemplate_values_root_tl #1 } + } + { \prop_clear:N \l__xtemplate_values_prop } } \cs_new_protected:Npn \__xtemplate_recover_vars:n #1 { - \prop_set_eq:Nc \l__xtemplate_vars_prop + \prop_if_exist:cTF { \c__xtemplate_vars_root_tl #1 } + { + \prop_set_eq:Nc \l__xtemplate_vars_prop + { \c__xtemplate_vars_root_tl #1 } + } + { \prop_clear:N \l__xtemplate_vars_prop } } \cs_new_protected:Npn \__xtemplate_declare_object_type:nn #1#2 { @@ -1075,34 +1102,24 @@ } \cs_new_protected:Npn \__xtemplate_show:Nnnn #1#2#3#4 { - \__msg_show_pre:nnnnnn { xtemplate } - { \prop_if_empty:NTF #1 { show-no-attribute } { show-attribute } } - {#2} {#3} {#4} { } - \__msg_show_wrap:n - { \prop_map_function:NN #1 \__msg_show_item_unbraced:nn } + \msg_show:nnxxxx { xtemplate } { show-attribute } + { \tl_to_str:n {#2} } + { \tl_to_str:n {#3} } + { \tl_to_str:n {#4} } + { \prop_map_function:NN #1 \msg_show_item_unbraced:nn } } \cs_new_protected:Npn \__xtemplate_show_values:nnn #1#2#3 { \__xtemplate_if_instance_exist:nnnT {#1} {#2} {#3} { \__xtemplate_recover_values:n { #1 / #2 / #3 } - \prop_if_empty:NTF \l__xtemplate_values_prop - { - \__msg_show_pre:nnnnnn { xtemplate } { show-no-values } - {#1} {#2} {#3} { } - \__msg_show_wrap:n { } - } + \msg_show:nnxxxx { xtemplate } { show-values } + { \tl_to_str:n {#1} } + { \tl_to_str:n {#2} } + { \tl_to_str:n {#3} } { - \prop_pop:NnNF \l__xtemplate_values_prop { from~template } - \l__xtemplate_tmp_tl - { \tl_clear:N \l__xtemplate_tmp_tl } - \__msg_show_pre:nnnnnV { xtemplate } { show-values } - {#1} {#2} {#3} \l__xtemplate_tmp_tl - \__msg_show_wrap:n - { - \prop_map_function:NN \l__xtemplate_values_prop - \__msg_show_item_unbraced:nn - } + \prop_map_function:NN \l__xtemplate_values_prop + \msg_show_item_unbraced:nn } } } @@ -1288,23 +1305,18 @@ Declaring~interface~for~template~'#2'~of~object~type~'#1'~ \msg_line_context:. } -\msg_new:nnn { xtemplate } { show-no-attribute } - { The~template~'#2'~of~object~type~'#1'~has~no~#3 . } \msg_new:nnn { xtemplate } { show-attribute } - { The~template~'#2'~of~object~type~'#1'~has~#3 : } -\msg_new:nnn { xtemplate } { show-no-values } { - The~ \tl_if_empty:nF {#2} {collection~} instance~'#3'~ - \tl_if_empty:nF {#2} { (from~collection~'#2')~ } - of~object~type~'#1'~has~no~values. + The~template~'#2'~of~object~type~'#1'~has~ + \tl_if_empty:nTF {#4} { no~#3. } { #3 : #4 } } \msg_new:nnn { xtemplate } { show-values } { - The~ \tl_if_empty:nF {#2} {collection~} instance~'#3'~ - \tl_if_empty:nF {#2} { (from~collection~'#2')~ } - of~object~type~'#1'~ - \tl_if_empty:nF {#4} { (from~template~'#4')~ } - has~values: + \tl_if_empty:nTF {#2} + { The~instance~'#3'~ } + { The~collection~ instance~'#3'~ (from~collection~'#2')~ } + of~object~type~'#1'~has~ + \tl_if_empty:nTF {#4} { no~values. } { values: #4 } } \cs_new_protected:Npn \DeclareObjectType #1#2 { \__xtemplate_declare_object_type:nn {#1} {#2} } |