diff options
author | Karl Berry <karl@freefriends.org> | 2022-09-27 21:11:23 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-09-27 21:11:23 +0000 |
commit | 73c6f4e458b99eae1e5ec3281fb1a1f4da9d7d50 (patch) | |
tree | 893ed375eb7d01e64d0baa9b8119e2a8ed4a6e1c /Master/texmf-dist/tex/latex-dev | |
parent | d3aff7aca8ab5bf17a9d63151a907893580f3889 (diff) |
latex-dev (26sep22)
git-svn-id: svn://tug.org/texlive/trunk@64533 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex-dev')
10 files changed, 729 insertions, 165 deletions
diff --git a/Master/texmf-dist/tex/latex-dev/base/atbegshi-ltx.sty b/Master/texmf-dist/tex/latex-dev/base/atbegshi-ltx.sty index 1a3a472062a..e9fee034661 100644 --- a/Master/texmf-dist/tex/latex-dev/base/atbegshi-ltx.sty +++ b/Master/texmf-dist/tex/latex-dev/base/atbegshi-ltx.sty @@ -47,8 +47,7 @@ %% %%% From File: ltshipout.dtx \providecommand\ltshipoutversion{v1.0m} -\providecommand\ltshipoutdate{2022/05/08} - % \cs{AtBeginDvi} is the existing \LaTeXe{} interface to fill the +\providecommand\ltshipoutdate{2022/08/26} \ProvidesPackage{atbegshi-ltx} [2021/01/10 v1.0c Emulation of the original atbegshi^^Jpackage with kernel methods] diff --git a/Master/texmf-dist/tex/latex-dev/base/atveryend-ltx.sty b/Master/texmf-dist/tex/latex-dev/base/atveryend-ltx.sty index f541bfe9527..2a6db6d67d4 100644 --- a/Master/texmf-dist/tex/latex-dev/base/atveryend-ltx.sty +++ b/Master/texmf-dist/tex/latex-dev/base/atveryend-ltx.sty @@ -42,8 +42,8 @@ %% and covered by LPPL is defined by the unpacking scripts (with %% extension .ins) which are part of the distribution. %%% From File: ltfilehook.dtx -\providecommand\ltfilehookversion{v1.0m} -\providecommand\ltfilehookdate{2022/04/01} +\providecommand\ltfilehookversion{v1.0n} +\providecommand\ltfilehookdate{2022/08/18} \ProvidesPackage{atveryend-ltx} [2020/08/19 v1.0a Emulation of the original atveryend package^^Jwith kernel methods] diff --git a/Master/texmf-dist/tex/latex-dev/base/docstrip.tex b/Master/texmf-dist/tex/latex-dev/base/docstrip.tex index 71df73c3508..a04954ae4a8 100644 --- a/Master/texmf-dist/tex/latex-dev/base/docstrip.tex +++ b/Master/texmf-dist/tex/latex-dev/base/docstrip.tex @@ -44,9 +44,9 @@ \catcode`\{=1 \catcode`\}=2 \def\filename{docstrip.dtx} -\def\fileversion{v2.6a} -\def\filedate{2020-11-23} -\def\docdate {2020-11-23} +\def\fileversion{v2.6b} +\def\filedate{2022-09-03} +\def\docdate {2022-09-03} %% %% The docstrip program for use with TeX. %% Copyright (C) 1989-1991 Frank Mittelbach @@ -54,7 +54,7 @@ %% Frank Mittelbach %% Copyright (C) 1995 Marcin Woli\'nski %% Copyright (C) 1996-1997 Mark Wooding, Marcin Woli\'nski -%% Copyright (C) 1998-2021 LaTeX Project and the above authors. +%% Copyright (C) 1998-2022 LaTeX Project and the above authors. %% All rights are reserved. %% \catcode`\Z=\catcode`\% @@ -422,7 +422,9 @@ Z \maybeMsg{<+#1 . >}% \Evaluate{#1}% \def\do##1##2##3{% - \if1\Expr{##2}\StreamPut##1{#2}\fi + \if1\Expr{##2}% + \def\inLine{#2}\replaceModuleInLine + \StreamPut##1{\inLine}\fi }% \activefiles } @@ -430,7 +432,9 @@ Z \maybeMsg{<-#1 . >}% \Evaluate{#1}% \def\do##1##2##3{% - \if1\Expr{##2}\else \StreamPut##1{#2}\fi + \if1\Expr{##2}\else + \def\inLine{#2}\replaceModuleInLine + \StreamPut##1{\inLine}\fi }% \activefiles } diff --git a/Master/texmf-dist/tex/latex-dev/base/latex.ltx b/Master/texmf-dist/tex/latex-dev/base/latex.ltx index 7ca690a8c99..fb37f7bfdb1 100644 --- a/Master/texmf-dist/tex/latex-dev/base/latex.ltx +++ b/Master/texmf-dist/tex/latex-dev/base/latex.ltx @@ -705,8 +705,8 @@ %%% From File: ltvers.dtx \def\fmtname{LaTeX2e} \edef\fmtversion - {2022-06-01} -\def\patch@level{-1} + {2022-11-01} +\def\patch@level{-2} \edef\development@branch@name{develop \the\year-\the\month-\the\day} \iffalse \def\reserved@a#1/#2/#3\@nil{% @@ -1731,8 +1731,8 @@ \xdef#1{\the\toks@}% \endgroup} %%% From File: ltcmd.dtx -\def\ltcmdversion{v1.0l} -\def\ltcmddate{2022-03-18} +\def\ltcmdversion{v1.1a} +\def\ltcmddate{2022-08-16} \message{document commands,} \ExplSyntaxOn \tl_new:N \l__cmd_arg_spec_tl @@ -1759,6 +1759,7 @@ \bool_new:N \l__cmd_obey_spaces_bool \tl_new:N \l__cmd_last_delimiters_tl \bool_new:N \l__cmd_long_bool +\bool_new:N \l__cmd_suppress_strip_bool \int_new:N \l__cmd_m_args_int \bool_new:N \l__cmd_prefixed_bool \tl_new:N \l__cmd_process_all_tl @@ -1769,6 +1770,9 @@ \bool_new:N \l__cmd_some_obey_spaces_bool \bool_new:N \l__cmd_some_long_bool \bool_new:N \l__cmd_some_short_bool +\quark_new:N \q__cmd_recursion_tail +\quark_new:N \q__cmd_recursion_stop +\__kernel_quark_new_test:N \__cmd_if_recursion_tail_stop_do:Nn \prop_new:N \l__cmd_tmp_prop \tl_new:N \l__cmd_tmpa_tl \tl_new:N \l__cmd_tmpb_tl @@ -2107,6 +2111,7 @@ \bool_set_true:N \l__cmd_grab_expandably_bool \bool_set_false:N \l__cmd_obey_spaces_bool \bool_set_false:N \l__cmd_long_bool + \bool_set_false:N \l__cmd_suppress_strip_bool \bool_set_false:N \l__cmd_some_obey_spaces_bool \bool_set_false:N \l__cmd_some_long_bool \bool_set_false:N \l__cmd_some_short_bool @@ -2197,30 +2202,48 @@ } \cs_new_protected:cpn { __cmd_normalize_type_+:w } #1 { - \quark_if_recursion_tail_stop_do:nn {#1} { \__cmd_bad_arg_spec:wn } - \bool_if:NT \l__cmd_long_bool + \__cmd_normalize_type_aux:NnNn + {#1} + \l__cmd_long_bool + { \bool_set_true:N \l__cmd_long_bool } + } +\cs_new_protected:cpn { __cmd_normalize_type_!:w } #1 + { + \__cmd_normalize_type_aux:NnNn ! {#1} + \l__cmd_obey_spaces_bool { - \msg_error:nnxx { cmd } { two-markers } - { \__cmd_environment_or_command: } { + } - \__cmd_bad_def:wn + \bool_set_true:N \l__cmd_obey_spaces_bool + \bool_set_true:N \l__cmd_some_obey_spaces_bool } - \bool_set_true:N \l__cmd_long_bool - \int_decr:N \l__cmd_current_arg_int - \__cmd_normalize_arg_spec_loop:n {#1} } -\cs_new_protected:cpn { __cmd_normalize_type_!:w } #1 +\cs_new_protected:cpn { __cmd_normalize_type_=:w } #1#2 { - \quark_if_recursion_tail_stop_do:nn {#1} { \__cmd_bad_arg_spec:wn } - \bool_if:NT \l__cmd_obey_spaces_bool + \__cmd_normalize_type_aux:NnNn = {#2} + \l__cmd_suppress_strip_bool + { + \bool_if:NT \l__cmd_expandable_bool + { + \msg_error:nnxx { cmd } { keyval-in-expandable } + { \iow_char:N \\ \l__cmd_function_tl } { \tl_to_str:n {#1} } + \__cmd_bad_def:wn + } + \bool_set_true:N \l__cmd_suppress_strip_bool + \bool_set_false:N \l__cmd_grab_expandably_bool + \tl_put_right:Nx \l__cmd_arg_spec_tl + { = { \tl_trim_spaces:n {#1} } } + } + } +\cs_new_protected:Npn \__cmd_normalize_type_aux:NnNn #1#2#3#4 + { + \quark_if_recursion_tail_stop_do:nn {#2} { \__cmd_bad_arg_spec:wn } + \bool_if:NT #3 { \msg_error:nnxx { cmd } { two-markers } - { \__cmd_environment_or_command: } { ! } + { \__cmd_environment_or_command: } { #1 } \__cmd_bad_def:wn } - \bool_set_true:N \l__cmd_obey_spaces_bool - \bool_set_true:N \l__cmd_some_obey_spaces_bool + #4 \int_decr:N \l__cmd_current_arg_int - \__cmd_normalize_arg_spec_loop:n {#1} + \__cmd_normalize_arg_spec_loop:n {#2} } \cs_new_protected:Npn \__cmd_normalize_type_D:w #1#2#3 { @@ -2417,6 +2440,7 @@ \int_zero:N \l__cmd_current_arg_int \bool_set_false:N \l__cmd_long_bool \bool_set_false:N \l__cmd_obey_spaces_bool + \bool_set_false:N \l__cmd_suppress_strip_bool \int_zero:N \l__cmd_m_args_int \bool_set_false:N \l__cmd_defaults_bool \tl_clear:N \l__cmd_defaults_tl @@ -2464,6 +2488,16 @@ \tl_put_left:Nn \l__cmd_process_one_tl { {#1} } \__cmd_prepare_signature_bypass:N } +\cs_new_protected:cpn { __cmd_add_type_=:w } #1 + { + \__cmd_flush_m_args: + \bool_set_true:N \l__cmd_prefixed_bool + \bool_set_true:N \l__cmd_suppress_strip_bool + \bool_set_true:N \l__cmd_process_some_bool + \tl_put_left:Nn \l__cmd_process_one_tl + { { \__cmd_arg_to_keyvalue:nn {#1} } } + \__cmd_prepare_signature_bypass:N + } \cs_new_protected:Npn \__cmd_add_type_b:w { \__cmd_flush_m_args: @@ -2554,11 +2588,16 @@ __cmd_grab_ #1 \bool_if:NT \l__cmd_long_bool { _long } \bool_if:NT \l__cmd_obey_spaces_bool { _obey_spaces } + \bool_lazy_and:nnT + { \l__cmd_suppress_strip_bool } + { \str_if_eq_p:nn {#1} { D } } + { _no_strip } :w } } \bool_set_false:N \l__cmd_long_bool \bool_set_false:N \l__cmd_obey_spaces_bool + \bool_set_false:N \l__cmd_suppress_strip_bool \tl_put_right:Nx \l__cmd_process_all_tl { { @@ -2969,7 +3008,7 @@ \quark_if_nil:nF {#1} { \tl_const:cn { c__cmd_show_type_#1_tl } {#2} \__cmd_tmp:w } } -\__cmd_tmp:w t0 r1 d1 R2 D2 O3 e4 E5 +6 !6 >7 \q_nil \q_nil +\__cmd_tmp:w t0 r1 d1 R2 D2 O3 e4 E5 +6 !6 >7 =7 \q_nil \q_nil \cs_new_protected:Npn \__cmd_show_delim:Nw #1 #2 { \__cmd_split_end_item:n { #1 #2 } \__cmd_split_signature_loop:Nw } \cs_new_protected:Npn \__cmd_show_delims:Nw #1 #2 #3 @@ -3030,7 +3069,7 @@ { \__cmd_grab_b_aux:NNw \cs_set_protected:Npn \exp_not:n } \cs_new_protected:Npn \__cmd_grab_b_aux:NNw #1#2#3 \__cmd_run_code: { - \__cmd_grab_D_aux:NNnN \begin \end {#3} #1 + \__cmd_grab_D_aux:NNnNN \begin \end {#3} #1 \use_ii:nn \tl_put_left:Nn \l__cmd_signature_tl { \__cmd_grab_b_end:Nw #2 } \tl_set_eq:NN \l__cmd_saved_args_tl \l__cmd_args_tl \tl_clear:N \l__cmd_args_tl @@ -3049,32 +3088,56 @@ } \cs_new_protected:Npn \__cmd_grab_D:w #1#2#3 \__cmd_run_code: { - \__cmd_grab_D_aux:NNnNN #1 #2 {#3} \cs_set_protected_nopar:Npn - \__cmd_peek_nonspace_remove:NTF + \__cmd_grab_D_aux:NNnNNN #1 #2 {#3} \cs_set_protected_nopar:Npn + \__cmd_peek_nonspace_remove:NTF \use_ii:nn } \cs_new_protected:Npn \__cmd_grab_D_long:w #1#2#3 \__cmd_run_code: { - \__cmd_grab_D_aux:NNnNN #1 #2 {#3} \cs_set_protected:Npn - \__cmd_peek_nonspace_remove:NTF + \__cmd_grab_D_aux:NNnNNN #1 #2 {#3} \cs_set_protected:Npn + \__cmd_peek_nonspace_remove:NTF \use_ii:nn } \cs_new_protected:Npn \__cmd_grab_D_obey_spaces:w #1#2#3 \__cmd_run_code: { - \__cmd_grab_D_aux:NNnNN #1 #2 {#3} \cs_set_protected_nopar:Npn - \__cmd_peek_meaning_remove:NTF + \__cmd_grab_D_aux:NNnNNN #1 #2 {#3} \cs_set_protected_nopar:Npn + \__cmd_peek_meaning_remove:NTF \use_ii:nn } \cs_new_protected:Npn \__cmd_grab_D_long_obey_spaces:w #1#2#3 \__cmd_run_code: { - \__cmd_grab_D_aux:NNnNN #1 #2 {#3} \cs_set_protected:Npn - \__cmd_peek_meaning_remove:NTF + \__cmd_grab_D_aux:NNnNNN #1 #2 {#3} \cs_set_protected:Npn + \__cmd_peek_meaning_remove:NTF \use_ii:nn } -\cs_new_protected:Npn \__cmd_grab_D_aux:NNnNN #1#2#3#4#5 +\cs_new_protected:Npn \__cmd_grab_D_no_strip:w + #1#2#3 \__cmd_run_code: + { + \__cmd_grab_D_aux:NNnNNN #1 #2 {#3} \cs_set_protected_nopar:Npn + \__cmd_peek_nonspace_remove:NTF \use_none:n + } +\cs_new_protected:Npn \__cmd_grab_D_long_no_strip:w + #1#2#3 \__cmd_run_code: + { + \__cmd_grab_D_aux:NNnNNN #1 #2 {#3} \cs_set_protected:Npn + \__cmd_peek_nonspace_remove:NTF \use_none:n + } +\cs_new_protected:Npn \__cmd_grab_D_obey_spaces_no_strip:w + #1#2#3 \__cmd_run_code: { - \__cmd_grab_D_aux:NNnN #1#2 {#3} #4 + \__cmd_grab_D_aux:NNnNNN #1 #2 {#3} \cs_set_protected_nopar:Npn + \__cmd_peek_meaning_remove:NTF \use_none:n + } +\cs_new_protected:Npn \__cmd_grab_D_long_obey_spaces_no_strip:w + #1#2#3 \__cmd_run_code: + { + \__cmd_grab_D_aux:NNnNNN #1 #2 {#3} \cs_set_protected:Npn + \__cmd_peek_meaning_remove:NTF \use_none:n + } +\cs_new_protected:Npn \__cmd_grab_D_aux:NNnNNN #1#2#3#4#5#6 + { + \__cmd_grab_D_aux:NNnNN #1#2 {#3} #4 #6 #5 #1 { \__cmd_grab_D_call:Nw #1 } { \__cmd_add_arg:o \c_novalue_tl } } -\cs_new_protected:Npn \__cmd_grab_D_aux:NNnN #1#2#3#4 +\cs_new_protected:Npn \__cmd_grab_D_aux:NNnNN #1#2#3#4#5 { \tl_set:Nn \l__cmd_signature_tl {#3} \exp_after:wN #4 \l__cmd_fn_tl ##1 #2 @@ -3088,7 +3151,7 @@ \str_if_eq:eeTF { \exp_not:o { \use_none:n ##1 } } { { \exp_not:o { \use_ii:nnn ##1 \q_nil } } } - { \__cmd_add_arg:o { \use_ii:nn ##1 } } + { \__cmd_add_arg:o { #5 ##1 } } { \__cmd_add_arg:o { \use_none:n ##1 } } } } @@ -3286,7 +3349,7 @@ { \__cmd_grab_R_aux:NNnN #1 #2 {#3} \cs_set_protected:Npn } \cs_new_protected:Npn \__cmd_grab_R_aux:NNnN #1#2#3#4 { - \__cmd_grab_D_aux:NNnN #1 #2 {#3} #4 + \__cmd_grab_D_aux:NNnNN #1 #2 {#3} #4 \use_ii:nn \__cmd_peek_nonspace_remove:NTF #1 { \__cmd_grab_D_call:Nw #1 } { @@ -3742,6 +3805,121 @@ } \cs_new_protected:Npn \__cmd_trim_spaces:n #1 { \tl_set:Nx \ProcessedArgument { \tl_trim_spaces:n {#1} } } +\cs_new_protected:Npn \__cmd_arg_to_keyvalue:nn #1#2 + { + \tl_trim_spaces_apply:nN {#2} \__cmd_arg_to_keyvalue_braces:nnn + {#1} {#2} + } +\cs_new_protected:Npn \__cmd_arg_to_keyvalue_braces:nnn #1#2#3 + { + \tl_if_head_is_group:nT {#1} + { + \tl_if_blank:oT { \use_none:n #1 } + { + \tl_set:Nx \ProcessedArgument { #2 = { \exp_not:n #1 } } + \use_none:nnnn + } + } + \__cmd_arg_to_keyvalue_auxi:nnn {#1} {#2} {#3} + } +\cs_new:Npn \__cmd_arg_to_keyvalue_auxi:nnn #1 + { + \tl_if_head_is_N_type:nTF {#1} + { \__cmd_split_N_head_apply:Nn \__cmd_arg_to_keyvalue_auxii:Nnnn {#1} } + { \__cmd_arg_to_keyvalue_auxv:nn } + } +\cs_new:Npn \__cmd_arg_to_keyvalue_auxii:Nnnn #1#2 + { + \str_if_eq:eeTF { \exp_not:n {#1} } { = } + { \tl_trim_spaces_apply:nN {#2} \__cmd_arg_to_keyvalue_auxiii:nnn } + { \__cmd_arg_to_keyvalue_auxv:nn } + } +\cs_new:Npn \__cmd_arg_to_keyvalue_auxiii:nnn #1 + { + \tl_if_head_is_N_type:nTF {#1} + { \__cmd_split_N_head_apply:Nn \__cmd_arg_to_keyvalue_auxiv:Nnnn {#1} } + { \__cmd_arg_to_keyvalue_auxv:nn } + } +\cs_new:Npn \__cmd_arg_to_keyvalue_auxiv:Nnnn #1#2 + { + \str_if_eq:eeTF { \exp_not:n {#1} } { , } + { \tl_set:Nn \ProcessedArgument {#2} \use_none:nn } + { \__cmd_arg_to_keyvalue_auxv:nn } + } +\cs_new_protected:Npn \__cmd_arg_to_keyvalue_auxv:nn #1#2 + { + \__cmd_arg_to_keyvalue_loop:w #2 + \q__cmd_recursion_tail \q__cmd_recursion_stop {#1} {#2} + } +\cs_new_protected:Npn \__cmd_arg_to_keyvalue_loop:w #1 \q__cmd_recursion_stop + { + \tl_if_head_is_N_type:nTF {#1} + { \__cmd_arg_to_keyvalue_loop_N_type:N } + { + \tl_if_head_is_group:nTF {#1} + { \__cmd_arg_to_keyvalue_loop_group:n } + { \__cmd_arg_to_keyvalue_loop_space:w } + } + #1 \q__cmd_recursion_stop + } +\cs_new_protected:Npn \__cmd_arg_to_keyvalue_loop_group:n #1 + { \__cmd_arg_to_keyvalue_loop:w } +\use:n { \cs_new_protected:Npn \__cmd_arg_to_keyvalue_loop_space:w } ~ + { \__cmd_arg_to_keyvalue_loop:w } +\cs_new_protected:Npn \__cmd_arg_to_keyvalue_loop_N_type:N #1 + { + \__cmd_if_recursion_tail_stop_do:Nn #1 + { \__cmd_arg_to_keyvalue_set_default:nn } + \str_if_eq:nnTF {#1} { = } + { + \__cmd_use_i_delimit_by_q_recursion_stop:nw + { \__cmd_arg_to_keyvalue_set_keyvalue:nn } + } + { + \bool_lazy_or:nnTF + { \token_if_math_toggle_p:N #1 } + { \str_if_eq_p:nn {#1} { \( } } + { \__cmd_arg_to_keyvalue_math:w } + { \__cmd_arg_to_keyvalue_loop:w } + } + } +\cs_new_protected:Npn \__cmd_arg_to_keyvalue_math:w #1 \q__cmd_recursion_stop + { + \tl_if_head_is_N_type:nTF {#1} + { \__cmd_arg_to_keyvalue_math_N_type:N } + { + \tl_if_head_is_group:nTF {#1} + { \__cmd_arg_to_keyvalue_math_group:n } + { \__cmd_arg_to_keyvalue_math_space:w } + } + #1 \q__cmd_recursion_stop + } +\cs_new_protected:Npn \__cmd_arg_to_keyvalue_math_N_type:N #1 + { + \__cmd_if_recursion_tail_stop_do:Nn #1 + { \__cmd_arg_to_keyvalue_set_default:nn } + \bool_lazy_or:nnTF + { \token_if_math_toggle_p:N #1 } + { \str_if_eq_p:nn {#1} { \) } } + { \__cmd_arg_to_keyvalue_loop:w } + { \__cmd_arg_to_keyvalue_math:w } + } +\cs_new_protected:Npn \__cmd_arg_to_keyvalue_math_group:n #1 + { \__cmd_arg_to_keyvalue_math:w } +\use:n { \cs_new_protected:Npn \__cmd_arg_to_keyvalue_math_space:w } ~ + { \__cmd_arg_to_keyvalue_math:w } +\cs_new_protected:Npn \__cmd_arg_to_keyvalue_set_default:nn #1#2 + { \tl_set:Nn \ProcessedArgument { #1 = {#2} } } +\cs_new_protected:Npn \__cmd_arg_to_keyvalue_set_keyvalue:nn #1#2 + { \tl_set:Nn \ProcessedArgument {#2} } +\cs_new:Npn \__cmd_split_N_head_apply:Nn #1#2 + { \exp:w \if_false: { \fi: \__cmd_split_N_head_apply_aux:NNw #1#2 } } +\cs_new:Npn \__cmd_split_N_head_apply_aux:NNw #1#2 + { + \exp_after:wN \exp_end: + \exp_after:wN #1 \exp_after:wN #2 \exp_after:wN { \if_false: } \fi: + } + \cs_new_protected:Npn \__cmd_get_arg_spec_error:N #1 { \bool_set_false:N \l__cmd_environment_bool @@ -4085,6 +4263,13 @@ This~is~only~supported~for~robust~commands,~but~not~for~expandable~ones. \c__cmd_ignore_def_tl } +\msg_new:nnnn { cmd } { keyval-in-expandable } + { Invalid~argument~prefix~'='~in~command~'#1'. } + { + The~argument~specification~for~'#1'~contains~a~key--value~marker~'={#2}'.~ + This~is~only~supported~for~robust~commands,~but~not~for~expandable~ones. + \c__cmd_ignore_def_tl + } \msg_new:nnnn { cmd } { too-many-args } { Too~many~arguments~for~#1. } { @@ -9072,12 +9257,6 @@ Type H <return> for immediate help.}% (local:~ \int_use:N\c@localmathalphabets) } \cs_gset_eq:cc { mv@#1@frozen }{ mv@#1 } \tl_gset:cx { g__nfss_frozen_mv_ #1 _tl }{ \int_use:c { c@mv@#1 } } - \group_insert_after:N \__nfss_init_mv_freeze:N - \exp_after:wN \group_insert_after:N \cs:w mv@#1@reset \cs_end: - \tl_gput_right:No \check@mathfonts - { - \exp_after:wN \group_insert_after:N \cs:w mv@#1@reset \cs_end: - } \cs_gset:cpn{mv@#1@reset} { \int_compare:nNnTF { \int_use:c{c@mv@#1} } > @@ -9097,10 +9276,6 @@ Type H <return> for immediate help.}% \if@ignore \ignorespaces \fi } } -\cs_new_protected:Npn \__nfss_init_mv_freeze:N #1 {% - \mode_if_math:T { \group_insert_after:N \__nfss_init_mv_freeze:N - \group_insert_after:N } #1 -} \ExplSyntaxOff \def\process@table{% \def\cdp@elt##1##2##3##4{% @@ -9148,6 +9323,11 @@ Type H <return> for immediate help.}% \@onlypreamble\process@table \def\DeclareMathVersion#1{% \@namedef{g__nfss_frozen_mv_#1_tl}{}% + \expandafter\ifx\csname mv@#1\endcsname \relax + \expandafter \g@addto@macro \expandafter \check@mathfonts + \expandafter {\expandafter \aftergroup \csname mv@#1@reset\endcsname}% + \@namedef{mv@#1@reset}{}% + \fi \expandafter\new@mathversion\csname mv@#1\endcsname} \@onlypreamble\DeclareMathVersion \def\new@mathversion#1{% @@ -9182,7 +9362,13 @@ Type H <return> for immediate help.}% \xdef#1{\the\toks@}% } \@onlypreamble\new@mathversion -\def\DeclareSymbolFont#1#2#3#4#5{% +\def\DeclareSymbolFont #1#2#3#4#5{% + \def\reserved@a{\DeclareSymbolFont@m@dropped{#1}{#2}{#3}}% + \edef\reserved@b{#4}% + \series@maybe@drop@one@m\reserved@b\reserved@b + \expandafter\reserved@a\expandafter{\reserved@b}{#5}% +} +\def\DeclareSymbolFont@m@dropped #1#2#3#4#5{% \@tempswafalse \edef\reserved@b{#2}% \def\cdp@elt##1##2##3##4{\def\reserved@c{##1}% @@ -9237,7 +9423,13 @@ Type H <return> for immediate help.}% \version@list } \@onlypreamble\new@symbolfont -\def\SetSymbolFont#1#2#3#4#5#6{% +\def\SetSymbolFont #1#2#3#4#5#6{% + \def\reserved@a{\SetSymbolFont@m@dropped{#1}{#2}{#3}{#4}}% + \edef\reserved@b{#5}% + \series@maybe@drop@one@m\reserved@b\reserved@b + \expandafter\reserved@a\expandafter{\reserved@b}{#6}% +} +\def\SetSymbolFont@m@dropped#1#2#3#4#5#6{% \@tempswafalse \edef\reserved@b{#3}% \def\cdp@elt##1##2##3##4{\def\reserved@c{##1}% @@ -10407,7 +10599,7 @@ Type H <return> for immediate help.}% \@ifundefined{#1:#2}% {\@font@info{Setting #2 sub-encoding to #1/#3}}% {\@font@info{Changing #2 sub-encoding to #1/#3}}% - \@namedef{#1:#2}{#3}} + \global\@namedef{#1:#2}{#3}} \@onlypreamble\DeclareEncodingSubset \@onlypreamble\DeclareEncodingSubset@aux \@onlypreamble\@DeclareEncodingSubset @@ -11380,7 +11572,8 @@ Type H <return> for immediate help.}% \def\makesm@sh#1{% \setbox\z@\hbox{\color@begingroup#1\color@endgroup}\finsm@sh} \def\mathsm@sh#1#2{% - \setbox\z@\hbox{$\m@th#1{#2}$}\finsm@sh} + \setbox\z@\hbox{$\m@th#1{#2}$}% + {}\finsm@sh} \def\finsm@sh{\ht\z@\z@ \dp\z@\z@ \leavevmode@ifvmode\box\z@} \def\buildrel#1\over#2{\mathrel{\mathop{\kern\z@#2}\limits^{#1}}} \DeclareRobustCommand*\cases[1]{\left\{\,\vcenter{\normalbaselines\m@th @@ -11998,6 +12191,7 @@ Type H <return> for immediate help.}% \def\@minipagefalse{\global\let\if@minipage\iffalse} \def\@minipagetrue {\global\let\if@minipage\iftrue} \@minipagefalse +\newif\if@in@minipage@env \def\minipage{% \@ifnextchar[%] \@iminipage @@ -12019,6 +12213,14 @@ Type H <return> for immediate help.}% \color@begingroup \hsize\@tempdima \textwidth\hsize \columnwidth\hsize + \if@in@minipage@env + \ifvoid\@mpfootins\else + \@latex@warning{Nested minipage: + footnotes may be misplaced}% + \fi + \else + \@in@minipage@envtrue + \fi \@parboxrestore \def\@mpfn{mpfootnote}\def\thempfn{\thempfootnote}\c@mpfootnote\z@ \let\@footnotetext\@mpfootnotetext @@ -14859,7 +15061,7 @@ Type H <return> for immediate help.}% { Unknown~option~'#1'~for~package~#2. } { LaTeX~has~been~asked~to~set~an~option~called~'#1'~ - but~the~#2~package~has~not~created~an~option~with~this~name. + but~the~package~"\msg_module_name:n {#2}"~has~not~created~an~option~with~this~name. } \cs_new_protected:Npn \__keys_options_global:n #1 { @@ -14978,12 +15180,18 @@ Type H <return> for immediate help.}% { \msg_error:nnnn { keys } { load-only } {#1} {#2} } } \msg_new:nnn { keys } { load-option-ignored } - { Package~"#1"~has~already~been~loaded:~ignoring~load-time~option~"#2". } + { + Package~"\msg_module_name:n {#1}"~has~already~been~loaded:~ + ignoring~load-time~option~"#2". + } \msg_new:nnnn { keys } { load-only } - { Key~"#2"~may~only~be~used~in~the~during~loading~of~package~"#1". } + { + Key~"#2"~may~only~be~used~during~loading~of~package~ + "\msg_module_name:n {#1}". + } { LaTeX~was~asked~to~set~a~key~called~"#2",~but~this~is~only~allowed~ - in~the~optional~argument~when~loading~package~"#1". + in~the~optional~argument~when~loading~package~"\msg_module_name:n{#1}". } \tl_gput_left:Nn \@kernel@after@begindocument { @@ -15009,8 +15217,8 @@ Type H <return> for immediate help.}% { \__keys_options_expand_module:Nn \keys_set:nn {#1} {#2} } \ExplSyntaxOff %%% From File: ltfilehook.dtx -\providecommand\ltfilehookversion{v1.0m} -\providecommand\ltfilehookdate{2022/04/01} +\providecommand\ltfilehookversion{v1.0n} +\providecommand\ltfilehookdate{2022/08/18} \ExplSyntaxOn \tl_new:N \CurrentFile \tl_new:N \CurrentFilePath @@ -15263,8 +15471,12 @@ Type H <return> for immediate help.}% \def\disable@package@load#1#2{% \global\@namedef{@pkg-disable@#1.\@pkgextension}{#2}} \def\@disable@packageload@do#1#2{% - \@ifundefined{@pkg-disable@#1}{#2}% - {\@nameuse{@pkg-disable@#1}}} + \@ifundefined{@pkg-disable@#1}% + {#2}% + {\@nameuse{@pkg-disable@#1}% + \@latex@info{Package '#1' has been disabled.% + \MessageBreak Load request ignored}% + \expandafter\@gobbletwo}} \def\reenable@package@load#1{% \global\expandafter\let \csname @pkg-disable@#1.\@pkgextension \endcsname \@undefined} @@ -15298,8 +15510,7 @@ Type H <return> for immediate help.}% %% %%% From File: ltshipout.dtx \providecommand\ltshipoutversion{v1.0m} -\providecommand\ltshipoutdate{2022/05/08} - % \cs{AtBeginDvi} is the existing \LaTeXe{} interface to fill the +\providecommand\ltshipoutdate{2022/08/26} \ExplSyntaxOn \bool_new:N \g__shipout_debug_bool \cs_new_eq:NN \__shipout_debug:n \use_none:n @@ -15799,6 +16010,8 @@ Type H <return> for immediate help.}% \@maxdepth = \maxdepth \newdimen\paperheight \newdimen\paperwidth +\newdimen\stockheight +\newdimen\stockwidth \newif \if@insert \newif \if@fcolmade \newif \if@specialpage \@specialpagefalse diff --git a/Master/texmf-dist/tex/latex-dev/base/latexrelease.sty b/Master/texmf-dist/tex/latex-dev/base/latexrelease.sty index 33493b9bef5..d573c3f6cca 100644 --- a/Master/texmf-dist/tex/latex-dev/base/latexrelease.sty +++ b/Master/texmf-dist/tex/latex-dev/base/latexrelease.sty @@ -290,7 +290,7 @@ } %%% From File: ltvers.dtx \edef\latexreleaseversion - {2022-06-01} + {2022-11-01} \newif\if@includeinrelease \@includeinreleasefalse \def\IncludeInRelease#1{% @@ -1890,8 +1890,8 @@ of this package available from CTAN} \EndIncludeInRelease %%% From File: ltcmd.dtx -\def\ltcmdversion{v1.0l} -\def\ltcmddate{2022-03-18} +\def\ltcmdversion{v1.1a} +\def\ltcmddate{2022-08-16} \edef\@latexrelease@catcode@null{\the\catcode`\^^@ } \catcode`\^^@=12 \ExplSyntaxOn @@ -1921,6 +1921,7 @@ of this package available from CTAN} \bool_new:N \l__cmd_obey_spaces_bool \tl_new:N \l__cmd_last_delimiters_tl \bool_new:N \l__cmd_long_bool +\bool_new:N \l__cmd_suppress_strip_bool \int_new:N \l__cmd_m_args_int \bool_new:N \l__cmd_prefixed_bool \tl_new:N \l__cmd_process_all_tl @@ -1931,6 +1932,9 @@ of this package available from CTAN} \bool_new:N \l__cmd_some_obey_spaces_bool \bool_new:N \l__cmd_some_long_bool \bool_new:N \l__cmd_some_short_bool +\quark_new:N \q__cmd_recursion_tail +\quark_new:N \q__cmd_recursion_stop +\__kernel_quark_new_test:N \__cmd_if_recursion_tail_stop_do:Nn \prop_new:N \l__cmd_tmp_prop \tl_new:N \l__cmd_tmpa_tl \tl_new:N \l__cmd_tmpb_tl @@ -2269,6 +2273,7 @@ of this package available from CTAN} \bool_set_true:N \l__cmd_grab_expandably_bool \bool_set_false:N \l__cmd_obey_spaces_bool \bool_set_false:N \l__cmd_long_bool + \bool_set_false:N \l__cmd_suppress_strip_bool \bool_set_false:N \l__cmd_some_obey_spaces_bool \bool_set_false:N \l__cmd_some_long_bool \bool_set_false:N \l__cmd_some_short_bool @@ -2359,30 +2364,48 @@ of this package available from CTAN} } \cs_new_protected:cpn { __cmd_normalize_type_+:w } #1 { - \quark_if_recursion_tail_stop_do:nn {#1} { \__cmd_bad_arg_spec:wn } - \bool_if:NT \l__cmd_long_bool + \__cmd_normalize_type_aux:NnNn + {#1} + \l__cmd_long_bool + { \bool_set_true:N \l__cmd_long_bool } + } +\cs_new_protected:cpn { __cmd_normalize_type_!:w } #1 + { + \__cmd_normalize_type_aux:NnNn ! {#1} + \l__cmd_obey_spaces_bool { - \msg_error:nnxx { cmd } { two-markers } - { \__cmd_environment_or_command: } { + } - \__cmd_bad_def:wn + \bool_set_true:N \l__cmd_obey_spaces_bool + \bool_set_true:N \l__cmd_some_obey_spaces_bool } - \bool_set_true:N \l__cmd_long_bool - \int_decr:N \l__cmd_current_arg_int - \__cmd_normalize_arg_spec_loop:n {#1} } -\cs_new_protected:cpn { __cmd_normalize_type_!:w } #1 +\cs_new_protected:cpn { __cmd_normalize_type_=:w } #1#2 { - \quark_if_recursion_tail_stop_do:nn {#1} { \__cmd_bad_arg_spec:wn } - \bool_if:NT \l__cmd_obey_spaces_bool + \__cmd_normalize_type_aux:NnNn = {#2} + \l__cmd_suppress_strip_bool + { + \bool_if:NT \l__cmd_expandable_bool + { + \msg_error:nnxx { cmd } { keyval-in-expandable } + { \iow_char:N \\ \l__cmd_function_tl } { \tl_to_str:n {#1} } + \__cmd_bad_def:wn + } + \bool_set_true:N \l__cmd_suppress_strip_bool + \bool_set_false:N \l__cmd_grab_expandably_bool + \tl_put_right:Nx \l__cmd_arg_spec_tl + { = { \tl_trim_spaces:n {#1} } } + } + } +\cs_new_protected:Npn \__cmd_normalize_type_aux:NnNn #1#2#3#4 + { + \quark_if_recursion_tail_stop_do:nn {#2} { \__cmd_bad_arg_spec:wn } + \bool_if:NT #3 { \msg_error:nnxx { cmd } { two-markers } - { \__cmd_environment_or_command: } { ! } + { \__cmd_environment_or_command: } { #1 } \__cmd_bad_def:wn } - \bool_set_true:N \l__cmd_obey_spaces_bool - \bool_set_true:N \l__cmd_some_obey_spaces_bool + #4 \int_decr:N \l__cmd_current_arg_int - \__cmd_normalize_arg_spec_loop:n {#1} + \__cmd_normalize_arg_spec_loop:n {#2} } \cs_new_protected:Npn \__cmd_normalize_type_D:w #1#2#3 { @@ -2579,6 +2602,7 @@ of this package available from CTAN} \int_zero:N \l__cmd_current_arg_int \bool_set_false:N \l__cmd_long_bool \bool_set_false:N \l__cmd_obey_spaces_bool + \bool_set_false:N \l__cmd_suppress_strip_bool \int_zero:N \l__cmd_m_args_int \bool_set_false:N \l__cmd_defaults_bool \tl_clear:N \l__cmd_defaults_tl @@ -2626,6 +2650,16 @@ of this package available from CTAN} \tl_put_left:Nn \l__cmd_process_one_tl { {#1} } \__cmd_prepare_signature_bypass:N } +\cs_new_protected:cpn { __cmd_add_type_=:w } #1 + { + \__cmd_flush_m_args: + \bool_set_true:N \l__cmd_prefixed_bool + \bool_set_true:N \l__cmd_suppress_strip_bool + \bool_set_true:N \l__cmd_process_some_bool + \tl_put_left:Nn \l__cmd_process_one_tl + { { \__cmd_arg_to_keyvalue:nn {#1} } } + \__cmd_prepare_signature_bypass:N + } \cs_new_protected:Npn \__cmd_add_type_b:w { \__cmd_flush_m_args: @@ -2716,11 +2750,16 @@ of this package available from CTAN} __cmd_grab_ #1 \bool_if:NT \l__cmd_long_bool { _long } \bool_if:NT \l__cmd_obey_spaces_bool { _obey_spaces } + \bool_lazy_and:nnT + { \l__cmd_suppress_strip_bool } + { \str_if_eq_p:nn {#1} { D } } + { _no_strip } :w } } \bool_set_false:N \l__cmd_long_bool \bool_set_false:N \l__cmd_obey_spaces_bool + \bool_set_false:N \l__cmd_suppress_strip_bool \tl_put_right:Nx \l__cmd_process_all_tl { { @@ -3139,7 +3178,7 @@ of this package available from CTAN} \quark_if_nil:nF {#1} { \tl_const:cn { c__cmd_show_type_#1_tl } {#2} \__cmd_tmp:w } } -\__cmd_tmp:w t0 r1 d1 R2 D2 O3 e4 E5 +6 !6 >7 \q_nil \q_nil +\__cmd_tmp:w t0 r1 d1 R2 D2 O3 e4 E5 +6 !6 >7 =7 \q_nil \q_nil \cs_new_protected:Npn \__cmd_show_delim:Nw #1 #2 { \__cmd_split_end_item:n { #1 #2 } \__cmd_split_signature_loop:Nw } \cs_new_protected:Npn \__cmd_show_delims:Nw #1 #2 #3 @@ -3204,7 +3243,7 @@ of this package available from CTAN} { \__cmd_grab_b_aux:NNw \cs_set_protected:Npn \exp_not:n } \cs_new_protected:Npn \__cmd_grab_b_aux:NNw #1#2#3 \__cmd_run_code: { - \__cmd_grab_D_aux:NNnN \begin \end {#3} #1 + \__cmd_grab_D_aux:NNnNN \begin \end {#3} #1 \use_ii:nn \tl_put_left:Nn \l__cmd_signature_tl { \__cmd_grab_b_end:Nw #2 } \tl_set_eq:NN \l__cmd_saved_args_tl \l__cmd_args_tl \tl_clear:N \l__cmd_args_tl @@ -3223,32 +3262,56 @@ of this package available from CTAN} } \cs_new_protected:Npn \__cmd_grab_D:w #1#2#3 \__cmd_run_code: { - \__cmd_grab_D_aux:NNnNN #1 #2 {#3} \cs_set_protected_nopar:Npn - \__cmd_peek_nonspace_remove:NTF + \__cmd_grab_D_aux:NNnNNN #1 #2 {#3} \cs_set_protected_nopar:Npn + \__cmd_peek_nonspace_remove:NTF \use_ii:nn } \cs_new_protected:Npn \__cmd_grab_D_long:w #1#2#3 \__cmd_run_code: { - \__cmd_grab_D_aux:NNnNN #1 #2 {#3} \cs_set_protected:Npn - \__cmd_peek_nonspace_remove:NTF + \__cmd_grab_D_aux:NNnNNN #1 #2 {#3} \cs_set_protected:Npn + \__cmd_peek_nonspace_remove:NTF \use_ii:nn } \cs_new_protected:Npn \__cmd_grab_D_obey_spaces:w #1#2#3 \__cmd_run_code: { - \__cmd_grab_D_aux:NNnNN #1 #2 {#3} \cs_set_protected_nopar:Npn - \__cmd_peek_meaning_remove:NTF + \__cmd_grab_D_aux:NNnNNN #1 #2 {#3} \cs_set_protected_nopar:Npn + \__cmd_peek_meaning_remove:NTF \use_ii:nn } \cs_new_protected:Npn \__cmd_grab_D_long_obey_spaces:w #1#2#3 \__cmd_run_code: { - \__cmd_grab_D_aux:NNnNN #1 #2 {#3} \cs_set_protected:Npn - \__cmd_peek_meaning_remove:NTF + \__cmd_grab_D_aux:NNnNNN #1 #2 {#3} \cs_set_protected:Npn + \__cmd_peek_meaning_remove:NTF \use_ii:nn } -\cs_new_protected:Npn \__cmd_grab_D_aux:NNnNN #1#2#3#4#5 +\cs_new_protected:Npn \__cmd_grab_D_no_strip:w + #1#2#3 \__cmd_run_code: + { + \__cmd_grab_D_aux:NNnNNN #1 #2 {#3} \cs_set_protected_nopar:Npn + \__cmd_peek_nonspace_remove:NTF \use_none:n + } +\cs_new_protected:Npn \__cmd_grab_D_long_no_strip:w + #1#2#3 \__cmd_run_code: + { + \__cmd_grab_D_aux:NNnNNN #1 #2 {#3} \cs_set_protected:Npn + \__cmd_peek_nonspace_remove:NTF \use_none:n + } +\cs_new_protected:Npn \__cmd_grab_D_obey_spaces_no_strip:w + #1#2#3 \__cmd_run_code: + { + \__cmd_grab_D_aux:NNnNNN #1 #2 {#3} \cs_set_protected_nopar:Npn + \__cmd_peek_meaning_remove:NTF \use_none:n + } +\cs_new_protected:Npn \__cmd_grab_D_long_obey_spaces_no_strip:w + #1#2#3 \__cmd_run_code: { - \__cmd_grab_D_aux:NNnN #1#2 {#3} #4 + \__cmd_grab_D_aux:NNnNNN #1 #2 {#3} \cs_set_protected:Npn + \__cmd_peek_meaning_remove:NTF \use_none:n + } +\cs_new_protected:Npn \__cmd_grab_D_aux:NNnNNN #1#2#3#4#5#6 + { + \__cmd_grab_D_aux:NNnNN #1#2 {#3} #4 #6 #5 #1 { \__cmd_grab_D_call:Nw #1 } { \__cmd_add_arg:o \c_novalue_tl } } -\cs_new_protected:Npn \__cmd_grab_D_aux:NNnN #1#2#3#4 +\cs_new_protected:Npn \__cmd_grab_D_aux:NNnNN #1#2#3#4#5 { \tl_set:Nn \l__cmd_signature_tl {#3} \exp_after:wN #4 \l__cmd_fn_tl ##1 #2 @@ -3262,7 +3325,7 @@ of this package available from CTAN} \str_if_eq:eeTF { \exp_not:o { \use_none:n ##1 } } { { \exp_not:o { \use_ii:nnn ##1 \q_nil } } } - { \__cmd_add_arg:o { \use_ii:nn ##1 } } + { \__cmd_add_arg:o { #5 ##1 } } { \__cmd_add_arg:o { \use_none:n ##1 } } } } @@ -3460,7 +3523,7 @@ of this package available from CTAN} { \__cmd_grab_R_aux:NNnN #1 #2 {#3} \cs_set_protected:Npn } \cs_new_protected:Npn \__cmd_grab_R_aux:NNnN #1#2#3#4 { - \__cmd_grab_D_aux:NNnN #1 #2 {#3} #4 + \__cmd_grab_D_aux:NNnNN #1 #2 {#3} #4 \use_ii:nn \__cmd_peek_nonspace_remove:NTF #1 { \__cmd_grab_D_call:Nw #1 } { @@ -3916,6 +3979,121 @@ of this package available from CTAN} } \cs_new_protected:Npn \__cmd_trim_spaces:n #1 { \tl_set:Nx \ProcessedArgument { \tl_trim_spaces:n {#1} } } +\cs_new_protected:Npn \__cmd_arg_to_keyvalue:nn #1#2 + { + \tl_trim_spaces_apply:nN {#2} \__cmd_arg_to_keyvalue_braces:nnn + {#1} {#2} + } +\cs_new_protected:Npn \__cmd_arg_to_keyvalue_braces:nnn #1#2#3 + { + \tl_if_head_is_group:nT {#1} + { + \tl_if_blank:oT { \use_none:n #1 } + { + \tl_set:Nx \ProcessedArgument { #2 = { \exp_not:n #1 } } + \use_none:nnnn + } + } + \__cmd_arg_to_keyvalue_auxi:nnn {#1} {#2} {#3} + } +\cs_new:Npn \__cmd_arg_to_keyvalue_auxi:nnn #1 + { + \tl_if_head_is_N_type:nTF {#1} + { \__cmd_split_N_head_apply:Nn \__cmd_arg_to_keyvalue_auxii:Nnnn {#1} } + { \__cmd_arg_to_keyvalue_auxv:nn } + } +\cs_new:Npn \__cmd_arg_to_keyvalue_auxii:Nnnn #1#2 + { + \str_if_eq:eeTF { \exp_not:n {#1} } { = } + { \tl_trim_spaces_apply:nN {#2} \__cmd_arg_to_keyvalue_auxiii:nnn } + { \__cmd_arg_to_keyvalue_auxv:nn } + } +\cs_new:Npn \__cmd_arg_to_keyvalue_auxiii:nnn #1 + { + \tl_if_head_is_N_type:nTF {#1} + { \__cmd_split_N_head_apply:Nn \__cmd_arg_to_keyvalue_auxiv:Nnnn {#1} } + { \__cmd_arg_to_keyvalue_auxv:nn } + } +\cs_new:Npn \__cmd_arg_to_keyvalue_auxiv:Nnnn #1#2 + { + \str_if_eq:eeTF { \exp_not:n {#1} } { , } + { \tl_set:Nn \ProcessedArgument {#2} \use_none:nn } + { \__cmd_arg_to_keyvalue_auxv:nn } + } +\cs_new_protected:Npn \__cmd_arg_to_keyvalue_auxv:nn #1#2 + { + \__cmd_arg_to_keyvalue_loop:w #2 + \q__cmd_recursion_tail \q__cmd_recursion_stop {#1} {#2} + } +\cs_new_protected:Npn \__cmd_arg_to_keyvalue_loop:w #1 \q__cmd_recursion_stop + { + \tl_if_head_is_N_type:nTF {#1} + { \__cmd_arg_to_keyvalue_loop_N_type:N } + { + \tl_if_head_is_group:nTF {#1} + { \__cmd_arg_to_keyvalue_loop_group:n } + { \__cmd_arg_to_keyvalue_loop_space:w } + } + #1 \q__cmd_recursion_stop + } +\cs_new_protected:Npn \__cmd_arg_to_keyvalue_loop_group:n #1 + { \__cmd_arg_to_keyvalue_loop:w } +\use:n { \cs_new_protected:Npn \__cmd_arg_to_keyvalue_loop_space:w } ~ + { \__cmd_arg_to_keyvalue_loop:w } +\cs_new_protected:Npn \__cmd_arg_to_keyvalue_loop_N_type:N #1 + { + \__cmd_if_recursion_tail_stop_do:Nn #1 + { \__cmd_arg_to_keyvalue_set_default:nn } + \str_if_eq:nnTF {#1} { = } + { + \__cmd_use_i_delimit_by_q_recursion_stop:nw + { \__cmd_arg_to_keyvalue_set_keyvalue:nn } + } + { + \bool_lazy_or:nnTF + { \token_if_math_toggle_p:N #1 } + { \str_if_eq_p:nn {#1} { \( } } + { \__cmd_arg_to_keyvalue_math:w } + { \__cmd_arg_to_keyvalue_loop:w } + } + } +\cs_new_protected:Npn \__cmd_arg_to_keyvalue_math:w #1 \q__cmd_recursion_stop + { + \tl_if_head_is_N_type:nTF {#1} + { \__cmd_arg_to_keyvalue_math_N_type:N } + { + \tl_if_head_is_group:nTF {#1} + { \__cmd_arg_to_keyvalue_math_group:n } + { \__cmd_arg_to_keyvalue_math_space:w } + } + #1 \q__cmd_recursion_stop + } +\cs_new_protected:Npn \__cmd_arg_to_keyvalue_math_N_type:N #1 + { + \__cmd_if_recursion_tail_stop_do:Nn #1 + { \__cmd_arg_to_keyvalue_set_default:nn } + \bool_lazy_or:nnTF + { \token_if_math_toggle_p:N #1 } + { \str_if_eq_p:nn {#1} { \) } } + { \__cmd_arg_to_keyvalue_loop:w } + { \__cmd_arg_to_keyvalue_math:w } + } +\cs_new_protected:Npn \__cmd_arg_to_keyvalue_math_group:n #1 + { \__cmd_arg_to_keyvalue_math:w } +\use:n { \cs_new_protected:Npn \__cmd_arg_to_keyvalue_math_space:w } ~ + { \__cmd_arg_to_keyvalue_math:w } +\cs_new_protected:Npn \__cmd_arg_to_keyvalue_set_default:nn #1#2 + { \tl_set:Nn \ProcessedArgument { #1 = {#2} } } +\cs_new_protected:Npn \__cmd_arg_to_keyvalue_set_keyvalue:nn #1#2 + { \tl_set:Nn \ProcessedArgument {#2} } +\cs_new:Npn \__cmd_split_N_head_apply:Nn #1#2 + { \exp:w \if_false: { \fi: \__cmd_split_N_head_apply_aux:NNw #1#2 } } +\cs_new:Npn \__cmd_split_N_head_apply_aux:NNw #1#2 + { + \exp_after:wN \exp_end: + \exp_after:wN #1 \exp_after:wN #2 \exp_after:wN { \if_false: } \fi: + } + \cs_new_protected:Npn \__cmd_get_arg_spec_error:N #1 { \bool_set_false:N \l__cmd_environment_bool @@ -4261,6 +4439,13 @@ of this package available from CTAN} This~is~only~supported~for~robust~commands,~but~not~for~expandable~ones. \c__cmd_ignore_def_tl } +\msg_new:nnnn { cmd } { keyval-in-expandable } + { Invalid~argument~prefix~'='~in~command~'#1'. } + { + The~argument~specification~for~'#1'~contains~a~key--value~marker~'={#2}'.~ + This~is~only~supported~for~robust~commands,~but~not~for~expandable~ones. + \c__cmd_ignore_def_tl + } \msg_new:nnnn { cmd } { too-many-args } { Too~many~arguments~for~#1. } { @@ -9240,44 +9425,6 @@ of this package available from CTAN} \expandafter#1\ifx\math@bgroup\bgroup{#4}\else#4\fi }% } -\ExplSyntaxOn -\cs_new_protected:Npn\freeze@math@version #1 { - \@font@info{Freeze~ math~ alphabet~ allocation~ in~ version~ - #1.\MessageBreak - Allocated~math~groups:~\int_use:c{ c@mv@ #1 }~ - (local:~ \int_use:N\c@localmathalphabets) } - \cs_gset_eq:cc { mv@#1@frozen }{ mv@#1 } - \tl_gset:cx { g__nfss_frozen_mv_ #1 _tl }{ \int_use:c { c@mv@#1 } } - \group_insert_after:N \__nfss_init_mv_freeze:N - \exp_after:wN \group_insert_after:N \cs:w mv@#1@reset \cs_end: - \tl_gput_right:No \check@mathfonts - { - \exp_after:wN \group_insert_after:N \cs:w mv@#1@reset \cs_end: - } - \cs_gset:cpn{mv@#1@reset} - { - \int_compare:nNnTF { \int_use:c{c@mv@#1} } > - { \tl_use:c{g__nfss_frozen_mv_ #1 _tl} } - { - \@font@info{Undo~ math~ alphabet~ allocation~ in~ version~ #1} - \cs_gset_eq:cc { mv@#1 }{ mv@#1@frozen } - \int_gset:cn { c@mv@#1 }{ \tl_use:c {g__nfss_frozen_mv_ #1 _tl} } - \group_begin: - \cs_set_eq:NN \getanddefine@fonts \use_none:nn - \use:c {mv@#1} - \group_end: - } - { - \@font@info{No~ math~ alphabet~ change~ to~ frozen~ version~ #1} - } - \if@ignore \ignorespaces \fi - } -} -\cs_new_protected:Npn \__nfss_init_mv_freeze:N #1 {% - \mode_if_math:T { \group_insert_after:N \__nfss_init_mv_freeze:N - \group_insert_after:N } #1 -} -\ExplSyntaxOff \EndIncludeInRelease \IncludeInRelease{2020/10/01} {\document@select@group}{\document@select@group}% @@ -9371,18 +9518,188 @@ of this package available from CTAN} }% } \EndIncludeInRelease -\IncludeInRelease{2021/11/15}% +\IncludeInRelease{2022/11/01}% + {\freeze@math@version}{freeze math version}% +\ExplSyntaxOn +\cs_new_protected:Npn\freeze@math@version #1 { + \@font@info{Freeze~ math~ alphabet~ allocation~ in~ version~ + #1.\MessageBreak + Allocated~math~groups:~\int_use:c{ c@mv@ #1 }~ + (local:~ \int_use:N\c@localmathalphabets) } + \cs_gset_eq:cc { mv@#1@frozen }{ mv@#1 } + \tl_gset:cx { g__nfss_frozen_mv_ #1 _tl }{ \int_use:c { c@mv@#1 } } + \cs_gset:cpn{mv@#1@reset} + { + \int_compare:nNnTF { \int_use:c{c@mv@#1} } > + { \tl_use:c{g__nfss_frozen_mv_ #1 _tl} } + { + \@font@info{Undo~ math~ alphabet~ allocation~ in~ version~ #1} + \cs_gset_eq:cc { mv@#1 }{ mv@#1@frozen } + \int_gset:cn { c@mv@#1 }{ \tl_use:c {g__nfss_frozen_mv_ #1 _tl} } + \group_begin: + \cs_set_eq:NN \getanddefine@fonts \use_none:nn + \use:c {mv@#1} + \group_end: + } + { + \@font@info{No~ math~ alphabet~ change~ to~ frozen~ version~ #1} + } + \if@ignore \ignorespaces \fi + } +} +\ExplSyntaxOff +\EndIncludeInRelease +\IncludeInRelease{2021/11/15} + {\freeze@math@version}{freeze math version}% + +\ExplSyntaxOn +\cs_set_protected:Npn\freeze@math@version #1 { + \@font@info{Freeze~ math~ alphabet~ allocation~ in~ version~ + #1.\MessageBreak + Allocated~math~groups:~\int_use:c{ c@mv@ #1 }~ + (local:~ \int_use:N\c@localmathalphabets) } + \cs_gset_eq:cc { mv@#1@frozen }{ mv@#1 } + \tl_gset:cx { g__nfss_frozen_mv_ #1 _tl }{ \int_use:c { c@mv@#1 } } + \group_insert_after:N \__nfss_init_mv_freeze:N + \exp_after:wN \group_insert_after:N \cs:w mv@#1@reset \cs_end: + \tl_gput_right:No \check@mathfonts + { + \exp_after:wN \group_insert_after:N \cs:w mv@#1@reset \cs_end: + } + \cs_gset:cpn{mv@#1@reset} + { + \int_compare:nNnTF { \int_use:c{c@mv@#1} } > + { \tl_use:c{g__nfss_frozen_mv_ #1 _tl} } + { + \@font@info{Undo~ math~ alphabet~ allocation~ in~ version~ #1} + \cs_gset_eq:cc { mv@#1 }{ mv@#1@frozen } + \int_gset:cn { c@mv@#1 }{ \tl_use:c {g__nfss_frozen_mv_ #1 _tl} } + \group_begin: + \cs_set_eq:NN \getanddefine@fonts \use_none:nn + \use:c {mv@#1} + \group_end: + } + { + \@font@info{No~ math~ alphabet~ change~ to~ frozen~ version~ #1} + } + \if@ignore \ignorespaces \fi + } +} +\cs_set_protected:Npn \__nfss_init_mv_freeze:N #1 {% + \mode_if_math:T { \group_insert_after:N \__nfss_init_mv_freeze:N + \group_insert_after:N } #1 +} +\ExplSyntaxOff + +\EndIncludeInRelease +\IncludeInRelease{2022/11/01}% {\DeclareMathVersion}{local alphabets}% \def\DeclareMathVersion#1{% \@namedef{g__nfss_frozen_mv_#1_tl}{}% + \expandafter\ifx\csname mv@#1\endcsname \relax + \expandafter \g@addto@macro \expandafter \check@mathfonts + \expandafter {\expandafter \aftergroup \csname mv@#1@reset\endcsname}% + \@namedef{mv@#1@reset}{}% + \fi \expandafter\new@mathversion\csname mv@#1\endcsname} \@onlypreamble\DeclareMathVersion \EndIncludeInRelease +\IncludeInRelease{2021/11/15}% + {\DeclareMathVersion}{local alphabets}% +\def\DeclareMathVersion#1{% + \@namedef{g__nfss_frozen_mv_#1_tl}{}% + \expandafter\new@mathversion\csname mv@#1\endcsname} +\EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\DeclareMathVersion}{local alphabets}% \def\DeclareMathVersion#1{% \expandafter\new@mathversion\csname mv@#1\endcsname} \EndIncludeInRelease +\IncludeInRelease{2022/11/01}% + {\DeclareSymbolFont}{maybe drop m}% +\def\DeclareSymbolFont #1#2#3#4#5{% + \def\reserved@a{\DeclareSymbolFont@m@dropped{#1}{#2}{#3}}% + \edef\reserved@b{#4}% + \series@maybe@drop@one@m\reserved@b\reserved@b + \expandafter\reserved@a\expandafter{\reserved@b}{#5}% +} +\def\DeclareSymbolFont@m@dropped #1#2#3#4#5{% + \@tempswafalse + \edef\reserved@b{#2}% + \def\cdp@elt##1##2##3##4{\def\reserved@c{##1}% + \ifx\reserved@b\reserved@c \@tempswatrue\fi}% + \cdp@list + \if@tempswa + \@ifundefined{sym#1}{% + \ifnum\count18<15 % + \expandafter\new@mathgroup\csname sym#1\endcsname + \expandafter\new@symbolfont\csname sym#1\endcsname + {#2}{#3}{#4}{#5}% + \else + \@latex@error{Too many symbol fonts declared}\@eha + \fi + }% + {% + \@font@info{Redeclaring symbol font `#1'}% + \def\group@elt##1##2{% + \noexpand\group@elt\noexpand##1% + \expandafter\ifx\csname sym#1\endcsname##1% + \expandafter\noexpand\csname#2/#3/#4/#5\endcsname + \else + \noexpand##2% + \fi}% + \xdef\group@list{\group@list}% + \def\version@elt##1{% + \expandafter + \SetSymbolFont@\expandafter##1\csname#2/#3/#4/#5\expandafter + \endcsname \csname sym#1\endcsname + }% + \version@list + }% + \else + \@latex@error{Encoding scheme `#2' unknown}\@eha + \fi + } +\@onlypreamble\DeclareSymbolFont +\EndIncludeInRelease +\IncludeInRelease{0000/00/00}% + {\DeclareSymbolFont}{maybe drop m}% + +\let\DeclareSymbolFont\DeclareSymbolFont@m@dropped +\let\DeclareSymbolFont@m@dropped\@undefined + +\EndIncludeInRelease +\IncludeInRelease{2022/11/01}% + {\SetSymbolFont}{maybe drop m}% +\def\SetSymbolFont #1#2#3#4#5#6{% + \def\reserved@a{\SetSymbolFont@m@dropped{#1}{#2}{#3}{#4}}% + \edef\reserved@b{#5}% + \series@maybe@drop@one@m\reserved@b\reserved@b + \expandafter\reserved@a\expandafter{\reserved@b}{#6}% +} +\def\SetSymbolFont@m@dropped#1#2#3#4#5#6{% + \@tempswafalse + \edef\reserved@b{#3}% + \def\cdp@elt##1##2##3##4{\def\reserved@c{##1}% + \ifx\reserved@b\reserved@c \@tempswatrue\fi}% + \cdp@list + \if@tempswa + \expandafter\SetSymbolFont@ + \csname mv@#2\expandafter\endcsname\csname#3/#4/#5/#6\expandafter + \endcsname \csname sym#1\endcsname + \else + \@latex@error{Encoding scheme `#3' unknown}\@eha + \fi +} +\@onlypreamble\SetSymbolFont +\EndIncludeInRelease +\IncludeInRelease{0000/00/00}% + {\SetSymbolFont}{maybe drop m}% + +\let\SetSymbolFont\SetSymbolFont@m@dropped +\let\SetSymbolFont@m@dropped\@undefined + +\EndIncludeInRelease \IncludeInRelease{2019/10/01}% {DeclareMathAccent}{Make math accents robust}% \def\DeclareMathAccent#1#2#3#4{% @@ -10247,7 +10564,7 @@ of this package available from CTAN} \@ifundefined{#1:#2}% {\@font@info{Setting #2 sub-encoding to #1/#3}}% {\@font@info{Changing #2 sub-encoding to #1/#3}}% - \@namedef{#1:#2}{#3}} + \global\@namedef{#1:#2}{#3}} \@onlypreamble\DeclareEncodingSubset \@onlypreamble\DeclareEncodingSubset@aux \@onlypreamble\@DeclareEncodingSubset @@ -11566,6 +11883,17 @@ of this package available from CTAN} \ifv@ \ht\tw@\ht\z@ \dp\tw@\dp\z@\fi \ifh@ \wd\tw@\wd\z@\fi \box\tw@} \EndIncludeInRelease +\IncludeInRelease{2022/11/01}% + {\mathsm@sh}{Guard against reboxing}% +\def\mathsm@sh#1#2{% + \setbox\z@\hbox{$\m@th#1{#2}$}% + {}\finsm@sh} +\EndIncludeInRelease +\IncludeInRelease{0000/00/00}% + {\mathsm@sh}{Guard against reboxing}% +\def\mathsm@sh#1#2{% + \setbox\z@\hbox{$\m@th#1{#2}$}\finsm@sh} +\EndIncludeInRelease \IncludeInRelease{2018/12/01}% {\finsm@sh}{Start LR-mode}% \def\finsm@sh{\ht\z@\z@ \dp\z@\z@ \leavevmode@ifvmode\box\z@} @@ -14534,8 +14862,8 @@ of this package available from CTAN} \endgroup% \EndIncludeInRelease %%% From File: ltfilehook.dtx -\providecommand\ltfilehookversion{v1.0m} -\providecommand\ltfilehookdate{2022/04/01} +\providecommand\ltfilehookversion{v1.0n} +\providecommand\ltfilehookdate{2022/08/18} \IncludeInRelease{2020/10/01}% {\CurrentFile}{Hook management file}% \ExplSyntaxOn @@ -14970,8 +15298,12 @@ of this package available from CTAN} \def\disable@package@load#1#2{% \global\@namedef{@pkg-disable@#1.\@pkgextension}{#2}} \def\@disable@packageload@do#1#2{% - \@ifundefined{@pkg-disable@#1}{#2}% - {\@nameuse{@pkg-disable@#1}}} + \@ifundefined{@pkg-disable@#1}% + {#2}% + {\@nameuse{@pkg-disable@#1}% + \@latex@info{Package '#1' has been disabled.% + \MessageBreak Load request ignored}% + \expandafter\@gobbletwo}} \def\reenable@package@load#1{% \global\expandafter\let \csname @pkg-disable@#1.\@pkgextension \endcsname \@undefined} @@ -15020,8 +15352,7 @@ of this package available from CTAN} %% %%% From File: ltshipout.dtx \providecommand\ltshipoutversion{v1.0m} -\providecommand\ltshipoutdate{2022/05/08} - % \cs{AtBeginDvi} is the existing \LaTeXe{} interface to fill the +\providecommand\ltshipoutdate{2022/08/26} \IncludeInRelease{2020/10/01}% {\shipout}{Hook management (shipout)}% \ExplSyntaxOn diff --git a/Master/texmf-dist/tex/latex-dev/base/ltluatex.lua b/Master/texmf-dist/tex/latex-dev/base/ltluatex.lua index 40c36482252..b59cc1484bd 100644 --- a/Master/texmf-dist/tex/latex-dev/base/ltluatex.lua +++ b/Master/texmf-dist/tex/latex-dev/base/ltluatex.lua @@ -296,9 +296,6 @@ local callbacktypes = callbacktypes or { ligaturing = simple, kerning = simple, insert_local_par = simple, - pre_mlist_to_hlist_filter = list, - mlist_to_hlist = exclusive, - post_mlist_to_hlist_filter = reverselist, new_graf = exclusive, pre_dump = simple, start_run = simple, @@ -329,6 +326,15 @@ local callbacktypes = callbacktypes or { provide_charproc_data = exclusive, } luatexbase.callbacktypes=callbacktypes +local shared_callbacks = { + mlist_to_hlist = { + callback = "mlist_to_hlist", + count = 0, + handler = nil, + }, +} +shared_callbacks.pre_mlist_to_hlist_filter = shared_callbacks.mlist_to_hlist +shared_callbacks.post_mlist_to_hlist_filter = shared_callbacks.mlist_to_hlist local callback_register = callback_register or callback.register function callback.register() luatexbase_error("Attempt to use callback.register() directly\n") @@ -415,11 +421,7 @@ local defaults = { [reverselist] = list_handler_default, [simple] = simple_handler_default, } -local user_callbacks_defaults = { - pre_mlist_to_hlist_filter = list_handler_default, - mlist_to_hlist = node.mlist_to_hlist, - post_mlist_to_hlist_filter = list_handler_default, -} +local user_callbacks_defaults = {} local function create_callback(name, ctype, default) local ctype_id = types[ctype] if not name or name == "" @@ -483,7 +485,13 @@ local function add_to_callback(name, func, description) if l == nil then l = { } callbacklist[name] = l - if user_callbacks_defaults[name] == nil then + local shared = shared_callbacks[name] + if shared then + shared.count = shared.count + 1 + if shared.count == 1 then + callback_register(shared.callback, shared.handler) + end + elseif user_callbacks_defaults[name] == nil then callback_register(name, handlers[callbacktypes[name]](name)) end end @@ -544,7 +552,13 @@ local function remove_from_callback(name, description) ) if #l == 0 then callbacklist[name] = nil - if user_callbacks_defaults[name] == nil then + local shared = shared_callbacks[name] + if shared then + shared.count = shared.count - 1 + if shared.count == 0 then + callback_register(shared.callback, nil) + end + elseif user_callbacks_defaults[name] == nil then callback_register(name, nil) end end @@ -600,7 +614,10 @@ local function uninstall() luatexbase = nil end luatexbase.uninstall = uninstall -callback_register("mlist_to_hlist", function(head, display_type, need_penalties) +create_callback('pre_mlist_to_hlist_filter', 'list') +create_callback('mlist_to_hlist', 'exclusive', node.mlist_to_hlist) +create_callback('post_mlist_to_hlist_filter', 'list') +function shared_callbacks.mlist_to_hlist.handler(head, display_type, need_penalties) local current = call_callback("pre_mlist_to_hlist_filter", head, display_type, need_penalties) if current == false then flush_list(head) @@ -613,4 +630,4 @@ callback_register("mlist_to_hlist", function(head, display_type, need_penalties) return nil end return post -end) +end diff --git a/Master/texmf-dist/tex/latex-dev/base/ltluatex.tex b/Master/texmf-dist/tex/latex-dev/base/ltluatex.tex index 3a5b526eed8..f676d94a416 100644 --- a/Master/texmf-dist/tex/latex-dev/base/ltluatex.tex +++ b/Master/texmf-dist/tex/latex-dev/base/ltluatex.tex @@ -47,7 +47,7 @@ #1#2[#3]{\endgroup\immediate\write-1{File: #1 #3}} \fi \ProvidesFile{ltluatex.tex}% -[2021/12/27 v1.1x +[2022/08/13 v1.1y LuaTeX support for plain TeX (core) ] \edef\etatcatcode{\the\catcode`\@} diff --git a/Master/texmf-dist/tex/latex-dev/base/structuredlog.sty b/Master/texmf-dist/tex/latex-dev/base/structuredlog.sty index f1de46f35a7..3821aefdeb2 100644 --- a/Master/texmf-dist/tex/latex-dev/base/structuredlog.sty +++ b/Master/texmf-dist/tex/latex-dev/base/structuredlog.sty @@ -42,8 +42,8 @@ %% and covered by LPPL is defined by the unpacking scripts (with %% extension .ins) which are part of the distribution. %%% From File: ltfilehook.dtx -\providecommand\ltfilehookversion{v1.0m} -\providecommand\ltfilehookdate{2022/04/01} +\providecommand\ltfilehookversion{v1.0n} +\providecommand\ltfilehookdate{2022/08/18} \ProvidesExplPackage {structuredlog}{\ltfilehookdate}{\ltfilehookversion} {Structuring the TeX transcript file} diff --git a/Master/texmf-dist/tex/latex-dev/tools/array.sty b/Master/texmf-dist/tex/latex-dev/tools/array.sty index 6d72accba91..e3c173cffcb 100644 --- a/Master/texmf-dist/tex/latex-dev/tools/array.sty +++ b/Master/texmf-dist/tex/latex-dev/tools/array.sty @@ -46,7 +46,7 @@ \DeclareCurrentRelease{}{2020-10-01} \ProvidesPackage{array} - [2022/03/10 v2.5f Tabular extension package (FMi)] + [2022/09/04 v2.5g Tabular extension package (FMi)] %% \def\@addtopreamble#1{\xdef\@preamble{\@preamble #1}} @@ -126,7 +126,7 @@ \newbox\ar@mcellbox \def\ar@align@mcell{% - \ifdim \ht\ar@mcellbox > \ht\@arstrutbox + \ifdim \ht\ar@mcellbox > \ht\strutbox \begingroup \dimen@\ht\ar@mcellbox \advance\dimen@-\ht\@arstrutbox diff --git a/Master/texmf-dist/tex/latex-dev/tools/verbatim.sty b/Master/texmf-dist/tex/latex-dev/tools/verbatim.sty index 57883e192ae..48d13747019 100644 --- a/Master/texmf-dist/tex/latex-dev/tools/verbatim.sty +++ b/Master/texmf-dist/tex/latex-dev/tools/verbatim.sty @@ -39,7 +39,7 @@ %% Copyright (C) 1989--2003 by Rainer Sch\"opf. All rights reserved. \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{verbatim} - [2020-07-07 v1.5u LaTeX2e package for verbatim enhancements] + [2022-07-02 v1.5u LaTeX2e package for verbatim enhancements] \@ifundefined{verbatim@@@}{}{\endinput} \newtoks\every@verbatim \every@verbatim={} |