summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex-dev/base/latexrelease.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex-dev/base/latexrelease.sty')
-rw-r--r--Master/texmf-dist/tex/latex-dev/base/latexrelease.sty3171
1 files changed, 2937 insertions, 234 deletions
diff --git a/Master/texmf-dist/tex/latex-dev/base/latexrelease.sty b/Master/texmf-dist/tex/latex-dev/base/latexrelease.sty
index af3b8833b6c..529e3cd6df3 100644
--- a/Master/texmf-dist/tex/latex-dev/base/latexrelease.sty
+++ b/Master/texmf-dist/tex/latex-dev/base/latexrelease.sty
@@ -12,6 +12,7 @@
%% ltluatex.dtx (with options: `latexrelease')
%% ltexpl.dtx (with options: `latexrelease')
%% ltdefns.dtx (with options: `latexrelease')
+%% ltcmd.dtx (with options: `latexrelease')
%% lthooks.dtx (with options: `latexrelease')
%% ltalloc.dtx (with options: `latexrelease')
%% ltcntrl.dtx (with options: `latexrelease')
@@ -60,7 +61,7 @@
%%
%%
%% Copyright (C) 1993-2021
-%% The LaTeX3 Project and any individual authors listed elsewhere
+%% The LaTeX Project and any individual authors listed elsewhere
%% in this file.
%%
%% This file was generated from file(s) of the LaTeX base system.
@@ -329,9 +330,11 @@
\PackageError{latexrelease}{skipped IncludeInRelease for tag \string#2}{}%
\fi}
\ProvidesPackage{latexrelease}
- [2020/12/06 v1.0k LaTeX release emulation and tests
+ [2021/01/23 v1.0l LaTeX release emulation and tests
(including releases up to \latexreleaseversion)]
\NeedsTeXFormat{LaTeX2e}[1996/06/01]
+\edef\sourceLaTeXdate{%
+ \expandafter\@parse@version\fmtversion//00\@nil}
\DeclareOption*{%
\def\@IncludeInRelease#1[#2]{\@IncludeInRele@se{#1}}%
\let\requestedpatchdate\CurrentOption}
@@ -991,10 +994,11 @@ of this package available from CTAN}
\EndIncludeInRelease
\IncludeInRelease{2020/10/01}%
{\@expl@sys@load@backend@@}{Roll forward support}%
-\def\@expl@sys@load@backend@@{}
-\def\@expl@push@filename@@{}
-\def\@expl@push@filename@aux@@{}
-\def\@expl@pop@filename@@{}
+\def\reserved@a#1{\ifdefined#1\else\def#1{}\fi}
+\reserved@a\@expl@sys@load@backend@@
+\reserved@a\@expl@push@filename@@
+\reserved@a\@expl@push@filename@aux@@
+\reserved@a\@expl@pop@filename@@
\EndIncludeInRelease
\IncludeInRelease{2020/10/01}%
{expl3}{Pre-load expl3}%
@@ -1034,17 +1038,9 @@ of this package available from CTAN}
--- I'm giving up!\MessageBreak\MessageBreak
Note that manually loading the expl3 package\MessageBreak
from your distribution is not enough}%
- \@@end % die
- }%
- {%
- \input expl3.ltx
- \ifdefined\NewDocumentCommand
- \else
- \IfFileExists{xparse.ltx}
- {\input xparse.ltx }
- {}%
- \fi
+ \batchmode \read -1 to \reserved@a
}%
+ {\input expl3.ltx }%
}
\EndIncludeInRelease
@@ -1068,14 +1064,6 @@ of this package available from CTAN}
}%
\input{expl3.ltx}
\EndIncludeInRelease
-\IncludeInRelease{2020/10/01}%
- {\NewDocumentCommand}{Emergency loading xparse}%
-
-\ifdefined\NewDocumentCommand \else
- \RequirePackage{xparse}
-\fi
-
-\EndIncludeInRelease
\IncludeInRelease{2020/10/01}{\@expl@cs@to@str@@N}%
{expl3 macros added for the 2020-10-01 release}%
\ExplSyntaxOn
@@ -1576,12 +1564,2294 @@ of this package available from CTAN}
\kernel@make@fragile\underbar
\EndIncludeInRelease
-%%
-%% File: lthooks.dtx (C) Copyright 2020,2021 Frank Mittelbach,
-%% Phelype Oleinik & LaTeX Team
+%%% From File: ltcmd.dtx
+\def\ltcmdversion{v1.0a}
+\def\ltcmddate{2021/01/21}
+\edef\@latexrelease@catcode@null{\the\catcode`\^^@ }
+\catcode`\^^@=12
+\IncludeInRelease{2021/05/01}%
+ {\NewDocumentCommand}{Document commands}%
+\ExplSyntaxOn
+\tl_new:N \l__cmd_arg_spec_tl
+\tl_new:N \l__cmd_args_tl
+\tl_new:N \l__cmd_args_i_tl
+\tl_new:N \l__cmd_args_ii_tl
+\int_new:N \l__cmd_current_arg_int
+\bool_new:N \l__cmd_defaults_bool
+\tl_new:N \l__cmd_defaults_tl
+\bool_new:N \l__cmd_environment_bool
+\str_new:N \l__cmd_environment_str
+\bool_new:N \l__cmd_expandable_bool
+\tl_new:N \l__cmd_expandable_aux_name_tl
+\tl_set:Nn \l__cmd_expandable_aux_name_tl
+ {
+ \l__cmd_function_tl \c_space_tl
+ ( arg~ \int_use:N \l__cmd_current_arg_int )
+ }
+\int_new:N \g__cmd_grabber_int
+\tl_new:N \l__cmd_fn_tl
+\tl_new:N \l__cmd_fn_code_tl
+\tl_new:N \l__cmd_function_tl
+\bool_new:N \l__cmd_grab_expandably_bool
+\bool_new:N \l__cmd_obey_spaces_bool
+\tl_new:N \l__cmd_last_delimiters_tl
+\bool_new:N \l__cmd_long_bool
+\int_new:N \l__cmd_m_args_int
+\bool_new:N \l__cmd_prefixed_bool
+\tl_new:N \l__cmd_process_all_tl
+\tl_new:N \l__cmd_process_one_tl
+\bool_new:N \l__cmd_process_some_bool
+\tl_new:N \l__cmd_saved_args_tl
+\tl_new:N \l__cmd_signature_tl
+\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
+\prop_new:N \l__cmd_tmp_prop
+\tl_new:N \l__cmd_tmpa_tl
+\tl_new:N \l__cmd_tmpb_tl
+\cs_new_eq:NN \__cmd_tmp:w ?
+\msg_redirect_module:nnn { LaTeX / ltcmd } { info } { none }
+\cs_new_protected:Npn \__cmd_declare_cmd:Nnn
+ {
+ \bool_set_false:N \l__cmd_expandable_bool
+ \__cmd_declare_cmd_aux:Nnn
+ }
+\cs_new_protected:Npn \__cmd_declare_expandable_cmd:Nnn
+ {
+ \bool_set_true:N \l__cmd_expandable_bool
+ \__cmd_declare_cmd_aux:Nnn
+ }
+\cs_new_protected:Npn \__cmd_declare_cmd_aux:Nnn #1#2#3
+ {
+ \cs_if_exist:NTF #1
+ {
+ \__kernel_msg_info:nnxx { ltcmd } { redefine-command }
+ { \token_to_str:N #1 } { \tl_to_str:n {#2} }
+ }
+ {
+ \bool_lazy_or:nnT
+ { \cs_if_exist_p:c { \cs_to_str:N #1 ~ code } }
+ { \cs_if_exist_p:c { \cs_to_str:N #1 ~ defaults } }
+ {
+ \__kernel_msg_warning:nnx { ltcmd } { unsupported-let }
+ { \token_to_str:N #1 }
+ }
+ \__kernel_msg_info:nnxx { ltcmd } { define-command }
+ { \token_to_str:N #1 } { \tl_to_str:n {#2} }
+ }
+ \bool_set_false:N \l__cmd_environment_bool
+ \__cmd_declare_cmd_internal:Nnnn #1 {#2} {#3} { }
+ }
+\cs_new_protected:Npn \__cmd_declare_cmd_internal:Nnnn #1#2#3#4
+ {
+ \tl_set:Nx \l__cmd_function_tl { \cs_to_str:N #1 }
+ \tl_set:Nx \l__cmd_fn_tl
+ { \exp_not:c { \l__cmd_function_tl \c_space_tl } }
+ \__cmd_normalize_arg_spec:n {#2}
+ \exp_args:No \__cmd_prepare_signature:n \l__cmd_arg_spec_tl
+ \__cmd_declare_cmd_code:Nnn #1 {#2} {#3}
+ #4
+ \__cmd_break_point:n {#2}
+ }
+\cs_generate_variant:Nn \__cmd_declare_cmd_internal:Nnnn { cnx }
+\cs_new_eq:NN \__cmd_break_point:n \use_none:n
+\cs_new_protected:Npn \__cmd_declare_cmd_code:Nnn
+ {
+ \bool_if:NTF \l__cmd_grab_expandably_bool
+ { \__cmd_declare_cmd_code_expandable:Nnn }
+ { \__cmd_declare_cmd_code_aux:Nnn }
+ }
+\cs_new_protected:Npn \__cmd_declare_cmd_code_aux:Nnn #1#2#3
+ {
+ \cs_generate_from_arg_count:cNnn
+ { \l__cmd_function_tl \c_space_tl code }
+ \cs_set_protected:Npn \l__cmd_current_arg_int {#3}
+ \cs_set_protected_nopar:Npx #1
+ {
+ \bool_if:NTF \l__cmd_environment_bool
+ {
+ \__cmd_start_env:nnnnn { \exp_not:n {#2} }
+ { \l__cmd_environment_str }
+ }
+ {
+ \__cmd_start:nNNnnn { \exp_not:n {#2} }
+ \exp_not:c { \l__cmd_function_tl \c_space_tl }
+ \exp_not:c { \l__cmd_function_tl \c_space_tl code }
+ }
+ { \exp_not:o \l__cmd_signature_tl }
+ {
+ \bool_if:NT \l__cmd_defaults_bool
+ { \exp_not:o \l__cmd_defaults_tl }
+ }
+ {
+ \bool_if:NT \l__cmd_process_some_bool
+ { \exp_not:o \l__cmd_process_all_tl }
+ }
+ }
+ }
+\cs_new_protected:Npn \__cmd_declare_cmd_code_expandable:Nnn #1#2#3
+ {
+ \exp_args:Ncc \cs_generate_from_arg_count:NNnn
+ { \l__cmd_function_tl \c_space_tl code }
+ { cs_set \bool_if:NF \l__cmd_expandable_bool { _protected } :Npn }
+ \l__cmd_current_arg_int {#3}
+ \bool_if:NT \l__cmd_defaults_bool
+ {
+ \use:x
+ {
+ \cs_generate_from_arg_count:cNnn
+ { \l__cmd_function_tl \c_space_tl defaults }
+ \cs_set:Npn \l__cmd_current_arg_int
+ { \exp_not:o \l__cmd_defaults_tl }
+ }
+ }
+ \bool_if:NTF \l__cmd_expandable_bool
+ { \cs_set_nopar:Npx } { \cs_set_protected_nopar:Npx } #1
+ {
+ \exp_not:N \__cmd_start_expandable:nNNNNn
+ { \exp_not:n {#2} }
+ \exp_not:c { \l__cmd_function_tl \c_space_tl }
+ \exp_not:c
+ {
+ \l__cmd_function_tl \c_space_tl
+ \bool_if:NT \l__cmd_some_short_bool
+ { \bool_if:NT \l__cmd_some_long_bool { \c_space_tl } }
+ }
+ \exp_not:c { \l__cmd_function_tl \c_space_tl code }
+ \bool_if:NTF \l__cmd_defaults_bool
+ { \exp_not:c { \l__cmd_function_tl \c_space_tl defaults } }
+ { ? }
+ { \exp_not:o \l__cmd_signature_tl }
+ }
+ \bool_if:NTF \l__cmd_some_long_bool
+ {
+ \bool_if:NT \l__cmd_some_short_bool
+ {
+ \cs_set_nopar:cpx { \l__cmd_function_tl \c_space_tl \c_space_tl }
+ ##1##2 { ##1 {##2} }
+ }
+ \cs_set:cpx
+ }
+ { \cs_set_nopar:cpx }
+ { \l__cmd_function_tl \c_space_tl } ##1##2 { ##1 {##2} }
+ }
+\cs_new_protected:Npn \__cmd_declare_env:nnnn #1#2
+ {
+ \str_set:Nx \l__cmd_environment_str {#1}
+ \str_set:Nx \l__cmd_environment_str
+ { \tl_trim_spaces:o { \l__cmd_environment_str } }
+ \cs_if_exist:cTF { \l__cmd_environment_str }
+ {
+ \__kernel_msg_info:nnxx { ltcmd } { redefine-environment }
+ { \l__cmd_environment_str } { \tl_to_str:n {#2} }
+ }
+ {
+ \__kernel_msg_info:nnxx { ltcmd } { define-environment }
+ { \l__cmd_environment_str } { \tl_to_str:n {#2} }
+ }
+ \bool_set_false:N \l__cmd_expandable_bool
+ \bool_set_true:N \l__cmd_environment_bool
+ \exp_args:NV \__cmd_declare_env_internal:nnnn
+ \l__cmd_environment_str {#2}
+ }
+\cs_new_protected:Npn \__cmd_declare_env_internal:nnnn #1#2#3#4
+ {
+ \__cmd_declare_cmd_internal:cnxn { environment~ #1 } {#2}
+ {
+ \cs_set_nopar:Npx \exp_not:c { environment~ #1 ~end~aux }
+ {
+ \exp_not:N \exp_not:N \exp_not:c { environment~ #1~end~aux~ }
+ \exp_not:n { \exp_not:o \l__cmd_args_tl }
+ }
+ \exp_not:n {#3}
+ }
+ {
+ \cs_set_nopar:cpx { environment~ #1 ~end }
+ { \exp_not:c { environment~ #1 ~end~aux } }
+ \cs_generate_from_arg_count:cNnn
+ { environment~ #1 ~end~aux~ } \cs_set:Npn
+ \l__cmd_current_arg_int {#4}
+ \cs_set_eq:cc {#1} { environment~ #1 }
+ \cs_set_eq:cc { end #1 } { environment~ #1 ~end }
+ }
+ }
+\cs_new_protected:Npn \__cmd_start_env:nnnnn #1#2
+ {
+ \conditionally@traceoff
+ \group_align_safe_begin:
+ \str_set:Nn \l__cmd_environment_str {#2}
+ \bool_set_true:N \l__cmd_environment_bool
+ \__cmd_start_aux:ccnnnn
+ { environment~ \l__cmd_environment_str \c_space_tl }
+ { environment~ \l__cmd_environment_str \c_space_tl code }
+ {#1}
+ }
+\cs_new_protected:Npx \__cmd_start:nNNnnn #1#2#3
+ {
+ \exp_not:c { xparse~function~is~not~expandable }
+ \exp_not:N \conditionally@traceoff
+ \exp_not:N \group_align_safe_begin:
+ \exp_not:n { \bool_set_false:N \l__cmd_environment_bool }
+ \exp_not:N \__cmd_start_aux:NNnnnn
+ #2 #3 {#1}
+ }
+\cs_new_protected:Npn \__cmd_start_aux:NNnnnn #1#2#3#4#5#6
+ {
+ \tl_clear:N \l__cmd_args_tl
+ \tl_set:Nn \l__cmd_fn_tl {#1}
+ \tl_set:Nn \l__cmd_fn_code_tl {#2}
+ \tl_set:Nn \l__cmd_defaults_tl {#5}
+ \tl_set:Nn \l__cmd_process_all_tl {#6}
+ #4 \__cmd_run_code:
+ }
+\cs_generate_variant:Nn \__cmd_start_aux:NNnnnn { cc }
+\cs_new_protected:Npn \__cmd_run_code:
+ {
+ \tl_if_empty:NF \l__cmd_defaults_tl { \__cmd_defaults: }
+ \tl_if_empty:NF \l__cmd_process_all_tl { \__cmd_args_process: }
+ \group_align_safe_end:
+ \conditionally@traceon
+ \exp_after:wN \l__cmd_fn_code_tl \l__cmd_args_tl
+ }
+\cs_new_protected:Npn \__cmd_defaults:
+ {
+ \__cmd_defaults_def:
+ \tl_set_eq:NN \l__cmd_args_i_tl \l__cmd_args_tl
+ \__cmd_defaults_aux: \__cmd_defaults_aux: \__cmd_defaults_aux:
+ \__cmd_defaults_aux: \__cmd_defaults_aux: \__cmd_defaults_aux:
+ \__cmd_defaults_aux: \__cmd_defaults_aux: \__cmd_defaults_aux:
+ \__cmd_defaults_error:w
+ \q_recursion_stop
+ \tl_set_eq:NN \l__cmd_args_tl \l__cmd_args_i_tl
+ }
+\cs_new_protected:Npn \__cmd_defaults_aux:
+ {
+ \tl_set:Nx \l__cmd_args_ii_tl
+ { \exp_after:wN \__cmd_tmp:w \l__cmd_args_i_tl }
+ \tl_if_eq:NNT \l__cmd_args_ii_tl \l__cmd_args_i_tl
+ { \use_none_delimit_by_q_recursion_stop:w }
+ \tl_set_eq:NN \l__cmd_args_i_tl \l__cmd_args_ii_tl
+ }
+\cs_new_protected:Npn \__cmd_defaults_error:w \q_recursion_stop
+ {
+ \__kernel_msg_error:nnx { ltcmd } { loop-in-defaults }
+ { \__cmd_environment_or_command: }
+ }
+\cs_new_protected:Npn \__cmd_defaults_def:
+ {
+ \tl_clear:N \l__cmd_tmpa_tl
+ \int_zero:N \l__cmd_current_arg_int
+ \__cmd_tl_mapthread_function:NNN \l__cmd_args_tl \l__cmd_defaults_tl
+ \__cmd_defaults_def:nn
+ \cs_generate_from_arg_count:NNVo \__cmd_tmp:w \cs_set:Npn
+ \l__cmd_current_arg_int \l__cmd_tmpa_tl
+ }
+\cs_generate_variant:Nn \cs_generate_from_arg_count:NNnn { NNVo }
+\cs_new_protected:Npn \__cmd_defaults_def:nn
+ {
+ \int_incr:N \l__cmd_current_arg_int
+ \exp_args:NV \__cmd_defaults_def:nnn \l__cmd_current_arg_int
+ }
+\cs_new_protected:Npn \__cmd_defaults_def:nnn #1#2#3
+ {
+ \tl_put_right:Nx \l__cmd_tmpa_tl
+ {
+ {
+ \exp_not:N \exp_not:n
+ {
+ \tl_if_novalue:nTF {#2}
+ { \exp_not:o {#3} }
+ { \exp_not:n { ## #1 } }
+ }
+ }
+ }
+ }
+\cs_new_protected:Npn \__cmd_args_process:
+ {
+ \tl_clear:N \l__cmd_args_ii_tl
+ \__cmd_tl_mapthread_function:NNN
+ \l__cmd_args_tl
+ \l__cmd_process_all_tl
+ \__cmd_args_process_loop:nn
+ \tl_set_eq:NN \l__cmd_args_tl \l__cmd_args_ii_tl
+ }
+\cs_new_protected:Npn \__cmd_args_process_loop:nn #1#2
+ {
+ \tl_set:Nn \ProcessedArgument {#1}
+ \tl_if_novalue:nF {#1}
+ { \tl_map_function:nN {#2} \__cmd_args_process_aux:n }
+ \tl_put_right:No \l__cmd_args_ii_tl
+ { \exp_after:wN { \ProcessedArgument } }
+ }
+\cs_new_protected:Npn \__cmd_args_process_aux:n #1
+ {
+ \cs_generate_from_arg_count:NNnn \__cmd_tmp:w \cs_set:Npn
+ { \tl_count:N \l__cmd_args_tl } {#1}
+ \exp_args:NNNo \exp_after:wN \__cmd_tmp:w \l__cmd_args_tl
+ { \ProcessedArgument }
+ }
+\cs_new:Npn \__cmd_start_expandable:nNNNNn #1#2#3#4#5#6
+ {
+ \group_align_safe_begin:
+ #6 \__cmd_end_expandable:NNw #5 #4 \q__cmd #2#3
+ }
+\cs_new:Npn \__cmd_end_expandable:NNw #1#2
+ { \__cmd_end_expandable_aux:w #1#2 \prg_do_nothing: }
+\cs_new:Npn \__cmd_end_expandable_aux:w #1#2#3 \q__cmd
+ { \exp_args:No \__cmd_end_expandable_aux:nNNNN {#3} #1 #2 }
+\cs_new:Npn \__cmd_end_expandable_aux:nNNNN #1#2#3#4#5
+ {
+ \token_if_eq_charcode:NNT ? #2 { \exp_after:wN \use_iv:nnnn }
+ \__cmd_end_expandable_defaults:nnnNNn {#1} { } {#1} #2#3
+ { } { } { } { } { } { } { } { } { } { }
+ {
+ \__kernel_msg_expandable_error:nnf
+ { ltcmd } { loop-in-defaults }
+ { \exp_args:Nf \tl_trim_spaces:n { \token_to_str:N #4 } }
+ \use_iv:nnnn
+ }
+ \q_stop
+ }
+\cs_new:Npn \__cmd_end_expandable_defaults:nnnNNn #1#2#3#4#5#6
+ {
+ #6
+ \str_if_eq:nnTF {#1} {#2}
+ { \use_i_delimit_by_q_stop:nw { \group_align_safe_end: #5 #1 } }
+ {
+ \exp_args:No \__cmd_tl_mapthread_function:nnN
+ { #4 #1 } {#3}
+ \__cmd_end_expandable_defaults:nnw
+ \__cmd_end_expandable_defaults:nnnNNn { } {#1} {#3} #4 #5
+ }
+ }
+\cs_new:Npn \__cmd_end_expandable_defaults:nnw #1#2
+ {
+ \tl_if_novalue:nTF {#2}
+ { \exp_args:No \__cmd_end_expandable_defaults:nw {#1} }
+ { \__cmd_end_expandable_defaults:nw {#2} }
+ }
+\cs_new:Npn \__cmd_end_expandable_defaults:nw
+ #1#2 \__cmd_end_expandable_defaults:nnnNNn #3
+ { #2 \__cmd_end_expandable_defaults:nnnNNn { #3 {#1} } }
+\cs_new_protected:Npn \__cmd_normalize_arg_spec:n #1
+ {
+ \int_zero:N \l__cmd_current_arg_int
+ \tl_clear:N \l__cmd_last_delimiters_tl
+ \tl_clear:N \l__cmd_arg_spec_tl
+ \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_some_obey_spaces_bool
+ \bool_set_false:N \l__cmd_some_long_bool
+ \bool_set_false:N \l__cmd_some_short_bool
+ \__cmd_normalize_arg_spec_loop:n #1
+ \q_recursion_tail \q_recursion_tail \q_recursion_tail \q_recursion_stop
+ \int_compare:nNnT \l__cmd_current_arg_int > 9
+ {
+ \__kernel_msg_error:nnxx { ltcmd } { too-many-arguments }
+ { \__cmd_environment_or_command: } { \tl_to_str:n {#1} }
+ \__cmd_bad_def:wn
+ }
+ \bool_if:NT \l__cmd_expandable_bool
+ {
+ \tl_if_empty:NF \l__cmd_last_delimiters_tl
+ {
+ \__kernel_msg_error:nnxx { ltcmd } { expandable-ending-optional }
+ { \iow_char:N \\ \l__cmd_function_tl } { \tl_to_str:n {#1} }
+ \__cmd_bad_def:wn
+ }
+ }
+ \bool_if:NT \l__cmd_expandable_bool
+ { \bool_set_true:N \l__cmd_grab_expandably_bool }
+ \bool_if:NT \l__cmd_environment_bool
+ { \bool_set_false:N \l__cmd_grab_expandably_bool }
+ }
+\cs_new_protected:Npn \__cmd_normalize_arg_spec_loop:n #1
+ {
+ \quark_if_recursion_tail_stop:n {#1}
+ \int_incr:N \l__cmd_current_arg_int
+ \cs_if_exist_use:cF { __cmd_normalize_type_ \tl_to_str:n {#1} :w }
+ {
+ \bool_lazy_any:nTF
+ {
+ { \str_if_eq_p:nn {#1} { G } }
+ { \str_if_eq_p:nn {#1} { g } }
+ { \str_if_eq_p:nn {#1} { l } }
+ { \str_if_eq_p:nn {#1} { u } }
+ }
+ {
+ \__kernel_msg_error:nnxx { ltcmd } { xparse-argument-type }
+ { \__cmd_environment_or_command: } { \tl_to_str:n {#1} }
+ }
+ {
+ \__kernel_msg_error:nnxx { ltcmd } { unknown-argument-type }
+ { \__cmd_environment_or_command: } { \tl_to_str:n {#1} }
+ }
+ \__cmd_bad_def:wn
+ }
+ }
+\cs_set_protected:Npn \__cmd_tmp:w #1
+ {
+ \cs_new_protected:Npn \__cmd_normalize_type_d:w ##1##2
+ {
+ \quark_if_recursion_tail_stop_do:nn {##2} { \__cmd_bad_arg_spec:wn }
+ \__cmd_normalize_type_D:w {##1} {##2} {#1}
+ }
+ \cs_new_protected:Npn \__cmd_normalize_type_e:w ##1
+ {
+ \quark_if_recursion_tail_stop_do:nn {##1} { \__cmd_bad_arg_spec:wn }
+ \__cmd_normalize_type_E:w {##1} { }
+ }
+ \cs_new_protected:Npn \__cmd_normalize_type_o:w
+ { \__cmd_normalize_type_D:w [ ] {#1} }
+ \cs_new_protected:Npn \__cmd_normalize_type_O:w
+ { \__cmd_normalize_type_D:w [ ] }
+ \cs_new_protected:Npn \__cmd_normalize_type_r:w ##1##2
+ {
+ \quark_if_recursion_tail_stop_do:nn {##2} { \__cmd_bad_arg_spec:wn }
+ \__cmd_normalize_type_R:w {##1} {##2} {#1}
+ }
+ \cs_new_protected:Npn \__cmd_normalize_type_s:w
+ { \__cmd_normalize_type_t:w * }
+ }
+\exp_args:No \__cmd_tmp:w { \c_novalue_tl }
+\cs_new_protected:cpn { __cmd_normalize_type_>:w } #1#2
+ {
+ \quark_if_recursion_tail_stop_do:nn {#2} { \__cmd_bad_arg_spec:wn }
+ \bool_if:NT \l__cmd_expandable_bool
+ {
+ \__kernel_msg_error:nnxx { ltcmd } { processor-in-expandable }
+ { \iow_char:N \\ \l__cmd_function_tl } { \tl_to_str:n {#1} }
+ \__cmd_bad_def:wn
+ }
+ \tl_put_right:Nx \l__cmd_arg_spec_tl { > { \tl_trim_spaces:n {#1} } }
+ \int_decr:N \l__cmd_current_arg_int
+ \bool_set_false:N \l__cmd_grab_expandably_bool
+ \__cmd_normalize_arg_spec_loop:n {#2}
+ }
+\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
+ {
+ \__kernel_msg_error:nnxx { ltcmd } { two-markers }
+ { \__cmd_environment_or_command: } { + }
+ \__cmd_bad_def:wn
+ }
+ \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
+ {
+ \quark_if_recursion_tail_stop_do:nn {#1} { \__cmd_bad_arg_spec:wn }
+ \bool_if:NT \l__cmd_obey_spaces_bool
+ {
+ \__kernel_msg_error:nnxx { ltcmd } { 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
+ \int_decr:N \l__cmd_current_arg_int
+ \__cmd_normalize_arg_spec_loop:n {#1}
+ }
+\cs_new_protected:Npn \__cmd_normalize_type_D:w #1#2#3
+ {
+ \quark_if_recursion_tail_stop_do:nn {#3} { \__cmd_bad_arg_spec:wn }
+ \__cmd_single_token_check:n {#1} \__cmd_allowed_token_check:N #1
+ \__cmd_single_token_check:n {#2}
+ \__cmd_add_arg_spec:n { D #1 #2 {#3} }
+ \tl_put_right:Nn \l__cmd_last_delimiters_tl {#1}
+ \bool_set_false:N \l__cmd_grab_expandably_bool
+ \__cmd_normalize_arg_spec_loop:n
+ }
+\cs_new_protected:Npn \__cmd_normalize_type_E:w #1#2
+ {
+ \quark_if_recursion_tail_stop_do:nn {#2} { \__cmd_bad_arg_spec:wn }
+ \tl_if_blank:nT {#1} { \__cmd_bad_arg_spec:wn }
+ \tl_map_function:nN {#1} \__cmd_single_token_check:n
+ \tl_map_function:nN {#1} \__cmd_allowed_token_check:N
+ \__cmd_normalize_E_unique_check:w #1 \q_nil \q_stop
+ \int_compare:nNnT { \tl_count:n {#2} } > { \tl_count:n {#1} }
+ { \__cmd_bad_arg_spec:wn }
+ \__cmd_add_arg_spec:n { E {#1} {#2} }
+ \tl_put_right:Nn \l__cmd_last_delimiters_tl {#1}
+ \bool_set_false:N \l__cmd_grab_expandably_bool
+ \int_add:Nn \l__cmd_current_arg_int { \tl_count:n {#1} - 1 }
+ \__cmd_normalize_arg_spec_loop:n
+ }
+\cs_new_protected:Npn \__cmd_normalize_E_unique_check:w #1#2 \q_stop
+ {
+ \quark_if_nil:NF #1
+ {
+ \tl_if_in:nnT {#2} {#1} { \__cmd_bad_arg_spec:wn }
+ \__cmd_normalize_E_unique_check:w #2 \q_stop
+ }
+ }
+\cs_new_protected:Npn \__cmd_normalize_type_t:w #1
+ {
+ \quark_if_recursion_tail_stop_do:Nn #1 { \__cmd_bad_arg_spec:wn }
+ \__cmd_single_token_check:n {#1} \__cmd_allowed_token_check:N #1
+ \tl_put_right:Nx \l__cmd_arg_spec_tl
+ {
+ \bool_if:NT \l__cmd_obey_spaces_bool { ! }
+ t \exp_not:n {#1}
+ }
+ \tl_put_right:Nn \l__cmd_last_delimiters_tl {#1}
+ \bool_set_false:N \l__cmd_grab_expandably_bool
+ \bool_set_false:N \l__cmd_obey_spaces_bool
+ \bool_set_false:N \l__cmd_long_bool
+ \__cmd_normalize_arg_spec_loop:n
+ }
+\cs_new_protected:Npn \__cmd_normalize_type_m:w
+ {
+ \__cmd_delimiter_check:nnn { } { m } { \iow_char:N \{ }
+ \__cmd_add_arg_spec_mandatory:n { m }
+ \__cmd_normalize_arg_spec_loop:n
+ }
+\cs_new_protected:Npn \__cmd_normalize_type_R:w #1#2#3
+ {
+ \quark_if_recursion_tail_stop_do:nn {#3} { \__cmd_bad_arg_spec:wn }
+ \__cmd_single_token_check:n {#1} \__cmd_allowed_token_check:N #1
+ \__cmd_single_token_check:n {#2}
+ \__cmd_delimiter_check:nnn {#1} { R/r } { \tl_to_str:n {#1} }
+ \bool_set_false:N \l__cmd_grab_expandably_bool
+ \__cmd_add_arg_spec_mandatory:n { R #1 #2 {#3} }
+ \__cmd_normalize_arg_spec_loop:n
+ }
+\cs_new_protected:Npn \__cmd_normalize_type_v:w
+ {
+ \__cmd_normalize_check_gv:N v
+ \__cmd_add_arg_spec_mandatory:n { v }
+ \__cmd_normalize_arg_spec_loop:n
+ }
+\cs_new_protected:Npn \__cmd_normalize_type_b:w #1
+ {
+ \bool_if:NF \l__cmd_environment_bool
+ {
+ \__kernel_msg_error:nnxx
+ { ltcmd } { invalid-command-arg }
+ { \__cmd_environment_or_command: } { b }
+ \__cmd_bad_def:wn
+ }
+ \tl_clear:N \l__cmd_last_delimiters_tl
+ \__cmd_add_arg_spec:n { b }
+ \quark_if_recursion_tail_stop:n {#1}
+ \__kernel_msg_error:nnxx { ltcmd } { arg-after-body }
+ { \__cmd_environment_or_command: }
+ { \tl_to_str:n {#1} }
+ \__cmd_bad_def:wn
+ }
+\cs_new_protected:Npn \__cmd_single_token_check:n #1
+ {
+ \tl_trim_spaces_apply:nN {#1} \tl_if_single_token:nF
+ {
+ \__kernel_msg_error:nnxx { ltcmd } { not-single-token }
+ { \__cmd_environment_or_command: } { \tl_to_str:n {#1} }
+ \__cmd_bad_def:wn
+ }
+ }
+\cs_new_protected:Npn \__cmd_allowed_token_check:N #1
+ {
+ \token_if_eq_meaning:NNTF #1 \c_group_begin_token
+ { \use:n }
+ {
+ \token_if_eq_meaning:NNTF #1 \c_group_end_token
+ { \use:n }
+ { \use_none:n }
+ }
+ {
+ \__kernel_msg_error:nnxxx
+ { ltcmd } { forbidden-implicit-group-token }
+ { \__cmd_environment_or_command: } { \tl_to_str:n {#1} }
+ {
+ \token_if_eq_meaning:NNTF #1 \c_group_begin_token
+ { begin } { end }
+ }
+ \__cmd_bad_def:wn
+ }
+ }
+\cs_new_protected:Npn \__cmd_normalize_check_gv:N #1
+ {
+ \bool_if:NT \l__cmd_expandable_bool
+ {
+ \__kernel_msg_error:nnxx
+ { ltcmd } { invalid-expandable-argument-type }
+ { \iow_char:N \\ \l__cmd_function_tl } { \tl_to_str:n {#1} }
+ \__cmd_bad_def:wn
+ }
+ \bool_set_false:N \l__cmd_grab_expandably_bool
+ }
+\cs_new_protected:Npn \__cmd_normalize_check_lu:N #1
+ {
+ \bool_if:NT \l__cmd_expandable_bool
+ {
+ \tl_if_empty:NF \l__cmd_last_delimiters_tl
+ {
+ \__kernel_msg_error:nnxx
+ { ltcmd } { invalid-after-optional-expandably }
+ { \iow_char:N \\ \l__cmd_function_tl } { \tl_to_str:n {#1} }
+ \__cmd_bad_def:wn
+ }
+ }
+ }
+\cs_new_protected:Npn \__cmd_delimiter_check:nnn #1#2#3
+ {
+ \tl_map_inline:Nn \l__cmd_last_delimiters_tl
+ {
+ \tl_if_eq:nnT {##1} {#1}
+ {
+ \__kernel_msg_warning:nnxx { ltcmd } { optional-mandatory }
+ {#2} {#3}
+ }
+ }
+ }
+\cs_new_protected:Npn \__cmd_bad_arg_spec:wn #1 \__cmd_break_point:n #2
+ {
+ \__kernel_msg_error:nnxx { ltcmd } { bad-arg-spec }
+ { \__cmd_environment_or_command: } { \tl_to_str:n {#2} }
+ }
+\cs_new_protected:Npn \__cmd_bad_def:wn #1 \__cmd_break_point:n #2 { }
+\cs_new_protected:Npn \__cmd_add_arg_spec:n #1
+ {
+ \bool_lazy_and:nnT
+ { ! \l__cmd_long_bool }
+ { \l__cmd_some_long_bool }
+ {
+ \bool_if:NT \l__cmd_expandable_bool
+ {
+ \__kernel_msg_error:nnx { ltcmd } { inconsistent-long }
+ { \iow_char:N \\ \l__cmd_function_tl }
+ \__cmd_bad_def:wn
+ }
+ \bool_set_false:N \l__cmd_grab_expandably_bool
+ }
+ \bool_if:NTF \l__cmd_long_bool
+ { \bool_set_true:N \l__cmd_some_long_bool }
+ { \bool_set_true:N \l__cmd_some_short_bool }
+ \tl_put_right:Nx \l__cmd_arg_spec_tl
+ {
+ \bool_if:NT \l__cmd_long_bool { + }
+ \bool_if:NT \l__cmd_obey_spaces_bool { ! }
+ \exp_not:n {#1}
+ }
+ \bool_set_false:N \l__cmd_long_bool
+ \bool_set_false:N \l__cmd_obey_spaces_bool
+ }
+\cs_new_protected:Npn \__cmd_add_arg_spec_mandatory:n #1
+ {
+ \bool_if:NT \l__cmd_some_obey_spaces_bool
+ {
+ \__kernel_msg_error:nnxx { ltcmd } { non-trailing-obey-spaces }
+ { \__cmd_environment_or_command: } { \tl_to_str:n {#1} }
+ \__cmd_bad_def:wn
+ }
+ \tl_clear:N \l__cmd_last_delimiters_tl
+ \__cmd_add_arg_spec:n {#1}
+ }
+\cs_new_protected:Npn \__cmd_prepare_signature:n #1
+ {
+ \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
+ \int_zero:N \l__cmd_m_args_int
+ \bool_set_false:N \l__cmd_defaults_bool
+ \tl_clear:N \l__cmd_defaults_tl
+ \tl_clear:N \l__cmd_process_all_tl
+ \tl_clear:N \l__cmd_process_one_tl
+ \bool_set_false:N \l__cmd_process_some_bool
+ \tl_clear:N \l__cmd_signature_tl
+ \__cmd_prepare_signature:N #1 \q_recursion_tail \q_recursion_stop
+ \bool_if:NF \l__cmd_expandable_bool { \__cmd_flush_m_args: }
+ }
+\cs_new_protected:Npn \__cmd_prepare_signature:N
+ {
+ \bool_set_false:N \l__cmd_prefixed_bool
+ \__cmd_prepare_signature_bypass:N
+ }
+\cs_new_protected:Npn \__cmd_prepare_signature_bypass:N #1
+ {
+ \quark_if_recursion_tail_stop:N #1
+ \use:c
+ {
+ __cmd_add
+ \bool_if:NT \l__cmd_grab_expandably_bool { _expandable }
+ _type_ \token_to_str:N #1 :w
+ }
+ }
+\cs_new_protected:cpn { __cmd_add_type_+:w }
+ {
+ \__cmd_flush_m_args:
+ \bool_set_true:N \l__cmd_long_bool
+ \bool_set_true:N \l__cmd_prefixed_bool
+ \__cmd_prepare_signature_bypass:N
+ }
+\cs_new_protected:cpn { __cmd_add_type_!:w }
+ {
+ \__cmd_flush_m_args:
+ \bool_set_true:N \l__cmd_obey_spaces_bool
+ \bool_set_true:N \l__cmd_prefixed_bool
+ \__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_process_some_bool
+ \tl_put_left:Nn \l__cmd_process_one_tl { {#1} }
+ \__cmd_prepare_signature_bypass:N
+ }
+\cs_new_protected:Npn \__cmd_add_type_b:w
+ {
+ \__cmd_flush_m_args:
+ \__cmd_add_default:
+ \__cmd_add_grabber:N b
+ \__cmd_prepare_signature:N
+ }
+\cs_new_protected:Npn \__cmd_add_type_D:w #1#2#3
+ {
+ \__cmd_flush_m_args:
+ \__cmd_add_default:n {#3}
+ \__cmd_add_grabber:N D
+ \tl_put_right:Nn \l__cmd_signature_tl { #1 #2 }
+ \__cmd_prepare_signature:N
+ }
+\cs_new_protected:Npn \__cmd_add_type_E:w #1#2
+ {
+ \__cmd_flush_m_args:
+ \__cmd_add_default_E:nn {#1} {#2}
+ \__cmd_add_grabber:N E
+ \tl_put_right:Nn \l__cmd_signature_tl { {#1} }
+ \__cmd_prepare_signature:N
+ }
+\cs_new_protected:Npn \__cmd_add_type_m:w
+ {
+ \__cmd_add_default:
+ \bool_if:NTF \l__cmd_prefixed_bool
+ { \__cmd_add_grabber:N m }
+ { \int_incr:N \l__cmd_m_args_int }
+ \__cmd_prepare_signature:N
+ }
+\cs_new_protected:Npn \__cmd_add_type_R:w #1#2#3
+ {
+ \__cmd_flush_m_args:
+ \__cmd_add_default:n {#3}
+ \__cmd_add_grabber:N R
+ \tl_put_right:Nn \l__cmd_signature_tl { #1 #2 }
+ \__cmd_prepare_signature:N
+ }
+\cs_new_protected:Npn \__cmd_add_type_t:w #1
+ {
+ \__cmd_flush_m_args:
+ \__cmd_add_default:
+ \__cmd_add_grabber:N t
+ \tl_put_right:Nn \l__cmd_signature_tl {#1}
+ \__cmd_prepare_signature:N
+ }
+\cs_new_protected:Npn \__cmd_add_type_v:w
+ {
+ \__cmd_flush_m_args:
+ \exp_args:No \__cmd_add_default:n \c_novalue_tl
+ \__cmd_add_grabber:N v
+ \__cmd_prepare_signature:N
+ }
+\cs_new_protected:Npn \__cmd_flush_m_args:
+ {
+ \int_compare:nNnT \l__cmd_m_args_int > 0
+ {
+ \tl_put_right:Nx \l__cmd_signature_tl
+ { \exp_not:c { __cmd_grab_m_ \int_use:N \l__cmd_m_args_int :w } }
+ \tl_put_right:Nx \l__cmd_process_all_tl
+ { \prg_replicate:nn { \l__cmd_m_args_int } { { } } }
+ }
+ \int_zero:N \l__cmd_m_args_int
+ }
+\cs_new_protected:Npn \__cmd_add_grabber:N #1
+ {
+ \tl_put_right:Nx \l__cmd_signature_tl
+ {
+ \exp_not:c
+ {
+ __cmd_grab_ #1
+ \bool_if:NT \l__cmd_long_bool { _long }
+ \bool_if:NT \l__cmd_obey_spaces_bool { _obey_spaces }
+ :w
+ }
+ }
+ \bool_set_false:N \l__cmd_long_bool
+ \bool_set_false:N \l__cmd_obey_spaces_bool
+ \tl_put_right:Nx \l__cmd_process_all_tl
+ { { \exp_not:o \l__cmd_process_one_tl } }
+ \tl_clear:N \l__cmd_process_one_tl
+ }
+\cs_new_protected:Npn \__cmd_add_default:n #1
+ {
+ \tl_if_novalue:nTF {#1}
+ { \__cmd_add_default: }
+ {
+ \int_incr:N \l__cmd_current_arg_int
+ \bool_set_true:N \l__cmd_defaults_bool
+ \tl_put_right:Nn \l__cmd_defaults_tl { { \prg_do_nothing: #1 } }
+ }
+ }
+\cs_new_protected:Npn \__cmd_add_default:
+ {
+ \int_incr:N \l__cmd_current_arg_int
+ \tl_put_right:Nn \l__cmd_defaults_tl { \c_novalue_tl }
+ }
+\cs_new_protected:Npn \__cmd_add_default_E:nn #1#2
+ {
+ \tl_map_function:nN {#2} \__cmd_add_default:n
+ \prg_replicate:nn
+ { \tl_count:n {#1} - \tl_count:n {#2} }
+ { \__cmd_add_default: }
+ }
+\cs_new_protected:cpn { __cmd_add_expandable_type_+:w }
+ {
+ \bool_set_true:N \l__cmd_long_bool
+ \__cmd_prepare_signature:N
+ }
+\cs_new_protected:Npn \__cmd_add_expandable_type_D:w
+ { \__cmd_add_expandable_type_D_aux:NNNn D }
+\cs_new_protected:Npn \__cmd_add_expandable_type_D_aux:NNNn #1#2#3#4
+ {
+ \__cmd_add_default:n {#4}
+ \tl_if_eq:nnTF {#2} {#3}
+ { \__cmd_add_expandable_type_D_aux:NN #1 #2 }
+ { \__cmd_add_expandable_type_D_aux:NNN #1 #2 #3 }
+ \__cmd_prepare_signature:N
+ }
+\cs_new_protected:Npn \__cmd_add_expandable_type_D_aux:NNN #1#2#3
+ {
+ \bool_if:NTF \l__cmd_long_bool
+ { \cs_set:cpx }
+ { \cs_set_nopar:cpx }
+ { \l__cmd_expandable_aux_name_tl } ##1 ##2 #2 ##3 \q__cmd ##4 #3
+ { ##1 {##2} {##3} {##4} }
+ \__cmd_add_expandable_grabber:nn {#1}
+ {
+ \exp_not:c { \l__cmd_expandable_aux_name_tl }
+ \exp_not:n { #2 #3 }
+ }
+ }
+\cs_new_protected:Npn \__cmd_add_expandable_type_D_aux:NN #1#2
+ {
+ \bool_if:NTF \l__cmd_long_bool
+ { \cs_set:cpx }
+ { \cs_set_nopar:cpx }
+ { \l__cmd_expandable_aux_name_tl } ##1 #2 ##2 #2
+ { ##1 {##2} }
+ \__cmd_add_expandable_grabber:nn { #1_alt }
+ {
+ \exp_not:c { \l__cmd_expandable_aux_name_tl }
+ \exp_not:n {#2}
+ }
+ }
+\cs_new_protected:Npn \__cmd_add_expandable_type_E:w #1#2
+ {
+ \__cmd_add_default_E:nn {#1} {#2}
+ \tl_clear:N \l__cmd_tmpb_tl
+ \tl_map_function:nN {#1} \__cmd_add_expandable_type_E_aux:n
+ \__cmd_add_expandable_grabber:nn
+ { E \bool_if:NT \l__cmd_long_bool { _long } }
+ {
+ { \exp_not:o \l__cmd_tmpb_tl }
+ {
+ \prg_replicate:nn { \tl_count:n {#1} }
+ { { \c_novalue_tl } }
+ }
+ }
+ \__cmd_prepare_signature:N
+ }
+\cs_new_protected:Npn \__cmd_add_expandable_type_E_aux:n #1
+ {
+ \__cmd_get_grabber:NN #1 \l__cmd_tmpa_tl
+ \tl_put_right:Nx \l__cmd_tmpb_tl
+ { \exp_not:o \l__cmd_tmpa_tl \exp_not:N #1 }
+ }
+\cs_new_protected:Npn \__cmd_add_expandable_type_m:w
+ {
+ \__cmd_add_default:
+ \__cmd_add_expandable_grabber:nn
+ { m \bool_if:NT \l__cmd_long_bool { _long } } { }
+ \__cmd_prepare_signature:N
+ }
+\cs_new_protected:Npn \__cmd_add_expandable_type_R:w
+ { \__cmd_add_expandable_type_D_aux:NNNn R }
+\cs_new_protected:Npn \__cmd_add_expandable_type_t:w #1
+ {
+ \__cmd_add_default:
+ \__cmd_get_grabber:NN #1 \l__cmd_tmpa_tl
+ \__cmd_add_expandable_grabber:nn { t }
+ {
+ \exp_not:o \l__cmd_tmpa_tl
+ \exp_not:N #1
+ }
+ \__cmd_prepare_signature:N
+ }
+\cs_new_protected:Npn \__cmd_add_expandable_grabber:nn #1#2
+ {
+ \tl_put_right:Nx \l__cmd_signature_tl
+ { \exp_not:c { __cmd_expandable_grab_ #1 :w } #2 }
+ }
+\cs_new_protected:Npn \__cmd_get_grabber:NN #1#2
+ {
+ \cs_set:Npn \__cmd_tmp:w ##1 #1 {##1}
+ \exp_args:Nc \__cmd_get_grabber_auxi:NN
+ { __cmd_grabber_ \token_to_str:N #1 :w } #2
+ }
+\cs_new_protected:Npn \__cmd_get_grabber_auxi:NN #1#2
+ {
+ \cs_if_eq:NNTF \__cmd_tmp:w #1
+ { \tl_set:Nn #2 {#1} }
+ {
+ \cs_if_exist:NTF #1
+ {
+ \int_gincr:N \g__cmd_grabber_int
+ \exp_args:Nc \__cmd_get_grabber_auxi:NN
+ {
+ __cmd_grabber_
+ - \int_use:N \g__cmd_grabber_int :w
+ }
+ #2
+ }
+ { \__cmd_get_grabber_auxii:NN #1 #2 }
+ }
+ }
+\cs_new_protected:Npn \__cmd_get_grabber_auxii:NN #1#2
+ {
+ \cs_set_eq:NN #1 \__cmd_tmp:w
+ \tl_set:Nn #2 {#1}
+ }
+\cs_new_protected:Npn \__cmd_grab_b:w
+ { \__cmd_grab_b_aux:NNw \cs_set_protected_nopar:Npn \tl_trim_spaces:n }
+\cs_new_protected:Npn \__cmd_grab_b_long:w
+ { \__cmd_grab_b_aux:NNw \cs_set_protected:Npn \tl_trim_spaces:n }
+\cs_new_protected:Npn \__cmd_grab_b_obey_spaces:w
+ { \__cmd_grab_b_aux:NNw \cs_set_protected_nopar:Npn \exp_not:n }
+\cs_new_protected:Npn \__cmd_grab_b_long_obey_spaces:w
+ { \__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
+ \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
+ \exp_args:Nc \l__cmd_fn_tl { begin ~ }
+ }
+\cs_new_protected:Npn \__cmd_grab_b_end:Nw #1#2 \__cmd_run_code:
+ {
+ \tl_set:Nx \l__cmd_args_tl
+ {
+ \exp_not:V \l__cmd_saved_args_tl
+ { \exp_after:wN #1 \l__cmd_args_tl }
+ }
+ #2
+ \__cmd_run_code:
+ \end
+ }
+\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
+ }
+\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
+ }
+\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
+ }
+\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
+ }
+\cs_new_protected:Npn \__cmd_grab_D_aux:NNnNN #1#2#3#4#5
+ {
+ \__cmd_grab_D_aux:NNnN #1#2 {#3} #4
+ #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
+ {
+ \tl_set:Nn \l__cmd_signature_tl {#3}
+ \exp_after:wN #4 \l__cmd_fn_tl ##1 #2
+ {
+ \tl_if_in:nnTF {##1} {#1}
+ { \__cmd_grab_D_nested:NNnN #1 #2 {##1} #4 }
+ {
+ \tl_if_blank:oTF { \use_none:n ##1 }
+ { \__cmd_add_arg:o { \use_none:n ##1 } }
+ {
+ \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 { \use_none:n ##1 } }
+ }
+ }
+ }
+ }
+\tl_new:N \l__cmd_nesting_a_tl
+\tl_new:N \l__cmd_nesting_b_tl
+\quark_new:N \q__cmd
+\cs_new_protected:Npn \__cmd_grab_D_nested:NNnN #1#2#3#4
+ {
+ \tl_clear:N \l__cmd_nesting_a_tl
+ \tl_clear:N \l__cmd_nesting_b_tl
+ \exp_after:wN #4 \l__cmd_fn_tl ##1 #1 ##2 \q__cmd ##3 #2
+ {
+ \tl_put_right:No \l__cmd_nesting_a_tl { \use_none:n ##1 #1 }
+ \tl_put_right:No \l__cmd_nesting_b_tl { \use_i:nn #2 ##3 }
+ \tl_if_in:nnTF {##2} {#1}
+ {
+ \l__cmd_fn_tl
+ \q_nil ##2 \q__cmd \ERROR
+ }
+ {
+ \tl_put_right:Nx \l__cmd_nesting_a_tl
+ { \__cmd_grab_D_nested:w \q_nil ##2 \q_stop }
+ \tl_if_in:NnTF \l__cmd_nesting_b_tl {#1}
+ {
+ \tl_set_eq:NN \l__cmd_tmpa_tl \l__cmd_nesting_b_tl
+ \tl_clear:N \l__cmd_nesting_b_tl
+ \exp_after:wN \l__cmd_fn_tl \exp_after:wN
+ \q_nil \l__cmd_tmpa_tl \q_nil \q__cmd \ERROR
+ }
+ {
+ \tl_put_right:No \l__cmd_nesting_a_tl
+ \l__cmd_nesting_b_tl
+ \__cmd_add_arg:V \l__cmd_nesting_a_tl
+ }
+ }
+ }
+ \l__cmd_fn_tl #3 \q_nil \q__cmd \ERROR
+ }
+\cs_new:Npn \__cmd_grab_D_nested:w #1 \q_nil \q_stop
+ { \exp_not:o { \use_none:n #1 } }
+\cs_new_protected_nopar:Npn \__cmd_grab_D_call:Nw #1
+ {
+ \token_if_eq_catcode:NNTF + #1
+ {
+ \exp_after:wN \exp_after:wN \exp_after:wN
+ \l__cmd_fn_tl \char_generate:nn { `#1 } { 11 }
+ }
+ {
+ \__cmd_token_if_cs:NTF #1
+ {
+ \exp_after:wN \l__cmd_fn_tl
+ \cs:w \cs_to_str:N #1 ~ \cs_end:
+ }
+ {
+ \exp_after:wN \l__cmd_fn_tl
+ \token_to_str:N #1
+ }
+ }
+ }
+\cs_new_protected:Npn \__cmd_grab_E:w #1#2 \__cmd_run_code:
+ {
+ \__cmd_grab_E:nnNN {#1} {#2}
+ \cs_set_protected_nopar:Npn
+ \__cmd_peek_nonspace_remove:NTF
+ }
+\cs_new_protected:Npn \__cmd_grab_E_long:w #1#2 \__cmd_run_code:
+ {
+ \__cmd_grab_E:nnNN {#1} {#2}
+ \cs_set_protected:Npn
+ \__cmd_peek_nonspace_remove:NTF
+ }
+\cs_new_protected:Npn \__cmd_grab_E_obey_spaces:w #1#2 \__cmd_run_code:
+ {
+ \__cmd_grab_E:nnNN {#1} {#2}
+ \cs_set_protected_nopar:Npn
+ \__cmd_peek_meaning_remove:NTF
+ }
+\cs_new_protected:Npn \__cmd_grab_E_long_obey_spaces:w #1#2 \__cmd_run_code:
+ {
+ \__cmd_grab_E:nnNN {#1} {#2}
+ \cs_set_protected:Npn
+ \__cmd_peek_meaning_remove:NTF
+ }
+\cs_new_protected:Npn \__cmd_grab_E:nnNN #1#2#3#4
+ {
+ \exp_after:wN #3 \l__cmd_fn_tl ##1##2##3
+ {
+ \prop_put:Nnn \l__cmd_tmp_prop {##1} {##3}
+ \__cmd_grab_E_loop:NnN #4 { } ##2 \q_recursion_stop
+ }
+ \prop_clear:N \l__cmd_tmp_prop
+ \tl_set:Nn \l__cmd_signature_tl {#2}
+ \cs_set_protected:Npn \__cmd_grab_E_finalise:
+ {
+ \tl_map_inline:nn {#1}
+ {
+ \prop_get:NnNF \l__cmd_tmp_prop {####1} \l__cmd_tmpb_tl
+ { \tl_set_eq:NN \l__cmd_tmpb_tl \c_novalue_tl }
+ \tl_put_right:Nx \l__cmd_args_tl
+ { { \exp_not:V \l__cmd_tmpb_tl } }
+ }
+ \l__cmd_signature_tl \__cmd_run_code:
+ }
+ \__cmd_grab_E_loop:NnN #4 { } #1 \q_recursion_tail \q_recursion_stop
+ }
+\cs_new_protected:Npn \__cmd_grab_E_loop:NnN #1#2#3#4 \q_recursion_stop
+ {
+ \cs_if_eq:NNTF #3 \q_recursion_tail
+ { \__cmd_grab_E_finalise: }
+ {
+ #1 #3
+ { \l__cmd_fn_tl #3 {#2#4} }
+ { \__cmd_grab_E_loop:NnN #1 {#2#3} #4 \q_recursion_stop }
+ }
+ }
+\cs_new_protected:Npn \__cmd_grab_E_finalise: { }
+\cs_new_protected:Npn \__cmd_grab_m:w #1 \__cmd_run_code:
+ {
+ \tl_set:Nn \l__cmd_signature_tl {#1}
+ \exp_after:wN \cs_set_protected_nopar:Npn \l__cmd_fn_tl ##1
+ { \__cmd_add_arg:n {##1} }
+ \l__cmd_fn_tl
+ }
+\cs_new_protected:Npn \__cmd_grab_m_long:w #1 \__cmd_run_code:
+ {
+ \tl_set:Nn \l__cmd_signature_tl {#1}
+ \exp_after:wN \cs_set_protected:Npn \l__cmd_fn_tl ##1
+ { \__cmd_add_arg:n {##1} }
+ \l__cmd_fn_tl
+ }
+\cs_new_protected_nopar:Npn \__cmd_grab_m_aux:Nnnnnnnnn #1#2#3#4#5#6#7#8#9
+ {
+ \tl_put_right:No \l__cmd_args_tl
+ { #1 {#2} {#3} {#4} {#5} {#6} {#7} {#8} {#9} }
+ \l__cmd_signature_tl \__cmd_run_code:
+ }
+\cs_new_protected:cpn { __cmd_grab_m_1:w } #1 \__cmd_run_code:
+ {
+ \tl_set:Nn \l__cmd_signature_tl {#1}
+ \exp_after:wN \cs_set_eq:NN \l__cmd_fn_tl \__cmd_grab_m_aux:Nnnnnnnnn
+ \l__cmd_fn_tl \use_none:nnnnnnn { } { } { } { } { } { } { }
+ }
+\cs_new_protected:cpn { __cmd_grab_m_2:w } #1 \__cmd_run_code:
+ {
+ \tl_set:Nn \l__cmd_signature_tl {#1}
+ \exp_after:wN \cs_set_eq:NN \l__cmd_fn_tl \__cmd_grab_m_aux:Nnnnnnnnn
+ \l__cmd_fn_tl \use_none:nnnnnn { } { } { } { } { } { }
+ }
+\cs_new_protected:cpn { __cmd_grab_m_3:w } #1 \__cmd_run_code:
+ {
+ \tl_set:Nn \l__cmd_signature_tl {#1}
+ \exp_after:wN \cs_set_eq:NN \l__cmd_fn_tl \__cmd_grab_m_aux:Nnnnnnnnn
+ \l__cmd_fn_tl \use_none:nnnnn { } { } { } { } { }
+ }
+\cs_new_protected:cpn { __cmd_grab_m_4:w } #1 \__cmd_run_code:
+ {
+ \tl_set:Nn \l__cmd_signature_tl {#1}
+ \exp_after:wN \cs_set_eq:NN \l__cmd_fn_tl \__cmd_grab_m_aux:Nnnnnnnnn
+ \l__cmd_fn_tl \use_none:nnnn { } { } { } { }
+ }
+\cs_new_protected:cpn { __cmd_grab_m_5:w } #1 \__cmd_run_code:
+ {
+ \tl_set:Nn \l__cmd_signature_tl {#1}
+ \exp_after:wN \cs_set_eq:NN \l__cmd_fn_tl \__cmd_grab_m_aux:Nnnnnnnnn
+ \l__cmd_fn_tl \use_none:nnn { } { } { }
+ }
+\cs_new_protected:cpn { __cmd_grab_m_6:w } #1 \__cmd_run_code:
+ {
+ \tl_set:Nn \l__cmd_signature_tl {#1}
+ \exp_after:wN \cs_set_eq:NN \l__cmd_fn_tl \__cmd_grab_m_aux:Nnnnnnnnn
+ \l__cmd_fn_tl \use_none:nn { } { }
+ }
+\cs_new_protected:cpn { __cmd_grab_m_7:w } #1 \__cmd_run_code:
+ {
+ \tl_set:Nn \l__cmd_signature_tl {#1}
+ \exp_after:wN \cs_set_eq:NN \l__cmd_fn_tl \__cmd_grab_m_aux:Nnnnnnnnn
+ \l__cmd_fn_tl \use_none:n { }
+ }
+\cs_new_protected:cpn { __cmd_grab_m_8:w } #1 \__cmd_run_code:
+ {
+ \tl_set:Nn \l__cmd_signature_tl {#1}
+ \exp_after:wN \cs_set_eq:NN \l__cmd_fn_tl \__cmd_grab_m_aux:Nnnnnnnnn
+ \l__cmd_fn_tl \prg_do_nothing:
+ }
+\cs_new_protected:cpx { __cmd_grab_m_9:w }
+ {
+ \exp_not:c { __cmd_grab_m_5:w }
+ \exp_not:c { __cmd_grab_m_4:w }
+ }
+\cs_new_protected:Npn \__cmd_grab_R:w #1#2#3 \__cmd_run_code:
+ { \__cmd_grab_R_aux:NNnN #1 #2 {#3} \cs_set_protected_nopar:Npn }
+\cs_new_protected:Npn \__cmd_grab_R_long:w #1#2#3 \__cmd_run_code:
+ { \__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_peek_nonspace_remove:NTF #1
+ { \__cmd_grab_D_call:Nw #1 }
+ {
+ \__kernel_msg_error:nnxx { ltcmd } { missing-required }
+ { \__cmd_environment_or_command: }
+ { \token_to_str:N #1 }
+ \__cmd_add_arg:o \c_novalue_tl
+ }
+ }
+\cs_new_protected:Npn \__cmd_grab_t:w
+ { \__cmd_grab_t_aux:NNw \__cmd_peek_nonspace_remove:NTF }
+\cs_new_protected:Npn \__cmd_grab_t_obey_spaces:w
+ { \__cmd_grab_t_aux:NNw \__cmd_peek_meaning_remove:NTF }
+\cs_new_protected:Npn \__cmd_grab_t_aux:NNw #1#2#3 \__cmd_run_code:
+ {
+ \tl_set:Nn \l__cmd_signature_tl {#3}
+ \exp_after:wN \cs_set_protected:Npn \l__cmd_fn_tl
+ {
+ #1 #2
+ { \__cmd_add_arg:n { \BooleanTrue } }
+ { \__cmd_add_arg:n { \BooleanFalse } }
+ }
+ \l__cmd_fn_tl
+ }
+\tl_new:N \l__cmd_v_arg_tl
+\cs_new_protected:Npn \__cmd_grab_v:w
+ {
+ \bool_set_false:N \l__cmd_long_bool
+ \__cmd_grab_v_aux:w
+ }
+\cs_new_protected:Npn \__cmd_grab_v_long:w
+ {
+ \bool_set_true:N \l__cmd_long_bool
+ \__cmd_grab_v_aux:w
+ }
+\cs_new_protected:Npn \__cmd_grab_v_aux:w #1 \__cmd_run_code:
+ {
+ \tl_set:Nn \l__cmd_signature_tl {#1}
+ \group_begin:
+ \tex_escapechar:D = 92 \scan_stop:
+ \tl_clear:N \l__cmd_v_arg_tl
+ \peek_remove_spaces:n
+ {
+ \peek_meaning_remove:NTF \c_group_begin_token
+ {
+ \group_align_safe_end:
+ \__cmd_grab_v_bgroup:
+ }
+ {
+ \peek_N_type:TF
+ { \__cmd_grab_v_aux_test:N }
+ { \__cmd_grab_v_aux_abort:n { } }
+ }
+ }
+ }
+\cs_new_protected:Npn \__cmd_grab_v_group_end:
+ {
+ \exp_args:NNNo
+ \group_end:
+ \tl_set:Nn \l__cmd_v_arg_tl { \l__cmd_v_arg_tl }
+ }
+\cs_new_protected:Npn \__cmd_grab_v_aux_test:N #1
+ {
+ \__cmd_grab_v_token_if_char:NTF #1
+ {
+ \__cmd_grab_v_aux_put:N #1
+ \__cmd_grab_v_aux_catcodes:
+ \__cmd_grab_v_aux_loop:N #1
+ }
+ { \__cmd_grab_v_aux_abort:n {#1} #1 }
+ }
+\cs_new_protected:Npn \__cmd_grab_v_aux_loop:N #1
+ {
+ \peek_N_type:TF
+ { \__cmd_grab_v_aux_loop:NN #1 }
+ { \__cmd_grab_v_aux_abort:n { } }
+ }
+\cs_new_protected:Npn \__cmd_grab_v_aux_loop:NN #1#2
+ {
+ \__cmd_grab_v_token_if_char:NTF #2
+ {
+ \token_if_eq_charcode:NNTF #1 #2
+ { \__cmd_grab_v_aux_loop_end: }
+ {
+ \__cmd_grab_v_aux_put:N #2
+ \__cmd_grab_v_aux_loop:N #1
+ }
+ }
+ { \__cmd_grab_v_aux_abort:n {#2} #2 }
+ }
+\cs_new_protected:Npn \__cmd_grab_v_aux_loop_end:
+ {
+ \__cmd_grab_v_group_end:
+ \__cmd_add_arg:x { \tl_tail:N \l__cmd_v_arg_tl }
+ }
+\int_new:N \l__cmd_v_nesting_int
+\cs_new_protected:Npx \__cmd_grab_v_bgroup:
+ {
+ \exp_not:N \__cmd_grab_v_aux_catcodes:
+ \exp_not:n { \int_set:Nn \l__cmd_v_nesting_int { 1 } }
+ \exp_not:N \__cmd_grab_v_aux_put:N \iow_char:N \{
+ \exp_not:N \__cmd_grab_v_bgroup_loop:
+ }
+\cs_new_protected:Npn \__cmd_grab_v_bgroup_loop:
+ {
+ \peek_N_type:TF
+ { \__cmd_grab_v_bgroup_loop:N }
+ { \__cmd_grab_v_aux_abort:n { } }
+ }
+\cs_new_protected:Npn \__cmd_grab_v_bgroup_loop:N #1
+ {
+ \__cmd_grab_v_token_if_char:NTF #1
+ {
+ \token_if_eq_charcode:NNTF \c_group_end_token #1
+ {
+ \int_decr:N \l__cmd_v_nesting_int
+ \int_compare:nNnTF \l__cmd_v_nesting_int > 0
+ {
+ \__cmd_grab_v_aux_put:N #1
+ \__cmd_grab_v_bgroup_loop:
+ }
+ { \__cmd_grab_v_aux_loop_end: }
+ }
+ {
+ \token_if_eq_charcode:NNT \c_group_begin_token #1
+ { \int_incr:N \l__cmd_v_nesting_int }
+ \__cmd_grab_v_aux_put:N #1
+ \__cmd_grab_v_bgroup_loop:
+ }
+ }
+ { \__cmd_grab_v_aux_abort:n {#1} #1 }
+ }
+\cs_new_protected:Npn \__cmd_grab_v_aux_catcodes:
+ {
+ \cs_set_eq:NN \do \char_set_catcode_other:N
+ \dospecials
+ \tex_endlinechar:D = `\^^M \scan_stop:
+ \bool_if:NTF \l__cmd_long_bool
+ { \char_set_catcode_other:n { \tex_endlinechar:D } }
+ { \char_set_catcode_parameter:n { \tex_endlinechar:D } }
+ }
+\cs_new_protected:Npn \__cmd_grab_v_aux_abort:n #1
+ {
+ \__cmd_grab_v_group_end:
+ \exp_after:wN \exp_after:wN \exp_after:wN
+ \peek_meaning_remove:NTF \char_generate:nn { \tex_endlinechar:D } { 6 }
+ {
+ \__kernel_msg_error:nnxxx { ltcmd } { verbatim-newline }
+ { \__cmd_environment_or_command: }
+ { \tl_to_str:N \l__cmd_v_arg_tl }
+ { \tl_to_str:n {#1} }
+ \__cmd_add_arg:o \c_novalue_tl
+ }
+ {
+ \__kernel_msg_error:nnxxx { ltcmd } { verbatim-tokenized }
+ { \__cmd_environment_or_command: }
+ { \tl_to_str:N \l__cmd_v_arg_tl }
+ { \tl_to_str:n {#1} }
+ \__cmd_add_arg:o \c_novalue_tl
+ }
+ }
+\cs_new_protected:Npn \__cmd_grab_v_aux_put:N #1
+ {
+ \tl_put_right:Nx \l__cmd_v_arg_tl
+ {
+ \token_if_active:NTF #1
+ { \exp_not:N #1 } { \token_to_str:N #1 }
+ }
+ }
+\cs_new_protected:Npn \__cmd_grab_v_token_if_char:NTF #1
+ { \str_if_eq:eeTF { } { \str_tail:n {#1} } }
+\cs_new_protected:Npn \__cmd_add_arg:n #1
+ {
+ \tl_put_right:Nn \l__cmd_args_tl { {#1} }
+ \l__cmd_signature_tl \__cmd_run_code:
+ }
+\cs_generate_variant:Nn \__cmd_add_arg:n { V , o , x }
+\cs_new:Npn \__cmd_expandable_grab_D:w #1 \q__cmd #2#3
+ { #2 { \__cmd_expandable_grab_D:NNNwNNn #1 \q__cmd #2 #3 } }
+\cs_set_protected:Npn \__cmd_tmp:w #1
+ {
+ \cs_new:Npn \__cmd_expandable_grab_D:NNNwNNn ##1##2##3##4 \q__cmd ##5##6##7
+ {
+ \str_if_eq:nnTF {##2} {##7}
+ {
+ \str_if_eq:onTF
+ { ##1 { } { } ##7 ##2 \q__cmd ##3 }
+ { { } {##2} { } }
+ }
+ { \use_ii:nn }
+ {
+ ##1
+ { \__cmd_expandable_grab_D:NNNwNNnnn ##1##2##3##4 \q__cmd ##5##6 }
+ \q_nil { } ##2 \ERROR \q__cmd \ERROR
+ }
+ { ##4 {#1} \q__cmd ##5 ##6 {##7} }
+ }
+ }
+\exp_args:No \__cmd_tmp:w { \c_novalue_tl }
+\cs_new:Npn \__cmd_expandable_grab_D:NNNwNNnnn #1#2#3#4 \q__cmd #5#6#7#8#9
+ {
+ \exp_args:Nof \__cmd_expandable_grab_D:nnNNNwNN
+ { \use_ii:nn #7 #2 }
+ { \__cmd_expandable_grab_D:Nw #3 \exp_stop_f: #8 #9 }
+ #1#2#3 #4 \q__cmd #5 #6
+ }
+\cs_new:Npn \__cmd_expandable_grab_D:Nw #1#2 \ERROR \ERROR { #2 #1 }
+\cs_new:Npn \__cmd_expandable_grab_D:nnNNNwNN #1#2#3#4#5#6 \q__cmd #7#8
+ {
+ \exp_args:No \tl_if_empty:oTF
+ { #3 { \use_none:nnn } #2 \q__cmd #5 #4 \q__cmd #5 }
+ {
+ \tl_if_blank:oTF { \use_none:nn #1#2 }
+ { \__cmd_put_arg_expandable:ow { \use_none:nn #1#2 } }
+ {
+ \str_if_eq:eeTF
+ { \exp_not:o { \use_none:nn #1#2 } }
+ { { \exp_not:o { \use_iii:nnnn #1#2 \q_nil } } }
+ { \__cmd_put_arg_expandable:ow { \use_iii:nnn #1#2 } }
+ { \__cmd_put_arg_expandable:ow { \use_none:nn #1#2 } }
+ }
+ #6 \q__cmd #7 #8
+ }
+ {
+ #3
+ { \__cmd_expandable_grab_D:NNNwNNnnn #3#4#5#6 \q__cmd #7 #8 }
+ \q_nil {#1} #2 \ERROR \q__cmd \ERROR
+ }
+ }
+\cs_new:Npn \__cmd_expandable_grab_D_alt:w #1 \q__cmd #2#3
+ { #2 { \__cmd_expandable_grab_D_alt:NNwNNn #1 \q__cmd #2 #3 } }
+\cs_set_protected:Npn \__cmd_tmp:w #1
+ {
+ \cs_new:Npn \__cmd_expandable_grab_D_alt:NNwNNn ##1##2##3 \q__cmd ##4##5##6
+ {
+ \str_if_eq:nnTF {##6} {##2}
+ {
+ \str_if_eq:onTF
+ { ##1 { } ##6 ##2 ##2 }
+ { { } ##2 }
+ }
+ { \use_ii:nn }
+ {
+ ##1
+ { \__cmd_expandable_grab_D_alt:NNwn ##4 ##5 ##3 \q__cmd }
+ ##6 \ERROR
+ }
+ { ##3 {#1} \q__cmd ##4 ##5 {##6} }
+ }
+ }
+\exp_args:No \__cmd_tmp:w { \c_novalue_tl }
+\cs_new:Npn \__cmd_expandable_grab_D_alt:NNwn #1#2#3 \q__cmd #4
+ {
+ \tl_if_blank:oTF { \use_none:n #4 }
+ { \__cmd_put_arg_expandable:ow { \use_none:n #4 } }
+ {
+ \str_if_eq:eeTF
+ { \exp_not:o { \use_none:n #4 } }
+ { { \exp_not:o { \use_ii:nnn #4 \q_nil } } }
+ { \__cmd_put_arg_expandable:ow { \use_ii:nn #4 } }
+ { \__cmd_put_arg_expandable:ow { \use_none:n #4 } }
+ }
+ #3 \q__cmd #1 #2
+ }
+\cs_new:Npn \__cmd_expandable_grab_E:w #1 \q__cmd #2#3
+ { \__cmd_expandable_grab_E_aux:w #1 \q__cmd #2 #3 #3 }
+\cs_new:Npn \__cmd_expandable_grab_E_long:w #1 \q__cmd #2#3
+ { \__cmd_expandable_grab_E_aux:w #1 \q__cmd #2 #3 #2 }
+\cs_new:Npn \__cmd_expandable_grab_E_aux:w #1 \q__cmd #2#3#4
+ { #2 { \__cmd_expandable_grab_E_test:nnw #1 \q__cmd #2 #3 #4 } }
+\cs_new:Npn \__cmd_expandable_grab_E_test:nnw #1#2#3 \q__cmd #4#5#6#7
+ {
+ \__cmd_expandable_grab_E_loop:nnnNNw {#7} { } { }
+ #1 \q_nil \q_nil \q_nil \q_mark #2 \q_nil
+ #3 \q__cmd #4 #5 #6
+ }
+\cs_new:Npn \__cmd_expandable_grab_E_loop:nnnNNw
+ #1#2#3#4#5#6 \q_nil #7 \q_mark #8
+ {
+ \quark_if_nil:NTF #4
+ { \__cmd_expandable_grab_E_end:nnw {#1} {#3} }
+ {
+ \tl_if_novalue:nTF {#8}
+ { \str_if_eq:onTF { #4 { } #1 #5 } {#5} }
+ { \use_ii:nn }
+ { \__cmd_expandable_grab_E_find:w { #2 #4 #5 #6 } {#3} ~ }
+ {
+ \__cmd_expandable_grab_E_loop:nnnNNw
+ {#1} { #2 #4 #5 } { #3 {#8} }
+ #6 \q_nil #7 \q_mark
+ }
+ }
+ }
+\cs_new:Npn \__cmd_expandable_grab_E_find:w #1 \q__cmd #2#3#4
+ { #4 { \__cmd_expandable_grab_E_find:nnw #1 \q__cmd #2 #3 #4 } }
+\cs_new:Npn \__cmd_expandable_grab_E_find:nnw #1#2#3 \q_nil #4 \q__cmd #5#6#7#8
+ { \__cmd_expandable_grab_E_aux:w {#1} { #2 {#8} #3 } #4 \q__cmd #5 #6 #7 }
+\cs_new:Npn \__cmd_expandable_grab_E_end:nnw #1#2#3 \q__cmd #4#5#6
+ { #3 #2 \q__cmd #4 #5 {#1} }
+\cs_new:Npn \__cmd_expandable_grab_m:w #1 \q__cmd #2#3
+ { #3 { \__cmd_expandable_grab_m_aux:wNn #1 \q__cmd #2 #3 } }
+\cs_new:Npn \__cmd_expandable_grab_m_long:w #1 \q__cmd #2#3
+ { #2 { \__cmd_expandable_grab_m_aux:wNn #1 \q__cmd #2 #3 } }
+\cs_new:Npn \__cmd_expandable_grab_m_aux:wNn #1 \q__cmd #2#3#4
+ { #1 {#4} \q__cmd #2 #3 }
+\cs_new:Npn \__cmd_expandable_grab_R:w #1 \q__cmd #2#3
+ { #2 { \__cmd_expandable_grab_R_aux:NNNwNNn #1 \q__cmd #2#3 } }
+\cs_set_protected:Npn \__cmd_tmp:w #1
+ {
+ \cs_new:Npn \__cmd_expandable_grab_R_aux:NNNwNNn ##1##2##3##4 \q__cmd ##5##6##7
+ {
+ \str_if_eq:nnTF {##7} {##2}
+ {
+ \str_if_eq:onTF
+ { ##1 { } { } ##7 ##2 \q__cmd ##3 }
+ { { } {##2} { } }
+ }
+ { \use_ii:nn }
+ {
+ ##1
+ { \__cmd_expandable_grab_D:NNNwNNnnn ##1##2##3##4 \q__cmd ##5##6 }
+ \q_nil { } ##2 \ERROR \q__cmd \ERROR
+ }
+ {
+ \__kernel_msg_expandable_error:nnff
+ { ltcmd } { missing-required }
+ { \exp_args:Nf \tl_trim_spaces:n { \token_to_str:N ##5 } }
+ { \tl_to_str:n {##2} }
+ ##4 {#1} \q__cmd ##5 ##6 {##7}
+ }
+ }
+ }
+\exp_args:No \__cmd_tmp:w { \c_novalue_tl }
+\cs_new:Npn \__cmd_expandable_grab_R_alt:w #1 \q__cmd #2#3
+ { #2 { \__cmd_expandable_grab_R_alt_aux:NNwNNn #1 \q__cmd #2#3 } }
+\cs_set_protected:Npn \__cmd_tmp:w #1
+ {
+ \cs_new:Npn \__cmd_expandable_grab_R_alt_aux:NNwNNn ##1##2##3 \q__cmd ##4##5##6
+ {
+ \str_if_eq:nnTF {##6} {##2}
+ {
+ \str_if_eq:onTF
+ { ##1 { } ##6 ##2 ##2 }
+ { { } ##2 }
+ }
+ { \use_ii:nn }
+ {
+ ##1
+ { \__cmd_expandable_grab_D_alt:NNwn ##4 ##5 ##3 \q__cmd }
+ ##6 \ERROR
+ }
+ {
+ \__kernel_msg_expandable_error:nnff
+ { ltcmd } { missing-required }
+ { \exp_args:Nf \tl_trim_spaces:n { \token_to_str:N ##4 } }
+ { \tl_to_str:n {##2} }
+ ##3 {#1} \q__cmd ##4 ##5 {##6}
+ }
+ }
+ }
+\exp_args:No \__cmd_tmp:w { \c_novalue_tl }
+\cs_new:Npn \__cmd_expandable_grab_t:w #1 \q__cmd #2#3
+ { #2 { \__cmd_expandable_grab_t_aux:NNwn #1 \q__cmd #2 #3 } }
+\cs_new:Npn \__cmd_expandable_grab_t_aux:NNwn #1#2#3 \q__cmd #4#5#6
+ {
+ \str_if_eq:onTF { #1 { } #6 #2 } {#2}
+ { #3 { \BooleanTrue } \q__cmd #4 #5 }
+ { #3 { \BooleanFalse } \q__cmd #4 #5 {#6} }
+ }
+\cs_new:Npn \__cmd_put_arg_expandable:nw #1#2 \q__cmd { #2 {#1} \q__cmd }
+\cs_generate_variant:Nn \__cmd_put_arg_expandable:nw { o }
+\cs_new_protected:Npn \__cmd_bool_reverse:N #1
+ {
+ \bool_if:NTF #1
+ { \tl_set:Nn \ProcessedArgument { \c_false_bool } }
+ { \tl_set:Nn \ProcessedArgument { \c_true_bool } }
+ }
+\seq_new:N \l__cmd_split_list_seq
+\tl_new:N \l__cmd_split_list_tl
+\cs_new_protected:Npn \__cmd_split_list:nn #1#2
+ {
+ \tl_if_single:nTF {#1}
+ {
+ \token_if_cs:NTF #1
+ { \__cmd_split_list_multi:nn {#1} {#2} }
+ { \__cmd_split_list_single:Nn #1 {#2} }
+ }
+ { \__cmd_split_list_multi:nn {#1} {#2} }
+ }
+\cs_new_protected:Npn \__cmd_split_list_multi:nn #1#2
+ {
+ \seq_set_split:Nnn \l__cmd_split_list_seq {#1} {#2}
+ \tl_clear:N \ProcessedArgument
+ \seq_map_inline:Nn \l__cmd_split_list_seq
+ { \tl_put_right:Nn \ProcessedArgument { {##1} } }
+ }
+\cs_generate_variant:Nn \__cmd_split_list_multi:nn { nV }
+\group_begin:
+\char_set_catcode_active:N \^^@
+\cs_new_protected:Npn \__cmd_split_list_single:Nn #1#2
+ {
+ \tl_set:Nn \l__cmd_split_list_tl {#2}
+ \group_begin:
+ \char_set_lccode:nn { `\^^@ } { `#1 }
+ \tex_lowercase:D
+ {
+ \group_end:
+ \tl_replace_all:Nnn \l__cmd_split_list_tl { ^^@ }
+ } {#1}
+ \__cmd_split_list_multi:nV {#1} \l__cmd_split_list_tl
+ }
+\group_end:
+\cs_new_protected:Npn \__cmd_split_argument:nnn #1#2#3
+ {
+ \__cmd_split_list:nn {#2} {#3}
+ \exp_args:Nf \__cmd_split_argument_aux:nnnn
+ { \tl_count:N \ProcessedArgument }
+ {#1} {#2} {#3}
+ }
+\cs_new_protected:Npn \__cmd_split_argument_aux:nnnn #1#2#3#4
+ {
+ \int_compare:nNnF {#1} = { #2 + 1 }
+ {
+ \int_compare:nNnTF {#1} > { #2 + 1 }
+ {
+ \tl_set:Nx \ProcessedArgument
+ {
+ \exp_last_unbraced:NnNo
+ \__cmd_split_argument_aux:n
+ { #2 + 1 }
+ \use_none_delimit_by_q_stop:w
+ \ProcessedArgument
+ \q_stop
+ }
+ \__kernel_msg_error:nnxxx { ltcmd } { split-excess-tokens }
+ { \tl_to_str:n {#3} } { \int_eval:n { #2 + 1 } }
+ { \tl_to_str:n {#4} }
+ }
+ {
+ \tl_put_right:Nx \ProcessedArgument
+ {
+ \prg_replicate:nn { #2 + 1 - (#1) }
+ { { \exp_not:V \c_novalue_tl } }
+ }
+ }
+ }
+ }
+\cs_new:Npn \__cmd_split_argument_aux:n #1
+ { \prg_replicate:nn {#1} { \__cmd_split_argument_aux:wn } }
+\cs_new:Npn \__cmd_split_argument_aux:wn #1 \use_none_delimit_by_q_stop:w #2
+ {
+ \exp_not:n { {#2} }
+ #1
+ \use_none_delimit_by_q_stop:w
+ }
+\cs_new_protected:Npn \__cmd_trim_spaces:n #1
+ { \tl_set:Nx \ProcessedArgument { \tl_trim_spaces:n {#1} } }
+\cs_new_protected:Npn \__cmd_get_arg_spec_error:N #1
+ {
+ \bool_set_false:N \l__cmd_environment_bool
+ \tl_set:Nn \l__cmd_fn_tl {#1}
+ \__cmd_get_arg_spec_error_aux:n { \cs_if_exist:NTF #1 }
+ }
+\cs_new_protected:Npn \__cmd_get_arg_spec_error:n #1
+ {
+ \bool_set_true:N \l__cmd_environment_bool
+ \str_set:Nx \l__cmd_environment_str {#1}
+ \__cmd_get_arg_spec_error_aux:n
+ { \cs_if_exist:cTF { \l__cmd_environment_str } }
+ }
+\cs_new_protected:Npn \__cmd_get_arg_spec_error_aux:n #1
+ {
+ #1
+ {
+ \__kernel_msg_error:nnx { ltcmd } { non-xparse }
+ { \__cmd_environment_or_command: }
+ }
+ {
+ \__kernel_msg_error:nnx { ltcmd } { unknown }
+ { \__cmd_environment_or_command: }
+ }
+ }
+\cs_new_protected:Npn \__cmd_get_arg_spec:NTF #1#2#3
+ {
+ \__cmd_cmd_if_xparse:NTF #1
+ {
+ \tl_set:Nx \ArgumentSpecification { \tl_item:Nn #1 { 2 } }
+ #2
+ }
+ {#3}
+ }
+\cs_new_eq:NN \__cmd_chk_if_free_cs:N \__kernel_chk_if_free_cs:N
+\cs_gset_eq:NN \__kernel_chk_if_free_cs:N \use_none:n
+\tl_new:N \ArgumentSpecification
+\cs_new_protected:Npn \__cmd_get_arg_spec:N #1
+ {
+ \__cmd_get_arg_spec:NTF #1 { }
+ { \__cmd_get_arg_spec_error:N #1 }
+ }
+\cs_new_protected:Npn \__cmd_get_arg_spec:n #1
+ {
+ \exp_args:Nc \__cmd_get_arg_spec:NTF
+ { environment~ \tl_to_str:n {#1} }
+ { }
+ { \__cmd_get_arg_spec_error:n {#1} }
+ }
+\cs_new_protected:Npn \__cmd_show_arg_spec:N #1
+ {
+ \__cmd_get_arg_spec:NTF #1
+ { \tl_show:N \ArgumentSpecification }
+ { \__cmd_get_arg_spec_error:N #1 }
+ }
+\cs_new_protected:Npn \__cmd_show_arg_spec:n #1
+ {
+ \exp_args:Nc \__cmd_get_arg_spec:NTF
+ { environment~ \tl_to_str:n {#1} }
+ { \tl_show:N \ArgumentSpecification }
+ { \__cmd_get_arg_spec_error:n {#1} }
+ }
+\cs_new_protected:Npn \__cmd_check_definable:nNT #1
+ { \tl_trim_spaces_apply:nN {#1} \__cmd_check_definable_aux:nN }
+\group_begin:
+ \char_set_catcode_active:n { `? }
+ \cs_new_protected:Npn \__cmd_check_definable_aux:nN #1#2
+ {
+ \group_begin:
+ \tl_if_single_token:nTF {#1}
+ {
+ \int_set:Nn \tex_escapechar:D { 92 }
+ \exp_args:Nx \tl_if_empty:nTF
+ { \exp_args:No \str_tail:n { \token_to_str:N #1 } }
+ {
+ \exp_args:Nx \char_set_lccode:nn
+ { ` \str_head:n {#1} } { `? }
+ \tex_lowercase:D { \tl_if_eq:nnTF {#1} } { ? }
+ { \group_end: \use_iii:nnn }
+ { \group_end: \use_i:nnn }
+ }
+ { \group_end: \use_iii:nnn }
+ }
+ { \group_end: \use_ii:nnn }
+ {
+ \__kernel_msg_error:nnxx { ltcmd } { not-definable }
+ { \tl_to_str:n {#1} } { \token_to_str:N #2 }
+ }
+ {
+ \__kernel_msg_error:nnxx { ltcmd } { not-one-token }
+ { \tl_to_str:n {#1} } { \token_to_str:N #2 }
+ }
+ }
+\group_end:
+\cs_new_protected:Npn \__cmd_token_if_cs:NTF #1
+ {
+ \group_begin:
+ \int_set:Nn \tex_escapechar:D { 92 }
+ \exp_args:Nx \tl_if_empty:nTF
+ { \exp_args:No \str_tail:n { \token_to_str:N #1 } }
+ { \group_end: \use_ii:nn }
+ { \group_end: \use_i:nn }
+ }
+\cs_new:Npn \__cmd_tl_mapthread_function:NNN #1#2#3
+ {
+ \exp_after:wN \exp_after:wN
+ \exp_after:wN \__cmd_tl_mapthread_loop:w
+ \exp_after:wN \exp_after:wN
+ \exp_after:wN #3
+ \exp_after:wN #1
+ \exp_after:wN \q_recursion_tail
+ \exp_after:wN \q_mark
+ #2
+ \q_recursion_tail
+ \q_recursion_stop
+ }
+\cs_new:Npn \__cmd_tl_mapthread_function:nnN #1#2#3
+ {
+ \__cmd_tl_mapthread_loop:w #3
+ #1 \q_recursion_tail \q_mark
+ #2 \q_recursion_tail \q_recursion_stop
+ }
+\cs_new:Npn \__cmd_tl_mapthread_loop:w #1#2#3 \q_mark #4
+ {
+ \quark_if_recursion_tail_stop:n {#2}
+ \quark_if_recursion_tail_stop:n {#4}
+ #1 {#2} {#4}
+ \__cmd_tl_mapthread_loop:w #1#3 \q_mark
+ }
+\cs_new_protected:Npn \__cmd_cmd_if_xparse:NTF #1
+ {
+ \exp_args:Nf \str_case_e:nnTF
+ {
+ \exp_args:Nf \tl_if_empty:nT { \cs_argument_spec:N #1 }
+ {
+ \exp_last_unbraced:Nf \__cmd_cmd_if_xparse_aux:w
+ { \cs_replacement_spec:N #1 } ~ \q_stop
+ }
+ }
+ {
+ { \token_to_str:N \__cmd_start:nNNnnn } { }
+ { \token_to_str:N \__cmd_start_expandable:nNNNNn } { }
+ { \token_to_str:N \__cmd_start_env:nnnnn } { }
+ }
+ }
+\cs_new:Npn \__cmd_cmd_if_xparse_aux:w #1 ~ #2 \q_stop {#1}
+\cs_new_protected:Npn \__cmd_peek_nonspace:NTF
+ { \__cmd_peek_nonspace_aux:nNNTF { } \__cmd_peek_meaning:NTF }
+\cs_new_protected:Npn \__cmd_peek_nonspace_remove:NTF
+ { \__cmd_peek_nonspace_aux:nNNTF { } \__cmd_peek_meaning_remove:NTF }
+\cs_new_protected:Npn \__cmd_peek_nonspace_aux:nNNTF #1#2#3#4#5
+ {
+ \peek_meaning_remove:NTF \c_space_token
+ { \__cmd_peek_nonspace_aux:nNNTF { #1 ~ } #2 #3 {#4} {#5} }
+ { #2 #3 { #4 } { #5 #1 } }
+ }
+\cs_new_protected:Npn \__cmd_peek_meaning:NTF
+ { \__cmd_peek_meaning_aux:NNTF \c_false_bool }
+\cs_new_protected:Npn \__cmd_peek_meaning_remove:NTF
+ { \__cmd_peek_meaning_aux:NNTF \c_true_bool }
+\cs_new_protected:Npn \__cmd_peek_meaning_aux:NNTF #1#2#3#4
+ {
+ \tl_set:Nn \l__cmd_tmpa_tl {#3}
+ \tl_set:Nn \l__cmd_tmpb_tl {#4}
+ \peek_meaning:NTF #2
+ {
+ \token_if_eq_meaning:NNTF #2 \c_group_begin_token
+ { \__cmd_peek_true_remove:Nw #1 }
+ {
+ \__cmd_token_if_cs:NTF #2
+ { \__cmd_peek_cs_check_equal:NNN #1 #2 }
+ { \__cmd_peek_true_remove:Nw #1 }
+ }
+ }
+ { \l__cmd_tmpb_tl }
+ }
+\cs_new_protected:Npn \__cmd_peek_cs_check_equal:NNN #1#2#3
+ {
+ \str_if_eq:nnTF {#2} {#3}
+ { \__cmd_peek_true_remove:Nw #1 }
+ { \l__cmd_tmpb_tl }
+ #3
+ }
+\cs_new_protected:Npn \__cmd_peek_true_remove:Nw #1
+ {
+ \bool_if:NTF #1
+ {
+ \tex_afterassignment:D \l__cmd_tmpa_tl
+ \cs_set_eq:NN \__cmd_tmp:w
+ }
+ { \l__cmd_tmpa_tl }
+ }
+\tl_const:Nn \c__cmd_ignore_def_tl
+ { \\ \\ LaTeX~will~ignore~this~entire~definition. }
+\cs_new:Npn \__cmd_environment_or_command:
+ {
+ \bool_if:NTF \l__cmd_environment_bool
+ { environment ~ ' \l__cmd_environment_str ' }
+ {
+ command ~ '
+ \exp_args:Nf \tl_trim_spaces:n
+ { \exp_after:wN \token_to_str:N \l__cmd_fn_tl }
+ '
+ }
+ }
+\__kernel_msg_new:nnnn { ltcmd } { arg-after-body }
+ { In~the~definition~of~#1,~b~(body)~argument~must~be~last. }
+ {
+ The~'body'~argument~type~is~followed~by~'#2'~in~the~argument~
+ specification~of~the~#1.~This~is~not~allowed.
+ \c__cmd_ignore_def_tl
+ }
+\__kernel_msg_new:nnnn { ltcmd } { bad-arg-spec }
+ { Bad~argument~specification~'#2'~for~#1. }
+ {
+ The~argument~specification~provided~was~not~valid:~
+ one~or~more~mandatory~pieces~of~information~were~missing.
+ \c__cmd_ignore_def_tl
+ }
+\__kernel_msg_new:nnnn { ltcmd } { command-already-defined }
+ { Command~'#1'~already~defined! }
+ {
+ You~have~used~#2~
+ with~a~command~that~already~has~a~definition. \\ \\
+ The~existing~definition~of~'#1'~will~not~be~altered.
+ }
+\__kernel_msg_new:nnnn { ltcmd } { command-not-yet-defined }
+ { Command ~'#1'~not~yet~defined! }
+ {
+ You~have~used~#2~
+ with~a~command~that~was~never~defined.
+ \c__cmd_ignore_def_tl
+ }
+\__kernel_msg_new:nnnn { ltcmd } { environment-already-defined }
+ { Environment~'#1'~already~defined! }
+ {
+ You~have~used~\NewDocumentEnvironment
+ with~an~environment~that~already~has~a~definition. \\ \\
+ The~existing~definition~of~'#1'~will~not~be~altered.
+ }
+\__kernel_msg_new:nnnn { ltcmd } { environment-not-yet-defined }
+ { Environment~'#1'~not~yet~defined! }
+ {
+ You~have~used~\RenewDocumentEnvironment
+ with~an~environment~that~was~never~defined.
+ \c__cmd_ignore_def_tl
+ }
+\__kernel_msg_new:nnnn { ltcmd } { expandable-ending-optional }
+ {
+ Argument~specification~'#2'~for~expandable~command~'#1'~
+ ends~with~optional~argument.
+ }
+ {
+ Expandable~commands~must~have~a~final~mandatory~argument~
+ (or~no~arguments~at~all).~You~cannot~have~a~terminal~optional~
+ argument~with~expandable~commands.
+ }
+\__kernel_msg_new:nnnn { ltcmd } { inconsistent-long }
+ { Inconsistent~long~arguments~for~expandable~command~'#1'. }
+ {
+ The~arguments~for~an~expandable~command~must~not~involve~short~
+ arguments~after~long~arguments.~You~have~tried~to~mix~the~two~types.
+ }
+\__kernel_msg_new:nnnn { ltcmd } { invalid-command-arg }
+ { Argument~type~'#2'~not~available~for~#1. }
+ {
+ The~letter~'#2'~can~only~be~used~in~environment~argument~
+ specifications,~not~for~commands.
+ \\ \\
+ LaTeX~will~ignore~this~entire~definition.
+ }
+\__kernel_msg_new:nnnn { ltcmd } { invalid-expandable-argument-type }
+ { Argument~type~'#2'~not~available~for~expandable~command~'#1'. }
+ {
+ The~letter~'#2'~specifies~an~argument~type~which~cannot~be~used~
+ in~an~expandable~command.
+ \c__cmd_ignore_def_tl
+ }
+\__kernel_msg_new:nnnn { ltcmd } { invalid-after-optional-expandably }
+ {
+ Argument~type~'#2'~not~available~after~optional~argument~
+ for~expandable~command~'#1'.
+ }
+ {
+ The~letter~'#2'~specifies~an~argument~type~which~cannot~be~used~
+ in~an~expandable~command~after~an~optional~argument.
+ \c__cmd_ignore_def_tl
+ }
+\__kernel_msg_new:nnnn { ltcmd } { non-trailing-obey-spaces }
+ { Prefix~'!'~used~before~mandatory~argument~'#2'~of~#1. }
+ {
+ The~prefix~'!'~can~only~apply~to~trailing~optional~arguments.
+ \c__cmd_ignore_def_tl
+ }
+\__kernel_msg_new:nnnn { ltcmd } { not-definable }
+ { First~argument~of~'#2'~must~be~a~command. }
+ {
+ The~first~argument~of~'#2'~should~be~the~document~command~that~will~
+ be~defined.~The~provided~argument~'#1'~is~a~character.~Perhaps~a~
+ backslash~is~missing?
+ \c__cmd_ignore_def_tl
+ }
+\__kernel_msg_new:nnnn { ltcmd } { not-one-token }
+ { First~argument~of~'#2'~must~be~a~command. }
+ {
+ The~first~argument~of~'#2'~should~be~the~document~command~that~will~
+ be~defined.~The~provided~argument~'#1'~contains~more~than~one~
+ token.~Perhaps~a~backslash~is~missing?
+ \c__cmd_ignore_def_tl
+ }
+\__kernel_msg_new:nnnn { ltcmd } { not-single-token }
+ {
+ Argument~delimiter~'#2'~for~the~#1~should~be~
+ a~single~non-space~token.
+ }
+ {
+ The~argument~specification~provided~was~not~valid:~in~a~place~
+ where~a~single~token~is~required,~LaTeX~found~'#2'.
+ \c__cmd_ignore_def_tl
+ }
+\__kernel_msg_new:nnnn { ltcmd } { forbidden-implicit-group-token }
+ { Argument~delimiter~'#2'~for~the~#1~is~not~allowed. }
+ {
+ The~argument~specification~provided~was~not~valid:~the~implicit~
+ #3-group~token~'#2'~is~not~allowed~as~an~argument~delimiter.
+ \c__cmd_ignore_def_tl
+ }
+\__kernel_msg_new:nnnn { ltcmd } { processor-in-expandable }
+ { Argument~processor~'>{#2}'~cannot~be~used~for~the~expandable~command~'#1'. }
+ {
+ The~argument~specification~for~#1~contains~a~processor~function:~
+ this~is~only~supported~for~standard~robust~commands.
+ \c__cmd_ignore_def_tl
+ }
+\__kernel_msg_new:nnnn { ltcmd } { too-many-arguments }
+ { Too~many~arguments~in~argument~specification~'#2'~of~#1. }
+ {
+ The~argument~specification~provided~has~more~than~9~arguments.~
+ This~cannot~be~implemented.
+ \c__cmd_ignore_def_tl
+ }
+\__kernel_msg_new:nnnn { ltcmd } { two-markers }
+ { Two~'#2'~apply~to~the~same~argument~in~argument~specification~of~#1. }
+ {
+ The~argument~specification~provided~has~two~markers~'#2'~applying~
+ to~the~same~argument;~these~are~redundant.
+ }
+\__kernel_msg_new:nnnn { ltcmd } { unknown-argument-type }
+ { Unknown~argument~type~'#2'~for~the~#1. }
+ {
+ The~letter~'#2'~does~not~specify~a~known~argument~type.
+ \c__cmd_ignore_def_tl
+ }
+\__kernel_msg_new:nnnn { ltcmd } { xparse-argument-type }
+ { Deprecated~argument~type~'#2'~for~the~#1~requires~xparse. }
+ {
+ The~letter~'#2'~specifies~a~known~argument~type~that~requires~
+ the~xparse~package.
+ \c__cmd_ignore_def_tl
+ }
+\__kernel_msg_new:nnn { ltcmd } { if-boolean }
+ { Invalid~use~\iow_char:N\\IfBooleanTF~{#1} }
+\__kernel_msg_new:nnnn { ltcmd } { loop-in-defaults }
+ { Defaults~of~#1~have~circular~dependency. }
+ {
+ The~default~values~of~two~or~more~arguments~of~the~#1~
+ depend~on~each~other~in~a~way~that~cannot~be~resolved.
+ }
+\__kernel_msg_new:nnnn { ltcmd } { missing-required }
+ { Missing~required~argument~for~#1. }
+ {
+ The~current~#1~expects~an~argument~starting~with~'#2'.~
+ LaTeX~did~not~find~it,~and~will~insert~a~default~value~to~be~processed.
+ }
+\__kernel_msg_new:nnnn { ltcmd } { non-xparse }
+ { \str_uppercase:n #1~not~defined~using~xparse. }
+ {
+ You~have~asked~for~the~argument~specification~for~the~#1,~
+ but~this~was~not~defined~using~xparse.
+ }
+\__kernel_msg_new:nnnn { ltcmd } { split-excess-tokens }
+ { Too~many~'#1'~tokens~when~trying~to~split~argument. }
+ {
+ LaTeX~was~asked~to~split~the~input~'#3'~
+ at~each~occurrence~of~the~token~'#1',~up~to~a~maximum~of~#2~parts.~
+ There~were~too~many~'#1'~tokens.
+ }
+\__kernel_msg_new:nnnn { ltcmd } { unknown }
+ { Unknown~document~#1. }
+ {
+ You~have~asked~for~the~argument~specification~for~the~#1,~
+ but~it~is~not~defined.
+ }
+\__kernel_msg_new:nnnn { ltcmd } { verbatim-newline }
+ { Verbatim~argument~of~#1~ended~by~end~of~line. }
+ {
+ The~verbatim~argument~of~the~#1~cannot~contain~more~than~one~line,~
+ but~the~end~
+ of~the~current~line~has~been~reached.~You~may~have~forgotten~the~
+ closing~delimiter.
+ \\ \\
+ LaTeX~will~ignore~'#2'.
+ }
+\__kernel_msg_new:nnnn { ltcmd } { verbatim-tokenized }
+ { The~verbatim~#1~cannot~be~used~inside~an~argument. }
+ {
+ The~#1~takes~a~verbatim~argument.~
+ It~may~not~appear~within~the~argument~of~another~function.~
+ It~received~an~illegal~token \tl_if_empty:nF {#3} { ~'#3' } .
+ \\ \\
+ LaTeX~will~ignore~'#2'.
+ }
+\__kernel_msg_new:nnn { ltcmd } { define-command }
+ {
+ Defining~command~#1~
+ with~sig.~'#2'~\msg_line_context:.
+ }
+\__kernel_msg_new:nnn { ltcmd } { define-environment }
+ {
+ Defining~environment~'#1'~
+ with~sig.~'#2'~\msg_line_context:.
+ }
+\__kernel_msg_new:nnn { ltcmd } { redefine-command }
+ {
+ Redefining~command~#1~
+ with~sig.~'#2'~\msg_line_context:.
+ }
+\__kernel_msg_new:nnn { ltcmd } { redefine-environment }
+ {
+ Redefining~environment~'#1'~
+ with~sig.~'#2'~\msg_line_context:.
+ }
+\__kernel_msg_new:nnn { ltcmd } { optional-mandatory }
+ {
+ Since~the~mandatory~argument~'#1'~has~the~same~delimiter~'#2'~
+ as~a~previous~optional~argument,~it~will~not~be~possible~to~
+ omit~all~optional~arguments~when~calling~this~command.
+ }
+\__kernel_msg_new:nnn { ltcmd } { unsupported-let }
+ {
+ The~command~'#1'~was~undefined~but~not~the~associated~commands~
+ '#1~code'~and/or~'#1~defaults'.~Maybe~you~tried~using~
+ \iow_char:N\\let.~This~may~lead~to~an~infinite~loop.
+ }
+\cs_new_eq:NN \BooleanFalse \c_false_bool
+\cs_new_eq:NN \BooleanTrue \c_true_bool
+\cs_new_protected:Npn \NewDocumentCommand #1#2#3
+ {
+ \__cmd_check_definable:nNT {#1} \NewDocumentCommand
+ {
+ \cs_if_exist:NTF #1
+ {
+ \__kernel_msg_error:nnxx { ltcmd } { command-already-defined }
+ { \use:nnn \token_to_str:N #1 { } }
+ { \token_to_str:N \NewDocumentCommand }
+ }
+ { \__cmd_declare_cmd:Nnn #1 {#2} {#3} }
+ }
+ }
+\cs_new_protected:Npn \RenewDocumentCommand #1#2#3
+ {
+ \__cmd_check_definable:nNT {#1} \RenewDocumentCommand
+ {
+ \cs_if_exist:NTF #1
+ { \__cmd_declare_cmd:Nnn #1 {#2} {#3} }
+ {
+ \__kernel_msg_error:nnxx { ltcmd } { command-not-yet-defined }
+ { \use:nnn \token_to_str:N #1 { } }
+ { \token_to_str:N \RenewDocumentCommand }
+ }
+ }
+ }
+\cs_new_protected:Npn \ProvideDocumentCommand #1#2#3
+ {
+ \__cmd_check_definable:nNT {#1} \ProvideDocumentCommand
+ { \cs_if_exist:NF #1 { \__cmd_declare_cmd:Nnn #1 {#2} {#3} } }
+ }
+\cs_new_protected:Npn \DeclareDocumentCommand #1#2#3
+ {
+ \__cmd_check_definable:nNT {#1} \DeclareDocumentCommand
+ { \__cmd_declare_cmd:Nnn #1 {#2} {#3} }
+ }
+\cs_new_protected:Npn \NewDocumentEnvironment #1#2#3#4
+ {
+ \cs_if_exist:cTF {#1}
+ { \__kernel_msg_error:nnx { ltcmd } { environment-already-defined } {#1} }
+ { \__cmd_declare_env:nnnn {#1} {#2} {#3} {#4} }
+ }
+\cs_new_protected:Npn \RenewDocumentEnvironment #1#2#3#4
+ {
+ \cs_if_exist:cTF {#1}
+ { \__cmd_declare_env:nnnn {#1} {#2} {#3} {#4} }
+ { \__kernel_msg_error:nnx { ltcmd } { environment-not-yet-defined } {#1} }
+ }
+\cs_new_protected:Npn \ProvideDocumentEnvironment #1#2#3#4
+ { \cs_if_exist:cF {#1} { \__cmd_declare_env:nnnn {#1} {#2} {#3} {#4} } }
+\cs_new_protected:Npn \DeclareDocumentEnvironment #1#2#3#4
+ { \__cmd_declare_env:nnnn {#1} {#2} {#3} {#4} }
+\cs_new_protected:Npn \NewExpandableDocumentCommand #1#2#3
+ {
+ \__cmd_check_definable:nNT {#1} \NewExpandableDocumentCommand
+ {
+ \cs_if_exist:NTF #1
+ {
+ \__kernel_msg_error:nnxx { ltcmd } { command-already-defined }
+ { \use:nnn \token_to_str:N #1 { } }
+ { \token_to_str:N \NewExpandableDocumentCommand }
+ }
+ { \__cmd_declare_expandable_cmd:Nnn #1 {#2} {#3} }
+ }
+ }
+\cs_new_protected:Npn \RenewExpandableDocumentCommand #1#2#3
+ {
+ \__cmd_check_definable:nNT {#1} \RenewExpandableDocumentCommand
+ {
+ \cs_if_exist:NTF #1
+ { \__cmd_declare_expandable_cmd:Nnn #1 {#2} {#3} }
+ {
+ \__kernel_msg_error:nnxx { ltcmd } { command-not-yet-defined }
+ { \use:nnn \token_to_str:N #1 { } }
+ { \token_to_str:N \RenewExpandableDocumentCommand }
+ }
+ }
+ }
+\cs_new_protected:Npn \ProvideExpandableDocumentCommand #1#2#3
+ {
+ \__cmd_check_definable:nNT {#1} \ProvideExpandableDocumentCommand
+ {
+ \cs_if_exist:NF #1
+ { \__cmd_declare_expandable_cmd:Nnn #1 {#2} {#3} }
+ }
+ }
+\cs_new_protected:Npn \DeclareExpandableDocumentCommand #1#2#3
+ {
+ \__cmd_check_definable:nNT {#1} \DeclareExpandableDocumentCommand
+ { \__cmd_declare_expandable_cmd:Nnn #1 {#2} {#3} }
+ }
+\cs_new:Npn \IfBooleanTF #1
+ {
+ \tl_if_single:nF {#1}
+ { \prg_break:n { \use:n } }
+ \tl_if_single_token:nF #1
+ { \prg_break:n { \use:n } }
+ \token_if_eq_meaning:NNT #1 \c_true_bool
+ { \prg_break:n { \use_ii:nnn } }
+ \token_if_eq_meaning:NNT #1 \c_false_bool
+ { \prg_break:n { \use_iii:nnn } }
+ \prg_break:n { \use:n }
+ \prg_break_point:
+ {
+ \__kernel_msg_expandable_error:nnn { ltcmd } { if-boolean } {#1}
+ \use_ii:nn
+ }
+ }
+\cs_new:Npn \IfBooleanT #1#2 { \IfBooleanTF {#1} {#2} { } }
+\cs_new:Npn \IfBooleanF #1 { \IfBooleanTF {#1} { } }
+\cs_new_eq:NN \IfNoValueF \tl_if_novalue:nF
+\cs_new_eq:NN \IfNoValueT \tl_if_novalue:nT
+\cs_new_eq:NN \IfNoValueTF \tl_if_novalue:nTF
+\cs_new:Npn \IfValueF { \tl_if_novalue:nT }
+\cs_new:Npn \IfValueT { \tl_if_novalue:nF }
+\cs_new:Npn \IfValueTF #1#2#3 { \tl_if_novalue:nTF {#1} {#3} {#2} }
+\tl_new:N \ProcessedArgument
+\cs_new_eq:NN \ReverseBoolean \__cmd_bool_reverse:N
+\cs_new_eq:NN \SplitArgument \__cmd_split_argument:nnn
+\cs_new_eq:NN \SplitList \__cmd_split_list:nn
+\cs_new_eq:NN \TrimSpaces \__cmd_trim_spaces:n
+\cs_new_eq:NN \ProcessList \tl_map_function:nN
+\cs_new_protected:Npn \GetDocumentCommandArgSpec #1
+ {
+ \__cmd_check_definable:nNT {#1} \GetDocumentCommandArgSpec
+ { \__cmd_get_arg_spec:N #1 }
+ }
+\cs_new_eq:NN \GetDocumentEnvironmentArgSpec \__cmd_get_arg_spec:n
+\cs_new_protected:Npn \ShowDocumentCommandArgSpec #1
+ {
+ \__cmd_check_definable:nNT {#1} \ShowDocumentCommandArgSpec
+ { \__cmd_show_arg_spec:N #1 }
+ }
+\cs_new_eq:NN \ShowDocumentEnvironmentArgSpec \__cmd_show_arg_spec:n
+\cs_gset_eq:NN \__kernel_chk_if_free_cs:N \__cmd_chk_if_free_cs:N
+\cs_undefine:N \__cmd_chk_if_free_cs:N
+\ExplSyntaxOff
+\EndIncludeInRelease
+\catcode`\^^@=\@latexrelease@catcode@null\relax
+
+\IncludeInRelease{2020/10/01}%
+ {\NewDocumentCommand}{Document commands}%
+\@ifundefined{NewDocumentCommand}
+ {%
+ \IfFileExists{xparse.ltx}
+ {\input xparse.ltx }
+ {\@latex@error{LaTeX requires xparse}\@ehd}%
+ }
+ {}
+\EndIncludeInRelease
+
+\IncludeInRelease{0000/00/00}%
+ {\NewDocumentCommand}{Document commands}%
+
+\EndIncludeInRelease
%%% From File: lthooks.dtx
\def\lthooksversion{v1.0h}
-\def\lthooksdate{2021/01/07}
+\def\lthooksdate{2021/01/15}
\IncludeInRelease{2020/10/01}%
{\NewHook}{The hook management}%
\ExplSyntaxOn
@@ -1989,9 +4259,11 @@ of this package available from CTAN}
{ \__hook_label_ordered:nnTF {#2} {#3} { -> } { <- } }
}
\cs_new_protected:cpn { __hook_rule_incompatible-error_gset:nnn } #1#2#3
- { \__hook_tl_gset:cn { g__hook_#1_rule_ \__hook_label_pair:nn {#2} {#3} _tl } { xE } }
+ { \__hook_tl_gset:cn { g__hook_#1_rule_ \__hook_label_pair:nn {#2} {#3} _tl }
+ { xE } }
\cs_new_protected:cpn { __hook_rule_incompatible-warning_gset:nnn } #1#2#3
- { \__hook_tl_gset:cn { g__hook_#1_rule_ \__hook_label_pair:nn {#2} {#3} _tl } { xW } }
+ { \__hook_tl_gset:cn { g__hook_#1_rule_ \__hook_label_pair:nn {#2} {#3} _tl }
+ { xW } }
\cs_new_protected:Npn \__hook_rule_unrelated_gset:nnn #1#2#3 { }
\cs_new_protected:Npn \__hook_rule_gclear:nnn #1#2#3
{ \cs_undefine:c { g__hook_#1_rule_ \__hook_label_pair:nn {#2} {#3} _tl } }
@@ -4527,8 +6799,10 @@ of this package available from CTAN}
\IncludeInRelease{2020/02/02}%
{\fontseries}{delay fontseries update}%
-\DeclareRobustCommand\fontseries[1]{\@forced@seriesfalse\merge@font@series{#1}}
-\DeclareRobustCommand\fontseriesforce[1]{\@forced@seriestrue\edef\f@series{#1}}
+\DeclareRobustCommand\fontseries[1]{\@forced@seriesfalse
+ \merge@font@series{#1}}
+\DeclareRobustCommand\fontseriesforce[1]{\@forced@seriestrue
+ \edef\f@series{#1}}
\let\delayed@f@adjustment\@undefined
\ifx\@forced@seriestrue\@undefined \else
@@ -4837,7 +7111,7 @@ of this package available from CTAN}
\EndIncludeInRelease
%%% From File: ltfsstrc.dtx
%% Copyright (C) 1989-97 by Frank Mittelbach and Rainer Sch\"opf.
-%% Copyright (C) 1994-97 by LaTeX3 project. All rights reserved.
+%% Copyright (C) 1994-97 by LaTeX Project. All rights reserved.
\IncludeInRelease{2021/05/01}%
{\selectfont}{Add hook to \selectfont}%
@@ -4985,7 +7259,7 @@ of this package available from CTAN}
in version \math@version}%
\@eha
\fi
- \else \expandafter\non@alpherr\fi
+ \else \expandafter\expandafter\expandafter\non@alpherr\fi
\expandafter#1\ifx\math@bgroup\bgroup{#4}\else#4\fi
}%
}
@@ -5500,7 +7774,6 @@ of this package available from CTAN}
\@font@series@contexttrue
\fi\fi\fi
}
-
\newif\if@font@series@context
\EndIncludeInRelease
\IncludeInRelease{0000/00/00}%
@@ -5518,9 +7791,7 @@ of this package available from CTAN}
\protected@edef\emfontdeclare@clist{\zap@space#1, \@empty\emforce\emreset}%
}
\let\emfontdeclare@clist\@empty
-
\DeclareRobustCommand\emreset{\upshape\ulcshape}
-
\DeclareRobustCommand\em{%
\@nomath\em
\ifx\emfontdeclare@clist\@empty
@@ -5686,6 +7957,7 @@ of this package available from CTAN}
\let\textsw\@undefined
\let\textssc\@undefined
\EndIncludeInRelease
+%%% From File: lttextcomp.dtx
\IncludeInRelease{2020/02/02}%
{\oldstylenums}{Old style numerals}%
\DeclareRobustCommand\legacyoldstylenums[1]{%
@@ -5803,7 +8075,6 @@ of this package available from CTAN}
\selectfont#1%
\egroup
}
-
\def\tc@fake@euro#1{%
\leavevmode
\@font@info{Faking \noexpand#1for font family
@@ -5816,17 +8087,17 @@ of this package available from CTAN}
\hbox{C}\crcr
}%
}
-
\def\tc@check@symbol{\CheckEncodingSubset\UseTextSymbol{TS1}\tc@subst}
-\def\tc@check@accent#1{\CheckEncodingSubset\UseTextAccent{TS1}{\tc@swap@accent#1}}
+\def\tc@check@accent#1{\CheckEncodingSubset\UseTextAccent
+ {TS1}{\tc@swap@accent#1}}
\def\tc@swap@accent#1#2{\UseTextAccent{T1}#1}
\DeclareTextSymbolDefault{\textdollar}{TS1}
-\UndeclareTextCommand{\textdollar} {OT1} % don't use the OT1 def any longer
+\UndeclareTextCommand{\textdollar}{OT1} % don't use the OT1 def any longer
\DeclareTextSymbolDefault{\textsterling}{TS1}
-\UndeclareTextCommand{\textsterling}{OT1} % don't use the OT1 def any longer
+\UndeclareTextCommand{\textsterling}{OT1}% don't use the OT1 def any longer
\DeclareTextSymbolDefault{\textperthousand}{TS1}
-\UndeclareTextCommand{\textperthousand}{T1} % don't use the T1 def
+\UndeclareTextCommand{\textperthousand}{T1} % don't use the T1 def
\DeclareTextSymbolDefault{\textasteriskcentered}{TS1}
\DeclareTextSymbolDefault{\textbullet}{TS1}
\DeclareTextSymbolDefault{\textdaggerdbl}{TS1}
@@ -5867,22 +8138,38 @@ of this package available from CTAN}
\DeclareTextCommandDefault{\t}
{\CheckEncodingSubset\UseTextAccent{TS1}{\UseTextAccent{OML}}2\t}
\ifx\Umathcode\@undefined
- \DeclareTextCommandDefault{\capitalacute} {\tc@check@accent{\'}2\capitalacute}
- \DeclareTextCommandDefault{\capitalbreve} {\tc@check@accent{\u}2\capitalbreve}
- \DeclareTextCommandDefault{\capitalcaron} {\tc@check@accent{\v}2\capitalcaron}
- \DeclareTextCommandDefault{\capitalcedilla} {\tc@check@accent{\c}2\capitalcedilla}
- \DeclareTextCommandDefault{\capitalcircumflex} {\tc@check@accent{\^}2\capitalcircumflex}
- \DeclareTextCommandDefault{\capitaldieresis} {\tc@check@accent{\"}2\capitaldieresis}
- \DeclareTextCommandDefault{\capitaldotaccent} {\tc@check@accent{\.}2\capitaldotaccent}
- \DeclareTextCommandDefault{\capitalgrave} {\tc@check@accent{\`}2\capitalgrave}
- \DeclareTextCommandDefault{\capitalhungarumlaut}{\tc@check@accent{\H}2\capitalhungarumlaut}
- \DeclareTextCommandDefault{\capitalmacron} {\tc@check@accent{\=}2\capitalmacron}
- \DeclareTextCommandDefault{\capitalogonek} {\tc@check@accent{\k}2\capitalogonek}
- \DeclareTextCommandDefault{\capitalring} {\tc@check@accent{\r}2\capitalring}
- \DeclareTextCommandDefault{\capitaltie} {\tc@check@accent{\t}2\capitaltie}
- \DeclareTextCommandDefault{\capitaltilde} {\tc@check@accent{\~}2\capitaltilde}
- \DeclareTextCommandDefault{\newtie} {\tc@check@accent{\t}2\newtie}
- \DeclareTextCommandDefault{\capitalnewtie} {\tc@check@accent{\t}2\capitalnewtie}
+ \DeclareTextCommandDefault{\capitalacute}
+ {\tc@check@accent{\'}2\capitalacute}
+ \DeclareTextCommandDefault{\capitalbreve}
+ {\tc@check@accent{\u}2\capitalbreve}
+ \DeclareTextCommandDefault{\capitalcaron}
+ {\tc@check@accent{\v}2\capitalcaron}
+ \DeclareTextCommandDefault{\capitalcedilla}
+ {\tc@check@accent{\c}2\capitalcedilla}
+ \DeclareTextCommandDefault{\capitalcircumflex}
+ {\tc@check@accent{\^}2\capitalcircumflex}
+ \DeclareTextCommandDefault{\capitaldieresis}
+ {\tc@check@accent{\"}2\capitaldieresis}
+ \DeclareTextCommandDefault{\capitaldotaccent}
+ {\tc@check@accent{\.}2\capitaldotaccent}
+ \DeclareTextCommandDefault{\capitalgrave}
+ {\tc@check@accent{\`}2\capitalgrave}
+ \DeclareTextCommandDefault{\capitalhungarumlaut}
+ {\tc@check@accent{\H}2\capitalhungarumlaut}
+ \DeclareTextCommandDefault{\capitalmacron}
+ {\tc@check@accent{\=}2\capitalmacron}
+ \DeclareTextCommandDefault{\capitalogonek}
+ {\tc@check@accent{\k}2\capitalogonek}
+ \DeclareTextCommandDefault{\capitalring}
+ {\tc@check@accent{\r}2\capitalring}
+ \DeclareTextCommandDefault{\capitaltie}
+ {\tc@check@accent{\t}2\capitaltie}
+ \DeclareTextCommandDefault{\capitaltilde}
+ {\tc@check@accent{\~}2\capitaltilde}
+ \DeclareTextCommandDefault{\newtie}
+ {\tc@check@accent{\t}2\newtie}
+ \DeclareTextCommandDefault{\capitalnewtie}
+ {\tc@check@accent{\t}2\capitalnewtie}
\else
\DeclareTextCommandDefault\capitalacute{\@tabacckludge'}
\DeclareTextCommandDefault\capitalbreve{\u}
@@ -5901,86 +8188,163 @@ of this package available from CTAN}
\DeclareTextCommandDefault\capitaltilde{\~}
\DeclareTextCommandDefault\newtie{\t}
\fi
-\DeclareTextCommandDefault{\textlbrackdbl} {\tc@check@symbol2\textlbrackdbl}
-\DeclareTextCommandDefault{\textrbrackdbl} {\tc@check@symbol2\textrbrackdbl}
-\DeclareTextCommandDefault{\texteightoldstyle} {\tc@check@symbol2\texteightoldstyle}
-\DeclareTextCommandDefault{\textfiveoldstyle} {\tc@check@symbol2\textfiveoldstyle}
-\DeclareTextCommandDefault{\textfouroldstyle} {\tc@check@symbol2\textfouroldstyle}
-\DeclareTextCommandDefault{\textnineoldstyle} {\tc@check@symbol2\textnineoldstyle}
-\DeclareTextCommandDefault{\textoneoldstyle} {\tc@check@symbol2\textoneoldstyle}
-\DeclareTextCommandDefault{\textsevenoldstyle} {\tc@check@symbol2\textsevenoldstyle}
-\DeclareTextCommandDefault{\textsixoldstyle} {\tc@check@symbol2\textsixoldstyle}
-\DeclareTextCommandDefault{\textthreeoldstyle} {\tc@check@symbol2\textthreeoldstyle}
-\DeclareTextCommandDefault{\texttwooldstyle} {\tc@check@symbol2\texttwooldstyle}
-\DeclareTextCommandDefault{\textzerooldstyle} {\tc@check@symbol2\textzerooldstyle}
-\DeclareTextCommandDefault{\textacutedbl} {\tc@check@symbol2\textacutedbl}
-\DeclareTextCommandDefault{\textasciiacute} {\tc@check@symbol2\textasciiacute}
-\DeclareTextCommandDefault{\textasciibreve} {\tc@check@symbol2\textasciibreve}
-\DeclareTextCommandDefault{\textasciicaron} {\tc@check@symbol2\textasciicaron}
-\DeclareTextCommandDefault{\textasciidieresis} {\tc@check@symbol2\textasciidieresis}
-\DeclareTextCommandDefault{\textasciigrave} {\tc@check@symbol2\textasciigrave}
-\DeclareTextCommandDefault{\textasciimacron} {\tc@check@symbol2\textasciimacron}
-\DeclareTextCommandDefault{\textgravedbl} {\tc@check@symbol2\textgravedbl}
-\DeclareTextCommandDefault{\texttildelow} {\tc@check@symbol2\texttildelow}
-\DeclareTextCommandDefault{\textbaht} {\tc@check@symbol2\textbaht}
-\DeclareTextCommandDefault{\textbigcircle} {\tc@check@symbol2\textbigcircle}
-\DeclareTextCommandDefault{\textborn} {\tc@check@symbol2\textborn}
-\DeclareTextCommandDefault{\textcentoldstyle} {\tc@check@symbol2\textcentoldstyle}
-\DeclareTextCommandDefault{\textcircledP} {\tc@check@symbol2\textcircledP}
-\DeclareTextCommandDefault{\textcopyleft} {\tc@check@symbol2\textcopyleft}
-\DeclareTextCommandDefault{\textdblhyphenchar} {\tc@check@symbol2\textdblhyphenchar}
-\DeclareTextCommandDefault{\textdblhyphen} {\tc@check@symbol2\textdblhyphen}
-\DeclareTextCommandDefault{\textdied} {\tc@check@symbol2\textdied}
-\DeclareTextCommandDefault{\textdiscount} {\tc@check@symbol2\textdiscount}
-\DeclareTextCommandDefault{\textdivorced} {\tc@check@symbol2\textdivorced}
-\DeclareTextCommandDefault{\textdollaroldstyle} {\tc@check@symbol2\textdollaroldstyle}
-\DeclareTextCommandDefault{\textguarani} {\tc@check@symbol2\textguarani}
-\DeclareTextCommandDefault{\textleaf} {\tc@check@symbol2\textleaf}
-\DeclareTextCommandDefault{\textlquill} {\tc@check@symbol2\textlquill}
-\DeclareTextCommandDefault{\textmarried} {\tc@check@symbol2\textmarried}
-\DeclareTextCommandDefault{\textmho} {\tc@check@symbol2\textmho}
-\DeclareTextCommandDefault{\textmusicalnote} {\tc@check@symbol2\textmusicalnote}
-\DeclareTextCommandDefault{\textnaira} {\tc@check@symbol2\textnaira}
-\DeclareTextCommandDefault{\textopenbullet} {\tc@check@symbol2\textopenbullet}
-\DeclareTextCommandDefault{\textpeso} {\tc@check@symbol2\textpeso}
-\DeclareTextCommandDefault{\textpilcrow} {\tc@check@symbol2\textpilcrow}
-\DeclareTextCommandDefault{\textrecipe} {\tc@check@symbol2\textrecipe}
-\DeclareTextCommandDefault{\textreferencemark} {\tc@check@symbol2\textreferencemark}
-\DeclareTextCommandDefault{\textrquill} {\tc@check@symbol2\textrquill}
-\DeclareTextCommandDefault{\textservicemark} {\tc@check@symbol2\textservicemark}
-\DeclareTextCommandDefault{\textsurd} {\tc@check@symbol2\textsurd}
-\DeclareTextCommandDefault{\textpertenthousand} {\tc@check@symbol2\textpertenthousand}
+\DeclareTextCommandDefault{\textlbrackdbl}
+ {\tc@check@symbol2\textlbrackdbl}
+\DeclareTextCommandDefault{\textrbrackdbl}
+ {\tc@check@symbol2\textrbrackdbl}
+\DeclareTextCommandDefault{\texteightoldstyle}
+ {\tc@check@symbol2\texteightoldstyle}
+\DeclareTextCommandDefault{\textfiveoldstyle}
+ {\tc@check@symbol2\textfiveoldstyle}
+\DeclareTextCommandDefault{\textfouroldstyle}
+ {\tc@check@symbol2\textfouroldstyle}
+\DeclareTextCommandDefault{\textnineoldstyle}
+ {\tc@check@symbol2\textnineoldstyle}
+\DeclareTextCommandDefault{\textoneoldstyle}
+ {\tc@check@symbol2\textoneoldstyle}
+\DeclareTextCommandDefault{\textsevenoldstyle}
+ {\tc@check@symbol2\textsevenoldstyle}
+\DeclareTextCommandDefault{\textsixoldstyle}
+ {\tc@check@symbol2\textsixoldstyle}
+\DeclareTextCommandDefault{\textthreeoldstyle}
+ {\tc@check@symbol2\textthreeoldstyle}
+\DeclareTextCommandDefault{\texttwooldstyle}
+ {\tc@check@symbol2\texttwooldstyle}
+\DeclareTextCommandDefault{\textzerooldstyle}
+ {\tc@check@symbol2\textzerooldstyle}
+\DeclareTextCommandDefault{\textacutedbl}
+ {\tc@check@symbol2\textacutedbl}
+\DeclareTextCommandDefault{\textasciiacute}
+ {\tc@check@symbol2\textasciiacute}
+\DeclareTextCommandDefault{\textasciibreve}
+ {\tc@check@symbol2\textasciibreve}
+\DeclareTextCommandDefault{\textasciicaron}
+ {\tc@check@symbol2\textasciicaron}
+\DeclareTextCommandDefault{\textasciidieresis}
+ {\tc@check@symbol2\textasciidieresis}
+\DeclareTextCommandDefault{\textasciigrave}
+ {\tc@check@symbol2\textasciigrave}
+\DeclareTextCommandDefault{\textasciimacron}
+ {\tc@check@symbol2\textasciimacron}
+\DeclareTextCommandDefault{\textgravedbl}
+ {\tc@check@symbol2\textgravedbl}
+\DeclareTextCommandDefault{\texttildelow}
+ {\tc@check@symbol2\texttildelow}
+\DeclareTextCommandDefault{\textbaht}
+ {\tc@check@symbol2\textbaht}
+\DeclareTextCommandDefault{\textbigcircle}
+ {\tc@check@symbol2\textbigcircle}
+\DeclareTextCommandDefault{\textborn}
+ {\tc@check@symbol2\textborn}
+\DeclareTextCommandDefault{\textcentoldstyle}
+ {\tc@check@symbol2\textcentoldstyle}
+\DeclareTextCommandDefault{\textcircledP}
+ {\tc@check@symbol2\textcircledP}
+\DeclareTextCommandDefault{\textcopyleft}
+ {\tc@check@symbol2\textcopyleft}
+\DeclareTextCommandDefault{\textdblhyphenchar}
+ {\tc@check@symbol2\textdblhyphenchar}
+\DeclareTextCommandDefault{\textdblhyphen}
+ {\tc@check@symbol2\textdblhyphen}
+\DeclareTextCommandDefault{\textdied}
+ {\tc@check@symbol2\textdied}
+\DeclareTextCommandDefault{\textdiscount}
+ {\tc@check@symbol2\textdiscount}
+\DeclareTextCommandDefault{\textdivorced}
+ {\tc@check@symbol2\textdivorced}
+\DeclareTextCommandDefault{\textdollaroldstyle}
+ {\tc@check@symbol2\textdollaroldstyle}
+\DeclareTextCommandDefault{\textguarani}
+ {\tc@check@symbol2\textguarani}
+\DeclareTextCommandDefault{\textleaf}
+ {\tc@check@symbol2\textleaf}
+\DeclareTextCommandDefault{\textlquill}
+ {\tc@check@symbol2\textlquill}
+\DeclareTextCommandDefault{\textmarried}
+ {\tc@check@symbol2\textmarried}
+\DeclareTextCommandDefault{\textmho}
+ {\tc@check@symbol2\textmho}
+\DeclareTextCommandDefault{\textmusicalnote}
+ {\tc@check@symbol2\textmusicalnote}
+\DeclareTextCommandDefault{\textnaira}
+ {\tc@check@symbol2\textnaira}
+\DeclareTextCommandDefault{\textopenbullet}
+ {\tc@check@symbol2\textopenbullet}
+\DeclareTextCommandDefault{\textpeso}
+ {\tc@check@symbol2\textpeso}
+\DeclareTextCommandDefault{\textpilcrow}
+ {\tc@check@symbol2\textpilcrow}
+\DeclareTextCommandDefault{\textrecipe}
+ {\tc@check@symbol2\textrecipe}
+\DeclareTextCommandDefault{\textreferencemark}
+ {\tc@check@symbol2\textreferencemark}
+\DeclareTextCommandDefault{\textrquill}
+ {\tc@check@symbol2\textrquill}
+\DeclareTextCommandDefault{\textservicemark}
+ {\tc@check@symbol2\textservicemark}
+\DeclareTextCommandDefault{\textsurd}
+ {\tc@check@symbol2\textsurd}
+\DeclareTextCommandDefault{\textpertenthousand}
+ {\tc@check@symbol2\textpertenthousand}
\UndeclareTextCommand{\textpertenthousand}{T1}
-\DeclareTextCommandDefault{\textlangle} {\tc@check@symbol3\textlangle}
-\DeclareTextCommandDefault{\textrangle} {\tc@check@symbol3\textrangle}
-\DeclareTextCommandDefault{\textcolonmonetary} {\tc@check@symbol4\textcolonmonetary}
-\DeclareTextCommandDefault{\textdong} {\tc@check@symbol4\textdong}
-\DeclareTextCommandDefault{\textdownarrow} {\tc@check@symbol4\textdownarrow}
-\DeclareTextCommandDefault{\textleftarrow} {\tc@check@symbol4\textleftarrow}
-\DeclareTextCommandDefault{\textlira} {\tc@check@symbol4\textlira}
-\DeclareTextCommandDefault{\textrightarrow} {\tc@check@symbol4\textrightarrow}
-\DeclareTextCommandDefault{\textuparrow} {\tc@check@symbol4\textuparrow}
-\DeclareTextCommandDefault{\textwon} {\tc@check@symbol4\textwon}
-\DeclareTextCommandDefault{\textestimated} {\tc@check@symbol5\textestimated}
-\DeclareTextCommandDefault{\textnumero} {\tc@check@symbol5\textnumero}
-\DeclareTextCommandDefault{\textflorin} {\tc@check@symbol6\textflorin}
-\DeclareTextCommandDefault{\textcurrency} {\tc@check@symbol6\textcurrency}
-\DeclareTextCommandDefault{\textfractionsolidus}{\tc@check@symbol7\textfractionsolidus}
-\DeclareTextCommandDefault{\textohm} {\tc@check@symbol7\textohm}
-\DeclareTextCommandDefault{\textmu} {\tc@check@symbol7\textmu}
-\DeclareTextCommandDefault{\textminus} {\tc@check@symbol7\textminus}
-\DeclareTextCommandDefault{\textblank} {\tc@check@symbol{8}\textblank}
-\DeclareTextCommandDefault{\textinterrobangdown}{\tc@check@symbol{8}\textinterrobangdown}
-\DeclareTextCommandDefault{\textinterrobang} {\tc@check@symbol{8}\textinterrobang}
+\DeclareTextCommandDefault{\textlangle}
+ {\tc@check@symbol3\textlangle}
+\DeclareTextCommandDefault{\textrangle}
+ {\tc@check@symbol3\textrangle}
+\DeclareTextCommandDefault{\textcolonmonetary}
+ {\tc@check@symbol4\textcolonmonetary}
+\DeclareTextCommandDefault{\textdong}
+ {\tc@check@symbol4\textdong}
+\DeclareTextCommandDefault{\textdownarrow}
+ {\tc@check@symbol4\textdownarrow}
+\DeclareTextCommandDefault{\textleftarrow}
+ {\tc@check@symbol4\textleftarrow}
+\DeclareTextCommandDefault{\textlira}
+ {\tc@check@symbol4\textlira}
+\DeclareTextCommandDefault{\textrightarrow}
+ {\tc@check@symbol4\textrightarrow}
+\DeclareTextCommandDefault{\textuparrow}
+ {\tc@check@symbol4\textuparrow}
+\DeclareTextCommandDefault{\textwon}
+ {\tc@check@symbol4\textwon}
+\DeclareTextCommandDefault{\textestimated}
+ {\tc@check@symbol5\textestimated}
+\DeclareTextCommandDefault{\textnumero}
+ {\tc@check@symbol5\textnumero}
+\DeclareTextCommandDefault{\textflorin}
+ {\tc@check@symbol6\textflorin}
+\DeclareTextCommandDefault{\textcurrency}
+ {\tc@check@symbol6\textcurrency}
+\DeclareTextCommandDefault{\textfractionsolidus}
+ {\tc@check@symbol7\textfractionsolidus}
+\DeclareTextCommandDefault{\textohm}
+ {\tc@check@symbol7\textohm}
+\DeclareTextCommandDefault{\textmu}
+ {\tc@check@symbol7\textmu}
+\DeclareTextCommandDefault{\textminus}
+ {\tc@check@symbol7\textminus}
+\DeclareTextCommandDefault{\textblank}
+ {\tc@check@symbol{8}\textblank}
+\DeclareTextCommandDefault{\textinterrobangdown}
+ {\tc@check@symbol{8}\textinterrobangdown}
+\DeclareTextCommandDefault{\textinterrobang}
+ {\tc@check@symbol{8}\textinterrobang}
\DeclareTextCommandDefault{\texteuro}
- {\CheckEncodingSubset\UseTextSymbol{TS1}\tc@fake@euro{8}\texteuro}
-\DeclareTextCommandDefault{\textcelsius}{\tc@check@symbol{9}\textcelsius}
-\DeclareTextCommandDefault{\textonesuperior}{\tc@check@symbol{9}\textonesuperior}
-\DeclareTextCommandDefault{\textthreequartersemdash}{\tc@check@symbol{9}\textthreequartersemdash}
-\DeclareTextCommandDefault{\textthreesuperior}{\tc@check@symbol{9}\textthreesuperior}
-\DeclareTextCommandDefault{\texttwelveudash}{\tc@check@symbol{9}\texttwelveudash}
-\DeclareTextCommandDefault{\texttwosuperior}{\tc@check@symbol{9}\texttwosuperior}
-\DeclareTextCommandDefault{\textbardbl}{\tc@check@symbol{9}\textbardbl}
+ {\CheckEncodingSubset\UseTextSymbol{TS1}\tc@fake@euro{8}\texteuro}
+\DeclareTextCommandDefault{\textcelsius}
+ {\tc@check@symbol{9}\textcelsius}
+\DeclareTextCommandDefault{\textonesuperior}
+ {\tc@check@symbol{9}\textonesuperior}
+\DeclareTextCommandDefault{\textthreequartersemdash}
+ {\tc@check@symbol{9}\textthreequartersemdash}
+\DeclareTextCommandDefault{\textthreesuperior}
+ {\tc@check@symbol{9}\textthreesuperior}
+\DeclareTextCommandDefault{\texttwelveudash}
+ {\tc@check@symbol{9}\texttwelveudash}
+\DeclareTextCommandDefault{\texttwosuperior}
+ {\tc@check@symbol{9}\texttwosuperior}
+\DeclareTextCommandDefault{\textbardbl}
+ {\tc@check@symbol{9}\textbardbl}
\ifx \Umathcode\@undefined \else
\DeclareTextCommand{\textzerooldstyle} \UnicodeEncodingName{\oldstylenums{0}}
@@ -5993,12 +8357,12 @@ of this package available from CTAN}
\DeclareTextCommand{\textsevenoldstyle}\UnicodeEncodingName{\oldstylenums{7}}
\DeclareTextCommand{\texteightoldstyle}\UnicodeEncodingName{\oldstylenums{8}}
\DeclareTextCommand{\textnineoldstyle} \UnicodeEncodingName{\oldstylenums{9}}
-\DeclareTextSymbol{\textpilcrow} \UnicodeEncodingName{"00B6}
-\DeclareTextSymbol{\textborn} \UnicodeEncodingName{"002A}
-\DeclareTextSymbol{\textdied} \UnicodeEncodingName{"2020}
-\DeclareTextSymbol{\textlbrackdbl} \UnicodeEncodingName{"27E6}
-\DeclareTextSymbol{\textrbrackdbl} \UnicodeEncodingName{"27E7}
-\DeclareTextSymbol{\textguarani} \UnicodeEncodingName{"20B2}
+\DeclareTextSymbol{\textpilcrow} \UnicodeEncodingName{"00B6}
+\DeclareTextSymbol{\textborn} \UnicodeEncodingName{"002A}
+\DeclareTextSymbol{\textdied} \UnicodeEncodingName{"2020}
+\DeclareTextSymbol{\textlbrackdbl} \UnicodeEncodingName{"27E6}
+\DeclareTextSymbol{\textrbrackdbl} \UnicodeEncodingName{"27E7}
+\DeclareTextSymbol{\textguarani} \UnicodeEncodingName{"20B2}
\DeclareTextSymbol{\textdollaroldstyle}{TS1}{138}
\DeclareTextSymbol{\textcentoldstyle} {TS1}{139}
\fi % --- END of Unicode engines specials
@@ -6030,31 +8394,32 @@ of this package available from CTAN}
\DeclareEncodingSubset{TS1}{lmss} {1}
\DeclareEncodingSubset{TS1}{lmssq} {1}
\DeclareEncodingSubset{TS1}{lmvtt} {1}
-\DeclareEncodingSubset{TS1}{lmtt} {1} % missing TM, SM, pertenthousand for some reason
+\DeclareEncodingSubset{TS1}{lmtt} {1} % missing TM, SM and
+ % pertenthousand for some reason
\DeclareEncodingSubset{TS1}{ptmx} {2}
\DeclareEncodingSubset{TS1}{ptmj} {2}
\DeclareEncodingSubset{TS1}{ul8} {2}
-\DeclareEncodingSubset{TS1}{bch} {5} % tofu for blank, ohm
-\DeclareEncodingSubset{TS1}{futj} {5} % tofu for blank, interrobang/down, ohm
-\DeclareEncodingSubset{TS1}{futs} {5} % tofu for blank, ohm
-\DeclareEncodingSubset{TS1}{futx} {5} % probably (currently broken distrib)
-\DeclareEncodingSubset{TS1}{pag} {5} % tofu for blank, interrobang/down, ohm
-\DeclareEncodingSubset{TS1}{pbk} {5} % tofu for blank, interrobang/down, ohm
-\DeclareEncodingSubset{TS1}{pcr} {5} % tofu for blank, interrobang/down, ohm
-\DeclareEncodingSubset{TS1}{phv} {5} % tofu for blank, interrobang/down, ohm
-\DeclareEncodingSubset{TS1}{pnc} {5} % tofu for blank, interrobang/down, ohm
-\DeclareEncodingSubset{TS1}{pplj} {5} % tofu for blank
-\DeclareEncodingSubset{TS1}{pplx} {5} % tofu for blank
-\DeclareEncodingSubset{TS1}{ppl} {5} % tofu for blank interrobang/down
-\DeclareEncodingSubset{TS1}{ptm} {5} % tofu for blank, interrobang/down, ohm
-\DeclareEncodingSubset{TS1}{pzc} {5} % tofu for blank, interrobang/down, ohm
-\DeclareEncodingSubset{TS1}{ul9} {5} % tofu for blank, interrobang/down, ohm
-\DeclareEncodingSubset{TS1}{dayroms} {6} % tofu for blank, interrobang/down, ohm
-\DeclareEncodingSubset{TS1}{dayrom} {6} % tofu for blank, interrobang/down, ohm
-\DeclareEncodingSubset{TS1}{augie} {8} % really only missing euro
-\DeclareEncodingSubset{TS1}{put} {8}
-\DeclareEncodingSubset{TS1}{uag} {8} % probably (currently broken distrib)
-\DeclareEncodingSubset{TS1}{ugq} {8}
+\DeclareEncodingSubset{TS1}{bch} {5} % tofu for blank, ohm
+\DeclareEncodingSubset{TS1}{futj}{5} % tofu for blank, interrobang/down, ohm
+\DeclareEncodingSubset{TS1}{futs}{5} % tofu for blank, ohm
+\DeclareEncodingSubset{TS1}{futx}{5} % probably (currently broken distrib)
+\DeclareEncodingSubset{TS1}{pag} {5} % tofu for blank, interrobang/down, ohm
+\DeclareEncodingSubset{TS1}{pbk} {5} % tofu for blank, interrobang/down, ohm
+\DeclareEncodingSubset{TS1}{pcr} {5} % tofu for blank, interrobang/down, ohm
+\DeclareEncodingSubset{TS1}{phv} {5} % tofu for blank, interrobang/down, ohm
+\DeclareEncodingSubset{TS1}{pnc} {5} % tofu for blank, interrobang/down, ohm
+\DeclareEncodingSubset{TS1}{pplj}{5} % tofu for blank
+\DeclareEncodingSubset{TS1}{pplx}{5} % tofu for blank
+\DeclareEncodingSubset{TS1}{ppl} {5} % tofu for blank interrobang/down
+\DeclareEncodingSubset{TS1}{ptm} {5} % tofu for blank, interrobang/down, ohm
+\DeclareEncodingSubset{TS1}{pzc} {5} % tofu for blank, interrobang/down, ohm
+\DeclareEncodingSubset{TS1}{ul9} {5} % tofu for blank, interrobang/down, ohm
+\DeclareEncodingSubset{TS1}{dayroms}{6} % tofu for blank, interrobang/down, ohm
+\DeclareEncodingSubset{TS1}{dayrom} {6} % tofu for blank, interrobang/down, ohm
+\DeclareEncodingSubset{TS1}{augie}{8} % really only missing euro
+\DeclareEncodingSubset{TS1}{put} {8}
+\DeclareEncodingSubset{TS1}{uag} {8} % probably (currently broken distrib)
+\DeclareEncodingSubset{TS1}{ugq} {8}
\DeclareEncodingSubset{TS1}{zi4} {9}
\DeclareEncodingSubset{TS1}{hls} {5}
\DeclareEncodingSubset{TS1}{hlst} {5}
@@ -6065,11 +8430,11 @@ of this package available from CTAN}
\DeclareEncodingSubset{TS1}{hlcn} {8}
\DeclareEncodingSubset{TS1}{hlcw} {8}
\DeclareEncodingSubset{TS1}{hlcf} {8}
-\DeclareEncodingSubset{TS1}{lato-*} {0} % with a bunch of tofu inside
-\DeclareEncodingSubset{TS1}{opensans-*} {0} % with a bunch of tofu inside
-\DeclareEncodingSubset{TS1}{cantarell-*} {0} % with a bunch of tofu inside
-\DeclareEncodingSubset{TS1}{fbb-*} {0} % missing centoldstyle
-\DeclareEncodingSubset{TS1}{tli} {1} % with lots of tofu inside
+\DeclareEncodingSubset{TS1}{lato-*} {0} % with a bunch of tofu inside
+\DeclareEncodingSubset{TS1}{opensans-*} {0} % with a bunch of tofu inside
+\DeclareEncodingSubset{TS1}{cantarell-*} {0} % with a bunch of tofu inside
+\DeclareEncodingSubset{TS1}{fbb-*} {0} % missing centoldstyle
+\DeclareEncodingSubset{TS1}{tli} {1} % with lots of tofu inside
\DeclareEncodingSubset{TS1}{Alegreya-*} {2}
\DeclareEncodingSubset{TS1}{AlegreyaSans-*} {2}
\DeclareEncodingSubset{TS1}{DejaVuSans-TLF} {2}
@@ -6177,7 +8542,7 @@ of this package available from CTAN}
\DeclareEncodingSubset{TS1}{erewhon-*} {7}
\DeclareEncodingSubset{TS1}{ComicNeue-TLF} {7}
\DeclareEncodingSubset{TS1}{ComicNeueAngular-TLF} {7}
-\DeclareEncodingSubset{TS1}{Forum-LF} {7} % the superiors are missing
+\DeclareEncodingSubset{TS1}{Forum-LF} {7} % the superiors are missing
\DeclareEncodingSubset{TS1}{Cochineal-*} {8}
\DeclareEncodingSubset{TS1}{AlgolRevived-TLF} {9}
\def\UseLegacyTextSymbols{%
@@ -6249,26 +8614,32 @@ of this package available from CTAN}
\let\textbrokenbar\@undefined
\let\textcelsius\@undefined
\let\textcent\@undefined
-\DeclareTextCommandDefault{\textcopyright}{\textcircled{c}}
+\DeclareTextCommandDefault{\textcopyright}
+ {\textcircled{c}}
\let\textdegree\@undefined
\let\textdiv\@undefined
\let\textlnot\@undefined
\let\textonehalf\@undefined
\let\textonequarter\@undefined
\let\textonesuperior\@undefined
-\DeclareTextCommandDefault{\textordfeminine}{\textsuperscript{a}}
-\DeclareTextCommandDefault{\textordmasculine}{\textsuperscript{o}}
+\DeclareTextCommandDefault{\textordfeminine}
+ {\textsuperscript{a}}
+\DeclareTextCommandDefault{\textordmasculine}
+ {\textsuperscript{o}}
\let\textpm\@undefined
\let\textquotesingle\@undefined
\let\textquotestraightbase\@undefined
\let\textquotestraightdblbase\@undefined
-\DeclareTextCommandDefault{\textregistered}{\textcircled{%
- \check@mathfonts\fontsize\sf@size\z@\math@fontsfalse\selectfont R}}
+\DeclareTextCommandDefault{\textregistered}
+ {\textcircled{%
+ \check@mathfonts\fontsize\sf@size\z@
+ \math@fontsfalse\selectfont R}}
\let\textthreequartersemdash\@undefined
\let\textthreequarters\@undefined
\let\textthreesuperior\@undefined
\let\texttimes\@undefined
-\DeclareTextCommandDefault{\texttrademark}{\textsuperscript{TM}}
+\DeclareTextCommandDefault{\texttrademark}
+ {\textsuperscript{TM}}
\let\texttwelveudash\@undefined
\let\texttwosuperior\@undefined
\let\textyen\@undefined
@@ -6678,6 +9049,9 @@ of this package available from CTAN}
\expandafter\endgroup\if@endpe\@doendpe\fi
\if@ignore\@ignorefalse\ignorespaces\fi}
+\expandafter\let\csname begin \endcsname\@undefined
+\expandafter\let\csname end \endcsname\@undefined
+
\EndIncludeInRelease
\IncludeInRelease{2020/10/01}%
{\AtBeginEnvironment}{Hooks for environments}%
@@ -7124,6 +9498,28 @@ of this package available from CTAN}
\mb@b
\kern\z@}}
\EndIncludeInRelease
+\IncludeInRelease{2021/05/01}%
+ {\color@begingroup}{color group settings}%
+\let\color@begingroup\begingroup
+\def\color@endgroup{\endgraf\endgroup}
+\def\color@setgroup{\color@begingroup} % changed further in color package
+\let\normalcolor\relax % remains untouched; only changed in a color package
+\def\color@hbox{\hbox\bgroup\color@begingroup}
+\def\color@vbox{\vbox\bgroup\color@begingroup}
+\def\color@endbox{\color@endgroup\egroup}
+\EndIncludeInRelease
+\IncludeInRelease{0000/00/00}%
+ {\color@begingroup}{color group settings}%
+
+\let\color@begingroup\relax
+\let\color@endgroup\relax
+\let\color@setgroup\relax
+\let\normalcolor\relax
+\let\color@hbox\relax
+\let\color@vbox\relax
+\let\color@endbox\relax
+
+\EndIncludeInRelease
\IncludeInRelease{2015/01/01}%
{\savebox}{Make \savebox robust}%
\DeclareRobustCommand\savebox[1]{%
@@ -7203,6 +9599,39 @@ of this package available from CTAN}
\baselineskip\normalbaselineskip
\sloppy}
\EndIncludeInRelease
+\IncludeInRelease{2021/05/01}%
+ {\@mpfootnotetext}{footnotetext tagging}%
+\long\def\@mpfootnotetext#1{%
+ \global\setbox\@mpfootins\vbox{%
+ \unvbox\@mpfootins
+ \reset@font\footnotesize
+ \hsize\columnwidth
+ \@parboxrestore
+ \protected@edef\@currentlabel
+ {\csname p@mpfootnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \@makefntext{%
+ \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}%
+ \par
+ \color@endgroup}}
+\EndIncludeInRelease
+\IncludeInRelease{0000/00/00}%
+ {\@mpfootnotetext}{footnotetext tagging}%
+
+\long\def\@mpfootnotetext#1{%
+ \global\setbox\@mpfootins\vbox{%
+ \unvbox\@mpfootins
+ \reset@font\footnotesize
+ \hsize\columnwidth
+ \@parboxrestore
+ \protected@edef\@currentlabel
+ {\csname p@mpfootnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \@makefntext{%
+ \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}%
+ \color@endgroup}}
+
+\EndIncludeInRelease
\IncludeInRelease{2015/01/01}%
{\rule}{Make \rule robust}%
\DeclareRobustCommand\rule{\@ifnextchar[\@rule{\@rule[\z@]}}%
@@ -8145,6 +10574,39 @@ of this package available from CTAN}
\@fpbot \@dblfpbot
}%
\EndIncludeInRelease
+\IncludeInRelease{2021/05/01}%
+ {\@savemarbox}{Explicit par for marginpar}%
+\long\def \@savemarbox #1#2{%
+ \global\setbox #1%
+ \color@vbox
+ \vtop{%
+ \hsize\marginparwidth
+ \@parboxrestore
+ \@marginparreset
+ #2\par
+ \@minipagefalse
+ \outer@nobreak
+ }%
+ \color@endbox
+}
+\EndIncludeInRelease
+\IncludeInRelease{0000/00/00}%
+ {\@savemarbox}{Explicit par for marginpar}%
+
+\long\def \@savemarbox #1#2{%
+ \global\setbox #1%
+ \color@vbox
+ \vtop{%
+ \hsize\marginparwidth
+ \@parboxrestore
+ \@marginparreset
+ #2%
+ \@minipagefalse
+ \outer@nobreak
+ }%
+ \color@endbox
+}
+\EndIncludeInRelease
\IncludeInRelease{2020/10/01}%
{\@textsuperscript}{superscript baseline}%
\def\@textsuperscript#1{%
@@ -8180,6 +10642,56 @@ of this package available from CTAN}
{\@textsubscript}{subscript baseline}%
\let\@textsubscript\@undefined
\EndIncludeInRelease
+\IncludeInRelease{2021/05/01}%
+ {\@footnotetext}{footnotetext tagging}%
+\long\def\@footnotetext#1{\insert\footins{%
+ \reset@font\footnotesize
+ \interlinepenalty\interfootnotelinepenalty
+ \splittopskip\footnotesep
+ \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
+ \hsize\columnwidth \@parboxrestore
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark
+ }%
+ \color@begingroup
+ \@makefntext{%
+ \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}%
+ \par
+ \color@endgroup}}%
+\EndIncludeInRelease
+\IncludeInRelease{0000/00/00}%
+ {\@footnotetext}{footnotetext tagging}%
+
+\long\def\@footnotetext#1{\insert\footins{%
+ \reset@font\footnotesize
+ \interlinepenalty\interfootnotelinepenalty
+ \splittopskip\footnotesep
+ \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
+ \hsize\columnwidth \@parboxrestore
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark
+ }%
+ \color@begingroup
+ \@makefntext{%
+ \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}%
+ \color@endgroup}}%
+
+\EndIncludeInRelease
+\IncludeInRelease{2021/05/01}%
+ {\footref}{Add footref}%
+\def\footref#1{%
+ \begingroup
+ \unrestored@protected@xdef\@thefnmark{\ref{#1}}%
+ \endgroup
+ \@footnotemark
+}
+\EndIncludeInRelease
+%%<latexrelease>\IncludeInRelease{0000/00/00}%
+%%<latexrelease> {\footref}{Add footref}%
+%%<latexrelease>
+%%<latexrelease>\let\footref\@undefined
+%%<latexrelease>
+%%<latexrelease>\EndIncludeInRelease
%%% From File: ltidxglo.dtx
%%% From File: ltbibl.dtx
\IncludeInRelease{2021/05/01}%
@@ -8311,6 +10823,7 @@ of this package available from CTAN}
\IncludeInRelease{2020/10/01}{\@kernel@currpathstack}%
{Add \@kernel@currpathstack}%
\gdef\@kernel@currpathstack{}
+\g@addto@macro\@kernel@currpathstack{{}}
\def\@p@pfilepath#1{%
\gdef\@currpath{#1}\@p@pfilepath@aux\@empty}
\def\@p@pfilepath@aux#1\@nil{%
@@ -8465,8 +10978,28 @@ of this package available from CTAN}
\let\ProvidesClass\ProvidesPackage
\@onlypreamble\ProvidesClass
\EndIncludeInRelease
+\IncludeInRelease{2021/05/01}%
+ {\@pass@ptions}{Raw option lists}%
+\def\@pass@ptions#1#2#3{%
+ \@expl@@@filehook@set@curr@file@@nNN
+ {\@expl@@@filehook@resolve@file@subst@@w #3.#1\@nil}%
+ \reserved@a\reserved@b
+ \@expl@@@filehook@clear@replacement@flag@@
+ \expandafter\xdef\csname opt@\reserved@a\endcsname{%
+ \@ifundefined{opt@\reserved@a}\@empty
+ {\csname opt@\reserved@a\endcsname,}%
+ \zap@space#2 \@empty}%
+ \expandafter\let
+ \csname opt@#3.#1\expandafter\endcsname
+ \csname opt@\reserved@a\endcsname
+ \@ifundefined{@raw@opt@#3.#1}%
+ {\expandafter\gdef\csname @raw@opt@#3.#1\endcsname{#2}}%
+ {\expandafter\g@addto@macro\csname @raw@opt@#3.#1\endcsname{,#2}}%
+}
+\EndIncludeInRelease
\IncludeInRelease{2020/10/01}{\@pass@ptions}
{Add file replacement in \@pass@ptions}%
+
\def\@pass@ptions#1#2#3{%
\@expl@@@filehook@set@curr@file@@nNN
{\@expl@@@filehook@resolve@file@subst@@w #3.#1\@nil}%
@@ -8482,12 +11015,33 @@ of this package available from CTAN}
\EndIncludeInRelease
\IncludeInRelease{0000/00/00}{\@pass@ptions}
{\@pass@ptions}%
+
\def\@pass@ptions#1#2#3{%
\expandafter\xdef\csname opt@#3.#1\endcsname{%
\@ifundefined{opt@#3.#1}\@empty
{\csname opt@#3.#1\endcsname,}%
\zap@space#2 \@empty}}
\EndIncludeInRelease
+\IncludeInRelease{2021/05/01}%
+ {\OptionNotUsed}{filter unused option list}%
+\def\@remove@eq@value#1=#2\@nil{#1}
+\def\OptionNotUsed{%
+ \ifx\@currext\@clsextension
+ \xdef\@unusedoptionlist{%
+ \ifx\@unusedoptionlist\@empty\else\@unusedoptionlist,\fi
+ \expandafter\@remove@eq@value\CurrentOption=\@nil}%
+ \fi}
+\EndIncludeInRelease
+\IncludeInRelease{0000/00/00}%
+ {\OptionNotUsed}{filter unused option list}%
+\let\@remove@eq@value\@undefined
+\def\OptionNotUsed{%
+ \ifx\@currext\@clsextension
+ \xdef\@unusedoptionlist{%
+ \ifx\@unusedoptionlist\@empty\else\@unusedoptionlist,\fi
+ \CurrentOption}%
+ \fi}
+\EndIncludeInRelease
\IncludeInRelease{2020/10/01}%
{\@process@pti@ns}{Unused options issue}%
\def\@process@pti@ns{%
@@ -8520,6 +11074,21 @@ of this package available from CTAN}
\let\@fileswith@pti@ns\@@fileswith@pti@ns
\AtEndOfPackage{\let\@unprocessedoptions\relax}}
\EndIncludeInRelease
+\IncludeInRelease{2021/05/01}%
+ {\@use@ption}{filter unused option list}%
+\def\@use@ption{%
+ \@expandtwoargs\@removeelement
+ {\expandafter\@remove@eq@value\CurrentOption=\@nil}%
+ \@unusedoptionlist\@unusedoptionlist
+ \csname ds@\CurrentOption\endcsname}
+\EndIncludeInRelease
+\IncludeInRelease{0000/00/00}%
+ {\@use@ption}{filter unused option list}%
+\def\@use@ption{%
+ \@expandtwoargs\@removeelement\CurrentOption
+ \@unusedoptionlist\@unusedoptionlist
+ \csname ds@\CurrentOption\endcsname}
+\EndIncludeInRelease
\IncludeInRelease{2017/01/01}%
{\ExecuteOptions}{Spaces in \ExecuteOptions}%
\def\ExecuteOptions#1{%
@@ -8555,6 +11124,34 @@ of this package available from CTAN}
\AtEndOfPackage{\let\@unprocessedoptions\relax}%
\@loadwithoptions\@pkgextension\RequirePackage}
\EndIncludeInRelease
+\IncludeInRelease{2020/10/01}%
+ {\@fileswith@pti@ns}{ifx tests in \@fileswith@pti@ns}%
+\def\@fileswith@pti@ns#1[#2]#3[#4]{%
+ \ifx#1\@clsextension
+ \ifx\@classoptionslist\relax
+ \xdef\@classoptionslist{\zap@space#2 \@empty}%
+ \gdef\@raw@classoptionslist{#2}%
+ \def\reserved@a{%
+ \@onefilewithoptions#3[{#2}][{#4}]#1%
+ \@documentclasshook}%
+ \else
+ \def\reserved@a{%
+ \@onefilewithoptions#3[{#2}][{#4}]#1}%
+ \fi
+ \else
+ \def\reserved@b##1,{%
+ \ifx\@nnil##1\relax\else
+ \ifx\@nnil##1\@nnil\else
+ \noexpand\@onefilewithoptions##1[{#2}][{#4}]%
+ \noexpand\@pkgextension
+ \fi
+ \expandafter\reserved@b
+ \fi}%
+ \edef\reserved@a{\zap@space#3 \@empty}%
+ \edef\reserved@a{\expandafter\reserved@b\reserved@a,\@nnil,}%
+ \fi
+ \reserved@a}
+\EndIncludeInRelease
\IncludeInRelease{2017/01/01}%
{\@fileswith@pti@ns}{ifx tests in \@fileswith@pti@ns}%
\def\@fileswith@pti@ns#1[#2]#3[#4]{%
@@ -8911,7 +11508,8 @@ of this package available from CTAN}
\ifx\relax##1\relax%
\else%
\@latex@warning{Writing text `##1' before %
- \string\end{\@currenvir}\MessageBreak as last line of \@curr@file}%
+ \string\end{\@currenvir}\MessageBreak
+ as last line of \@curr@file}%
\immediate\write\reserved@c{##1}%
\fi%
\ifx\relax##2\relax%
@@ -8933,7 +11531,8 @@ of this package available from CTAN}
\endgroup%
\EndIncludeInRelease
\IncludeInRelease{2019/10/01}%
- {\filec@ntents}{Spaces in file names + optional arg}%
+ {\filec@ntents}{Spaces in file names + optional arg}%
+
\def\filecontents{\@tempswatrue\@fileswtrue
\@ifnextchar[\filec@ntents@opt\filec@ntents
}
@@ -9063,7 +11662,7 @@ of this package available from CTAN}
\endgroup%
\EndIncludeInRelease
\IncludeInRelease{0000/00/00}%
- {\filec@ntents}{Spaces in file names + optional arg}%
+ {\filec@ntents}{Spaces in file names + optional arg}%
\let\filec@ntents@opt \@undefined
\let\filec@ntents@force \@undefined
@@ -9152,12 +11751,9 @@ of this package available from CTAN}
\noexpand\reserved@b##1\E\E\relax}}%
\endgroup%
\EndIncludeInRelease
-%%
-%% File: ltfilehook.dtx (C) Copyright 2020,2021 Frank Mittelbach,
-%% Phelype Oleinik & LaTeX Team
%%% From File: ltfilehook.dtx
-\providecommand\ltfilehookversion{v1.0e}
-\providecommand\ltfilehookdate{2021/01/07}
+\providecommand\ltfilehookversion{v1.0g}
+\providecommand\ltfilehookdate{2021/02/08}
\IncludeInRelease{2020/10/01}%
{\CurrentFile}{Hook management file}%
\ExplSyntaxOn
@@ -9256,7 +11852,8 @@ of this package available from CTAN}
{
\tl_if_empty:nTF {#3}
{ \__file_parse_full_name_base:nw { } #2 . \s__file_stop {#1} }
- { \__file_parse_full_name_area:nw { #1 / #2 } #3 \s__file_stop }
+ { \__file_parse_full_name_area:nw { #1 / #2 }
+ #3 \s__file_stop }
}
\cs_new:Npn \__file_parse_full_name_base:nw #1 #2 . #3 \s__file_stop
{
@@ -9270,7 +11867,8 @@ of this package available from CTAN}
}
{ \__file_parse_full_name_tidy:nnnN {#1} { .#2 } }
}
- { \__file_parse_full_name_base:nw { #1 . #2 } #3 \s__file_stop }
+ { \__file_parse_full_name_base:nw { #1 . #2 }
+ #3 \s__file_stop }
}
\cs_new:Npn \__file_parse_full_name_tidy:nnnN #1 #2 #3 #4
{
@@ -9335,6 +11933,7 @@ of this package available from CTAN}
\long\def \InputIfFileExists#1#2{%
\IfFileExists{#1}%
{#2\@addtofilelist{#1}\@@input \@filef@und}}
+\expandafter\let\csname InputIfFileExists \endcsname\@undefined
\let\@input@file@exists@with@hooks\@undefined
\let\unqu@tefilef@und\@undefined
\EndIncludeInRelease
@@ -9351,7 +11950,8 @@ of this package available from CTAN}
@file-subst@
\__filehook_subst_file_normalize:Nn \use_ii_iii:nnn {#1}
}
- { \__filehook_subst_file_normalize:Nn \__filehook_file_name_compose:nnn {#2} }
+ { \__filehook_subst_file_normalize:Nn \__filehook_file_name_compose:nnn
+ {#2} }
\group_end:
}
\cs_new_protected:Npn \__filehook_subst_remove:n #1
@@ -9391,11 +11991,31 @@ of this package available from CTAN}
\let \undeclare@file@substitution \@gobble
\EndIncludeInRelease
-\IncludeInRelease{2020/10/01}%
+\IncludeInRelease{2021/05/01}%
{\set@curr@file}{Setting current file name}%
\def\set@curr@file#1{%
\begingroup
\escapechar\m@ne
+ \let\protect\string
+ \expandafter\def\csname\expandafter\endcsname
+ \expandafter{\csname\endcsname}%
+ \@expl@@@filehook@if@no@extension@@nTF{#1}%
+ {\@tempswatrue}{\@tempswafalse}%
+ \@kernel@make@file@csname\@curr@file
+ \@expl@@@filehook@resolve@file@subst@@w {#1}%
+ \@expl@@@filehook@if@file@replaced@@TF
+ {\@kernel@make@file@csname\@curr@file@reqd
+ \@expl@@@filehook@normalize@file@name@@w{#1}%
+ \if@tempswa \@expl@@@filehook@drop@extension@@N\@curr@file@reqd \fi}%
+ {\if@tempswa \@expl@@@filehook@drop@extension@@N\@curr@file \fi
+ \global\let\@curr@file@reqd\@curr@file}%
+ \@expl@@@filehook@clear@replacement@flag@@
+ \endgroup}
+\EndIncludeInRelease
+\IncludeInRelease{2020/10/01}%
+\def\set@curr@file#1{%
+ \begingroup
+ \escapechar\m@ne
\expandafter\def\csname\expandafter\endcsname
\expandafter{\csname\endcsname}%
\@expl@@@filehook@if@no@extension@@nTF{#1}%
@@ -9463,7 +12083,7 @@ of this package available from CTAN}
\ExplSyntaxOff
\EndIncludeInRelease
\IncludeInRelease{2020/10/01}%
- {\__filehook_resolve_file_subst:w}{Replace files detect loops}%
+ {\__filehook_resolve_file_subst:w}{Replace files detect loops}%
\ExplSyntaxOn
\cs_new:Npn \__filehook_resolve_file_subst:w #1 \@nil
{ \__filehook_file_parse_full_name:nN {#1} \__filehook_file_subst_begin:nnn }
@@ -9484,7 +12104,7 @@ of this package available from CTAN}
\ExplSyntaxOff
\EndIncludeInRelease
\IncludeInRelease{2020/10/01}%
- {\__filehook_file_subst_tortoise_hare:nn}{Tortoise and Hare}%
+ {\__filehook_file_subst_tortoise_hare:nn}{Tortoise and Hare}%
\ExplSyntaxOn
\cs_new:Npn \__filehook_file_subst_tortoise_hare:nn #1 #2 #3
{
@@ -9574,11 +12194,12 @@ of this package available from CTAN}
\EndIncludeInRelease
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
-%% File: ltshipout.dtx (C) Copyright 2020,2021 Frank Mittelbach, LaTeX Team
+%% Copyright (C) 2020-2021
+%% Frank Mittelbach, LaTeX Team
%%
%%% From File: ltshipout.dtx
-\providecommand\ltshipoutversion{v1.0d}
-\providecommand\ltshipoutdate{2020/12/06}
+\providecommand\ltshipoutversion{v1.0i}
+\providecommand\ltshipoutdate{2021/01/25}
\IncludeInRelease{2020/10/01}%
{\shipout}{Hook management (shipout)}%
\ExplSyntaxOn
@@ -9601,6 +12222,27 @@ of this package available from CTAN}
}
\box_new:N \l_shipout_box
\cs_set_eq:NN \ShipoutBox \l_shipout_box
+\box_new:N \l__shipout_raw_box
+\sys_if_engine_luatex:TF
+ {
+ \newluafunction \__shipout_finalize_box:
+ \exp_args:Nx \everyjob {
+ \exp_not:V \everyjob
+ \exp_not:N \lua_now:n {
+ luatexbase.create_callback('pre_shipout_filter', 'list')
+ local~call, getbox, setbox = luatexbase.call_callback, tex.getbox, tex.setbox~
+ lua.get_functions_table()[\the \__shipout_finalize_box:] = function()
+ local~result = call('pre_shipout_filter', getbox(\the \l_shipout_box))
+ if~not (result == true) then~
+ setbox(\the \l_shipout_box, result~or~nil)
+ end~
+ end
+ }
+ }
+ \protected \luadef \__shipout_finalize_box: \the \__shipout_finalize_box:
+ } {
+ \cs_set_eq:NN \__shipout_finalize_box: \scan_stop:
+ }
\cs_set_protected:Npn \__shipout_execute: {
\tl_set:Nx \l__shipout_group_level_tl
{ \int_value:w \tex_currentgrouplevel:D }
@@ -9612,26 +12254,43 @@ of this package available from CTAN}
\cs_new:Npn \__shipout_execute_test_level: {
\int_compare:nNnT
\l__shipout_group_level_tl < \tex_currentgrouplevel:D
- \tex_aftergroup:D
- \__shipout_execute_cont:
+ \tex_aftergroup:D \__shipout_execute_cont:
}
\cs_new:Npn \__shipout_execute_cont: {
- \box_if_empty:NTF \l_shipout_box
- { \PackageWarning{ltshipout}{Ignoring~ void~ shipout~ box} }
+ \__shipout_execute_main_cont:Nnnn
+ \l_shipout_box
+ { \hook_use:n {shipout/before} }
+ { \hook_if_empty:nF {shipout/foreground}
+ { \__shipout_add_foreground_picture:n
+ { \hook_use:n {shipout/foreground} } }
+ \bool_lazy_and:nnF
+ { \hook_if_empty_p:n {shipout/background} }
+ { \tl_if_empty_p:N \@kernel@before@shipout@background }
+ { \__shipout_add_background_picture:n
+ { \@kernel@before@shipout@background
+ \hook_use:n {shipout/background}
+ \@kernel@after@shipout@background }
+ }
+ }
+ { \hook_use:n {shipout/after} }
+}
+\cs_new:Npn \__shipout_execute_main_cont:Nnnn #1#2#3#4 {
+ \box_if_empty:NTF #1
+ { \@latex@warning{Ignoring~ void~ shipout~ box} }
{
- \bool_gset_false:N \g__shipout_discard_bool
+ % \DiscardShipoutBox on doc-level
\cs_set_eq:NN \__shipout_saved_protect: \protect
\set@typeset@protect
- \__shipout_get_box_size:N \l_shipout_box
- \hook_use:n {shipout/before}
+ \__shipout_get_box_size:N #1
+ #2
\int_gincr:N \g_shipout_totalpages_int
\bool_if:NTF \g__shipout_discard_bool
- { \PackageInfo{ltshipout}{Completed~ page~ discarded}
+ { \@latex@info@no@line{Completed~ page~ discarded}
\bool_gset_false:N \g__shipout_discard_bool
\tex_deadcycles:D \c_zero_int
}
- { \box_if_empty:NTF \l_shipout_box
- { \PackageWarning{ltshipout}{
+ { \box_if_empty:NTF #1
+ { \@latex@warning{
Shipout~ box~ was~ voided~ by~ hook,\MessageBreak
ignoring~ shipout~ box }
}
@@ -9641,53 +12300,89 @@ of this package available from CTAN}
\typeout{Absolute~ page~ =~ \int_use:N \g_shipout_readonly_int
\space (target:~ \@abspage@last)}
}
- \__shipout_get_box_size:N \l_shipout_box
- \hook_if_empty:nF {shipout/foreground}
- { \__shipout_add_foreground_picture:n
- { \hook_use:n {shipout/foreground} } }
- \bool_lazy_and:nnF
- { \hook_if_empty_p:n {shipout/background} }
- { \tl_if_empty_p:N \@kernel@before@shipout@background }
- { \__shipout_add_background_picture:n
- { \@kernel@before@shipout@background
- \hook_use:n {shipout/background} } }
- \__shipout_execute_firstpage_hook:
+ \__shipout_get_box_size:N #1
+ \__shipout_run_firstpage_hook:
+ #3
+ \__shipout_add_firstpage_specials:
\int_compare:nNnT \@abspage@last = \g_shipout_readonly_int
{ \bool_lazy_and:nnF
{ \hook_if_empty_p:n {shipout/lastpage} }
{ \tl_if_empty_p:N \@kernel@after@shipout@lastpage }
{ \__shipout_debug:n { \typeout{Executing~ lastpage~ hook~
- on~ page~ \int_use:N \g_shipout_readonly_int } }
- \__shipout_add_foreground_box:n { \UseHook{shipout/lastpage}
- \@kernel@after@shipout@lastpage }
+ on~ page~ \int_use:N \g_shipout_readonly_int } }
+ \__shipout_add_foreground_box:n
+ { \UseHook{shipout/lastpage}
+ \@kernel@after@shipout@lastpage }
}
\bool_gset_true:N \g__shipout_lastpage_handled_bool
}
+ \__shipout_finalize_box:
\cs_set_eq:NN \protect \exp_not:N
\tex_shipout:D \box_use:N \l_shipout_box
+ \__shipout_drop_firstpage_specials:
+ \set@typeset@protect
+ #4
}
}
\cs_set_eq:NN \protect \__shipout_saved_protect:
}
}
+\cs_set_protected:Npn \__shipout_execute_raw: {
+ \tl_set:Nx \l__shipout_group_level_tl
+ { \int_value:w \tex_currentgrouplevel:D }
+ \tex_afterassignment:D \__shipout_execute_test_level_raw:
+ \tex_setbox:D \l__shipout_raw_box
+}
+\cs_new:Npn \__shipout_execute_test_level_raw: {
+ \int_compare:nNnT
+ \l__shipout_group_level_tl < \tex_currentgrouplevel:D
+ \tex_aftergroup:D \__shipout_execute_nohooks_cont:
+}
+\cs_new:Npn \__shipout_execute_nohooks_cont: {
+ \__shipout_execute_main_cont:Nnnn \l__shipout_raw_box
+ {} { \__shipout_debug:n{ \typeout{Doing~ raw~ shipout~ ...} }
+ \box_set_eq:NN \l_shipout_box \l__shipout_raw_box } {}
+}
+
+\cs_gset_eq:NN \RawShipout \__shipout_execute_raw:
\cs_new_eq:NN \__shipout_saved_protect: \protect
\hook_new:n{shipout/before}
+\hook_new:n{shipout/after}
\hook_new:n{shipout/foreground}
\hook_new:n{shipout/background}
\hook_new:n{shipout/firstpage}
\hook_new:n{shipout/lastpage}
\let\@kernel@after@shipout@lastpage\@empty
\let\@kernel@before@shipout@background\@empty
-\cs_new:Npn \__shipout_execute_firstpage_hook: {
- \hook_if_empty:nF {shipout/firstpage}
- { \__shipout_add_background_box:n { \UseHook{shipout/firstpage} } }
- \cs_gset_eq:NN \__shipout_execute_firstpage_hook: \prg_do_nothing:
+\let\@kernel@after@shipout@background\@empty
+\cs_new:Npn \__shipout_run_firstpage_hook: {
+ \hook_if_empty:nTF {shipout/firstpage}
+ {
+ \cs_gset_eq:NN \__shipout_add_firstpage_specials: \prg_do_nothing:
+ \cs_gset_eq:NN \__shipout_drop_firstpage_specials: \prg_do_nothing:
+ }
+ {
+ \hbox_set:Nn \l__shipout_firstpage_box { \UseHook{shipout/firstpage} }
+ }
+ \cs_gset_eq:NN \__shipout_run_firstpage_hook: \prg_do_nothing:
\cs_gset:Npn \__shipout_add_firstpage_material:Nn ##1 ##2 {
\@latex@warning{
First~ page~ is~ already~ shipped~ out,~ ignoring\MessageBreak
\string##1 }
}
}
+\cs_new:Npn \__shipout_add_firstpage_specials: {
+ \box_set_eq:NN \l__shipout_raw_box \l_shipout_box
+ \__shipout_add_background_box:n { \hbox_unpack_drop:N \l__shipout_firstpage_box }
+ \cs_gset_eq:NN \__shipout_add_firstpage_specials: \prg_do_nothing:
+}
+\cs_new:Npn \__shipout_drop_firstpage_specials: {
+ \box_set_eq:NN \l_shipout_box \l__shipout_raw_box
+ \cs_gset_eq:NN \__shipout_drop_firstpage_specials: \prg_do_nothing:
+ }
+
+\box_new:N \l__shipout_firstpage_box
+
\bool_new:N \g__shipout_lastpage_handled_bool
\cs_new:Npn \__shipout_add_firstpage_material:Nn #1#2 {
\AddToHook{shipout/firstpage}{#2}
@@ -9696,8 +12391,8 @@ of this package available from CTAN}
\dim_set:Nn \l_shipout_box_ht_dim { \box_ht:N #1 }
\dim_set:Nn \l_shipout_box_dp_dim { \box_dp:N #1 }
\dim_set:Nn \l_shipout_box_wd_dim { \box_wd:N #1 }
- \dim_set:Nn \l_shipout_box_ht_plus_dp_dim { \l_shipout_box_ht_dim +
- \l_shipout_box_dp_dim }
+ \dim_set:Nn \l_shipout_box_ht_plus_dp_dim
+ { \l_shipout_box_ht_dim + \l_shipout_box_dp_dim }
}
\dim_new:N \l_shipout_box_ht_dim
\dim_new:N \l_shipout_box_dp_dim
@@ -9903,7 +12598,8 @@ of this package available from CTAN}
{\ifnum\@abspage@last<\maxdimen
\xdef\PreviousTotalPages{\@abspage@last}\fi}
\cs_new_eq:NN \DiscardShipoutBox \shipout_discard:
-\cs_set_protected:Npn \AtBeginDvi {\__shipout_add_firstpage_material:Nn \AtBeginDvi}
+\cs_set_protected:Npn \AtBeginDvi
+ {\__shipout_add_firstpage_material:Nn \AtBeginDvi}
\cs_new_eq:NN \DebugShipoutsOn \shipout_debug_on:
\cs_new_eq:NN \DebugShipoutsOff \shipout_debug_off:
\cs_set_eq:NN \@expl@@@shipout@add@firstpage@material@@Nn
@@ -9926,6 +12622,7 @@ of this package available from CTAN}
\csname tex_shipout:D\endcsname
\fi
+\let \RawShipout\@undefined
\let \ShipoutBox\@undefined
\let \ReadonlyShipoutCounter \@undefined
\let \c@totalpages \@undefined
@@ -9949,13 +12646,6 @@ of this package available from CTAN}
\let \ShipoutBoxDepth \@undefined
\let \ShipoutBoxWidth \@undefined
-\let \AtBeginShipoutDiscard \@undefined
-
-\let \AtBeginShipoutAddToBox \@undefined
-\let \AtBeginShipoutAddToBoxForeground \@undefined
-\let \AtBeginShipoutUpperLeft \@undefined
-\let \AtBeginShipoutUpperLeftForeground \@undefined
-
\let \AtEndDvi \@undefined
@@ -11038,13 +13728,26 @@ of this package available from CTAN}
\fi
\EndIncludeInRelease
\IncludeInRelease{2017/04/15}%
- {\document@default@language}{Save language for hyphenation}%
+ {\document@default@language}{Save language for hyphenation}%
\let\document@default@language\m@ne
\EndIncludeInRelease
\IncludeInRelease{0000/00/00}%
- {\document@default@language}{Save language for hyphenation}%
+ {\document@default@language}{Save language for hyphenation}%
\let\document@default@language\@undefined
\EndIncludeInRelease
+\IncludeInRelease{2021/05/01}%
+ {\pdfgentounicode}{Preload glyphtounicode}%
+\ifx \pdfgentounicode \@undefined \else
+ \input glyphtounicode
+ \pdfgentounicode=1
+\fi
+\EndIncludeInRelease
+\IncludeInRelease{0000/00/00}%
+ {\pdfgentounicode}{Preload glyphtounicode}%
+\ifx \pdfgentounicode \@undefined \else
+ \pdfgentounicode=0
+\fi
+\EndIncludeInRelease
\IncludeInRelease{2018/04/01}%
{\UTFviii@invalid}{UTF-8 default}%
\ifnum0%