summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/base/latex.ltx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/base/latex.ltx')
-rw-r--r--Master/texmf-dist/tex/latex/base/latex.ltx912
1 files changed, 818 insertions, 94 deletions
diff --git a/Master/texmf-dist/tex/latex/base/latex.ltx b/Master/texmf-dist/tex/latex/base/latex.ltx
index 3486509fe0d..3eba2430337 100644
--- a/Master/texmf-dist/tex/latex/base/latex.ltx
+++ b/Master/texmf-dist/tex/latex/base/latex.ltx
@@ -18,6 +18,7 @@
%% lterror.dtx (with options: `2ekernel')
%% ltpar.dtx (with options: `2ekernel')
%% ltpara.dtx (with options: `2ekernel')
+%% ltmeta.dtx (with options: `2ekernel')
%% ltspace.dtx (with options: `2ekernel')
%% ltlogos.dtx (with options: `2ekernel')
%% ltfiles.dtx (with options: `2ekernel')
@@ -44,8 +45,10 @@
%% ltfloat.dtx (with options: `2ekernel')
%% ltidxglo.dtx (with options: `2ekernel')
%% ltbibl.dtx (with options: `2ekernel')
+%% ltmarks.dtx (with options: `trace,2ekernel')
%% ltpage.dtx (with options: `2ekernel')
%% ltclass.dtx (with options: `2ekernel,tracerollback')
+%% ltkeys.dtx (with options: `2ekernel')
%% ltfilehook.dtx (with options: `2ekernel')
%% ltshipout.dtx (with options: `2ekernel')
%% ltoutput.dtx (with options: `2ekernel')
@@ -58,7 +61,7 @@
%% (but please observe conditions on bug reports sent to that address!)
%%
%%
-%% Copyright (C) 1993-2021
+%% Copyright (C) 1993-2022
%% The LaTeX Project and any individual authors listed elsewhere
%% in this file.
%%
@@ -87,6 +90,7 @@
%% and covered by LPPL is defined by the unpacking scripts (with
%% extension .ins) which are part of the distribution.
%%% From File: ltdirchk.dtx
+%% ---- START temporary definitions for bootstrapping; later overwritten ----
\ifnum\catcode`\{=1
\errmessage
{LaTeX must be made using an initex with no format preloaded}
@@ -294,6 +298,7 @@
\ifx\reserved@a\@empty\else\gdef\@TeXversion{3}\fi}
\fi
\fi
+%% ---- END temporary definitions for bootstrapping ----
%%% From File: ltplain.dtx
\catcode`\{=1 % left brace is begin-group character
\catcode`\}=2 % right brace is end-group character
@@ -572,11 +577,20 @@
\def\null{\hbox{}}
\let\bgroup={
\let\egroup=}
-{\catcode`\^^M=\active % these lines must end with %
- \gdef\obeylines{\catcode`\^^M\active \let^^M\par}%
- \global\let^^M\par} % this is in case ^^M appears in a \write
-\def\obeyspaces{\catcode`\ \active}
-{\obeyspaces\global\let =\space}
+\begingroup
+\catcode`\^^M=\active % these lines must end with %
+ \gdef\obeylines{\catcode`\^^M\active%
+ \let^^M\obeyedline%
+ }%
+ \global\let^^M\par % this is in case ^^M appears in a \write
+\endgroup
+\protected\gdef\obeyedline{\par}
+\global\let\obeyedspace\space
+\begingroup
+\catcode`\ =\active%
+\gdef\obeyspaces{\catcode`\ \active\let =\obeyedspace}%
+\global\let =\space%
+\endgroup
\long\def \loop #1\repeat{%
\def\iterate{#1\relax % Extra \relax
\expandafter\iterate\fi
@@ -691,9 +705,9 @@
%%% From File: ltvers.dtx
\def\fmtname{LaTeX2e}
\edef\fmtversion
- {2021-11-15}
-\def\patch@level{1}
-\edef\development@branch@name{}
+ {2022-06-01}
+\def\patch@level{0}
+\edef\development@branch@name{develop \the\year-\the\month-\the\day}
\iffalse
\def\reserved@a#1/#2/#3\@nil{%
\count@\year
@@ -840,7 +854,7 @@
\GenericInfo{}{BEGIN module: \new@modulename\space (\new@moduledate)}%
\GenericInfo{}{ \@spaces\@spaces\@spaces\space#3\@gobble}%
\ifnum\sourceLaTeXdate<%
- \expandafter\@parse@version\new@moduledate//00\@nil\relax
+ \expandafter\@parse@version\new@moduledate//00\@nil\relax
\ifnum\expandafter\@parse@version\fmtversion//00\@nil<%
\expandafter\@parse@version\new@moduledate//00\@nil\relax
\GenericInfo{}{Skipping module \new@modulename}%
@@ -855,7 +869,19 @@
\@skipping@moduletrue
\expandafter\new@module@skip
\fi}
-\long\def\new@module@skip#1\IncludeInRelease{\IncludeInRelease}
+\long\def\new@module@skip#1\IncludeInRelease{%
+ \long\def\reserved@a##1\EndModuleRelease{}%
+ \if\relax\detokenize\expandafter{\reserved@a#1{}{}\EndModuleRelease}\relax
+ \else
+ \@latex@error{Missing mandatory \string\IncludeInRelease{0000/00/00}}\@ehc
+ \expandafter\@secondoftwo
+ \fi
+ \@gobble
+ {\@expandtwoargs\IncludeInRelease
+ {0000/00/00}{\new@modulename}%
+ {ERROR! Emergency recovery}%
+ #1}%
+ \IncludeInRelease}
\def\EndModuleRelease{%
\ifx\new@modulename\@empty
\@latex@error{Extra \string\EndModuleRelease.}\@eha
@@ -982,6 +1008,14 @@
\e@alloc\luafunction\e@alloc@chardef
\e@alloc@luafunction@count\m@ne\e@alloc@top
}
+\def\newluacmd{%
+ \e@alloc\luafunction\luadef
+ \e@alloc@luafunction@count\m@ne\e@alloc@top
+}
+\def\newprotectedluacmd{%
+ \e@alloc\luafunction{\protected\luadef}
+ \e@alloc@luafunction@count\m@ne\e@alloc@top
+}
\ifx\e@alloc@whatsit@count\@undefined
\countdef\e@alloc@whatsit@count=261
\e@alloc@whatsit@count=\z@
@@ -1124,6 +1158,22 @@
\cs_gset_eq:NN \@expl@str@map@function@@NN \str_map_function:NN
\cs_gset_eq:NN \@expl@char@generate@@nn \char_generate:nn
\ExplSyntaxOff
+\ExplSyntaxOn
+\cs_new_eq:NN \fpeval \fp_eval:n
+\cs_new_eq:NN \inteval \int_eval:n
+\cs_new_eq:NN \dimeval \dim_eval:n
+\cs_new_eq:NN \skipeval \skip_eval:n
+\ExplSyntaxOff
+\ExplSyntaxOn
+\cs_new_eq:NN \UseName \use:c
+\cs_new:Npn \ExpandArgs #1
+ {
+ \cs_if_exist_use:cF { exp_args:N #1 }
+ { \msg_expandable_error:nnn { kernel } { unknown-arg-expansion } {#1} }
+ }
+\msg_new:nnn { kernel } { unknown-arg-expansion }
+ { Unknown~arg~expansion~"#1" }
+\ExplSyntaxOff
%%% From File: ltdefns.dtx
\def\two@digits#1{\ifnum#1<10 0\fi\number#1}
\protected\long\def\typeout#1{\begingroup
@@ -1681,8 +1731,8 @@
\xdef#1{\the\toks@}%
\endgroup}
%%% From File: ltcmd.dtx
-\def\ltcmdversion{v1.0i}
-\def\ltcmddate{2021-12-02}
+\def\ltcmdversion{v1.0l}
+\def\ltcmddate{2022-03-18}
\message{document commands,}
\ExplSyntaxOn
\tl_new:N \l__cmd_arg_spec_tl
@@ -2857,21 +2907,21 @@
\cs_new_protected:Npn \__cmd_show_command_aux:nNNn #1 #2 #3 #4
{
\__cmd_split_signature:n {#4}
- \iow_term:x
+ \tl_show:x
{
- > ~ \token_to_str:N #2 = #1: \iow_newline:
+ \token_to_str:N #2 = #1: \iow_newline:
\tl_use:N \l__cmd_tmpa_tl
- -> \cs_replacement_spec:N #3 .
+ -> \cs_replacement_spec:N #3
}
}
\cs_new_protected:Npn \__cmd_show_environment:N #1
{
\exp_after:wN \__cmd_show_environment:Nnnw #1 \q__cmd
- \iow_term:x
+ \tl_show:x
{
- > ~ \token_to_str:N \end { \cs_to_str:N #1 } : \iow_newline:
+ \token_to_str:N \end { \cs_to_str:N #1 } : \iow_newline:
-> \exp_args:Nc \cs_replacement_spec:N
- { environment~ \cs_to_str:N #1 ~end~aux~ } .
+ { environment~ \cs_to_str:N #1 ~end~aux~ }
}
}
\cs_new_protected:Npn \__cmd_show_environment:Nnnw #1 #2 #3 #4 \q__cmd
@@ -3824,22 +3874,14 @@
\exp_args:Ne \str_case_e:nnF
{
\exp_args:Nf \tl_if_empty:nT { \cs_argument_spec:N #1 }
- {
- \token_if_macro:NT #1
- {
- \exp_after:wN \exp_after:wN
- \exp_after:wN \token_to_str:N
- \exp_after:wN \use_i_delimit_by_q_stop:nw
- #1 \scan_stop: \q_stop
- }
- }
+ { \exp_not:N \exp_not:n { \exp_not:e { \tl_head:N #1 } } }
}
{
- { \token_to_str:N \__cmd_start:nNNnnn } {#2}
- { \token_to_str:N \__cmd_start_expandable:nNNNNn } {#3}
- { \token_to_str:N \__cmd_start_env:nnnnn } {#4}
+ { \exp_not:N \__cmd_start:nNNnnn } {#2}
+ { \exp_not:N \__cmd_start_expandable:nNNNNn } {#3}
+ { \exp_not:N \__cmd_start_env:nnnnn } {#4}
{
- \exp_after:wN \token_to_str:N
+ \exp_after:wN \exp_not:N
\cs:w environment~
\exp_last_unbraced:Ne \use_none:nnn
{ \cs_to_str:N #1 } ~end~aux \cs_end:
@@ -4284,6 +4326,9 @@
\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} }
+\cs_new_eq:NN \IfBlankF \tl_if_blank:nF
+\cs_new_eq:NN \IfBlankT \tl_if_blank:nT
+\cs_new_eq:NN \IfBlankTF \tl_if_blank:nTF
\tl_new:N \ProcessedArgument
\cs_new_eq:NN \ReverseBoolean \__cmd_bool_reverse:N
\cs_new_eq:NN \SplitArgument \__cmd_split_argument:nnn
@@ -4305,8 +4350,8 @@
\ExplSyntaxOff
%%% From File: lthooks.dtx
-\def\lthooksversion{v1.0s}
-\def\lthooksdate{2021/09/28}
+\def\lthooksversion{v1.0u}
+\def\lthooksdate{2022/05/19}
\ExplSyntaxOn
\bool_new:N \g__hook_debug_bool
\cs_new_eq:NN \__hook_debug:n \use_none:n
@@ -4726,6 +4771,7 @@
\tl_const:cn { c__hook_generic_env/./begin_tl } { + }
\tl_const:cn { c__hook_generic_env/./end_tl } { + }
\tl_const:cn { c__hook_generic_include/./end_tl } { - }
+\tl_const:cn { c__hook_generic_include/./excluded_tl } { + }
\clist_map_inline:nn { file , package , class , include }
{
\tl_const:cn { c__hook_deprecated_#1/./before_tl } { }
@@ -4779,7 +4825,13 @@
\__hook_deprecated_generic_warn:n {#1}
\__hook_do_deprecated_generic:Nn \__hook_gset_rule:nnnn {#1}
{#2} {#3} {#4}
- \exp_after:wN \use_none:nnnnnnnnn \use_none:n
+ \__hook_clean_to_scan:w
+ }
+ \__hook_if_execute_immediately:nT {#1}
+ {
+ \msg_error:nnnnnn { hooks } { rule-too-late }
+ {#1} {#2} {#3} {#4}
+ \__hook_clean_to_scan:w
}
\__hook_init_structure:n {#1}
\__hook_rule_gclear:nnn {#1} {#2} {#4}
@@ -4788,8 +4840,11 @@
{#1} {#2} {#4}
\__hook_update_hook_code:n {#1}
}
- { \msg_error:nnnnnn { hooks } { unknown-rule }
- {#1} {#2} {#3} {#4} }
+ {
+ \msg_error:nnnnnn { hooks } { unknown-rule }
+ {#1} {#2} {#3} {#4}
+ }
+ \s__hook_mark
}
\cs_new_protected:Npn \__hook_rule_before_gset:nnn #1#2#3
{
@@ -4860,8 +4915,8 @@
}
\cs_new_protected:Npn \__hook_initialize_hook_code:n #1
{
- \__hook_debug:n{ \iow_term:x{^^JUpdate~ code~ for~ hook~
- '#1' \on@line :^^J} }
+ \__hook_debug:n
+ { \iow_term:x { ^^J Update~code~for~hook~'#1' \on@line :^^J } }
\__hook_include_legacy_code_chunk:n {#1}
\__hook_if_usable:nT {#1}
{
@@ -4882,8 +4937,8 @@
\prop_set_eq:Nc \l__hook_work_prop { g__hook_#1_code_prop }
\__hook_initialize_single:ccn
{ __hook~#1 } { g__hook_#1_labels_clist } {#1}
- \__hook_debug:n{ \exp_args:NNx \prop_gput:Nnn
- \g__hook_used_prop {#1}{} }
+ \__hook_debug:n
+ { \exp_args:NNx \prop_gput:Nnn \g__hook_used_prop {#1} { } }
}
}
}
@@ -5040,12 +5095,12 @@
}
\prop_put:Nnn \l__hook_work_prop {#1} { }
}
-\cs_new_eq:cc { __hook_apply_-rule_<:nnn } { __hook_apply_rule_>:nnn }
-\cs_new_eq:cc { __hook_apply_-rule_>:nnn } { __hook_apply_rule_<:nnn }
+\cs_new_eq:cc { __hook_apply_-rule_<:nnn } { __hook_apply_rule_>:nnn }
+\cs_new_eq:cc { __hook_apply_-rule_>:nnn } { __hook_apply_rule_<:nnn }
\cs_new_eq:cc { __hook_apply_-rule_<-:nnn } { __hook_apply_rule_<-:nnn }
\cs_new_eq:cc { __hook_apply_-rule_->:nnn } { __hook_apply_rule_->:nnn }
-\cs_new_eq:cc { __hook_apply_-rule_xE:nnn } { __hook_apply_rule_xE:nnn }
-\cs_new_eq:cc { __hook_apply_-rule_xW:nnn } { __hook_apply_rule_xW:nnn }
+\cs_new_eq:cc { __hook_apply_-rule_xE:nnn } { __hook_apply_rule_xE:nnn }
+\cs_new_eq:cc { __hook_apply_-rule_xW:nnn } { __hook_apply_rule_xW:nnn }
\cs_new_protected:Npn \__hook_msg_pair_found:nnn #1#2#3
{
\iow_term:x{~ \str_if_eq:nnTF {#3} {??} {default} {~normal} ~
@@ -5281,9 +5336,9 @@
\__hook_tl_gclear:c { __hook~#1 }
\__hook_tl_gclear:c { __hook_next~#1 }
\__hook_tl_gclear:c { __hook_toplevel~#1 }
- \prop_gclear:c { g__hook_#1_code_prop }
+ \prop_gclear_new:c { g__hook_#1_code_prop }
}
-\prg_new_conditional:Npnn \__hook_if_execute_immediately:n #1 { F, TF }
+\prg_new_conditional:Npnn \__hook_if_execute_immediately:n #1 { T, F, TF }
{
\__hook_if_usable:nTF {#1}
{
@@ -5406,7 +5461,8 @@
This~command~was~ignored.
}
\msg_new:nnnn { hooks } { unknown-rule }
- { Unknown~ relationship~ '#3'~
+ {
+ Unknown~ relationship~ '#3'~
between~ labels~ '#2'~ and~ '#4'~
\str_if_eq:nnF {#1} {??} { ~in~hook~'#1' }. ~
Perhaps~ a~ misspelling?
@@ -5420,6 +5476,19 @@
'voids'~ or~
'unrelated'.
}
+\msg_new:nnnn { hooks } { rule-too-late }
+ {
+ Sorting~rule~for~'#1'~hook~applied~too~late.\\
+ Try~setting~this~rule~earlier.
+ }
+ {
+ You~tried~to~set~the~ordering~of~hook~'#1'~using\\
+ \ \ \iow_char:N\\DeclareHookRule{#1}{#2}{#3}{#4}\\
+ but~hook~'#1'~was~already~used~as~a~one-time~hook,~
+ thus~sorting~is\\
+ no~longer~possible.~Declare~the~rule~
+ before~the~hook~is~used.
+ }
\msg_new:nnnn { hooks } { misused-top-level }
{
Illegal~use~of~\iow_char:N \\AddToHook{#1}[top-level]{...}.\\
@@ -5972,6 +6041,7 @@
}
}
\ExplSyntaxOff
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% From File: ltalloc.dtx
\chardef\@xxxii=32
\mathchardef\@Mi=10001
@@ -6291,7 +6361,7 @@ Type H <return> for immediate help.}%
%% File: ltpara.dtx (C) Copyright 2020-2021
%%% From File: ltpara.dtx
\def\ltparaversion{v1.0k}
-\def\ltparadate{2021/11/11}
+\def\ltparadate{2022/05/13}
\ExplSyntaxOn
@@ -6416,6 +6486,37 @@ Type H <return> for immediate help.}%
\ExplSyntaxOff
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% File: ltmeta.dtx (C) Copyright 2021, 2022
+%%% From File: ltmeta.dtx
+\def\ltmetaversion{v1.0b}
+\def\ltmetadate{2022/05/18}
+\let \IfDocumentMetadataTF \@secondoftwo
+\protected\def\DocumentMetadata{%
+ \InputIfFileExists{documentmetadata-support.ltx}%
+ {}%
+ {%
+ \@latex@error{No support files for
+ \noexpand\DocumentMetadata found}
+ {Is the 'LaTeX-lab' bundle installed?%
+ \MessageBreak
+ Without it, the declaration is ignored.}%
+ \let\DocumentMetadata\@gobble
+ }%
+ \let \IfDocumentMetadataTF \@firstoftwo
+ \DocumentMetadata
+}
+\NewDocumentCommand\MakeLinkTarget{sO{}m}{%
+ \ifvmode
+ \special{}%
+ \else
+ \@savsf\spacefactor
+ \smash{}%
+ \spacefactor\@savsf
+ \fi}
+\NewDocumentCommand\LinkTargetOn{}{}
+\NewDocumentCommand\LinkTargetOff{}{}
+\NewDocumentCommand\NextLinkTarget{m}{}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% From File: ltspace.dtx
\message{spacing,}
\DeclareRobustCommand\pagebreak{\@testopt{\@no@pgbk-}4}
@@ -6826,6 +6927,8 @@ Type H <return> for immediate help.}%
\else
\deadcycles\z@
\@nameuse{cp@#1}%
+ \UseHook{include/excluded}%
+ \UseOneTimeHook{include/#1/excluded}%
\fi
\let\@auxout\@mainaux
\else
@@ -6836,6 +6939,7 @@ Type H <return> for immediate help.}%
\NewHook{include/before}
\NewReversedHook{include/end}
\NewReversedHook{include/after}
+\NewHook{include/excluded}
\def\@writeckpt#1{%
\if@filesw
\immediate\write\@partaux{\string\@setckpt{#1}\@charlb}%
@@ -6966,6 +7070,10 @@ Type H <return> for immediate help.}%
\ifx\filename@ext\relax tex\else\filename@ext\fi}%
\expandafter\let\expandafter\reserved@b
\csname ver@\reserved@a\endcsname
+ \ifx\reserved@b\relax
+ \expandafter\let\expandafter\reserved@b
+ \csname ver@@\reserved@a\endcsname
+ \fi
\expandafter\expandafter\expandafter\@listfiles\expandafter
\filename@area\filename@base\\\\\\\\\\\\\\\\\\\@@
\typeout{%
@@ -7244,6 +7352,7 @@ Type H <return> for immediate help.}%
}%
\egroup
}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% From File: ltcounts.dtx
\def\setcounter#1#2{%
@@ -7886,6 +7995,7 @@ Type H <return> for immediate help.}%
\def\@xviipt{17.28}
\def\@xxpt{20.74}
\def\@xxvpt{24.88}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% From File: ltfssaxes.dtx
%% Copyright (C) 1999-2020 Frank Mittelbach
\def\DeclareFontSeriesChangeRule#1#2#3#4{%
@@ -10859,9 +10969,19 @@ Type H <return> for immediate help.}%
\else
\expandafter#2#1\null
\fi}
-\def\ref#1{\expandafter\@setref\csname r@#1\endcsname\@firstoftwo{#1}}
-\def\pageref#1{\expandafter\@setref\csname r@#1\endcsname
- \@secondoftwo{#1}}
+\def\@kernel@sref#1{\expandafter\@setref\csname r@#1\endcsname\@firstoftwo{#1}}
+\def\@kernel@spageref#1{\expandafter\@setref\csname r@#1\endcsname
+ \@secondoftwo{#1}}
+\let\@kernel@ref\@kernel@sref
+\let\@kernel@pageref\@kernel@spageref
+\NewDocumentCommand\ref{s}
+ {\IfBooleanTF{#1}{\@kernel@sref}{\@kernel@ref}}
+\NewDocumentCommand\pageref{s}
+ {\IfBooleanTF{#1}{\@kernel@spageref}{\@kernel@pageref}}
+\def\@kernel@pageref@exp#1{\csname cs_if_exist:cTF\endcsname
+ {r@#1}{\csname tl_item:cn\endcsname{r@#1}{2}}{0}}
+\def\@kernel@ref@exp#1{\csname cs_if_exist:cTF\endcsname
+ {r@#1}{\csname tl_item:cn\endcsname{r@#1}{1}}{0}}
\def\@newl@bel#1#2#3{{%
\@ifundefined{#1@#2}%
\relax
@@ -10883,8 +11003,12 @@ Type H <return> for immediate help.}%
{\csname p@#1\expandafter\endcsname\csname the#1\endcsname}%
}
\def\labelformat#1{\expandafter\def\csname p@#1\endcsname##1}
-\DeclareRobustCommand\Ref[1]{\protected@edef\@tempa{\ref{#1}}%
- \expandafter\MakeUppercase\@tempa}
+\def\@kernel@Ref#1{\protected@edef\@tempa{\@kernel@ref{#1}}%
+ \expandafter\MakeUppercase\@tempa}
+\def\@kernel@sRef#1{\protected@edef\@tempa{\@kernel@sref{#1}}%
+ \expandafter\MakeUppercase\@tempa}
+\NewDocumentCommand\Ref{s}
+ {\IfBooleanTF{#1}{\@kernel@sRef}{\@kernel@Ref}}
\def\@currentlabel{}
%%% From File: ltmiscen.dtx
\message{environments,}
@@ -11272,7 +11396,7 @@ Type H <return> for immediate help.}%
\global\setbox\@ne\vbox{\box\@ne\kern2\p@}%
\vcenter{\kern-\ht\@ne\unvbox\z@\kern-\baselineskip}\,\right)$}%
\null\;\vbox{\kern\ht\@ne\box\tw@}\endgroup}
-\def\openup{\afterassignment\@penup\dimen@}
+\protected\def\openup{\afterassignment\@penup\dimen@}
\def\@penup{\advance\lineskip\dimen@
\advance\baselineskip\dimen@
\advance\lineskiplimit\dimen@}
@@ -11422,6 +11546,9 @@ Type H <return> for immediate help.}%
\expandafter\@ensuredmath
\fi}
\long\def\@ensuredmath#1{$\relax#1$}
+\ifx\mathdefaultsmode\@undefined\else
+ \mathdefaultsmode=1
+\fi
%%% From File: ltlists.dtx
\newskip\topsep
\newskip\partopsep
@@ -13306,7 +13433,12 @@ Type H <return> for immediate help.}%
\def\bibcite{\@newl@bel b}
\let\citation\@gobble
\DeclareRobustCommand\cite{%
- \@ifnextchar [{\@tempswatrue\@citex}{\@tempswafalse\@citex[]}}
+ \@ifnextchar [{\@tempswatrue\@citex@checkblank}{\@tempswafalse\@citex@checkblank[]}}
+\def\@citex@checkblank[#1]#2{%
+ \IfBlankTF {#2}%
+ {\@citex[#1]{\space}}%
+ {\@citex[#1]{#2}}%
+}
\def\@citex[#1]#2{\leavevmode
\let\@citea\@empty
\@cite{\@for\@citeb:=#2\do
@@ -13347,6 +13479,368 @@ Type H <return> for immediate help.}%
\def\@cite#1#2{[{#1\if@tempswa , #2\fi}]}
\let\@cite@ofmt\hbox
\def\@biblabel#1{[#1]}
+%% File: ltmarks.dtx (C) Copyright 2022
+%%% From File: ltmarks.dtx
+\def\ltmarksversion{v1.0d}
+\def\ltmarksdate{2022/06/01}
+%% \end{function}
+
+\ExplSyntaxOn
+\seq_new:N \g__mark_classes_seq
+\cs_new_protected:Npn \mark_new_class:n #1
+{
+ \seq_if_in:NnTF \g__mark_classes_seq {#1}
+ {
+ \msg_error:nnn { mark } { class-already-defined }
+ {#1}
+ }
+ { \__mark_new_class:nn {#1} }
+}
+\@onlypreamble \mark_new_class:n
+\cs_new_protected:Npn \__mark_new_class:nn #1
+{
+ \__mark_debug:n { \iow_term:x { Marks:~new~mark:~#1~\msg_line_context: } }
+ \exp_args:Nc \newmarks {c__mark_class_ #1 _mark}
+ \seq_gput_right:Nn \g__mark_classes_seq {#1}
+ \tl_new:c { g__mark_page_top_ #1 _tl }
+ \tl_new:c { g__mark_page_first_ #1 _tl }
+ \tl_new:c { g__mark_page_last_ #1 _tl }
+ \tl_new:c { g__mark_previous-page_top_ #1 _tl }
+ \tl_new:c { g__mark_previous-page_first_ #1 _tl }
+ \tl_new:c { g__mark_previous-page_last_ #1 _tl }
+ \tl_new:c { g__mark_column_top_ #1 _tl }
+ \tl_new:c { g__mark_column_first_ #1 _tl }
+ \tl_new:c { g__mark_column_last_ #1 _tl }
+ \tl_new:c { g__mark_previous-column_top_ #1 _tl }
+ \tl_new:c { g__mark_previous-column_first_ #1 _tl }
+ \tl_new:c { g__mark_previous-column_last_ #1 _tl }
+ \tl_new:c { g__mark_first-column_top_ #1 _tl }
+ \tl_new:c { g__mark_first-column_first_ #1 _tl }
+ \tl_new:c { g__mark_first-column_last_ #1 _tl }
+ \tl_new:c { g__mark_last-column_top_ #1 _tl }
+ \tl_new:c { g__mark_last-column_first_ #1 _tl }
+ \tl_new:c { g__mark_last-column_last_ #1 _tl }
+}
+\box_new:N \l__mark_box
+\tl_new:N \g__mark_tmp_tl
+\tl_new:N \g__mark_new_top_tl
+\cs_new_protected:Npn \__mark_update_structure:nn #1#2
+ {
+ \__mark_update_structure_alias:nn { previous-#1 } {#1}
+ \group_begin:
+ \dim_set_eq:NN \tex_splitmaxdepth:D \c_max_dim
+ \int_set_eq:NN \tex_vbadness:D \c_max_int
+ \dim_set_eq:NN \tex_vfuzz:D \c_max_dim
+ \vbox_set_to_ht:Nnn \l__mark_box { -.5\c_max_dim }
+ {
+ #2
+ \tex_unskip:D
+ \box_set_to_last:N \l__mark_box
+ \int_compare:nNnT \tex_lastnodetype:D < 0
+ {
+ \box_if_vertical:NT \l__mark_box
+ {
+ \vbox_set_to_ht:Nnn \l__mark_box { -.5\c_max_dim }
+ {
+ \vbox_unpack:N \l__mark_box
+ \tex_kern:D \c_zero_dim % ensure that box
+ % is not empty
+ }
+ \int_compare:nNnT \tex_badness:D > 0
+ { \vbox_unpack:N \l__mark_box }
+ }
+ }
+ \tex_kern:D \c_zero_dim
+ }
+ \int_compare:nNnTF \tex_badness:D > 0
+ {
+ \vbox_set_split_to_ht:NNn \l__mark_box \l__mark_box \c_max_dim
+ \seq_map_inline:Nn \g__mark_classes_seq
+ {
+ \tl_gset_eq:Nc \g__mark_new_top_tl { g__mark_#1_last_##1_tl }
+ \tl_gset_eq:cN { g__mark_#1_top_##1_tl } \g__mark_new_top_tl
+ \tl_gset:No \g__mark_tmp_tl
+ { \tex_splitbotmarks:D \use:c { c__mark_class_##1_mark } }
+ \tl_if_empty:NTF \g__mark_tmp_tl
+ {
+ \tl_gset_eq:cN { g__mark_#1_last_ ##1_tl }
+ \g__mark_new_top_tl
+ \tl_gset_eq:cN { g__mark_#1_first_##1_tl }
+ \g__mark_new_top_tl
+ }
+ {
+ \tl_gset_eq:cN { g__mark_#1_last_##1_tl } \g__mark_tmp_tl
+ \tl_gset:co { g__mark_#1_first_##1_tl }
+ {
+ \tex_splitfirstmarks:D
+ \use:c { c__mark_class_##1_mark }
+ }
+ }
+ }
+ }
+ {
+ \msg_error:nnn { mark } { infinite-shrinkage } {#1}
+ \seq_map_inline:Nn \g__mark_classes_seq
+ {
+ \tl_gset_eq:cc { g__mark_#1_top_ ##1_tl }
+ { g__mark_#1_last_ ##1_tl }
+ \tl_gset_eq:cc { g__mark_#1_first_##1_tl }
+ { g__mark_#1_last_ ##1_tl }
+ }
+ }
+ \group_end:
+ }
+\cs_new_protected:Npn \__mark_update_structure_alias:nn #1#2 {
+ \seq_map_inline:Nn \g__mark_classes_seq
+ {
+ \tl_gset_eq:cc { g__mark_ #1 _top_ ##1 _tl }
+ { g__mark_ #2 _top_ ##1 _tl }
+ \tl_gset_eq:cc { g__mark_ #1 _first_ ##1 _tl }
+ { g__mark_ #2 _first_ ##1 _tl }
+ \tl_gset_eq:cc { g__mark_ #1 _last_ ##1 _tl }
+ { g__mark_ #2 _last_ ##1 _tl }
+ }
+}
+\cs_new_protected:Npn \__mark_update_structure_to_err:n #1 {
+ \seq_map_inline:Nn \g__mark_classes_seq
+ {
+ \tl_gset:cn { g__mark_ #1 _top_ ##1 _tl } { \__mark_error:n {#1} }
+ \tl_gset:cn { g__mark_ #1 _first_ ##1 _tl } { \__mark_error:n {#1} }
+ \tl_gset:cn { g__mark_ #1 _last_ ##1 _tl } { \__mark_error:n {#1} }
+ }
+}
+\cs_new_protected:Npn \__mark_error:n #1 {
+ \msg_error:nnn { mark } { invalid-use } {#1}
+}
+\cs_new_protected:Npn \mark_insert:nn #1#2
+{
+ \seq_if_in:NnTF \g__mark_classes_seq {#1}
+ {
+ \group_begin:
+ \@kernel@before@insertmark
+ \hook_use:n { insertmark }
+ \unrestored@protected@xdef \g__mark_tmp_tl {#2}
+ \__mark_debug:n{ \iow_term:x { Marks:~ set~#1~<-~
+ '\tl_to_str:V \g__mark_tmp_tl' ~ \msg_line_context: } }
+ \tex_marks:D \use:c { c__mark_class_ #1 _mark }
+ {
+ \tl_if_empty:NTF \g__mark_tmp_tl
+ { \exp_not:n { \prg_do_nothing: } }
+ { \exp_not:o { \g__mark_tmp_tl } }
+ }
+ \group_end:
+ \if@nobreak\ifvmode\nobreak\fi\fi
+ }
+ {
+ \msg_error:nnx { mark } { unknown-class }
+ { \tl_to_str:n {#1} }
+ }
+}
+\cs_new:Npn \@kernel@before@insertmark {
+ \cs_set_eq:NN \label \scan_stop:
+ \cs_set_eq:NN \index \scan_stop:
+ \cs_set_eq:NN \glossary \scan_stop:
+}
+\hook_new:n {insertmark}
+\cs_new:Npn \mark_use_first:nn #1#2 { \exp_not:v { g__mark_#1_first_#2_tl } }
+\cs_new:Npn \mark_use_last:nn #1#2 { \exp_not:v { g__mark_#1_last_#2_tl } }
+\cs_new:Npn \mark_use_top:nn #1#2 { \exp_not:v { g__mark_#1_top_#2_tl } }
+\prg_new_conditional:Npnn \mark_if_eq:nnnn #1#2#3#4 { T , F , TF }
+{
+ \tl_if_eq:ccTF { g__mark_ #1 _#3_ #2 _tl }
+ { g__mark_ #1 _#4_ #2 _tl }
+ \prg_return_true:
+ \prg_return_false:
+}
+\prg_new_conditional:Npnn \mark_if_eq:nnnnnn #1#2#3#4#5#6 { T , F , TF }
+{
+ \tl_if_eq:ccTF { g__mark_ #1 _#3_ #2 _tl }
+ { g__mark_ #4 _#6_ #5 _tl }
+ \prg_return_true:
+ \prg_return_false:
+}
+\prop_gput:Nnn \g_msg_module_type_prop { mark } { LaTeX }
+\msg_new:nnnn { mark } { class-already-defined }
+ { Mark~class~'#1'~already~defined }
+ {
+ \c__msg_coding_error_text_tl
+ LaTeX~was~asked~to~define~a~new~mark~class~called~'#1':~
+ this~mark~class~already~exists.
+ \c__msg_return_text_tl
+ }
+\msg_new:nnnn { mark } { unknown-class }
+ { Unknown~mark~class~'#1'. }
+ {
+ \c__msg_coding_error_text_tl
+ LaTeX~was~asked~to~manipulate~a~mark~of~class~'#1',~
+ but~this~class~of~marks~does~not~exist.
+ }
+
+\msg_new:nnnn { mark } { invalid-use }
+ { Mark~region~'#1'~not ~usable }
+ {
+ \c__msg_coding_error_text_tl
+ The~region~'#1'~can~only~be~used~after~
+ all~columns~have~been~assembled.
+ \c__msg_return_text_tl
+ }
+\msg_new:nnnn { mark } { infinite-shrinkage }
+ { Infinite~shrinkage~found~in~'#1'. }
+ {
+ \c__msg_coding_error_text_tl
+ The~mark~region~'#1'~contains~some~infinite~negative~glue~
+ allowing~it~to~shrink~to~an~arbitrary~size.~
+ This~makes~it~impossible~to~split~the~region~apart~to~
+ get~at~its~marks.~They~are~lost.
+ }
+\bool_new:N \g__mark_debug_bool
+\cs_new_eq:NN \__mark_debug:n \use_none:n
+\cs_new_protected:Npn \mark_debug_on:
+ {
+ \bool_gset_true:N \g__mark_debug_bool
+ \__mark_debug_gset:
+ }
+\cs_new_protected:Npn \mark_debug_off:
+ {
+ \bool_gset_false:N \g__mark_debug_bool
+ \__mark_debug_gset:
+ }
+\cs_new_protected:Npn \__mark_debug_gset:
+ {
+ \cs_gset_protected:Npx \__mark_debug:n ##1
+ { \bool_if:NT \g__mark_debug_bool {##1} }
+ }
+\cs_new_eq:NN \DebugMarksOn \mark_debug_on:
+\cs_new_eq:NN \DebugMarksOff \mark_debug_off:
+\cs_new_protected:Npn \__mark_class_status:nn #1#2
+ {
+ \typeout{ Marks:~#2~ #1:}
+ \typeout{\@spaces page~ (current):
+ | \exp_not:v { g__mark_page_top_ #2 _tl }
+ | \exp_not:v { g__mark_page_first_ #2 _tl }
+ | \exp_not:v { g__mark_page_last_ #2 _tl } |}
+ \typeout{\@spaces page~ (previous):
+ | \exp_not:v { g__mark_previous-page_top_ #2 _tl }
+ | \exp_not:v { g__mark_previous-page_first_ #2 _tl }
+ | \exp_not:v { g__mark_previous-page_last_ #2 _tl } |}
+ \typeout{\@spaces column~ (previous):
+ | \exp_not:v { g__mark_previous-column_top_ #2 _tl }
+ | \exp_not:v { g__mark_previous-column_first_ #2 _tl }
+ | \exp_not:v { g__mark_previous-column_last_ #2 _tl } |}
+ \typeout{\@spaces column~ (current):
+ | \exp_not:v { g__mark_column_top_ #2 _tl }
+ | \exp_not:v { g__mark_column_first_ #2 _tl }
+ | \exp_not:v { g__mark_column_last_ #2 _tl } |}
+ \typeout{\@spaces column~ (first):
+ | \exp_not:v { g__mark_first-column_top_ #2 _tl }
+ | \exp_not:v { g__mark_first-column_first_ #2 _tl }
+ | \exp_not:v { g__mark_first-column_last_ #2 _tl } |}
+ \typeout{\@spaces column~ (second):
+ | \exp_not:v { g__mark_last-column_top_ #2 _tl }
+ | \exp_not:v { g__mark_last-column_first_ #2 _tl }
+ | \exp_not:v { g__mark_last-column_last_ #2 _tl } |}
+}
+\cs_new_protected:Npn \__mark_status:n #1
+ {
+ \seq_map_inline:Nn \g__mark_classes_seq
+ { \__mark_class_status:nn {#1} {##1} }
+ }
+\cs_new_eq:NN \NewMarkClass \mark_new_class:n
+\@onlypreamble \NewMarkClass
+\cs_new_eq:NN \InsertMark \mark_insert:nn
+\NewExpandableDocumentCommand \FirstMark { O{page} m }
+ { \mark_use_first:nn {#1}{#2} }
+\NewExpandableDocumentCommand \LastMark { O{page} m }
+ { \mark_use_last:nn {#1}{#2} }
+\NewExpandableDocumentCommand \TopMark { O{page} m }
+ { \mark_use_top:nn {#1}{#2} }
+\NewExpandableDocumentCommand \IfMarksEqualTF {O{page}mmm} {
+ \mark_if_eq:nnnnTF {#1}{#2}{#3}{#4}
+}
+\cs_new_protected:Npn \__mark_update_singlecol_structures: {
+ \box_if_vertical:NTF \@outputbox
+ {
+ \__mark_update_structure:nn {page}
+ { \vbox_unpack:N \@outputbox }
+ }
+ {
+ \__mark_update_structure:nn {page}
+ { \hbox_unpack:N \@outputbox }
+ }
+ \__mark_update_structure_alias:nn {previous-column}{previous-page}
+ \__mark_update_structure_alias:nn {column}{page}
+ \__mark_update_structure_alias:nn {first-column}{page}
+ \__mark_update_structure_alias:nn {last-column}{page}
+ \__mark_debug:n
+ {
+ \__mark_status:n
+ { in~ OR~ (
+ \legacy_if:nTF {@twoside}
+ { twoside-
+ \int_if_odd:nTF \c@page
+ { odd }{ even }
+ }
+ { oneside }
+ )
+ }
+ }
+}
+\cs_new_protected:Npn \__mark_update_dblcol_structures: {
+ \box_if_vertical:NTF \@outputbox
+ {
+ \__mark_update_structure:nn {column}
+ { \vbox_unpack:N \@outputbox }
+ }
+ {
+ \__mark_update_structure:nn {column}
+ { \hbox_unpack:N \@outputbox }
+ }
+ \legacy_if:nTF {@firstcolumn}
+ {
+ \__mark_update_structure_alias:nn {first-column}{column}
+ \__mark_update_structure_to_err:n {last-column}
+ }
+ {
+ \__mark_update_structure_alias:nn {last-column}{column}
+ \seq_map_inline:Nn \g__mark_classes_seq
+ {
+ \tl_gset_eq:cc { g__mark_previous-page_top_ ##1 _tl }
+ { g__mark_page_top_ ##1 _tl }
+ \tl_gset_eq:cc { g__mark_previous-page_first_ ##1 _tl }
+ { g__mark_page_first_ ##1 _tl }
+ \tl_gset_eq:cc { g__mark_previous-page_last_ ##1 _tl }
+ { g__mark_page_last_ ##1 _tl }
+ \tl_gset_eq:cc { g__mark_page_top_ ##1 _tl }
+ { g__mark_first-column_top_ ##1 _tl }
+ \tl_gset_eq:cc { g__mark_ page_first_ ##1 _tl }
+ { g__mark_first-column_first_ ##1 _tl }
+ \tl_gset_eq:cc { g__mark_page_last_ ##1 _tl }
+ { g__mark_last-column_last_ ##1 _tl }
+ }
+ }
+ \__mark_debug:n
+ {
+ \__mark_status:n
+ { in~ OR~ (
+ \legacy_if:nTF {@twoside}
+ { twoside-
+ \int_if_odd:nTF \c@page
+ { odd }{ even }
+ }
+ { oneside }
+ \space
+ \legacy_if:nTF {@firstcolumn}
+ { first~ }{ second~ }
+ column )
+ }
+ }
+}
+\cs_new_eq:NN \@expl@@@mark@update@singlecol@structures@@
+ \__mark_update_singlecol_structures:
+\cs_new_eq:NN \@expl@@@mark@update@dblcol@structures@@
+ \__mark_update_dblcol_structures:
+\ExplSyntaxOff
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% From File: ltpage.dtx
\def\pagestyle#1{%
\@ifundefined{ps@#1}%
@@ -13364,11 +13858,15 @@ Type H <return> for immediate help.}%
\hfil}\let\@evenhead\@empty\let\@evenfoot\@oddfoot}
\let\@leftmark\@firstoftwo
\let\@rightmark\@secondoftwo
+\ExplSyntaxOn
\DeclareRobustCommand*\markboth[2]{%
\begingroup
\let\label\relax \let\index\relax \let\glossary\relax
\unrestored@protected@xdef\@themark {{#1}{#2}}%
\@temptokena \expandafter{\@themark}%
+ \mark_insert:nn{2e-left}{#1}
+ \mark_insert:nn{2e-right}{#2}
+ \tl_if_empty:nF{#2}{ \mark_insert:nn{2e-right-nonempty}{#2} }
\mark{\the\@temptokena}%
\endgroup
\if@nobreak\ifvmode\nobreak\fi\fi}
@@ -13377,9 +13875,12 @@ Type H <return> for immediate help.}%
\let\label\relax \let\index\relax \let\glossary\relax
\expandafter\@markright\@themark {#1}%
\@temptokena \expandafter{\@themark}%
+ \mark_insert:nn{2e-right}{#1}
+ \tl_if_empty:nF{#1}{ \mark_insert:nn{2e-right-nonempty}{#1} }
\mark{\the\@temptokena}%
\endgroup
\if@nobreak\ifvmode\nobreak\fi\fi}
+\ExplSyntaxOff
\def\@markright#1#2#3{\@temptokena {#1}%
\unrestored@protected@xdef\@themark{{\the\@temptokena}{#3}}}
\def\leftmark{\expandafter\@leftmark\botmark\@empty\@empty}
@@ -13768,22 +14269,16 @@ Type H <return> for immediate help.}%
\xdef\@currpath{\ifx\reserved@b\@empty\else\reserved@b/\fi}%
\global\let\@currext#4%
\@ifl@aded\@currext\@currname
- {\@if@ptions\@currext{\@currname}{#2}{}%
- {\@latex@error
- {Option clash for \@cls@pkg\space \@currname}%
- {The package \@currname\space has already been loaded
- with options:\MessageBreak
- \space\space[\@ptionlist{\@currname.\@currext}]\MessageBreak
- There has now been an attempt to load it
- with options\MessageBreak
- \space\space[#2]\MessageBreak
- Adding the global options:\MessageBreak
- \space\space
- \@ptionlist{\@currname.\@currext},#2\MessageBreak
- to your \noexpand\documentclass declaration may fix this.%
- \MessageBreak
- Try typing \space <return> \space to proceed.}}%
- \@firstofone}%
+ {%
+ \@ifundefined{opt@fam@\@currname.\@currext}
+ {\@onefilewithoptions@clashchk{#2}}
+ {%
+ \@namedef{opt@\@currname.\@currext}{#2}%
+ \expandafter\expandafter\expandafter\ProcessKeyOptions
+ \expandafter\expandafter\expandafter
+ [\csname opt@fam@\@currname.\@currext\endcsname]%
+ }%
+ }%
{\makeatletter
\@reset@ptions
\IfFileExists{\@currpath\@currname.\@currext}{}%
@@ -13823,6 +14318,23 @@ Type H <return> for immediate help.}%
\ifx\@currext\@clsextension\let\LoadClass\@twoloadclasserror\fi}%
\@popfilename
\@reset@ptions}
+\def\@onefilewithoptions@clashchk#1{%
+ \@if@ptions\@currext{\@currname}{#1}{}%
+ {\@latex@error
+ {Option clash for \@cls@pkg\space \@currname}%
+ {The package \@currname\space has already been loaded
+ with options:\MessageBreak
+ \space\space[\@ptionlist{\@currname.\@currext}]\MessageBreak
+ There has now been an attempt to load it
+ with options\MessageBreak
+ \space\space[#1]\MessageBreak
+ Adding the global options:\MessageBreak
+ \space\space
+ \@ptionlist{\@currname.\@currext},#1\MessageBreak
+ to your \noexpand\documentclass declaration may fix this.%
+ \MessageBreak
+ Try typing \space <return> \space to proceed.}}%
+ \@firstofone}
\let\@currpkg@reqd\@empty
\@onlypreamble\@onefilewithoptions
\let\@unprocessedoptions\@undefined
@@ -14280,9 +14792,197 @@ Type H <return> for immediate help.}%
\expandafter\@secondoftwo
\fi
}
+%%% From File: ltkeys.dtx
+\ExplSyntaxOn
+\group_begin:
+ \cs_set_protected:Npn \__keys_tmp:nn #1#2
+ {
+ \quark_if_recursion_tail_stop:n {#1}
+ \cs_new_eq:cc
+ { \c__keys_props_root_str . #2 }
+ { \c__keys_props_root_str . #1 }
+ \__keys_tmp:nn
+ }
+ \__keys_tmp:nn
+ { code:n } { code }
+ { legacy_if_set:n } { if }
+ { tl_set:N } { store }
+ { usage:n } { usage }
+ { \q_recursion_tail } { }
+ \q_recursion_stop
+\group_end:
+\cs_generate_variant:Nn \clist_put_right:Nn { Nv }
+\clist_new:N \l__keys_options_clist
+\bool_new:N \l__keys_options_loading_bool
+\cs_new_protected:Npn \__keys_options:n #1
+ { \__keys_options_expand_module:Nn \__keys_options_aux:n {#1} }
+\cs_new_protected:Npn \__keys_options_aux:n #1
+ {
+ \cs_gset_nopar:cpn { opt@fam@\@currname.\@currext } {#1}
+ \cs_set_protected:Npn \__keys_option_end: { }
+ \clist_clear:N \l__keys_options_clist
+ \__keys_options_global:n {#1}
+ \__keys_options_local:
+ \keys_if_exist:nnF {#1} { unknown }
+ {
+ \keys_define:nn {#1}
+ {
+ unknown .code:n =
+ {
+ \msg_error:nnxx { keys } { option-unknown }
+ { \l_keys_key_str } { \@currname }
+ }
+ }
+ \cs_set_protected:Npn \__keys_option_end:
+ { \keys_define:nn {#1} { unknown .undefine: } }
+ }
+ \bool_set_true:N \l__keys_options_loading_bool
+ \keys_set:nV {#1} \l__keys_options_clist
+ \bool_set_false:N \l__keys_options_loading_bool
+ \AtEndOfPackage { \cs_set_eq:NN \@unprocessedoptions \scan_stop: }
+ \__keys_option_end:
+ \__keys_options_loaded:n {#1}
+ }
+\msg_new:nnnn { keys } { option-unknown }
+ { Unknown~option~'#1'~for~package~#2. }
+ {
+ LaTeX~has~been~asked~to~set~an~option~called~'#1'~
+ but~the~#2~package~has~not~created~an~option~with~this~name.
+ }
+\cs_new_protected:Npn \__keys_options_global:n #1
+ {
+ \cs_if_eq:NNF \@classoptionslist \scan_stop:
+ {
+ \cs_if_eq:NNTF \@currext \@clsextension
+ { \__keys_options_class:n {#1} }
+ { \__keys_options_package:n {#1} }
+ }
+ }
+\cs_new_protected:Npn \__keys_options_class:n #1
+ {
+ \cs_if_free:cF { opt@ \@currname . \@currext }
+ {
+ \keys_if_exist:nnTF {#1} { unknown }
+ {
+ \clist_put_right:Nv \l__keys_options_clist
+ { opt@ \@currname . \@currext }
+ }
+ {
+ \clist_map_inline:cn { opt@ \@currname . \@currext }
+ {
+ \keys_if_exist:neTF
+ {#1} { \__keys_remove_equals:n {##1} }
+ { \clist_put_right:Nn \l__keys_options_clist {##1} }
+ { \clist_put_right:Nn \@unusedoptionlist {##1} }
+ }
+ }
+ }
+ }
+\cs_new_protected:Npn \__keys_options_package:n #1
+ {
+ \clist_map_inline:Nn \@classoptionslist
+ {
+ \keys_if_exist:neT {#1} { \__keys_remove_equals:n {##1} }
+ {
+ \clist_put_right:Nn \l__keys_options_clist {##1}
+ \clist_remove_all:Nn \@unusedoptionlist {##1}
+ }
+ }
+ }
+\cs_new_protected:Npn \__keys_options_local:
+ {
+ \cs_if_eq:NNF \@currext \@clsextension
+ {
+ \cs_if_exist:cT { opt@ \@currname . \@currext }
+ {
+ \clist_put_right:Nv \l__keys_options_clist
+ { opt@ \@currname . \@currext }
+ }
+ }
+ }
+\cs_new:Npn \__keys_remove_equals:n #1
+ { \__keys_remove_equals:w #1 = \s__keys_stop }
+\cs_new:Npn \__keys_remove_equals:w #1 = #2 \s__keys_stop { \exp_not:n {#1} }
+\cs_generate_variant:Nn \keys_define:nn { nx }
+\cs_new_protected:Npn \__keys_options_expand_module:Nn #1#2
+ {
+ \cs:w __keys_options_expand_module:nN \use:e { \cs_end: {#2} } #1
+ }
+\cs_new_protected:Npn \__keys_options_expand_module:nN #1#2
+ { #2 {#1} }
+\NewDocumentCommand \DeclareKeys { O { \@currname } +m }
+ { \__keys_options_expand_module:Nn \keys_define:nn {#1} {#2} }
+\NewDocumentCommand \DeclareUnknownKeyHandler { O { \@currname } +m }
+ {
+ \cs_set_protected:cpn { __keys_unknown_handler_ #1 :nn } ##1##2 {#2}
+ \__keys_options_expand_module:Nn \keys_define:nx {#1}
+ {
+ unknown .code:n =
+ \exp_not:N \exp_args:NV
+ \exp_not:c { __keys_unknown_handler_ #1 :nn }
+ \exp_not:N \l_keys_key_str {####1}
+ }
+ }
+\NewDocumentCommand \ProcessKeyOptions { O { \@currname } }
+ { \__keys_options:n {#1} }
+\@onlypreamble \ProcessKeyOptions
+\cs_new_protected:Npn \__keys_options_loaded:n #1
+ {
+ \prop_get:NnNT \l_keys_usage_load_prop {#1} \l__keys_tmpa_tl
+ {
+ \clist_map_inline:Nn \l__keys_tmpa_tl
+ {
+ \keys_define:nn {#1}
+ {
+ ##1 .code:n =
+ \__keys_options_loaded:nn {#1} {##1}
+ }
+ }
+ }
+ }
+\cs_new_protected:Npn \__keys_options_loaded:nn #1#2
+ {
+ \bool_if:NTF \l__keys_options_loading_bool
+ {
+ \msg_warning:nnxx { keys } { load-option-ignored }
+ { \use:c { opt@fam@\@currname.\@currext } } {#2}
+ }
+ { \msg_error:nnnn { keys } { load-only } {#1} {#2} }
+ }
+\msg_new:nnn { keys } { load-option-ignored }
+ { Package~"#1"~has~already~been~loaded:~ignoring~load-time~option~"#2". }
+\msg_new:nnnn { keys } { load-only }
+ { Key~"#2"~may~only~be~used~in~the~during~loading~of~package~"#1". }
+ {
+ LaTeX~was~asked~to~set~a~key~called~"#2",~but~this~is~only~allowed~
+ in~the~optional~argument~when~loading~package~"#1".
+ }
+\tl_gput_left:Nn \@kernel@after@begindocument
+ {
+ \prop_map_inline:Nn \l_keys_usage_preamble_prop
+ {
+ \clist_map_inline:nn {#2}
+ {
+ \keys_define:nn {#1}
+ {
+ ##1 .code:n =
+ \msg_error:nnn { keys } { preamble-only } {##1}
+ }
+ }
+ }
+ }
+\msg_new:nnnn { keys } { preamble-only }
+ { Key~"#1"~may~only~be~used~in~the~preamble. }
+ {
+ LaTeX~was~asked~to~set~a~key~called~"#1",~but~this~is~only~allowed~
+ before~\begin{document}.~You~will~need~to~set~the~key~earlier.
+ }
+\NewDocumentCommand \SetKeys { O { \@currname } +m }
+ { \__keys_options_expand_module:Nn \keys_set:nn {#1} {#2} }
+\ExplSyntaxOff
%%% From File: ltfilehook.dtx
-\providecommand\ltfilehookversion{v1.0l}
-\providecommand\ltfilehookdate{2021/08/27}
+\providecommand\ltfilehookversion{v1.0m}
+\providecommand\ltfilehookdate{2022/04/01}
\ExplSyntaxOn
\tl_new:N \CurrentFile
\tl_new:N \CurrentFilePath
@@ -14421,8 +15121,16 @@ Type H <return> for immediate help.}%
\cs_new_eq:NN \undeclare@file@substitution \__filehook_subst_remove:n
\ExplSyntaxOff
\ExplSyntaxOff
-\def\set@curr@file#1{%
+\def\set@curr@file{%
+ \begingroup
+ \set@curr@file@aux}
+\edef\set@curr@file@nosearch{%
\begingroup
+ \let\noexpand\input@path\noexpand\@empty
+ \csname seq_clear:N\endcsname
+ \expandafter\noexpand\csname l_file_search_path_seq\endcsname
+ \noexpand\set@curr@file@aux}
+\def\set@curr@file@aux#1{%
\escapechar\m@ne
\let\protect\string
\edef~{\string~}%
@@ -14557,12 +15265,13 @@ Type H <return> for immediate help.}%
\declare@file@substitution{atveryend.sty}{atveryend-ltx.sty}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
-%% Copyright (C) 2020-2021
+%% Copyright (C) 2020-2022
%% Frank Mittelbach, LaTeX Team
%%
%%% From File: ltshipout.dtx
-\providecommand\ltshipoutversion{v1.0j}
-\providecommand\ltshipoutdate{2021/06/09}
+\providecommand\ltshipoutversion{v1.0m}
+\providecommand\ltshipoutdate{2022/05/08}
+ % \cs{AtBeginDvi} is the existing \LaTeXe{} interface to fill the
\ExplSyntaxOn
\bool_new:N \g__shipout_debug_bool
\cs_new_eq:NN \__shipout_debug:n \use_none:n
@@ -14586,21 +15295,21 @@ Type H <return> for immediate help.}%
\box_new:N \l__shipout_raw_box
\sys_if_engine_luatex:TF
{
- \newluafunction \__shipout_finalize_box:
+ \newprotectedluacmd \__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~
+ lua.get_functions_table()[\the \allocationnumber] = function()
+ local~head = getbox(\the \l_shipout_box)
+ local~result = call('pre_shipout_filter', head)
+ if~not (result == head) 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:
}
@@ -14673,8 +15382,8 @@ Type H <return> for immediate help.}%
\__shipout_add_foreground_box:n
{ \UseHook{shipout/lastpage}
\@kernel@after@shipout@lastpage }
+ \bool_gset_true:N \g__shipout_lastpage_handled_bool
}
- \bool_gset_true:N \g__shipout_lastpage_handled_bool
}
\__shipout_finalize_box:
\cs_set_eq:NN \protect \exp_not:N
@@ -14919,7 +15628,16 @@ Type H <return> for immediate help.}%
\iow_now:Nx \@auxout {
\gdef\string\@abspage@last {\int_use:N \g_shipout_readonly_int}}
\fi
- \bool_if:NF \g__shipout_lastpage_handled_bool
+ \bool_if:NTF \g__shipout_lastpage_handled_bool
+ {
+ \int_compare:nNnF \@abspage@last = \g_shipout_readonly_int
+ {
+ \@latex@warning@no@line{Hook~ 'shipout/lastpage'~ executed~
+ on~ wrong~ page~ (\@abspage@last\space not~
+ \int_use:N\g_shipout_readonly_int).\MessageBreak
+ Rerun~ to~ correct~ this}%
+ }
+ }
{
\bool_lazy_and:nnF
{ \hook_if_empty_p:n {shipout/lastpage} }
@@ -14973,7 +15691,7 @@ Type H <return> for immediate help.}%
\__shipout_add_foreground_picture:n
\ExplSyntaxOff
\ExplSyntaxOn
-\cs_new_protected:Npn \AtEndDvi {\AddToHook{shipout/lastpage}}
+\cs_new_protected:Npn \AtEndDvi #1 {\AddToHook{shipout/lastpage}{#1}}
\ExplSyntaxOff
\disable@package@load{atenddvi}
{\PackageWarning{atenddvi}
@@ -15307,8 +16025,10 @@ Type H <return> for immediate help.}%
}%
\def \@opcol {%
\if@twocolumn
+ \@expl@@@mark@update@dblcol@structures@@
\@outputdblcol
\else
+ \@expl@@@mark@update@singlecol@structures@@
\@outputpage
\fi
\global \@mparbottom \z@ \global \@textfloatsheight \z@
@@ -16074,6 +16794,10 @@ Type H <return> for immediate help.}%
\def\newmarks{%
\e@alloc\marks \e@alloc@chardef{\count256}\m@ne\e@alloc@top}
\fi
+\NewMarkClass {2e-left}
+\NewMarkClass {2e-right}
+\NewMarkClass {2e-right-nonempty}
+
\ifx\XeTeXcharclass\@undefined
\else
\ifdim\the\XeTeXversion\XeTeXrevision\p@>0.99993\p@
@@ -16385,23 +17109,23 @@ Type H <return> for immediate help.}%
\uccode`\^^9e=`\^^d0 % d-bar
\lccode`\^^[=`\^^[ % oe in OT1
\fi % End of reset block for 8-bit engines
+\ExplSyntaxOn
+\protected\def\@expl@text@lowercase@@n{\text_lowercase:n}
+\protected\def\@expl@text@uppercase@@n{\text_uppercase:n}
+\tl_put_right:Nn \l_text_case_exclude_arg_tl { \NoCaseChange }
+\cs_new_protected:Npn \NoCaseChange #1 {#1}
+\ExplSyntaxOff
\DeclareRobustCommand{\MakeUppercase}[1]{{%
\def\i{I}\def\j{J}%
\def\reserved@a##1##2{\let##1##2\reserved@a}%
\expandafter\reserved@a\@uclclist\reserved@b{\reserved@b\@gobble}%
- \let\UTF@two@octets@noexpand\@empty
- \let\UTF@three@octets@noexpand\@empty
- \let\UTF@four@octets@noexpand\@empty
- \protected@edef\reserved@a{\uppercase{#1}}%
+ \protected@edef\reserved@a{\@expl@text@uppercase@@n{\noexpand\unexpanded{#1}}}%
\reserved@a
}}
\DeclareRobustCommand{\MakeLowercase}[1]{{%
\def\reserved@a##1##2{\let##2##1\reserved@a}%
\expandafter\reserved@a\@uclclist\reserved@b{\reserved@b\@gobble}%
- \let\UTF@two@octets@noexpand\@empty
- \let\UTF@three@octets@noexpand\@empty
- \let\UTF@four@octets@noexpand\@empty
- \protected@edef\reserved@a{\lowercase{#1}}%
+ \protected@edef\reserved@a{\@expl@text@lowercase@@n{\noexpand\unexpanded{#1}}}%
\reserved@a
}}
\def\@uclclist{\oe\OE\o\O\ae\AE