summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex')
-rw-r--r--Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex1166
1 files changed, 681 insertions, 485 deletions
diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex b/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex
index 6bf8dcf4de8..55ca81971be 100644
--- a/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex
+++ b/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex
@@ -62,7 +62,7 @@
%% and all files in that bundle must be distributed together.
%%
%% File: expl3.dtx Copyright (C) 1990-2017 The LaTeX3 Project
-\def\ExplFileDate{2017/07/15}%
+\def\ExplFileDate{2017/07/19}%
\begingroup
\def\next{\endgroup}%
\expandafter\ifx\csname PackageError\endcsname\relax
@@ -1480,6 +1480,189 @@
\cs_set:Npn \use_none:nnnnnnn #1#2#3#4#5#6#7 { }
\cs_set:Npn \use_none:nnnnnnnn #1#2#3#4#5#6#7#8 { }
\cs_set:Npn \use_none:nnnnnnnnn #1#2#3#4#5#6#7#8#9 { }
+\cs_set_protected:Npn \__debug:TF #1#2 {#2}
+\tex_ifodd:D \l@expl@enable@debug@bool
+ \cs_set_protected:Npn \__debug:TF #1#2 {#1}
+\fi:
+\__debug:TF
+ {
+ \cs_set_protected:Npn \debug_on:n #1
+ {
+ \exp_args:No \clist_map_inline:nn { \tl_to_str:n {#1} }
+ {
+ \cs_if_exist_use:cF { __debug_##1_on: }
+ { \__msg_kernel_error:nnn { kernel } { debug } {##1} }
+ }
+ }
+ \cs_set_protected:Npn \debug_off:n #1
+ {
+ \exp_args:No \clist_map_inline:nn { \tl_to_str:n {#1} }
+ {
+ \cs_if_exist_use:cF { __debug_##1_off: }
+ { \__msg_kernel_error:nnn { kernel } { debug } {##1} }
+ }
+ }
+ }
+ {
+ \cs_set_protected:Npn \debug_on:n #1
+ {
+ \__msg_kernel_error:nnx { kernel } { enable-debug }
+ { \tl_to_str:n { \debug_on:n {#1} } }
+ }
+ \cs_set_protected:Npn \debug_off:n #1
+ {
+ \__msg_kernel_error:nnx { kernel } { enable-debug }
+ { \tl_to_str:n { \debug_off:n {#1} } }
+ }
+ }
+\__debug:TF
+ {
+ \exp_args:Nc \cs_set_protected:Npn { __debug_check-declarations_on: }
+ {
+ \cs_set_protected:Npn \__debug_chk_var_exist:N ##1
+ {
+ \cs_if_exist:NF ##1
+ {
+ \__msg_kernel_error:nnx { kernel } { non-declared-variable }
+ { \token_to_str:N ##1 }
+ }
+ }
+ \cs_set_protected:Npn \__debug_chk_cs_exist:N ##1
+ {
+ \cs_if_exist:NF ##1
+ {
+ \__msg_kernel_error:nnx { kernel } { command-not-defined }
+ { \token_to_str:N ##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_cs_exist:c
+ { \exp_args:Nc \__debug_chk_cs_exist:N }
+ \tex_ifodd:D \l@expl@check@declarations@bool
+ \use:c { __debug_check-declarations_on: }
+ \else:
+ \use:c { __debug_check-declarations_off: }
+ \fi:
+ }
+ { }
+\__debug:TF
+ {
+ \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: { }
+ }
+ \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: { }
+ }
+ \tex_ifodd:D \l@expl@log@functions@bool
+ \use:c { __debug_log-functions_on: }
+ \else:
+ \use:c { __debug_log-functions_off: }
+ \fi:
+ }
+ { }
+\__debug:TF
+ {
+ \cs_set_protected:Npn \__debug_deprecation_on:
+ { \g__debug_deprecation_on_tl }
+ \cs_set_protected:Npn \__debug_deprecation_off:
+ { \g__debug_deprecation_off_tl }
+ \cs_set_nopar:Npn \g__debug_deprecation_on_tl { }
+ \cs_set_nopar:Npn \g__debug_deprecation_off_tl { }
+ }
+ { }
+\__debug:TF
+ {
+ \cs_set_protected:Npn \__debug_deprecation:nnNNpn #1#2#3#4#5#
+ {
+ \if_meaning:w \cs_new_protected:Npn #3
+ \else:
+ \__msg_kernel_error:nnx { kernel } { debug-unpatchable }
+ { \token_to_str:N #3 ~(for~deprecation) }
+ \fi:
+ \__debug_deprecation_aux:nnNnn {#1} {#2} #4 {#5}
+ }
+ \cs_set_protected:Npn \__debug_deprecation_aux:nnNnn #1#2#3#4#5
+ {
+ \tl_gput_right:Nn \g__debug_deprecation_on_tl
+ {
+ \tex_let:D #3 \scan_stop:
+ \__deprecation_error:Nnn #3 {#2} {#1}
+ }
+ \tl_gput_right:Nn \g__debug_deprecation_off_tl
+ {
+ \tex_let:D #3 \scan_stop:
+ \cs_set_protected:Npn #3 #4 {#5}
+ }
+ \cs_new_protected:Npx #3
+ {
+ \exp_not:N \__msg_kernel_warning:nnxxx
+ { kernel } { deprecated-command }
+ {#1} { \token_to_str:N #3 } { \tl_to_str:n {#2} }
+ \exp_not:n { \cs_gset_protected:Npn #3 #4 {#5} }
+ \exp_not:N #3
+ }
+ }
+ }
+ { \cs_set_protected:Npn \__debug_deprecation:nnNNpn #1#2 { } }
+\__debug:TF
+ {
+ \cs_set_protected:Npn \__debug_patch:nnNNpn #1#2#3#4#5#
+ { \__debug_patch_aux:nnNNnn {#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 } }
+ }
+ {
+ \cs_set_protected:Npn \__debug_patch:nnNNpn #1#2 { }
+ \cs_set_protected:Npn \__debug_patch_conditional:nNNpnn #1 { }
+ }
+\__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: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_protected:Npn \__debug_patch_args_aux:nNNnnn #1#2#3#4#5#6
+ {
+ \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_protected:Npn \__debug_patch_args:nNNpn #1 { }
+ \cs_set_protected:Npn \__debug_patch_conditional_args:nNNpnn #1 { }
+ }
\cs_set:Npn \prg_return_true:
{ \exp_after:wN \use_i:nn \exp:w }
\cs_set:Npn \prg_return_false:
@@ -1636,26 +1819,22 @@
#5 {#1} {#2} {#3} {#4}
\__prg_set_eq_conditional_loop:nnnnNw {#1} {#2} {#3} {#4} #5
}
+\__debug_patch:nnNNpn
+ { \__debug_chk_cs_exist:c { #5 _p : #6 } } { }
\cs_set:Npn \__prg_set_eq_conditional_p_form:wNnnnn #1 \q_stop #2#3#4#5#6
- {
- \__chk_if_exist_cs:c { #5 _p : #6 }
- #2 { #3 _p : #4 } { #5 _p : #6 }
- }
+ { #2 { #3 _p : #4 } { #5 _p : #6 } }
+\__debug_patch:nnNNpn
+ { \__debug_chk_cs_exist:c { #5 : #6 TF } } { }
\cs_set:Npn \__prg_set_eq_conditional_TF_form:wNnnnn #1 \q_stop #2#3#4#5#6
- {
- \__chk_if_exist_cs:c { #5 : #6 TF }
- #2 { #3 : #4 TF } { #5 : #6 TF }
- }
+ { #2 { #3 : #4 TF } { #5 : #6 TF } }
+\__debug_patch:nnNNpn
+ { \__debug_chk_cs_exist:c { #5 : #6 T } } { }
\cs_set:Npn \__prg_set_eq_conditional_T_form:wNnnnn #1 \q_stop #2#3#4#5#6
- {
- \__chk_if_exist_cs:c { #5 : #6 T }
- #2 { #3 : #4 T } { #5 : #6 T }
- }
+ { #2 { #3 : #4 T } { #5 : #6 T } }
+\__debug_patch:nnNNpn
+ { \__debug_chk_cs_exist:c { #5 : #6 F } } { }
\cs_set:Npn \__prg_set_eq_conditional_F_form:wNnnnn #1 \q_stop #2#3#4#5#6
- {
- \__chk_if_exist_cs:c { #5 : #6 F }
- #2 { #3 : #4 F } { #5 : #6 F }
- }
+ { #2 { #3 : #4 F } { #5 : #6 F } }
\tex_chardef:D \c_true_bool = 1 ~
\tex_chardef:D \c_false_bool = 0 ~
\cs_set:Npn \cs_to_str:N
@@ -1782,80 +1961,7 @@
{ \tex_immediate:D \tex_write:D -1 }
\cs_set_protected:Npn \iow_term:x
{ \tex_immediate:D \tex_write:D 16 }
-\cs_set_protected:Npn \debug_log_functions_on:
- {
- \__msg_kernel_error:nnx { kernel } { enable-debug }
- { \token_to_str:N \debug_log_functions_on: }
- }
-\cs_set_protected:Npn \debug_log_functions_off:
- {
- \__msg_kernel_error:nnx { kernel } { enable-debug }
- { \token_to_str:N \debug_log_functions_off: }
- }
-\cs_set_protected:Npn \__debug_suspend_log: { }
-\cs_set_protected:Npn \__debug_resume_log: { }
-\tex_ifodd:D \l@expl@enable@debug@bool
- \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_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: { }
- }
- \tex_ifodd:D \l@expl@log@functions@bool
- \debug_log_functions_on:
- \else:
- \debug_log_functions_off:
- \fi:
-\fi:
-\cs_set_protected:Npn \__debug_patch:nnNw #1#2 { }
-\tex_ifodd:D \l@expl@enable@debug@bool
- \cs_set_protected:Npn \__debug_patch:nnNw #1#2#3
- {
- \tex_ifcase:D
- \if_meaning:w #3 \cs_new_protected:Npn 1~ \fi:
- \if_meaning:w #3 \cs_new:Npn 1~ \fi:
- \if_meaning:w #3 \cs_set_protected:Npn 1~ \fi:
- \if_meaning:w #3 \cs_set:Npn 1~ \fi:
- \if_meaning:w #3 \cs_gset_protected:Npn 1~ \fi:
- \if_meaning:w #3 \cs_gset:Npn 1~ \fi:
- \if_meaning:w #3 \prg_new_protected_conditional:Npnn 2~ \fi:
- \if_meaning:w #3 \prg_new_conditional:Npnn 2~ \fi:
- \__msg_kernel_error:nnx { kernel } { debug-unpatchable }
- { \token_to_str:N #3 }
- \or:
- \exp_after:wN \__debug_patch_param:NNnnNnp
- \exp_after:wN \__debug_patch_new:nnNNnn
- \else:
- \exp_after:wN \__debug_patch_param:NNnnNnp
- \exp_after:wN \__debug_patch_new_conditional:nnNNnnn
- \fi:
- \use_none:nn {#1} {#2} #3
- }
- \cs_set_protected:Npn \__debug_patch_param:NNnnNnp #1#2#3#4#5#6#7#
- { #1 {#3} {#4} #5 #6 {#7} }
- \cs_set_protected:Npn \__debug_patch_new:nnNNnn #1#2#3#4#5#6
- { #3 #4 #5 { #1 #6 #2 } }
- \cs_set_protected:Npn \__debug_patch_new_conditional:nnNNnnn
- #1#2#3#4#5#6#7
- { #3 #4 #5 {#6} { #1 #7 #2 } }
-\fi:
-\__debug_patch:nnNw { }
+\__debug_patch:nnNNpn { }
{ \__debug_log:x { Defining~\token_to_str:N #1~ \msg_line_context: } }
\cs_set_protected:Npn \__chk_if_free_cs:N #1
{
@@ -1867,46 +1973,6 @@
}
\cs_set_protected:Npn \__chk_if_free_cs:c
{ \exp_args:Nc \__chk_if_free_cs:N }
-\cs_set_protected:Npn \debug_check_declarations_on:
- {
- \__msg_kernel_error:nnx { kernel } { enable-debug }
- { \token_to_str:N \debug_check_declarations_on: }
- }
-\cs_set_protected:Npn \debug_check_declarations_off:
- {
- \__msg_kernel_error:nnx { kernel } { enable-debug }
- { \token_to_str:N \debug_check_declarations_off: }
- }
-\tex_ifodd:D \l@expl@enable@debug@bool
- \cs_set_protected:Npn \debug_check_declarations_on:
- {
- \cs_set_protected:Npn \__chk_if_exist_var:N ##1
- {
- \cs_if_exist:NF ##1
- {
- \__msg_kernel_error:nnx { check } { non-declared-variable }
- { \token_to_str:N ##1 }
- }
- }
- }
- \cs_set_protected:Npn \debug_check_declarations_off:
- { \cs_set_protected:Npn \__chk_if_exist_var:N ##1 { } }
- \tex_ifodd:D \l@expl@check@declarations@bool
- \debug_check_declarations_on:
- \else:
- \debug_check_declarations_off:
- \fi:
-\fi:
-\cs_set_protected:Npn \__chk_if_exist_cs:N #1
- {
- \cs_if_exist:NF #1
- {
- \__msg_kernel_error:nnx { kernel } { command-not-defined }
- { \token_to_str:N #1 }
- }
- }
-\cs_set_protected:Npn \__chk_if_exist_cs:c
- { \exp_args:Nc \__chk_if_exist_cs:N }
\cs_set:Npn \__cs_tmp:w #1#2
{
\cs_set_protected:Npn #1 ##1
@@ -1981,7 +2047,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:w (#2) \__int_eval_end:
{ }
\or: { ##1 }
\or: { ##1##2 }
@@ -2439,9 +2505,9 @@
\cs_new:Npn ^^@{\expansionERROR}
\cs_new:Npn \exp_end_continue_f:nw #1 { `^^@ #1 }
\tex_catcode:D `\^^@=15
+\__debug_patch:nnNNpn { \__debug_chk_cs_exist:N #1 } { }
\cs_new_protected:Npn \cs_generate_variant:Nn #1#2
{
- \__chk_if_exist_cs:N #1
\__cs_generate_variant:N #1
\exp_after:wN \__cs_split_function:NN
\exp_after:wN #1
@@ -2576,7 +2642,7 @@
\fi:
\fi:
}
-\__debug_patch:nnNw
+\__debug_patch:nnNNpn
{
\cs_if_free:NF #4
{
@@ -2665,14 +2731,14 @@
\tex_ifodd:D \l@expl@enable@debug@bool
\cs_new_protected:Npn \tl_set_eq:NN #1#2
{
- \__chk_if_exist_var:N #1
- \__chk_if_exist_var:N #2
+ \__debug_chk_var_exist:N #1
+ \__debug_chk_var_exist:N #2
\cs_set_eq:NN #1 #2
}
\cs_new_protected:Npn \tl_gset_eq:NN #1#2
{
- \__chk_if_exist_var:N #1
- \__chk_if_exist_var:N #2
+ \__debug_chk_var_exist:N #1
+ \__debug_chk_var_exist:N #2
\cs_gset_eq:NN #1 #2
}
\else:
@@ -2681,20 +2747,20 @@
\fi:
\cs_generate_variant:Nn \tl_set_eq:NN { cN, Nc, cc }
\cs_generate_variant:Nn \tl_gset_eq:NN { cN, Nc, cc }
-\__debug_patch:nnNw
+\__debug_patch:nnNNpn
{
- \__chk_if_exist_var:N #1
- \__chk_if_exist_var:N #2
- \__chk_if_exist_var:N #3
+ \__debug_chk_var_exist:N #1
+ \__debug_chk_var_exist:N #2
+ \__debug_chk_var_exist:N #3
}
{ }
\cs_new_protected:Npn \tl_concat:NNN #1#2#3
{ \tl_set:Nx #1 { \exp_not:o {#2} \exp_not:o {#3} } }
-\__debug_patch:nnNw
+\__debug_patch:nnNNpn
{
- \__chk_if_exist_var:N #1
- \__chk_if_exist_var:N #2
- \__chk_if_exist_var:N #3
+ \__debug_chk_var_exist:N #1
+ \__debug_chk_var_exist:N #2
+ \__debug_chk_var_exist:N #3
}
{ }
\cs_new_protected:Npn \tl_gconcat:NNN #1#2#3
@@ -2705,22 +2771,22 @@
\prg_new_eq_conditional:NNn \tl_if_exist:c \cs_if_exist:c { TF , T , F , p }
\tl_const:Nn \c_empty_tl { }
\tl_const:Nn \c_space_tl { ~ }
-\__debug_patch:nnNw { \__chk_if_exist_var:N #1 } { }
+\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { }
\cs_new_protected:Npn \tl_set:Nn #1#2
{ \cs_set_nopar:Npx #1 { \exp_not:n {#2} } }
-\__debug_patch:nnNw { \__chk_if_exist_var:N #1 } { }
+\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { }
\cs_new_protected:Npn \tl_set:No #1#2
{ \cs_set_nopar:Npx #1 { \exp_not:o {#2} } }
-\__debug_patch:nnNw { \__chk_if_exist_var:N #1 } { }
+\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { }
\cs_new_protected:Npn \tl_set:Nx #1#2
{ \cs_set_nopar:Npx #1 {#2} }
-\__debug_patch:nnNw { \__chk_if_exist_var:N #1 } { }
+\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { }
\cs_new_protected:Npn \tl_gset:Nn #1#2
{ \cs_gset_nopar:Npx #1 { \exp_not:n {#2} } }
-\__debug_patch:nnNw { \__chk_if_exist_var:N #1 } { }
+\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { }
\cs_new_protected:Npn \tl_gset:No #1#2
{ \cs_gset_nopar:Npx #1 { \exp_not:o {#2} } }
-\__debug_patch:nnNw { \__chk_if_exist_var:N #1 } { }
+\__debug_patch:nnNNpn { \__debug_chk_var_exist: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 }
@@ -2729,28 +2795,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:nnNw { \__chk_if_exist_var:N #1 } { }
+\__debug_patch:nnNNpn { \__debug_chk_var_exist: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:nnNw { \__chk_if_exist_var:N #1 } { }
+\__debug_patch:nnNNpn { \__debug_chk_var_exist: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:nnNw { \__chk_if_exist_var:N #1 } { }
+\__debug_patch:nnNNpn { \__debug_chk_var_exist: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:nnNw { \__chk_if_exist_var:N #1 } { }
+\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { }
\cs_new_protected:Npn \tl_put_left:Nx #1#2
{ \cs_set_nopar:Npx #1 { #2 \exp_not:o #1 } }
-\__debug_patch:nnNw { \__chk_if_exist_var:N #1 } { }
+\__debug_patch:nnNNpn { \__debug_chk_var_exist: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:nnNw { \__chk_if_exist_var:N #1 } { }
+\__debug_patch:nnNNpn { \__debug_chk_var_exist: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:nnNw { \__chk_if_exist_var:N #1 } { }
+\__debug_patch:nnNNpn { \__debug_chk_var_exist: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:nnNw { \__chk_if_exist_var:N #1 } { }
+\__debug_patch:nnNNpn { \__debug_chk_var_exist: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 }
@@ -2761,28 +2827,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:nnNw { \__chk_if_exist_var:N #1 } { }
+\__debug_patch:nnNNpn { \__debug_chk_var_exist: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:nnNw { \__chk_if_exist_var:N #1 } { }
+\__debug_patch:nnNNpn { \__debug_chk_var_exist: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:nnNw { \__chk_if_exist_var:N #1 } { }
+\__debug_patch:nnNNpn { \__debug_chk_var_exist: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:nnNw { \__chk_if_exist_var:N #1 } { }
+\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { }
\cs_new_protected:Npn \tl_put_right:Nx #1#2
{ \cs_set_nopar:Npx #1 { \exp_not:o #1 #2 } }
-\__debug_patch:nnNw { \__chk_if_exist_var:N #1 } { }
+\__debug_patch:nnNNpn { \__debug_chk_var_exist: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:nnNw { \__chk_if_exist_var:N #1 } { }
+\__debug_patch:nnNNpn { \__debug_chk_var_exist: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:nnNw { \__chk_if_exist_var:N #1 } { }
+\__debug_patch:nnNNpn { \__debug_chk_var_exist: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:nnNw { \__chk_if_exist_var:N #1 } { }
+\__debug_patch:nnNNpn { \__debug_chk_var_exist: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 }
@@ -3509,24 +3575,10 @@
\tl_new:N \g_tmpb_tl
\tl_new:N \l_tmpa_tl
\tl_new:N \l_tmpb_tl
-\cs_new_protected:Npn \tl_to_lowercase:n #1
- {
- \__msg_kernel_warning:nnxxx { kernel } { deprecated-command }
- { 2017-12-31 }
- { \token_to_str:N \tl_to_lowercase:n }
- { }
- \cs_gset_eq:NN \tl_to_lowercase:n \tex_lowercase:D
- \tex_lowercase:D {#1}
- }
-\cs_new_protected:Npn \tl_to_uppercase:n #1
- {
- \__msg_kernel_warning:nnxxx { kernel } { deprecated-command }
- { 2017-12-31 }
- { \token_to_str:N \tl_to_uppercase:n }
- { }
- \cs_gset_eq:NN \tl_to_uppercase:n \tex_uppercase:D
- \tex_uppercase:D {#1}
- }
+\__debug_deprecation:nnNNpn { 2017-12-31 } { \tex_lowercase:D }
+\cs_new_protected:Npn \tl_to_lowercase:n #1 { \tex_lowercase:D {#1} }
+\__debug_deprecation:nnNNpn { 2017-12-31 } { \tex_uppercase:D }
+\cs_new_protected:Npn \tl_to_uppercase:n #1 { \tex_uppercase:D {#1} }
%% File: l3str.dtx Copyright (C) 2011-2017 The LaTeX3 Project
\group_begin:
\cs_set_protected:Npn \__str_tmp:n #1
@@ -3753,6 +3805,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) } }
\cs_new:Npn \__str_item:nn #1#2
{
\exp_after:wN \__str_item:w
@@ -3811,6 +3864,7 @@
}
\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) } }
\cs_new:Npn \__str_range:nnn #1#2#3
{
\exp_after:wN \__str_range:w
@@ -4709,8 +4763,10 @@
\cs_new_eq:NN \__int_eval_end: \tex_relax:D
\cs_new_eq:NN \if_int_odd:w \tex_ifodd:D
\cs_new_eq:NN \if_case:w \tex_ifcase:D
+\__debug_patch_args:nNNpn { { (#1) } }
\cs_new:Npn \int_eval:n #1
{ \__int_value:w \__int_eval:w #1 \__int_eval_end: }
+\__debug_patch_args:nNNpn { { (#1) } }
\cs_new:Npn \int_abs:n #1
{
\__int_value:w \exp_after:wN \__int_abs:N
@@ -4719,6 +4775,7 @@
}
\cs_new:Npn \__int_abs:N #1
{ \if_meaning:w - #1 \else: \exp_after:wN #1 \fi: }
+\__debug_patch_args:nNNpn { { (#1) } { (#2) } }
\cs_set:Npn \int_max:nn #1#2
{
\__int_value:w \exp_after:wN \__int_maxmin:wwN
@@ -4727,6 +4784,7 @@
>
\exp_stop_f:
}
+\__debug_patch_args:nNNpn { { (#1) } { (#2) } }
\cs_set:Npn \int_min:nn #1#2
{
\__int_value:w \exp_after:wN \__int_maxmin:wwN
@@ -4743,6 +4801,7 @@
#2
\fi:
}
+\__debug_patch_args:nNNpn { { (#1) } { (#2) } }
\cs_new:Npn \int_div_truncate:nn #1#2
{
\__int_value:w \__int_eval:w
@@ -4766,6 +4825,7 @@
}
\cs_new:Npn \int_div_round:nn #1#2
{ \__int_value:w \__int_eval:w ( #1 ) / ( #2 ) \__int_eval_end: }
+\__debug_patch_args:nNNpn { { (#1) } { (#2) } }
\cs_new:Npn \int_mod:nn #1#2
{
\__int_value:w \__int_eval:w \exp_after:wN \__int_mod:ww
@@ -4797,7 +4857,7 @@
{
\__chk_if_free_cs:N #1
\tex_global:D \__int_constdef:Nw #1 =
- \__int_eval:w #2 \__int_eval_end:
+ \__int_eval:w (#2) \__int_eval_end:
}
}
}
@@ -4835,8 +4895,10 @@
{ 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} { (#2) } }
\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} { (#2) } }
\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
@@ -4859,6 +4921,7 @@
\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} { (#2) } }
\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 }
@@ -4934,6 +4997,7 @@
{ \__int_compare:nnN { \if_int_compare:w } {#3} > }
\cs_new:cpn { __int_compare_>=:NNw } #1#2#3 >=
{ \__int_compare:nnN { \if_int_compare:w } {#3} < }
+\__debug_patch_conditional_args:nNNpnn { { (#1) \__int_eval_end: } {#2} { (#3) } }
\prg_new_conditional:Npnn \int_compare:nNn #1#2#3 { p , T , F , TF }
{
\if_int_compare:w \__int_eval:w #1 #2 \__int_eval:w #3 \__int_eval_end:
@@ -4971,6 +5035,7 @@
{ \__int_case:nw {#1} }
}
\cs_new_eq:NN \__int_case_end:nw \__prg_case_end:nw
+\__debug_patch_conditional_args:nNNpnn { { (#1) } }
\prg_new_conditional:Npnn \int_if_odd:n #1 { p , T , F , TF}
{
\if_int_odd:w \__int_eval:w #1 \__int_eval_end:
@@ -4979,6 +5044,7 @@
\prg_return_false:
\fi:
}
+\__debug_patch_conditional_args:nNNpnn { { (#1) } }
\prg_new_conditional:Npnn \int_if_even:n #1 { p , T , F , TF}
{
\if_int_odd:w \__int_eval:w #1 \__int_eval_end:
@@ -5043,6 +5109,7 @@
\int_compare:nNnF {#1} #2 {#3}
{ \int_do_until:nNnn {#1} #2 {#3} {#4} }
}
+\__debug_patch_args:nNNpn { { (#1) } { (#2) } { (#3) } }
\cs_new:Npn \int_step_function:nnnN #1#2#3
{
\exp_after:wN \__int_step:wwwN
@@ -5499,7 +5566,16 @@
\int_new:N \l_tmpb_int
\int_new:N \g_tmpa_int
\int_new:N \g_tmpb_int
-\cs_new_eq:NN \c_minus_one \m@ne
+\cs_gset_eq:NN \c__deprecation_minus_one \m@ne
+\cs_new_eq:NN \c_minus_one \c__deprecation_minus_one
+\__debug:TF
+ {
+ \tl_gput_right:Nn \g__debug_deprecation_on_tl
+ { \__deprecation_error:Nnn \c_minus_one { -1 } { 2018-12-31 } }
+ \tl_gput_right:Nn \g__debug_deprecation_off_tl
+ { \tex_let:D \c_minus_one \c__deprecation_minus_one }
+ }
+ { }
%% File: l3intarray.dtx Copyright (C) 2017 The LaTeX3 Project
\int_new:N \g__intarray_font_int
\cs_new_protected:Npn \__intarray_new:Nn #1#2
@@ -5560,8 +5636,8 @@
\cs_new:cpn { flag~#1 } ##1 ;
{ \exp_after:wN \use_none:n \cs:w flag~#1~##1 \cs_end: }
}
-\__debug_patch:nnNw
- { \exp_args:Nc \__chk_if_exist_var:N { flag~#1 } } { }
+\__debug_patch:nnNNpn
+ { \exp_args:Nc \__debug_chk_var_exist:N { flag~#1 } } { }
\cs_new_protected:Npn \flag_clear:n #1 { \__flag_clear:wn 0 ; {#1} }
\cs_new_protected:Npn \__flag_clear:wn #1 ; #2
{
@@ -5598,7 +5674,7 @@
\cs_if_exist:cTF { flag~#1 }
{ \prg_return_true: } { \prg_return_false: }
}
-\__debug_patch:nnNw { \__flag_chk_exist:n {#1} } { }
+\__debug_patch_conditional:nNNpnn { \__flag_chk_exist:n {#1} }
\prg_new_conditional:Npnn \flag_if_raised:n #1 { p , T , F , TF }
{
\if_cs_exist:w flag~#1~0 \cs_end:
@@ -5607,7 +5683,7 @@
\prg_return_false:
\fi:
}
-\__debug_patch:nnNw { \__flag_chk_exist:n {#1} } { }
+\__debug_patch:nnNNpn { \__flag_chk_exist:n {#1} } { }
\cs_new:Npn \flag_height:n #1 { \__flag_height_loop:wn 0; {#1} }
\cs_new:Npn \__flag_height_loop:wn #1 ; #2
{
@@ -5736,16 +5812,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:nnNw { \__chk_if_exist_var:N #1 } { }
+\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { }
\cs_new_protected:Npn \bool_set_true:N #1
{ \cs_set_eq:NN #1 \c_true_bool }
-\__debug_patch:nnNw { \__chk_if_exist_var:N #1 } { }
+\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { }
\cs_new_protected:Npn \bool_set_false:N #1
{ \cs_set_eq:NN #1 \c_false_bool }
-\__debug_patch:nnNw { \__chk_if_exist_var:N #1 } { }
+\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { }
\cs_new_protected:Npn \bool_gset_true:N #1
{ \cs_gset_eq:NN #1 \c_true_bool }
-\__debug_patch:nnNw { \__chk_if_exist_var:N #1 } { }
+\__debug_patch:nnNNpn { \__debug_chk_var_exist: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 }
@@ -5756,17 +5832,17 @@
\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:nnNw { \__chk_if_exist_var:N #1 } { }
+\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { }
\cs_new_protected:Npn \bool_set:Nn #1#2
{ \tex_chardef:D #1 = \bool_if_p:n {#2} }
-\__debug_patch:nnNw { \__chk_if_exist_var:N #1 } { }
+\__debug_patch:nnNNpn { \__debug_chk_var_exist: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 }
\cs_generate_variant:Nn \bool_gset:Nn { c }
\prg_new_conditional:Npnn \bool_if:N #1 { p , T , F , TF }
{
- \if_meaning:w \c_true_bool #1
+ \if_bool:N #1
\prg_return_true:
\else:
\prg_return_false:
@@ -5810,22 +5886,10 @@
\cs_new:Npn \bool_if_p:n #1
{
\group_align_safe_begin:
- \__bool_if_left_parentheses:wwwn \q_nil
- #1 \q_mark { }
- ( \q_mark { \__bool_if_right_parentheses:wwwn \q_nil }
- ) \q_mark { \__bool_if_or:wwwn \q_nil }
- || \q_mark \__bool_if_parse:NNNww
- \q_stop
- }
-\cs_new:Npn \__bool_if_left_parentheses:wwwn #1 \q_nil #2 ( #3 \q_mark #4
- { #4 \__bool_if_left_parentheses:wwwn #1 #2 (( \q_nil #3 \q_mark {#4} }
-\cs_new:Npn \__bool_if_right_parentheses:wwwn #1 \q_nil #2 ) #3 \q_mark #4
- { #4 \__bool_if_right_parentheses:wwwn #1 #2 )) \q_nil #3 \q_mark {#4} }
-\cs_new:Npn \__bool_if_or:wwwn #1 \q_nil #2 || #3 \q_mark #4
- { #4 \__bool_if_or:wwwn #1 #2 )||( \q_nil #3 \q_mark {#4} }
-\cs_new:Npn \__bool_if_parse:NNNww #1#2#3#4 \q_mark #5 \q_stop
- {
- \__bool_get_next:NN \use_i:nn (( #4 )) S
+ \exp_after:wN
+ \group_align_safe_end:
+ \exp:w \exp_end_continue_f:w % (
+ \__bool_get_next:NN \use_i:nnnn #1 )
}
\cs_new:Npn \__bool_get_next:NN #1#2
{
@@ -5838,11 +5902,14 @@
#1 #2
}
\cs_new:cpn { __bool_!:Nw } #1#2
- { \exp_after:wN \__bool_get_next:NN #1 \use_ii:nn \use_i:nn }
+ {
+ \exp_after:wN \__bool_get_next:NN
+ #1 \use_ii:nnnn \use_i:nnnn \use_iii:nnnn \use_iv:nnnn
+ }
\cs_new:cpn { __bool_(:Nw } #1#2
{
\exp_after:wN \__bool_choose:NNN \exp_after:wN #1
- \__int_value:w \__bool_get_next:NN \use_i:nn
+ \__int_value:w \__bool_get_next:NN \use_i:nnnn
}
\cs_new:cpn { __bool_p:Nw } #1
{ \exp_after:wN \__bool_choose:NNN \exp_after:wN #1 \__int_value:w }
@@ -5850,38 +5917,19 @@
{
\use:c
{
- __bool_ #3 _
- #1 #2 { \if_meaning:w 0 #2 1 \else: 0 \fi: }
- :w
- }
- }
-\cs_new:cpn { __bool_)_0:w } { \c_false_bool }
-\cs_new:cpn { __bool_)_1:w } { \c_true_bool }
-\cs_new:cpn { __bool_S_0:w } { \group_align_safe_end: \c_false_bool }
-\cs_new:cpn { __bool_S_1:w } { \group_align_safe_end: \c_true_bool }
-\cs_new:cpn { __bool_&_1:w } & { \__bool_get_next:NN \use_i:nn }
-\cs_new:cpn { __bool_|_0:w } | { \__bool_get_next:NN \use_i:nn }
-\cs_new:cpn { __bool_&_0:w } &
- { \__bool_eval_skip_to_end_auxi:Nw \c_false_bool }
-\cs_new:cpn { __bool_|_1:w } |
- { \__bool_eval_skip_to_end_auxi:Nw \c_true_bool }
-%% (
-\cs_new:Npn \__bool_eval_skip_to_end_auxi:Nw #1#2 )
- {
- \__bool_eval_skip_to_end_auxii:Nw #1#2 ( % )
- \q_no_value \q_stop
- {#2}
- }
-\cs_new:Npn \__bool_eval_skip_to_end_auxii:Nw #1#2 ( #3#4 \q_stop #5 % )
- {
- \quark_if_no_value:NTF #3
- {#1}
- { \__bool_eval_skip_to_end_auxiii:Nw #1 #5 }
- }
-\cs_new:Npn \__bool_eval_skip_to_end_auxiii:Nw #1#2 ( #3 )
- { % (
- \__bool_eval_skip_to_end_auxi:Nw #1#3 )
+ __bool_ \token_to_str:N #3 _
+ #1 #2 { \if_meaning:w 0 #2 1 \else: 0 \fi: } 2 0 :
+ }
}
+\cs_new:cpn { __bool_)_0: } { \c_false_bool }
+\cs_new:cpn { __bool_)_1: } { \c_true_bool }
+\cs_new:cpn { __bool_)_2: } { \c_true_bool }
+\cs_new:cpn { __bool_&_0: } & { \__bool_get_next:NN \use_iv:nnnn }
+\cs_new:cpn { __bool_&_1: } & { \__bool_get_next:NN \use_i:nnnn }
+\cs_new:cpn { __bool_&_2: } & { \__bool_get_next:NN \use_iii:nnnn }
+\cs_new:cpn { __bool_|_0: } | { \__bool_get_next:NN \use_i:nnnn }
+\cs_new:cpn { __bool_|_1: } | { \__bool_get_next:NN \use_iii:nnnn }
+\cs_new:cpn { __bool_|_2: } | { \__bool_get_next:NN \use_iii:nnnn }
\prg_new_conditional:Npnn \bool_lazy_all:n #1 { p , T , F , TF }
{ \__bool_lazy_all:n #1 \q_recursion_tail \q_recursion_stop }
\cs_new:Npn \__bool_lazy_all:n #1
@@ -5957,6 +6005,7 @@
#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
@@ -6564,13 +6613,15 @@
\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) } }
\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:w #1 \__int_eval_end: }
\cs_new_protected:Npn \char_show_value_catcode:n #1
{ \__msg_show_wrap:n { > ~ \char_value_catcode:n {#1} } }
\cs_new_protected:Npn \char_set_catcode_escape:N #1
@@ -6637,40 +6688,48 @@
{ \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) } }
\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:w #1 \__int_eval_end: }
\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) } }
\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) } }
\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:w #1 \__int_eval_end: }
\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) } }
\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) } }
\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:w #1 \__int_eval_end: }
\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) } }
\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) } }
\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:w #1 \__int_eval_end: }
\cs_new_protected:Npn \char_show_value_sfcode:n #1
{ \__msg_show_wrap:n { > ~ \char_value_sfcode:n {#1} } }
\seq_new:N \l_char_special_seq
@@ -6699,6 +6758,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) } }
\cs_new:Npn \char_generate:nn #1#2
{
\exp:w \exp_after:wN \__char_generate_aux:w
@@ -6709,8 +6769,7 @@
{
\exp:w \exp_after:wN
\__char_generate_aux:nnw \exp_after:wN
- { \__int_value:w \__int_eval:w #1 \exp_after:wN }
- {#2} \exp_end:
+ { \__int_value:w \__int_eval:w #1 } {#2} \exp_end:
}
\cs_new:Npn \__char_generate_aux:w #1 ; #2 ;
{
@@ -7106,45 +7165,35 @@
{ \tex_global:D \tex_futurelet:D \g_peek_token }
\cs_new_protected:Npn \__peek_true_remove:w
{
- \group_align_safe_end:
\tex_afterassignment:D \__peek_true_aux:w
\cs_set_eq:NN \__peek_tmp:w
}
-\cs_new_protected:Npn \__peek_token_generic:NNTF #1#2#3#4
+\cs_new_protected:Npn \__peek_token_generic_aux:NNNTF #1#2#3#4#5
{
- \cs_set_eq:NN \l__peek_search_token #2
- \tl_set:Nn \l__peek_search_tl {#2}
- \cs_set:Npx \__peek_true:w
+ \group_align_safe_begin:
+ \cs_set_eq:NN \l__peek_search_token #3
+ \tl_set:Nn \l__peek_search_tl {#3}
+ \cs_set:Npx \__peek_true_aux:w
{
\exp_not:N \group_align_safe_end:
- \exp_not:n {#3}
+ \exp_not:n {#4}
}
+ \cs_set_eq:NN \__peek_true:w #1
\cs_set:Npx \__peek_false:w
{
\exp_not:N \group_align_safe_end:
- \exp_not:n {#4}
+ \exp_not:n {#5}
}
- \group_align_safe_begin:
- \peek_after:Nw #1
+ \peek_after:Nw #2
}
+\cs_new_protected:Npn \__peek_token_generic:NNTF
+ { \__peek_token_generic_aux:NNNTF \__peek_true_aux:w }
\cs_new_protected:Npn \__peek_token_generic:NNT #1#2#3
{ \__peek_token_generic:NNTF #1 #2 {#3} { } }
\cs_new_protected:Npn \__peek_token_generic:NNF #1#2#3
{ \__peek_token_generic:NNTF #1 #2 { } {#3} }
-\cs_new_protected:Npn \__peek_token_remove_generic:NNTF #1#2#3#4
- {
- \cs_set_eq:NN \l__peek_search_token #2
- \tl_set:Nn \l__peek_search_tl {#2}
- \cs_set_eq:NN \__peek_true:w \__peek_true_remove:w
- \cs_set:Npx \__peek_true_aux:w { \exp_not:n {#3} }
- \cs_set:Npx \__peek_false:w
- {
- \exp_not:N \group_align_safe_end:
- \exp_not:n {#4}
- }
- \group_align_safe_begin:
- \peek_after:Nw #1
- }
+\cs_new_protected:Npn \__peek_token_remove_generic:NNTF
+ { \__peek_token_generic_aux:NNNTF \__peek_true_remove:w }
\cs_new_protected:Npn \__peek_token_remove_generic:NNT #1#2#3
{ \__peek_token_remove_generic:NNTF #1 #2 {#3} { } }
\cs_new_protected:Npn \__peek_token_remove_generic:NNF #1#2#3
@@ -7580,7 +7629,7 @@
\cs_if_exist:cTF { \c__msg_text_prefix_tl #1 / #2 }
{ \prg_return_true: } { \prg_return_false: }
}
-\__debug_patch:nnNw { }
+\__debug_patch:nnNNpn { }
{ \__debug_log:x { Defining~message~ #1 / #2 ~\msg_line_context: } }
\cs_new_protected:Npn \__chk_if_free_msg:nn #1#2
{
@@ -8216,9 +8265,14 @@
}
\bool_if:NTF \l@expl@enable@debug@bool
{
- \__msg_kernel_new:nnn { kernel } { debug-unpatchable }
- { Only~some~definitions~can~be~patched;~'#3'~cannot. }
- \__msg_kernel_new:nnnn { check } { non-declared-variable }
+ \__msg_kernel_new:nnnn { kernel } { debug }
+ { The~debugging~option~'#1'~does~not~exist~\msg_line_context:. }
+ {
+ The~functions~'\iow_char:N\\debug_on:n'~and~
+ '\iow_char:N\\debug_off:n'~only~accept~the~arguments~
+ 'check-declarations',~'deprecation',~'log-functions',~not~'#1'.
+ }
+ \__msg_kernel_new:nnnn { kernel } { non-declared-variable }
{ The~variable~#1~has~not~been~declared~\msg_line_context:. }
{
Checking~is~active,~and~you~have~tried~do~so~something~like: \\
@@ -8646,10 +8700,10 @@
{ 1 }
{
\cs_if_exist:NTF \normalend
- { \tex_count:D 38 \scan_stop: }
+ { \tex_count:D 38 ~ }
{
- \tex_count:D 16 \scan_stop:
- \cs_if_exist:NT \loccount { - 1 }
+ \tex_count:D 16 ~ %
+ \cs_if_exist:NT \loccount { - 1 }
}
}
{
@@ -8795,10 +8849,10 @@
{ 1 }
{
\cs_if_exist:NTF \normalend
- { \tex_count:D 39 \scan_stop: }
+ { \tex_count:D 39 ~ }
{
- \tex_count:D 17 \scan_stop:
- \cs_if_exist:NT \loccount { - 1 }
+ \tex_count:D 17 ~
+ \cs_if_exist:NT \loccount { - 1 }
}
}
{
@@ -8945,7 +8999,8 @@
\cs_set_eq:NN \ \c_catcode_other_space_tl
\cs_set_eq:NN \iow_indent:n \__iow_indent:n
#3
- \__iow_wrap_set:Nx \l__iow_wrap_tl {#1}
+ \cs_set_eq:NN \protect \token_to_str:N
+ \tl_set:Nx \l__iow_wrap_tl {#1}
\cs_set_eq:NN \iow_indent:n \__iow_indent_error:n
\tl_set:Nx \l__iow_newline_tl { \iow_newline: #2 }
\tl_set:Nx \l__iow_newline_tl { \tl_to_str:N \l__iow_newline_tl }
@@ -8955,7 +9010,6 @@
\exp_args:NNf \group_end:
#4 { \tl_to_str:N \l__iow_wrap_tl }
}
-\cs_new_eq:NN \__iow_wrap_set:Nx \protected@edef
\cs_new_protected:Npn \__iow_wrap_do:
{
\tl_set:Nx \l__iow_wrap_tl
@@ -9187,95 +9241,51 @@
}
\tl_new:N \g_file_current_name_tl
\tl_gset:Nn \g_file_current_name_tl { \g_file_curr_name_str }
-\cs_new_protected:Npn \file_path_include:n #1
+\__debug:TF
{
- \__msg_kernel_warning:nnxxx { kernel } { deprecated-command }
- { 2018-12-31 }
- { \token_to_str:N \file_path_include:n }
+ \tl_gput_right:Nn \g__debug_deprecation_on_tl
{
- \token_to_str:N \seq_put_right:Nn \c_space_tl
- \token_to_str:N \l_file_search_path_seq
+ \__deprecation_error:Nnn \g_file_current_name_tl
+ { \g_file_curr_name_str } { 2018-12-31 }
}
+ \tl_gput_right:Nn \g__debug_deprecation_off_tl
+ { \tex_def:D \g_file_current_name_tl { \g_file_curr_name_str } }
+ }
+ { }
+\__debug_deprecation:nnNNpn { 2018-12-31 }
+ { \seq_put_right:Nn \l_file_search_path_seq }
+\cs_new_protected:Npn \file_path_include:n #1
+ {
\__file_name_sanitize:nN {#1} \l__file_full_name_str
\seq_if_in:NVF \l_file_search_path_seq \l__file_full_name_str
{ \seq_put_right:NV \l_file_search_path_seq \l__file_full_name_str }
}
+\__debug_deprecation:nnNNpn { 2018-12-31 }
+ { \seq_remove_all:Nn \l_file_search_path_seq }
\cs_new_protected:Npn \file_path_remove:n #1
{
- \__msg_kernel_warning:nnxxx { kernel } { deprecated-command }
- { 2018-12-31 }
- { \token_to_str:N \file_path_remove:n }
- {
- \token_to_str:N \seq_remove_all:Nn \c_space_tl
- \token_to_str:N \l_file_search_path_seq
- }
\__file_name_sanitize:nN {#1} \l__file_full_name_str
\seq_remove_all:NV \l_file_search_path_seq \l__file_full_name_str
}
+\__debug_deprecation:nnNNpn { 2018-12-31 } { \file_get_full_name:nN }
\cs_new_protected:Npn \file_add_path:nN #1#2
{
- \__msg_kernel_warning:nnxxx { kernel } { deprecated-command }
- { 2018-12-31 }
- { \token_to_str:N \file_add_path:nN }
- { \token_to_str:N \file_get_full_name:nN }
\file_get_full_name:nN {#1} #2
\str_if_empty:NT #2
{ \tl_set:Nn #2 { \q_no_value } }
}
-\cs_new_protected:Npn \ior_get_str:NN
- {
- \__msg_kernel_warning:nnxxx { kernel } { deprecated-command }
- { 2017-12-31 }
- { \token_to_str:N \ior_get_str:NN }
- { \token_to_str:N \ior_str_get:NN }
- \cs_gset_eq:NN \ior_get_str:NN \ior_str_get:NN
- \ior_str_get:NN
- }
-\cs_new_protected:Npn \file_list:
- {
- \__msg_kernel_warning:nnxxx { kernel } { deprecated-command }
- { 2018-12-31 }
- { \token_to_str:N \file_list: }
- { \token_to_str:N \file_log_list: }
- \cs_gset_eq:NN \file_list: \file_log_list:
- \file_log_list:
- }
-\cs_new_protected:Npn \ior_list_streams:
- {
- \__msg_kernel_warning:nnxxx { kernel } { deprecated-command }
- { 2018-12-31 }
- { \token_to_str:N \ior_list_streams: }
- { \token_to_str:N \ior_show_list: }
- \cs_gset_eq:NN \ior_list_streams: \ior_show_list:
- \ior_show_list:
- }
-\cs_new_protected:Npn \ior_log_streams:
- {
- \__msg_kernel_warning:nnxxx { kernel } { deprecated-command }
- { 2018-12-31 }
- { \token_to_str:N \ior_log_streams: }
- { \token_to_str:N \ior_log_list: }
- \cs_gset_eq:NN \ior_log_streams: \ior_log_list:
- \ior_log_list:
- }
-\cs_new_protected:Npn \iow_list_streams:
- {
- \__msg_kernel_warning:nnxxx { kernel } { deprecated-command }
- { 2018-12-31 }
- { \token_to_str:N \iow_list_streams: }
- { \token_to_str:N \iow_show_list: }
- \cs_gset_eq:NN \iow_list_streams: \iow_show_list:
- \iow_show_list:
- }
-\cs_new_protected:Npn \iow_log_streams:
- {
- \__msg_kernel_warning:nnxxx { kernel } { deprecated-command }
- { 2018-12-31 }
- { \token_to_str:N \iow_log_streams: }
- { \token_to_str:N \iow_log_list: }
- \cs_gset_eq:NN \iow_log_streams: \iow_log_list:
- \iow_log_list:
- }
+\__debug_deprecation:nnNNpn { 2017-12-31 } { \ior_str_get:NN }
+\cs_new_protected:Npn \ior_get_str:NN { \ior_str_get:NN }
+\__debug_deprecation:nnNNpn { 2018-12-31 } { \file_log_list: }
+\cs_new_protected:Npn \file_list: { \file_log_list: }
+\__debug_deprecation:nnNNpn { 2018-12-31 } { \ior_show_list: }
+\cs_new_protected:Npn \ior_list_streams: { \ior_show_list: }
+\__debug_deprecation:nnNNpn { 2018-12-31 } { \ior_log_list: }
+\cs_new_protected:Npn \ior_log_streams: { \ior_log_list: }
+\__debug_deprecation:nnNNpn { 2018-12-31 } { \iow_show_list: }
+\cs_new_protected:Npn \iow_list_streams: { \iow_show_list: }
+\__debug_deprecation:nnNNpn { 2018-12-31 } { \iow_log_list: }
+\cs_new_protected:Npn \iow_log_streams: { \iow_log_list: }
%% File: l3skip.dtx Copyright (C) 2004-2011 Frank Mittelbach, The LaTeX3 Project
%% (C) 2012-2017 The LaTeX3 Project
\cs_new_eq:NN \if_dim:w \tex_ifdim:D
@@ -9307,6 +9317,7 @@
{ 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} { (#2) } }
\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 }
@@ -9318,16 +9329,19 @@
\cs_new_protected:Npn \dim_gset_eq:NN #1#2 { \tex_global:D #1 = #2 }
\cs_generate_variant:Nn \dim_gset_eq:NN { c }
\cs_generate_variant:Nn \dim_gset_eq:NN { Nc , cc }
+\__debug_patch_args:nNNpn { {#1} { (#2) } }
\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 }
\cs_generate_variant:Nn \dim_add:Nn { c }
\cs_generate_variant:Nn \dim_gadd:Nn { c }
+\__debug_patch_args:nNNpn { {#1} { (#2) } }
\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 }
\cs_generate_variant:Nn \dim_sub:Nn { c }
\cs_generate_variant:Nn \dim_gsub:Nn { c }
+\__debug_patch_args:nNNpn { { (#1) } }
\cs_new:Npn \dim_abs:n #1
{
\exp_after:wN \__dim_abs:N
@@ -9335,6 +9349,7 @@
}
\cs_new:Npn \__dim_abs:N #1
{ \if_meaning:w - #1 \else: \exp_after:wN #1 \fi: }
+\__debug_patch_args:nNNpn { { (#1) } { (#2) } }
\cs_new:Npn \dim_max:nn #1#2
{
\dim_use:N \__dim_eval:w \exp_after:wN \__dim_maxmin:wwN
@@ -9343,6 +9358,7 @@
>
\__dim_eval_end:
}
+\__debug_patch_args:nNNpn { { (#1) } { (#2) } }
\cs_new:Npn \dim_min:nn #1#2
{
\dim_use:N \__dim_eval:w \exp_after:wN \__dim_maxmin:wwN
@@ -9363,6 +9379,7 @@
{ \__dim_ratio:n {#1} / \__dim_ratio:n {#2} }
\cs_new:Npn \__dim_ratio:n #1
{ \__int_value:w \__dim_eval:w (#1) \__dim_eval_end: }
+\__debug_patch_conditional_args:nNNpnn { { (#1) \__dim_eval_end: } {#2} { (#3) } }
\prg_new_conditional:Npnn \dim_compare:nNn #1#2#3 { p , T , F , TF }
{
\if_dim:w \__dim_eval:w #1 #2 \__dim_eval:w #3 \__dim_eval_end:
@@ -9489,14 +9506,16 @@
\dim_compare:nNnF {#1} #2 {#3}
{ \dim_do_until:nNnn {#1} #2 {#3} {#4} }
}
+\__debug_patch_args:nNNpn { { (#1) } }
\cs_new:Npn \dim_eval:n #1
{ \dim_use:N \__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 { { (#1) } }
\cs_new:Npn \dim_to_decimal:n #1
{
\exp_after:wN
- \__dim_to_decimal:w \dim_use:N \__dim_eval:w (#1) \__dim_eval_end:
+ \__dim_to_decimal:w \dim_use:N \__dim_eval:w #1 \__dim_eval_end:
}
\use:x
{
@@ -9510,6 +9529,7 @@
}
\cs_new:Npn \dim_to_decimal_in_bp:n #1
{ \dim_to_decimal:n { ( #1 ) * 800 / 803 } }
+\__debug_patch_args:nNNpn { { (#1) } }
\cs_new:Npn \dim_to_decimal_in_sp:n #1
{ \int_eval:n { \__dim_eval:w #1 \__dim_eval_end: } }
\cs_new:Npn \dim_to_decimal_in_unit:nn #1#2
@@ -9560,6 +9580,7 @@
{ 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} { (#2) } }
\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 }
@@ -9571,11 +9592,13 @@
\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} { (#2) } }
\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 }
\cs_generate_variant:Nn \skip_add:Nn { c }
\cs_generate_variant:Nn \skip_gadd:Nn { c }
+\__debug_patch_args:nNNpn { {#1} { (#2) } }
\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 }
@@ -9593,6 +9616,7 @@
}
\cs_set_protected:Npn \__cs_tmp:w #1
{
+ \__debug_patch_conditional_args:nNNpnn { { (##1) } }
\prg_new_conditional:Npnn \skip_if_finite:n ##1 { p , T , F , TF }
{
\exp_after:wN \__skip_if_finite:wwNw
@@ -9602,14 +9626,17 @@
\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 } }
+\__debug_patch_args:nNNpn { { (#1) } }
\cs_new:Npn \skip_eval:n #1
{ \skip_use:N \etex_glueexpr:D #1 \scan_stop: }
\cs_new_eq:NN \skip_use:N \tex_the:D
\cs_new:Npn \skip_use:c #1 { \tex_the:D \cs:w #1 \cs_end: }
\cs_new_eq:NN \skip_horizontal:N \tex_hskip:D
+\__debug_patch_args:nNNpn { { (#1) } }
\cs_new:Npn \skip_horizontal:n #1
{ \skip_horizontal:N \etex_glueexpr:D #1 \scan_stop: }
\cs_new_eq:NN \skip_vertical:N \tex_vskip:D
+\__debug_patch_args:nNNpn { { (#1) } }
\cs_new:Npn \skip_vertical:n #1
{ \skip_vertical:N \etex_glueexpr:D #1 \scan_stop: }
\cs_generate_variant:Nn \skip_horizontal:N { c }
@@ -9655,6 +9682,7 @@
{ 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 { {#1} { (#2) } }
\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 }
@@ -9666,16 +9694,19 @@
\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} { (#2) } }
\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 }
\cs_generate_variant:Nn \muskip_add:Nn { c }
\cs_generate_variant:Nn \muskip_gadd:Nn { c }
+\__debug_patch_args:nNNpn { {#1} { (#2) } }
\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 }
\cs_generate_variant:Nn \muskip_sub:Nn { c }
\cs_generate_variant:Nn \muskip_gsub:Nn { c }
+\__debug_patch_args:nNNpn { { (#1) } }
\cs_new:Npn \muskip_eval:n #1
{ \muskip_use:N \etex_muexpr:D #1 \scan_stop: }
\cs_new_eq:NN \muskip_use:N \tex_the:D
@@ -10022,7 +10053,7 @@
}
}
}
-\__debug_patch:nnNw
+\__debug_patch:nnNNpn
{
\cs_if_exist:cF { \c__keys_code_root_tl #1 }
{ \__debug_log:x { Defining~key~#1~\msg_line_context: } }
@@ -11148,17 +11179,35 @@
\__fp_round_o:Nw \__fp_round_to_nearest:NNN #1
#2
}
-\cs_new:Npn \__fp_parse_round:Nw
- #1 #2 \__fp_round_to_nearest:NNN #3#4 { #2 #1 #3 }
-\cs_new:Npn \__fp_parse_round_deprecation_error:Nw
- #1 #2 \__fp_round_to_nearest:NNN #3#4
+\__debug:TF
{
- \__fp_error:nnfn { fp-deprecated } { round#4() }
+ \tl_gput_right:Nn \g__debug_deprecation_on_tl
{
- \str_case:nn {#2}
- { { + } { ceil } { 0 } { trunc } { - } { floor } }
- } { }
- #2 #1 #3
+ \cs_set_eq:NN \__fp_parse_round:Nw
+ \__fp_parse_round_deprecation_error:Nw
+ }
+ \tl_gput_right:Nn \g__debug_deprecation_off_tl
+ {
+ \cs_set_eq:NN \__fp_parse_round:Nw
+ \__fp_parse_round_no_error:Nw
+ }
+ \cs_new:Npn \__fp_parse_round_deprecation_error:Nw
+ #1 #2 \__fp_round_to_nearest:NNN #3#4
+ {
+ \__fp_error:nnfn { fp-deprecated } { round#4() }
+ {
+ \str_case:nn {#2}
+ { { + } { ceil } { 0 } { trunc } { - } { floor } }
+ } { }
+ #2 #1 #3
+ }
+ \cs_new:Npn \__fp_parse_round_no_error:Nw
+ #1 #2 \__fp_round_to_nearest:NNN #3#4 { #2 #1 #3 }
+ \cs_new_eq:NN \__fp_parse_round:Nw \__fp_parse_round_no_error:Nw
+ }
+ {
+ \cs_new:Npn \__fp_parse_round:Nw
+ #1 #2 \__fp_round_to_nearest:NNN #3#4 { #2 #1 #3 }
}
\int_const:Nn \c__fp_five_int { 5 }
\cs_new:Npn \__fp_round_return_one:
@@ -15800,6 +15849,7 @@
\exp_after:wN \__fp_to_decimal_dispatch:w \exp:w \exp_end_continue_f:w
\__fp_round:Nwn \__fp_round_to_nearest:NNN #1; { 0 }
}
+\__debug_patch_args:nNNpn { { (#1) } }
\cs_new:Npn \dim_to_fp:n #1
{
\exp_after:wN \__fp_from_dim_test:ww
@@ -16484,24 +16534,10 @@
\iow_char:N\\sort_return_swapped: ~multiple~times.~
Exactly~one~of~these~should~be~called.
}
-\cs_new_protected:Npn \sort_ordered:
- {
- \__msg_kernel_warning:nnxxx { kernel } { deprecated-command }
- { 2018-12-31 }
- { \token_to_str:N \sort_ordered: }
- { \token_to_str:N \sort_return_same: }
- \cs_gset_eq:NN \sort_ordered: \sort_return_same:
- \sort_return_same:
- }
-\cs_new_protected:Npn \sort_reversed:
- {
- \__msg_kernel_warning:nnxxx { kernel } { deprecated-command }
- { 2018-12-31 }
- { \token_to_str:N \sort_reversed: }
- { \token_to_str:N \sort_return_swapped: }
- \cs_gset_eq:NN \sort_reversed: \sort_return_swapped:
- \sort_return_swapped:
- }
+\__debug_deprecation:nnNNpn { 2018-12-31 } { \sort_return_same: }
+\cs_new_protected:Npn \sort_ordered: { \sort_return_same: }
+\__debug_deprecation:nnNNpn { 2018-12-31 } { \sort_return_swapped: }
+\cs_new_protected:Npn \sort_reversed: { \sort_return_swapped: }
%% File: l3tl-build.dtx Copyright (C) 2011-2017 The LaTeX3 Project
\int_new:N \l__tl_build_start_index_int
\int_new:N \l__tl_build_index_int
@@ -16604,43 +16640,32 @@
{
\group_begin:
\group_align_safe_begin:
- \__tl_analysis_setup:n {#1}
\__tl_analysis_a:n {#1}
\__tl_analysis_b:n {#1}
\group_align_safe_end:
\group_end:
}
-\cs_new_protected:Npn \__tl_analysis_setup:n #1
- {
- \int_set:Nn \tex_escapechar:D { -1 }
- \exp_after:wN \__tl_analysis_disable_loop:N
- \tl_to_str:n {#1} { ~ } { ? \__prg_break: }
- \__prg_break_point:
- \scan_stop:
- }
\group_begin:
\char_set_catcode_active:N \^^@
- \cs_new_protected:Npn \__tl_analysis_disable_loop:N #1
+ \cs_new_protected:Npn \__tl_analysis_disable:n #1
{
- \tex_lccode:D 0 = `#1 ~
+ \tex_lccode:D 0 = #1 \exp_stop_f:
\tex_lowercase:D { \tex_let:D ^^@ } \tex_undefined:D
- \__tl_analysis_disable_loop:N
}
\cs_if_exist:NT \ptex_kanjiskip:D
{
- \cs_gset_protected:Npn \__tl_analysis_disable_loop:N #1
+ \cs_gset_protected:Npn \__tl_analysis_disable:n #1
{
- \use_none:n #1 \scan_stop:
- \if_int_compare:w 256 > `#1 \exp_stop_f:
- \tex_lccode:D 0 = `#1 ~
+ \if_int_compare:w 256 > #1 \exp_stop_f:
+ \tex_lccode:D 0 = #1 \exp_stop_f:
\tex_lowercase:D { \tex_let:D ^^@ } \tex_undefined:D
\fi:
- \__tl_analysis_disable_loop:N
}
}
\group_end:
\cs_new_protected:Npn \__tl_analysis_a:n #1
{
+ \__tl_analysis_disable:n { 32 }
\int_set:Nn \tex_escapechar:D { 92 }
\int_zero:N \l__tl_analysis_normal_int
\int_zero:N \l__tl_analysis_index_int
@@ -16692,14 +16717,12 @@
\__tl_analysis_a_loop:w
}
\group_begin:
- \char_set_catcode_group_begin:N \^^@
- \char_set_catcode_group_end:N \^^E
+ \char_set_catcode_group_begin:N \^^@ % {
\cs_new_protected:Npn \__tl_analysis_a_bgroup:w
- { \__tl_analysis_a_group:nw { \exp_after:wN ^^@ \if_false: ^^E \fi: } }
- \char_set_catcode_group_begin:N \^^B
+ { \__tl_analysis_a_group:nw { \exp_after:wN ^^@ \if_false: } \fi: } }
\char_set_catcode_group_end:N \^^@
\cs_new_protected:Npn \__tl_analysis_a_egroup:w
- { \__tl_analysis_a_group:nw { \if_false: ^^B \fi: ^^@ } }
+ { \__tl_analysis_a_group:nw { \if_false: { \fi: ^^@ } } % }
\group_end:
\cs_new_protected:Npn \__tl_analysis_a_group:nw #1
{
@@ -16708,6 +16731,19 @@
\if_int_compare:w \tex_lccode:D 0 = \tex_escapechar:D
\int_set:Nn \tex_escapechar:D { 139 - \tex_escapechar:D }
\fi:
+ \__tl_analysis_disable:n { \tex_lccode:D 0 }
+ \tex_futurelet:D \l__tl_analysis_token \__tl_analysis_a_group_aux:w
+ }
+\cs_new_protected:Npn \__tl_analysis_a_group_aux:w
+ {
+ \if_meaning:w \l__tl_analysis_token \tex_undefined:D
+ \exp_after:wN \__tl_analysis_a_safe:N
+ \else:
+ \exp_after:wN \__tl_analysis_a_group_auxii:w
+ \fi:
+ }
+\cs_new_protected:Npn \__tl_analysis_a_group_auxii:w
+ {
\tex_afterassignment:D \__tl_analysis_a_group_test:w
\exp_after:wN \cs_set_eq:NN
\exp_after:wN \l__tl_analysis_char_token
@@ -16726,7 +16762,7 @@
{
\tex_advance:D \l__tl_analysis_nesting_int \l__tl_analysis_type_int
\if_int_compare:w \tex_lccode:D 0 = `\ \exp_stop_f:
- \tex_multiply:D \l__tl_analysis_type_int 2 \exp_stop_f:
+ \tex_advance:D \l__tl_analysis_type_int \l__tl_analysis_type_int
\fi:
\tex_skip:D \l__tl_analysis_index_int
= \l__tl_analysis_normal_int sp plus \l__tl_analysis_type_int sp \scan_stop:
@@ -16742,10 +16778,15 @@
\scan_stop:
\exp_after:wN \use_none:n \token_to_str:N #1 \prg_do_nothing:
\scan_stop:
- \int_incr:N \l__tl_analysis_normal_int
+ \exp_after:wN \use_i:nn
\else:
- \__tl_analysis_cs_space_count:NN \__tl_analysis_a_cs:ww #1
+ \exp_after:wN \use_ii:nn
\fi:
+ {
+ \__tl_analysis_disable:n { `#1 }
+ \int_incr:N \l__tl_analysis_normal_int
+ }
+ { \__tl_analysis_cs_space_count:NN \__tl_analysis_a_cs:ww #1 }
\__tl_analysis_a_loop:w
}
\cs_new_protected:Npn \__tl_analysis_a_cs:ww #1; #2;
@@ -16754,10 +16795,10 @@
\tex_skip:D \l__tl_analysis_index_int
= \__int_eval:w \l__tl_analysis_normal_int + 1 sp \scan_stop:
\tex_advance:D \l__tl_analysis_index_int #1 \exp_stop_f:
- \l__tl_analysis_normal_int #2 \exp_stop_f:
\else:
- \tex_advance:D \l__tl_analysis_normal_int #2 \exp_stop_f:
+ \tex_advance:D
\fi:
+ \l__tl_analysis_normal_int #2 \exp_stop_f:
}
\cs_new_protected:Npn \__tl_analysis_b:n #1
{
@@ -16841,7 +16882,7 @@
\fi:
\tex_the:D \tex_toks:D #1 \s__tl
\if_case:w \etex_gluestretch:D \tex_skip:D #1 \exp_stop_f:
- A
+ \token_to_str:N A
\or: 1
\or: 1
\else: 2
@@ -17248,6 +17289,14 @@
\__regex_item_caseful_range:nn { `A } { `F }
\__regex_item_caseful_range:nn { `a } { `f }
}
+\__debug_patch:nnNNpn
+ {
+ \__debug_trace_push:nnN { regex } { 1 } \__regex_escape_use:nnnn
+ \__tl_build:Nw \l__regex_internal_a_tl
+ \__tl_build_one:n { \__debug_trace_pop:nnN { regex } { 1 } \__regex_escape_use:nnnn }
+ \use_none:nn
+ }
+ { }
\cs_new_protected:Npn \__regex_escape_use:nnnn #1#2#3#4
{
\__tl_build:Nw \l__regex_internal_a_tl
@@ -18536,6 +18585,12 @@
\__regex_compile:n {#1}
\__regex_build:N \l__regex_internal_regex
}
+\__debug_patch:nnNNpn
+ { \__debug_trace_push:nnN { regex } { 1 } \__regex_build:N }
+ {
+ \__regex_trace_states:n { 2 }
+ \__debug_trace_pop:nnN { regex } { 1 } \__regex_build:N
+ }
\cs_new_protected:Npn \__regex_build:N #1
{
\__regex_standard_escapechar:
@@ -18549,6 +18604,12 @@
\__regex_toks_put_right:Nn \l__regex_right_state_int
{ \__regex_action_success: }
}
+\__debug_patch:nnNNpn
+ { \__debug_trace_push:nnN { regex } { 1 } \__regex_build_for_cs:n }
+ {
+ \__regex_trace_states:n { 2 }
+ \__debug_trace_pop:nnN { regex } { 1 } \__regex_build_for_cs:n
+ }
\cs_new_protected:Npn \__regex_build_for_cs:n #1
{
\int_set_eq:NN \l__regex_max_state_int \l__regex_min_state_int
@@ -18582,6 +18643,18 @@
{ \__regex_toks_put_left:Nx #2 { #1 { \int_eval:n { #3 - #2 } } } }
\cs_new_protected:Npn \__regex_build_transition_right:nNn #1#2#3
{ \__regex_toks_put_right:Nx #2 { #1 { \int_eval:n { #3 - #2 } } } }
+\__debug_patch:nnNNpn
+ {
+ \__debug_trace:nnx { regex } { 2 }
+ {
+ regex~new~state~
+ L=\int_use:N \l__regex_left_state_int ~ -> ~
+ R=\int_use:N \l__regex_right_state_int ~ -> ~
+ M=\int_use:N \l__regex_max_state_int ~ -> ~
+ \int_eval:n { \l__regex_max_state_int + 1 }
+ }
+ }
+ { }
\cs_new_protected:Npn \__regex_build_new_state:
{
\__regex_toks_clear:N \l__regex_max_state_int
@@ -18654,6 +18727,9 @@
\__regex_tests_action_cost:n \l__regex_right_state_int
}
}
+\__debug_patch:nnNNpn
+ { \__debug_trace_push:nnN { regex } { 1 } \__regex_group_aux:nnnnN }
+ { \__debug_trace_pop:nnN { regex } { 1 } \__regex_group_aux:nnnnN }
\cs_new_protected:Npn \__regex_group_aux:nnnnN #1#2#3#4#5
{
\if_int_compare:w #3 = 0 \exp_stop_f:
@@ -18703,6 +18779,9 @@
{ \int_max:nn {#1} { \l__regex_capturing_group_int } }
{#2}
}
+\__debug_patch:nnNNpn
+ { \__debug_trace_push:nnN { regex } { 1 } \__regex_branch:n }
+ { \__debug_trace_pop:nnN { regex } { 1 } \__regex_branch:n }
\cs_new_protected:Npn \__regex_branch:n #1
{
\__regex_build_new_state:
@@ -18889,6 +18968,12 @@
\bool_new:N \g__regex_success_bool
\bool_new:N \l__regex_saved_success_bool
\bool_new:N \l__regex_match_success_bool
+\__debug_patch:nnNNpn
+ {
+ \__debug_trace_push:nnN { regex } { 1 } \__regex_match:n
+ \__debug_trace:nnx { regex } { 1 } { analyzing~query~token~list }
+ }
+ { \__debug_trace_pop:nnN { regex } { 1 } \__regex_match:n }
\cs_new_protected:Npn \__regex_match:n #1
{
\int_zero:N \l__regex_balance_int
@@ -18899,6 +18984,14 @@
{ \__regex_query_set:nnn {##1} {"##2} {##3} }
\int_set_eq:NN \l__regex_max_pos_int \l__regex_curr_pos_int
\__regex_query_set:nnn { } { -1 } { -2 }
+ \__regex_match_init:
+ \__regex_match_once:
+ }
+\__debug_patch:nnNNpn
+ { \__debug_trace:nnx { regex } { 1 } { initializing } }
+ { }
+\cs_new_protected:Npn \__regex_match_init:
+ {
\bool_gset_false:N \g__regex_success_bool
\int_step_inline:nnnn
\l__regex_min_state_int { 1 } { \l__regex_max_state_int - 1 }
@@ -18910,7 +19003,6 @@
{ 2 * \l__regex_max_state_int }
\int_set_eq:NN \l__regex_submatch_int \l__regex_min_submatch_int
\bool_set_false:N \l__regex_empty_success_bool
- \__regex_match_once:
}
\cs_new_protected:Npn \__regex_match_once:
{
@@ -19001,6 +19093,9 @@
= \__intarray_item_fast:Nn \g__regex_catcode_intarray
{ \l__regex_curr_pos_int } \scan_stop:
}
+\__debug_patch:nnNNpn
+ { \__debug_trace:nnx { regex } { 2 } { state~\int_use:N \l__regex_curr_state_int } }
+ { }
\cs_new_protected:Npn \__regex_use_state:
{
\__intarray_gset_fast:Nnn \g__regex_state_active_intarray
@@ -19148,6 +19243,9 @@
}
\__int_eval_end:
}
+\__debug_patch:nnNNpn
+ { \__debug_trace_push:nnN { regex } { 1 } \__regex_replacement:n }
+ { \__debug_trace_pop:nnN { regex } { 1 } \__regex_replacement:n }
\cs_new_protected:Npn \__regex_replacement:n #1
{
\__tl_build:Nw \l__regex_internal_a_tl
@@ -19996,6 +20094,36 @@
}
}
}
+\__debug:TF
+ {
+ \cs_new_protected:Npn \__debug_trace_push:nnN #1#2#3
+ { \__debug_trace:nnx {#1} {#2} { entering~ \token_to_str:N #3 } }
+ \cs_new_protected:Npn \__debug_trace_pop:nnN #1#2#3
+ { \__debug_trace:nnx {#1} {#2} { leaving~ \token_to_str:N #3 } }
+ \cs_new_protected:Npn \__debug_trace:nnx #1#2#3
+ {
+ \int_compare:nNnF
+ { \int_use:c { g__debug_trace_#1_int } } < {#2}
+ { \iow_term:x { Trace:~#3 } }
+ }
+ }
+ { }
+\int_new:N \g__debug_trace_regex_int
+\__debug:TF
+ {
+ \cs_new_protected:Npn \__regex_trace_states:n #1
+ {
+ \int_step_inline:nnnn
+ \l__regex_min_state_int
+ { 1 }
+ { \l__regex_max_state_int - 1 }
+ {
+ \__debug_trace:nnx { regex } {#1}
+ { \iow_char:N \\toks ##1 = { \__regex_toks_use:w ##1 } }
+ }
+ }
+ }
+ { }
%% File: l3box.dtx Copyright (C) 2005-2017 The LaTeX3 Project
\cs_new_protected:Npn \box_new:N #1
{
@@ -20037,10 +20165,13 @@
\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) } }
\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) } }
\cs_new_protected:Npn \box_set_wd:Nn #1#2
{ \box_wd:N #1 \__dim_eval:w #2 \__dim_eval_end: }
\cs_generate_variant:Nn \box_set_ht:Nn { c }
@@ -20050,12 +20181,16 @@
\cs_new_eq:NN \box_use:N \tex_copy:D
\cs_generate_variant:Nn \box_use_clear: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} }
\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} }
\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} }
\cs_new_protected:Npn \box_move_down:nn #1#2
{ \tex_lower:D \__dim_eval:w #1 \__dim_eval_end: #2 }
\cs_new_eq:NN \if_hbox:N \tex_ifhbox:D
@@ -20133,6 +20268,7 @@
\cs_new_protected:Npn \hbox_gset:Nn { \tex_global:D \hbox_set:Nn }
\cs_generate_variant:Nn \hbox_set:Nn { c }
\cs_generate_variant:Nn \hbox_gset:Nn { c }
+\__debug_patch_args:nNNpn { {#1} { (#2) } {#3} }
\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:
@@ -20158,6 +20294,7 @@
\c_group_end_token
}
\cs_new_eq:NN \hbox_gset_end: \hbox_set_end:
+\__debug_patch_args:nNNpn { {#1} { (#2) } }
\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:
@@ -20168,6 +20305,7 @@
{ \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:
@@ -20187,6 +20325,7 @@
{ \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:
@@ -20214,6 +20353,7 @@
{ \tex_global:D \vbox_set_top:Nn }
\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} }
\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:
@@ -20240,6 +20380,7 @@
\c_group_end_token
}
\cs_new_eq:NN \vbox_gset_end: \vbox_set_end:
+\__debug_patch_args:nNNpn { {#1} { (#2) } }
\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:
@@ -20254,6 +20395,7 @@
\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) } }
\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: }
\fp_new:N \l__box_angle_fp
@@ -20555,8 +20697,14 @@
}
}
}
-\cs_new_eq:NN \box_resize:Nnn \box_resize_to_wd_and_ht_plus_dp:Nnn
-\cs_new_eq:NN \box_resize:cnn \box_resize_to_wd_and_ht_plus_dp:cnn
+\__debug_deprecation:nnNNpn
+ { 2018-12-31 } { \box_resize_to_wd_and_ht_plus_dp:Nnn }
+\cs_new_protected:Npn \box_resize:Nnn
+ { \box_resize_to_wd_and_ht_plus_dp:Nnn }
+\__debug_deprecation:nnNNpn
+ { 2018-12-31 } { \box_resize_to_wd_and_ht_plus_dp:cnn }
+\cs_new_protected:Npn \box_resize:cnn
+ { \box_resize_to_wd_and_ht_plus_dp:cnn }
%% File: l3coffins.dtx Copyright(C) 2010-2017 The LaTeX3 Project
\box_new:N \l__coffin_internal_box
\dim_new:N \l__coffin_internal_dim
@@ -20621,17 +20769,32 @@
}
}
\cs_generate_variant:Nn \coffin_clear:N { c }
-\cs_new_protected:Npn \coffin_new:N #1
+\__debug:TF
{
- \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
+ {
+ \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
+ {
+ \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
+ }
}
\cs_generate_variant:Nn \coffin_new:N { c }
\cs_new_protected:Npn \hcoffin_set:Nn #1#2
@@ -21498,30 +21661,6 @@
\__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 }
-\cs_new_protected:Npn \deprecation_error:
- {
- \__deprecation_error:Nnn \tl_to_lowercase:n { } { 2017-12-31 }
- \__deprecation_error:Nnn \tl_to_uppercase:n { } { 2017-12-31 }
- \__deprecation_error:Nnn \ior_get_str:NN { \ior_str_get:NN } { 2017-12-31 }
- \__deprecation_error:Nnn \box_resize:Nnn { \box_resize_to_wd_and_ht_plus_dp:Nnn } { 2018-12-31 }
- \__deprecation_error:Nnn \box_resize:cnn { \box_resize_to_wd_and_ht_plus_dp:cnn } { 2018-12-31 }
- \__deprecation_error:Nnn \c_minus_one { - 1 } { 2018-12-31 }
- \__deprecation_error:Nnn \sort_ordered: { \sort_return_same: } { 2018-12-31 }
- \__deprecation_error:Nnn \sort_reversed: { \sort_return_swapped: } { 2018-12-31 }
- \__deprecation_error:Nnn \g_file_current_name_tl { \g_file_curr_name_str } { 2018-12-31 }
- \__deprecation_error:Nnn \file_add_path:nN { \file_get_full_name:nN } { 2018-12-31 }
- \__deprecation_error:Nnn \file_path_include:n
- { \seq_put_right:Nn \l_file_search_path_seq } { 2018-12-31 }
- \__deprecation_error:Nnn \file_path_remove:n
- { \seq_remove_all:Nn \l_file_search_path_seq } { 2018-12-31 }
- \__deprecation_error:Nnn \file_list: { \file_log_list: } { 2018-12-31 }
- \__deprecation_error:Nnn \ior_list_streams: { \ior_show_list: } { 2018-12-31 }
- \__deprecation_error:Nnn \ior_log_streams: { \ior_log_list: } { 2018-12-31 }
- \__deprecation_error:Nnn \iow_list_streams: { \iow_show_list: } { 2018-12-31 }
- \__deprecation_error:Nnn \iow_log_streams: { \iow_log_list: } { 2018-12-31 }
- \cs_set_eq:NN \__fp_parse_round:Nw \__fp_parse_round_deprecation_error:Nw
- \cs_set_eq:NN \deprecation_error: \scan_stop:
- }
%% File: l3candidates.dtx Copyright (C) 2012-2017 The LaTeX3 Project
\cs_new_protected:Npx \mode_leave_vertical:
{
@@ -21539,6 +21678,7 @@
\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
@@ -21559,7 +21699,7 @@
{
\hbox_set:Nn \l__box_internal_box
{
- \box_move_down:nn { #3 - \box_dp:N #1 }
+ \box_move_down:nn { (#3) - \box_dp:N #1 }
{ \box_use:N \l__box_internal_box }
}
\box_set_dp:Nn \l__box_internal_box \c_zero_dim
@@ -21577,7 +21717,7 @@
{
\hbox_set:Nn \l__box_internal_box
{
- \box_move_up:nn { #5 - \box_ht:N \l__box_internal_box }
+ \box_move_up:nn { (#5) - \box_ht:N \l__box_internal_box }
{ \box_use:N \l__box_internal_box }
}
\box_set_ht:Nn \l__box_internal_box \c_zero_dim
@@ -21585,6 +21725,7 @@
\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
@@ -21616,7 +21757,7 @@
}
\box_set_ht:Nn \l__box_internal_box
{
- #5
+ (#5)
\dim_compare:nNnT {#3} > \c_zero_dim
{ - (#3) }
}
@@ -21870,7 +22011,7 @@
{
\prop_put:cnx { l__coffin_poles_ \__int_value:w #1 _prop } {#2}
{
- { \dim_eval:n #3 + \box_wd:N #1 } {#4}
+ { \dim_eval:n { #3 + \box_wd:N #1 } } {#4}
{#5} {#6}
}
}
@@ -21937,15 +22078,6 @@
\str_if_empty:NF \l__file_full_name_str
{ \__file_input:V \l__file_full_name_str }
}
-\cs_new_protected:Npn \file_if_exist_input:nT #1#2
- {
- \file_get_full_name:nN {#1} \l__file_full_name_str
- \str_if_empty:NF \l__file_full_name_str
- {
- #2
- \__file_input:V \l__file_full_name_str
- }
- }
\cs_new_protected:Npn \file_if_exist_input:nF #1#2
{
\file_get_full_name:nN {#1} \l__file_full_name_str
@@ -21953,19 +22085,26 @@
{#2}
{ \__file_input:V \l__file_full_name_str }
}
+\__debug_deprecation:nnNNpn { 2017-12-31 }
+ { \file_if_exist:nTF and~ \file_input:n }
\cs_new_protected:Npn \file_if_exist_input:nTF #1#2#3
{
\file_get_full_name:nN {#1} \l__file_full_name_str
\str_if_empty:NTF \l__file_full_name_str
- {#3}
- {
- #2
- \__file_input:V \l__file_full_name_str
- }
+ {#3} { #2 \__file_input:V \l__file_full_name_str }
+ }
+\__debug_deprecation:nnNNpn { 2017-12-31 }
+ { \file_if_exist:nT and~ \file_input:n }
+\cs_new_protected:Npn \file_if_exist_input:nT #1#2
+ {
+ \file_get_full_name:nN {#1} \l__file_full_name_str
+ \str_if_empty:NF \l__file_full_name_str
+ { #2 \__file_input:V \l__file_full_name_str }
}
\cs_new_protected:Npn \file_input_stop: { \tex_endinput:D }
\cs_if_exist:NTF \pdftex_uniformdeviate:D
{
+ \__debug_patch_args:nNNpn { { (#1) } { (#2) } }
\cs_new:Npn \int_rand:nn #1#2
{
\exp_after:wN \__int_rand:ww
@@ -22163,6 +22302,7 @@
{ \prg_return_false: }
}
\cs_new:Npn \sys_rand_seed: { \tex_the:D \pdftex_randomseed:D }
+\__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: }
\int_const:Nn \c_sys_shell_escape_int
@@ -23285,17 +23425,24 @@
\cs_generate_variant:Nn \tl_rand_item:N { c }
\cs_new:Npn \tl_range:Nnn { \exp_args:No \tl_range:nnn }
\cs_generate_variant:Nn \tl_range:Nnn { c }
-\cs_new:Npn \tl_range:nnn #1#2#3
+\cs_new:Npn \tl_range:nnn { \__tl_range:Nnnn \__tl_range:w }
+\cs_new:Npn \tl_range_braced:Nnn { \exp_args:No \tl_range_braced:nnn }
+\cs_generate_variant:Nn \tl_range_braced:Nnn { c }
+\cs_new:Npn \tl_range_braced:nnn { \__tl_range:Nnnn \__tl_range_braced:w }
+\cs_new:Npn \tl_range_unbraced:Nnn { \exp_args:No \tl_range_unbraced:nnn }
+\cs_generate_variant:Nn \tl_range_unbraced:Nnn { c }
+\cs_new:Npn \tl_range_unbraced:nnn { \__tl_range:Nnnn \__tl_range_unbraced:w }
+\cs_new:Npn \__tl_range:Nnnn #1#2#3#4
{
\tl_head:f
{
- \exp_args:Nf \__tl_range:nnnw { \tl_count:n {#1} } {#2} {#3}
- #1
+ \exp_args:Nf \__tl_range:nnnNn
+ { \tl_count:n {#2} } {#3} {#4} #1 {#2}
}
}
-\cs_new:Npn \__tl_range:nnnw #1#2#3
+\cs_new:Npn \__tl_range:nnnNn #1#2#3
{
- \exp_args:Nff \__tl_range:nnw
+ \exp_args:Nff \__tl_range:nnNn
{
\exp_args:Nf \__tl_range_normalize:nn
{ \int_eval:n { #2 - 1 } } {#1}
@@ -23305,15 +23452,14 @@
{ \int_eval:n {#3} } {#1}
}
}
-\cs_new:Npn \__tl_range:nnw #1#2
+\cs_new:Npn \__tl_range:nnNn #1#2#3#4
{
\if_int_compare:w #2 > #1 \exp_stop_f: \else:
\exp_after:wN { \exp_after:wN }
\fi:
- \exp_after:wN \__tl_range_collect:w
+ \exp_after:wN #3
\__int_value:w \__int_eval:w #2 - #1 \exp_after:wN ;
- \exp_after:wN { \exp_after:wN }
- \exp:w \__tl_range_skip:w #1 ; { }
+ \exp_after:wN { \exp:w \__tl_range_skip:w #1 ; { } #4 }
}
\cs_new:Npn \__tl_range_skip:w #1 ; #2
{
@@ -23324,14 +23470,64 @@
\exp_after:wN \exp_end:
\fi:
}
-\cs_new:Npn \__tl_range_collect:w #1 ; #2#3
+\cs_new:Npn \__tl_range_braced:w #1 ; #2
+ { \__tl_range_collect_braced:w #1 ; { } #2 }
+\cs_new:Npn \__tl_range_unbraced:w #1 ; #2
+ { \__tl_range_collect_unbraced:w #1 ; { } #2 }
+\cs_new:Npn \__tl_range_collect_braced:w #1 ; #2#3
{
\if_int_compare:w #1 > 1 \exp_stop_f:
- \exp_after:wN \__tl_range_collect:w
+ \exp_after:wN \__tl_range_collect_braced:w
\__int_value:w \__int_eval:w #1 - 1 \exp_after:wN ;
\fi:
{ #2 {#3} }
}
+\cs_new:Npn \__tl_range_collect_unbraced:w #1 ; #2#3
+ {
+ \if_int_compare:w #1 > 1 \exp_stop_f:
+ \exp_after:wN \__tl_range_collect_unbraced:w
+ \__int_value:w \__int_eval:w #1 - 1 \exp_after:wN ;
+ \fi:
+ { #2 #3 }
+ }
+\cs_new:Npn \__tl_range:w #1 ; #2
+ {
+ \exp_args:Nf \__tl_range_collect:nn
+ { \__tl_range_skip_spaces:n {#2} } {#1}
+ }
+\cs_new:Npn \__tl_range_skip_spaces:n #1
+ {
+ \tl_if_head_is_space:nTF {#1}
+ { \exp_args:Nf \__tl_range_skip_spaces:n {#1} }
+ { { } #1 }
+ }
+\cs_new:Npn \__tl_range_collect:nn #1#2
+ {
+ \int_compare:nNnTF {#2} = 0
+ {#1}
+ {
+ \exp_args:No \tl_if_head_is_space:nTF { \use_none:n #1 }
+ {
+ \exp_args:Nf \__tl_range_collect:nn
+ { \__tl_range_collect_space:nw #1 }
+ {#2}
+ }
+ {
+ \__tl_range_collect:ff
+ {
+ \exp_args:No \tl_if_head_is_N_type:nTF { \use_none:n #1 }
+ { \__tl_range_collect_N:nN }
+ { \__tl_range_collect_group:nn }
+ #1
+ }
+ { \int_eval:n { #2 - 1 } }
+ }
+ }
+ }
+\cs_new:Npn \__tl_range_collect_space:nw #1 ~ { { #1 ~ } }
+\cs_new:Npn \__tl_range_collect_N:nN #1#2 { { #1 #2 } }
+\cs_new:Npn \__tl_range_collect_group:nn #1#2 { { #1 {#2} } }
+\cs_generate_variant:Nn \__tl_range_collect:nn { ff }
\cs_new:Npn \__tl_range_normalize:nn #1#2
{
\int_eval:n