diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex | 250 |
1 files changed, 194 insertions, 56 deletions
diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex b/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex index 55ca81971be..4e9108fafe9 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/19}% +\def\ExplFileDate{2017/09/18}% \begingroup \def\next{\endgroup}% \expandafter\ifx\csname PackageError\endcsname\relax @@ -1552,6 +1552,36 @@ { } \__debug:TF { + \exp_args:Nc \cs_set_protected:Npn { __debug_check-expressions_on: } + { + \cs_set:Npn \__debug_chk_expr:nNnN ##1##2 + { + \exp_after:wN \__debug_chk_expr_aux:nNnN + \exp_after:wN { \tex_the:D ##2 ##1 \tex_relax:D } + ##2 + } + } + \exp_args:Nc \cs_set_protected:Npn { __debug_check-expressions_off: } + { \cs_set:Npn \__debug_chk_expr:nNnN ##1##2##3##4 {##1} } + \use:c { __debug_check-expressions_off: } + \cs_set:Npn \__debug_chk_expr_aux:nNnN #1#2#3#4 + { + \tl_if_empty:oF + { + \tex_romannumeral:D - 0 + \exp_after:wN \use_none:n + \__int_value:w #3 #2 #1 \tex_relax:D + } + { + \__msg_kernel_expandable_error:nnnn + { kernel } { expr } {#4} {#1} + } + #1 + } + } + { } +\__debug:TF + { \exp_args:Nc \cs_set_protected:Npn { __debug_log-functions_on: } { \cs_set_protected:Npn \__debug_log:x { \iow_log:x } @@ -4763,10 +4793,12 @@ \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) } } +\__debug_patch_args:nNNpn + { { \__debug_chk_expr:nNnN {#1} \__int_eval:w { } \int_eval:n } } \cs_new:Npn \int_eval:n #1 { \__int_value:w \__int_eval:w #1 \__int_eval_end: } -\__debug_patch_args:nNNpn { { (#1) } } +\__debug_patch_args:nNNpn + { { \__debug_chk_expr:nNnN {#1} \__int_eval:w { } \int_abs:n } } \cs_new:Npn \int_abs:n #1 { \__int_value:w \exp_after:wN \__int_abs:N @@ -4775,7 +4807,11 @@ } \cs_new:Npn \__int_abs:N #1 { \if_meaning:w - #1 \else: \exp_after:wN #1 \fi: } -\__debug_patch_args:nNNpn { { (#1) } { (#2) } } +\__debug_patch_args:nNNpn + { + { \__debug_chk_expr:nNnN {#1} \__int_eval:w { } \int_max:nn } + { \__debug_chk_expr:nNnN {#2} \__int_eval:w { } \int_max:nn } + } \cs_set:Npn \int_max:nn #1#2 { \__int_value:w \exp_after:wN \__int_maxmin:wwN @@ -4784,7 +4820,11 @@ > \exp_stop_f: } -\__debug_patch_args:nNNpn { { (#1) } { (#2) } } +\__debug_patch_args:nNNpn + { + { \__debug_chk_expr:nNnN {#1} \__int_eval:w { } \int_min:nn } + { \__debug_chk_expr:nNnN {#2} \__int_eval:w { } \int_min:nn } + } \cs_set:Npn \int_min:nn #1#2 { \__int_value:w \exp_after:wN \__int_maxmin:wwN @@ -4801,7 +4841,11 @@ #2 \fi: } -\__debug_patch_args:nNNpn { { (#1) } { (#2) } } +\__debug_patch_args:nNNpn + { + { \__debug_chk_expr:nNnN {#1} \__int_eval:w { } \int_div_truncate:nn } + { \__debug_chk_expr:nNnN {#2} \__int_eval:w { } \int_div_truncate:nn } + } \cs_new:Npn \int_div_truncate:nn #1#2 { \__int_value:w \__int_eval:w @@ -4825,7 +4869,11 @@ } \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) } } +\__debug_patch_args:nNNpn + { + { \__debug_chk_expr:nNnN {#1} \__int_eval:w { } \int_mod:nn } + { \__debug_chk_expr:nNnN {#2} \__int_eval:w { } \int_mod:nn } + } \cs_new:Npn \int_mod:nn #1#2 { \__int_value:w \__int_eval:w \exp_after:wN \__int_mod:ww @@ -4841,6 +4889,8 @@ \cs:w newcount \cs_end: #1 } \cs_generate_variant:Nn \int_new:N { c } +\__debug_patch_args:nNNpn + { {#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 @@ -4857,7 +4907,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: } } } @@ -4895,10 +4945,12 @@ { 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) } } +\__debug_patch_args:nNNpn + { {#1} { \__debug_chk_expr:nNnN {#2} \__int_eval:w { } \int_add:Nn } } \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) } } +\__debug_patch_args:nNNpn + { {#1} { \__debug_chk_expr:nNnN {#2} \__int_eval:w { } \int_sub:Nn } } \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 @@ -4921,7 +4973,8 @@ \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) } } +\__debug_patch_args:nNNpn + { {#1} { \__debug_chk_expr:nNnN {#2} \__int_eval:w { } \int_set:Nn } } \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 } @@ -4997,7 +5050,12 @@ { \__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) } } +\__debug_patch_conditional_args:nNNpnn + { + { \__debug_chk_expr:nNnN {#1} \__int_eval:w { } \int_compare:nNn } + { \__int_eval_end: #2 } + { \__debug_chk_expr:nNnN {#3} \__int_eval:w { } \int_compare:nNn } + } \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: @@ -5035,7 +5093,8 @@ { \__int_case:nw {#1} } } \cs_new_eq:NN \__int_case_end:nw \__prg_case_end:nw -\__debug_patch_conditional_args:nNNpnn { { (#1) } } +\__debug_patch_conditional_args:nNNpnn + { { \__debug_chk_expr:nNnN {#1} \__int_eval:w { } \int_if_odd:n } } \prg_new_conditional:Npnn \int_if_odd:n #1 { p , T , F , TF} { \if_int_odd:w \__int_eval:w #1 \__int_eval_end: @@ -5044,7 +5103,8 @@ \prg_return_false: \fi: } -\__debug_patch_conditional_args:nNNpnn { { (#1) } } +\__debug_patch_conditional_args:nNNpnn + { { \__debug_chk_expr:nNnN {#1} \__int_eval:w { } \int_if_even:n } } \prg_new_conditional:Npnn \int_if_even:n #1 { p , T , F , TF} { \if_int_odd:w \__int_eval:w #1 \__int_eval_end: @@ -5109,7 +5169,12 @@ \int_compare:nNnF {#1} #2 {#3} { \int_do_until:nNnn {#1} #2 {#3} {#4} } } -\__debug_patch_args:nNNpn { { (#1) } { (#2) } { (#3) } } +\__debug_patch_args:nNNpn + { + { \__debug_chk_expr:nNnN {#1} \__int_eval:w { } \int_step_function:nnnN } + { \__debug_chk_expr:nNnN {#2} \__int_eval:w { } \int_step_function:nnnN } + { \__debug_chk_expr:nNnN {#3} \__int_eval:w { } \int_step_function:nnnN } + } \cs_new:Npn \int_step_function:nnnN #1#2#3 { \exp_after:wN \__int_step:wwwN @@ -6893,6 +6958,7 @@ } \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 @@ -8272,6 +8338,7 @@ '\iow_char:N\\debug_off:n'~only~accept~the~arguments~ 'check-declarations',~'deprecation',~'log-functions',~not~'#1'. } + \__msg_kernel_new:nnn { kernel } { expr } { '#2'~in~#1 } \__msg_kernel_new:nnnn { kernel } { non-declared-variable } { The~variable~#1~has~not~been~declared~\msg_line_context:. } { @@ -8929,7 +8996,6 @@ \cs_new_protected:Npn \iow_term:n { \iow_now:Nn \c_term_iow } \cs_new:Npn \iow_newline: { ^^J } \cs_new_eq:NN \iow_char:N \cs_to_str:N -\tl_const:Nx \c_catcode_other_space_tl { \char_generate:nn { `\ } { 12 } } \int_new:N \l_iow_line_count_int \int_set:Nn \l_iow_line_count_int { 78 } \tl_new:N \l__iow_newline_tl @@ -9317,7 +9383,8 @@ { 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) } } +\__debug_patch_args:nNNpn + { {#1} { \__debug_chk_expr:nNnN {#2} \__dim_eval:w { } \dim_set:Nn } } \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 } @@ -9329,19 +9396,22 @@ \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) } } +\__debug_patch_args:nNNpn + { {#1} { \__debug_chk_expr:nNnN {#2} \__dim_eval:w { } \dim_add:Nn } } \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) } } +\__debug_patch_args:nNNpn + { {#1} { \__debug_chk_expr:nNnN {#2} \__dim_eval:w { } \dim_sub:Nn } } \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) } } +\__debug_patch_args:nNNpn + { { \__debug_chk_expr:nNnN {#1} \__dim_eval:w { } \dim_abs:n } } \cs_new:Npn \dim_abs:n #1 { \exp_after:wN \__dim_abs:N @@ -9349,7 +9419,11 @@ } \cs_new:Npn \__dim_abs:N #1 { \if_meaning:w - #1 \else: \exp_after:wN #1 \fi: } -\__debug_patch_args:nNNpn { { (#1) } { (#2) } } +\__debug_patch_args:nNNpn + { + { \__debug_chk_expr:nNnN {#1} \__dim_eval:w { } \dim_max:nn } + { \__debug_chk_expr:nNnN {#2} \__dim_eval:w { } \dim_max:nn } + } \cs_new:Npn \dim_max:nn #1#2 { \dim_use:N \__dim_eval:w \exp_after:wN \__dim_maxmin:wwN @@ -9358,7 +9432,11 @@ > \__dim_eval_end: } -\__debug_patch_args:nNNpn { { (#1) } { (#2) } } +\__debug_patch_args:nNNpn + { + { \__debug_chk_expr:nNnN {#1} \__dim_eval:w { } \dim_min:nn } + { \__debug_chk_expr:nNnN {#2} \__dim_eval:w { } \dim_min:nn } + } \cs_new:Npn \dim_min:nn #1#2 { \dim_use:N \__dim_eval:w \exp_after:wN \__dim_maxmin:wwN @@ -9379,7 +9457,12 @@ { \__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) } } +\__debug_patch_conditional_args:nNNpnn + { + { \__debug_chk_expr:nNnN {#1} \__dim_eval:w { } \dim_compare:nNn } + { \__dim_eval_end: #2 } + { \__debug_chk_expr:nNnN {#3} \__dim_eval:w { } \dim_compare:nNn } + } \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: @@ -9506,12 +9589,14 @@ \dim_compare:nNnF {#1} #2 {#3} { \dim_do_until:nNnn {#1} #2 {#3} {#4} } } -\__debug_patch_args:nNNpn { { (#1) } } +\__debug_patch_args:nNNpn + { { \__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: } \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) } } +\__debug_patch_args:nNNpn + { { \__debug_chk_expr:nNnN {#1} \__dim_eval:w { } \dim_to_decimal:n } } \cs_new:Npn \dim_to_decimal:n #1 { \exp_after:wN @@ -9529,7 +9614,8 @@ } \cs_new:Npn \dim_to_decimal_in_bp:n #1 { \dim_to_decimal:n { ( #1 ) * 800 / 803 } } -\__debug_patch_args:nNNpn { { (#1) } } +\__debug_patch_args:nNNpn + { { \__debug_chk_expr:nNnN {#1} \__dim_eval:w { } \dim_to_decimal_in_sp:n } } \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 @@ -9580,7 +9666,8 @@ { 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) } } +\__debug_patch_args:nNNpn + { {#1} { \__debug_chk_expr:nNnN {#2} \etex_glueexpr:D { } \skip_set:Nn } } \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 } @@ -9592,13 +9679,15 @@ \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) } } +\__debug_patch_args:nNNpn + { {#1} { \__debug_chk_expr:nNnN {#2} \etex_glueexpr:D { } \skip_add:Nn } } \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) } } +\__debug_patch_args:nNNpn + { {#1} { \__debug_chk_expr:nNnN {#2} \etex_glueexpr:D { } \skip_sub:Nn } } \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 } @@ -9616,7 +9705,13 @@ } \cs_set_protected:Npn \__cs_tmp:w #1 { - \__debug_patch_conditional_args:nNNpnn { { (##1) } } + \__debug_patch_conditional_args:nNNpnn + { + { + \__debug_chk_expr:nNnN + {##1} \etex_glueexpr:D { } \skip_if_finite:n + } + } \prg_new_conditional:Npnn \skip_if_finite:n ##1 { p , T , F , TF } { \exp_after:wN \__skip_if_finite:wwNw @@ -9626,17 +9721,20 @@ \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) } } +\__debug_patch_args:nNNpn + { { \__debug_chk_expr:nNnN {#1} \etex_glueexpr:D { } \skip_eval:n } } \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) } } +\__debug_patch_args:nNNpn + { { \__debug_chk_expr:nNnN {#1} \etex_glueexpr:D { } \skip_horizontal:n } } \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) } } +\__debug_patch_args:nNNpn + { { \__debug_chk_expr:nNnN {#1} \etex_glueexpr:D { } \skip_vertical:n } } \cs_new:Npn \skip_vertical:n #1 { \skip_vertical:N \etex_glueexpr:D #1 \scan_stop: } \cs_generate_variant:Nn \skip_horizontal:N { c } @@ -9682,7 +9780,14 @@ { 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) } } +\__debug_patch_args:nNNpn + { + {#1} + { + \__debug_chk_expr:nNnN {#2} \etex_muexpr:D + { \etex_mutoglue:D } \muskip_set:Nn + } + } \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 } @@ -9694,19 +9799,39 @@ \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) } } +\__debug_patch_args:nNNpn + { + {#1} + { + \__debug_chk_expr:nNnN {#2} \etex_muexpr:D + { \etex_mutoglue:D } \muskip_add:Nn + } + } \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) } } +\__debug_patch_args:nNNpn + { + {#1} + { + \__debug_chk_expr:nNnN {#2} \etex_muexpr:D + { \etex_mutoglue:D } \muskip_sub:Nn + } + } \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) } } +\__debug_patch_args:nNNpn + { + { + \__debug_chk_expr:nNnN {#1} \etex_muexpr:D + { \etex_mutoglue:D } \muskip_eval:n + } + } \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 @@ -14854,25 +14979,25 @@ \exp_stop_f: } \cs_new:Npn \__fp_pow_neg_case_aux:nnnnn #1#2#3#4#5 - { \__fp_pow_neg_case_aux:w #1 ; #2 #3 ; #4 #5 ; } -\cs_new:Npn \__fp_pow_neg_case_aux:w #1 ; #2 ; #3 ; { \if_int_compare:w #1 > \c__fp_prec_int -1 \else: + \__fp_decimate:nNnnnn { \c__fp_prec_int - #1 } + \__fp_pow_neg_case_aux:Nnnw + {#2} {#3} {#4} {#5} + \fi: + } +\cs_new:Npn \__fp_pow_neg_case_aux:Nnnw #1#2#3#4 ; + { + \if_meaning:w 0 #1 \if_int_odd:w #3 \exp_stop_f: - \if_int_compare:w #1 = \c__fp_prec_int - 0 - \else: - 1 - \fi: + 0 \else: - \exp_after:wN \__fp_pow_neg_case_aux:w - \__int_value:w \__int_eval:w #1 + 1 \exp_after:wN ; - \__int_value:w \__int_eval:w (#2 + 1) / 2 - 1 \exp_after:wN ; - \__int_value:w \__int_eval:w - \if_int_odd:w #2 \exp_stop_f: 5000 0000 + \fi: #3 / 2 ; + -1 \fi: + \else: + 1 \fi: } %% File: l3fp-trig.dtx Copyright (C) 2011-2014,2016,2017 The LaTeX3 Project @@ -20177,9 +20302,9 @@ \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 } -\cs_new_eq:NN \box_use_clear:N \tex_box:D +\cs_new_eq:NN \box_use_drop:N \tex_box:D \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_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 @@ -20452,7 +20577,7 @@ \box_set_dp:Nn \l__box_internal_box { -\l__box_bottom_new_dim } \box_set_wd:Nn \l__box_internal_box { \l__box_right_new_dim - \l__box_left_new_dim } - \box_use:N \l__box_internal_box + \box_use_drop:N \l__box_internal_box } \cs_new_protected:Npn \__box_rotate_x:nnN #1#2#3 { @@ -20683,7 +20808,7 @@ \hbox_to_wd:nn { \l__box_right_new_dim } { \tex_kern:D \l__box_right_new_dim - \box_use:N \l__box_internal_box + \box_use_drop:N \l__box_internal_box \tex_hss:D } } @@ -20692,7 +20817,7 @@ \hbox:n { \tex_kern:D \c_zero_dim - \box_use:N \l__box_internal_box + \box_use_drop:N \l__box_internal_box \tex_hss:D } } @@ -20705,6 +20830,12 @@ { 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 } +\__debug_deprecation:nnNNpn + { 2018-12-31 } { \box_use_clear:N } +\cs_new_protected:Npn \box_use_clear:N { \box_use_drop:N } +\__debug_deprecation:nnNNpn + { 2018-12-31 } { \box_use_clear:c } +\cs_new_protected:Npn \box_use_clear:c { \box_use_drop:c } %% File: l3coffins.dtx Copyright(C) 2010-2017 The LaTeX3 Project \box_new:N \l__coffin_internal_box \dim_new:N \l__coffin_internal_dim @@ -21277,7 +21408,7 @@ \mode_leave_vertical: \__coffin_align:NnnNnnnnN \c_empty_coffin { H } { l } #1 {#2} {#3} {#4} {#5} \l__coffin_aligned_coffin - \box_use:N \l__coffin_aligned_coffin + \box_use_drop:N \l__coffin_aligned_coffin } \cs_generate_variant:Nn \coffin_typeset:Nnnnn { c } \coffin_new:N \l__coffin_display_coffin @@ -21394,7 +21525,7 @@ \prop_remove:Nn \l__coffin_display_poles_prop {##1} \__coffin_display_handles_aux:nnnnnn {##1} ##2 {#2} } - \box_use:N \l__coffin_display_coffin + \box_use_drop:N \l__coffin_display_coffin } \cs_new_protected:Npn \__coffin_display_handles_aux:nnnnnn #1#2#3#4#5#6 { @@ -22302,6 +22433,8 @@ { \prg_return_false: } } \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: } @@ -23548,6 +23681,11 @@ } } \group_begin: + \char_set_catcode_active:N * + \char_set_lccode:nn { `* } { `\ } + \tex_lowercase:D { \tl_const:Nn \c_catcode_active_space_tl { * } } +\group_end: +\group_begin: \cs_set_protected:Npn \__peek_tmp:w #1 \q_stop { \cs_new_protected:Npn \__peek_execute_branches_N_type: |