summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex-dev/base/latex.ltx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex-dev/base/latex.ltx')
-rw-r--r--Master/texmf-dist/tex/latex-dev/base/latex.ltx215
1 files changed, 124 insertions, 91 deletions
diff --git a/Master/texmf-dist/tex/latex-dev/base/latex.ltx b/Master/texmf-dist/tex/latex-dev/base/latex.ltx
index e912c3d3494..66ee8826d2a 100644
--- a/Master/texmf-dist/tex/latex-dev/base/latex.ltx
+++ b/Master/texmf-dist/tex/latex-dev/base/latex.ltx
@@ -709,8 +709,8 @@
%%% From File: ltvers.dtx
\def\fmtname{LaTeX2e}
\edef\fmtversion
- {2024-06-01}
-\def\patch@level{-2}
+ {2024-11-01}
+\def\patch@level{1}
\edef\development@branch@name{develop \the\year-\the\month-\the\day}
\iffalse
\def\reserved@a#1/#2/#3\@nil{%
@@ -1160,7 +1160,10 @@
\cs_gset_eq:NN \@expl@cs@to@str@@N \cs_to_str:N
\cs_gset_eq:NN \@expl@str@if@eq@@nnTF \str_if_eq:nnTF
\cs_gset_eq:NN \@expl@cs@prefix@spec@@N \cs_prefix_spec:N
-\cs_gset_eq:NN \@expl@cs@argument@spec@@N \cs_argument_spec:N
+\cs_if_exist:NTF \cs_parameter_spec:N
+ { \cs_gset_eq:NN \@expl@cs@parameter@spec@@N \cs_parameter_spec:N }
+ { \cs_gset_eq:NN \@expl@cs@parameter@spec@@N \cs_argument_spec:N }
+\cs_gset_eq:NN \__kernel_cs_parameter_spec:N \@expl@cs@parameter@spec@@N
\cs_gset_eq:NN \@expl@cs@replacement@spec@@N \cs_replacement_spec:N
\cs_gset_eq:NN \@expl@str@map@function@@NN \str_map_function:NN
\cs_gset_eq:NN \@expl@char@generate@@nn \char_generate:nn
@@ -1650,7 +1653,7 @@
\long\def\@show@newcommand@aux#1#2#3{%
\typeout{> \string#1=\@expl@cs@prefix@spec@@N#1macro:}%
#3{default \string##1=\expandafter\detokenize\@gobblethree#2.^^J%
- \@expl@cs@argument@spec@@N#1->\@expl@cs@replacement@spec@@N#1}}
+ \@expl@cs@parameter@spec@@N#1->\@expl@cs@replacement@spec@@N#1}}
\long\def\@show@tokens#1{%
\edef\reserved@a{#1}%
\showtokens\expandafter
@@ -1681,7 +1684,7 @@
\@show@environment@end#1}
\long\def\@show@environment@begin#1{%
\typeout{> \string\begin{\@expl@cs@to@str@@N#1}=environment:}%
- \typeout{\@expl@cs@argument@spec@@N#1->%
+ \typeout{\@expl@cs@parameter@spec@@N#1->%
\@expl@cs@replacement@spec@@N#1.^^J}}
\long\def\@show@normalenv#1{%
\@show@environment@begin#1%
@@ -1692,12 +1695,12 @@
\long\def\@show@environment@end@aux#1#2{%
\@show@tokens{\string\end{\@expl@cs@to@str@@N#2}%
\ifx\relax#1=undefined%
- \else:^^J\@expl@cs@argument@spec@@N#1->%
+ \else:^^J\@expl@cs@parameter@spec@@N#1->%
\@expl@cs@replacement@spec@@N#1%
\fi}}
\def\@show@nonstop#1{%
\typeout{> \string#1=\@expl@cs@prefix@spec@@N#1macro:^^J%
- \@expl@cs@argument@spec@@N#1->\@expl@cs@replacement@spec@@N#1.}}
+ \@expl@cs@parameter@spec@@N#1->\@expl@cs@replacement@spec@@N#1.}}
\def\@show@typeout#1{\typeout{> #1.^^J}}
\def\@ifundefined#1{%
\ifcsname#1\endcsname\@ifundefin@d@i\else\@ifundefin@d@ii\fi{#1}}
@@ -1808,8 +1811,8 @@
\xdef#1{\the\toks@}%
\endgroup}
%%% From File: ltcmd.dtx
-\def\ltcmdversion{v1.2d}
-\def\ltcmddate{2024-03-21}
+\def\ltcmdversion{v1.2e}
+\def\ltcmddate{2024-04-17}
\message{document commands,}
\ExplSyntaxOn
\tl_new:N \l__cmd_arg_spec_tl
@@ -4188,7 +4191,7 @@
{
\exp_args:Ne \str_case_e:nnF
{
- \exp_args:Nf \tl_if_empty:nT { \cs_argument_spec:N #1 }
+ \exp_args:Nf \tl_if_empty:nT { \__kernel_cs_parameter_spec:N #1 }
{ \exp_not:N \exp_not:n { \exp_not:e { \tl_head:N #1 } } }
}
{
@@ -6432,7 +6435,7 @@
\__hook_curr_name_pop:
\ExplSyntaxOff
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% From File: ltcmdhooks.dtx
+%% From File: ltcmdhooks.dtx
%% Copyright (C) 2020-2024
%% Frank Mittelbach, Phelype Oleinik, The LaTeX Project
%%% From File: lthooks.dtx
@@ -6573,7 +6576,7 @@
\__hook_patch_debug:x { ++~command~can~be~patched~without~rescanning }
\int_set:Nn \l__hook_patch_num_args_int
{
- \exp_args:Nf \str_count:n { \cs_argument_spec:N #2 } / 2
+ \exp_args:Nf \str_count:n { \__kernel_cs_parameter_spec:N #2 } / 2
\bool_if:NT #1 { -1 }
}
\int_compare:nNnTF { \l__hook_patch_num_args_int } > { \c_zero_int }
@@ -6713,7 +6716,7 @@
{ ~ \__hook_double_hashes:w }
\cs_new_protected:Npn \__hook_retokenize_patch:Nnn #1 #2 #3
{
- \str_if_eq:eeTF { \cs_argument_spec:N #1 } { }
+ \str_if_eq:eeTF { \__kernel_cs_parameter_spec:N #1 } { }
{ \__hook_patch_expand_redefine:NNnn \c_false_bool #1 {#2} {#3} }
{
\__hook_patch_debug:x { ..~command~can~only~be~patched~by~rescanning }
@@ -7770,7 +7773,8 @@
{ \__template_find_global: }
}
\tl_set:Nn \l__template_key_name_tl {#1}
- \use:c { __template_assign_ \l__template_keytype_tl : }
+ \cs_if_exist_use:cF { __template_assign_ \l__template_keytype_tl : }
+ { \__template_assign_variable: }
}
{ \msg_error:nnn { template } { unknown-attribute } {#1} }
}
@@ -7884,67 +7888,14 @@
}
}
}
-\cs_new_protected:Npn \__template_assign_integer:
+\cs_new_protected:Npn \__template_assign_variable:
{
- \bool_if:NTF \l__template_global_bool
- { \__template_assign_variable:N \int_gset:Nn }
- { \__template_assign_variable:N \int_set:Nn }
- }
-\cs_new_protected:Npn \__template_assign_length:
- {
- \bool_if:NTF \l__template_global_bool
- { \__template_assign_variable:N \dim_gset:Nn }
- { \__template_assign_variable:N \dim_set:Nn }
-}
-\cs_new_protected:Npn \__template_assign_muskip:
- {
- \bool_if:NTF \l__template_global_bool
- { \__template_assign_variable:N \muskip_gset:Nn }
- { \__template_assign_variable:N \muskip_set:Nn }
- }
-\cs_new_protected:Npn \__template_assign_real:
- {
- \bool_if:NTF \l__template_global_bool
- { \__template_assign_variable:N \fp_gset:Nn }
- { \__template_assign_variable:N \fp_set:Nn }
- }
-\cs_new_protected:Npn \__template_assign_skip:
- {
- \bool_if:NTF \l__template_global_bool
- { \__template_assign_variable:N \skip_gset:Nn }
- { \__template_assign_variable:N \skip_set:Nn }
- }
-\cs_new_protected:Npn \__template_assign_tokenlist:
- {
- \bool_if:NTF \l__template_global_bool
- { \__template_assign_tokenlist_aux:NN \tl_gset:NV \tl_gset:Nn }
- { \__template_assign_tokenlist_aux:NN \tl_set:NV \tl_set:Nn }
- }
-\cs_new_protected:Npn \__template_assign_tokenlist_aux:NN #1#2
- {
- \__template_if_key_value:VTF \l__template_value_tl
+ \__template_assign_variable:c
{
- \__template_key_to_value:
- \tl_put_right:Ne \l__template_assignments_tl
- {
- #1 \exp_not:V \l__template_var_tl
- { \exp_not:V \l__template_value_tl }
- }
- }
- {
- \tl_put_right:Ne \l__template_assignments_tl
- {
- #2 \exp_not:V \l__template_var_tl
- { \exp_not:V \l__template_value_tl }
- }
+ \__template_map_var_type: _
+ \bool_if:NT \l__template_global_bool { g } set:Nn
}
}
-\cs_new_protected:Npn \__template_assign_commalist:
- {
- \bool_if:NTF \l__template_global_bool
- { \__template_assign_tokenlist_aux:NN \clist_gset:NV \clist_gset:Nn }
- { \__template_assign_tokenlist_aux:NN \clist_set:NV \clist_set:Nn }
- }
\cs_new_protected:Npn \__template_assign_variable:N #1
{
\__template_if_key_value:VT \l__template_value_tl
@@ -7955,6 +7906,7 @@
{ \exp_not:V \l__template_value_tl }
}
}
+\cs_generate_variant:Nn \__template_assign_variable:N { c }
\cs_new_protected:Npn \__template_key_to_value:
{ \exp_after:wN \__template_key_to_value_auxi:w \l__template_value_tl }
\cs_new_protected:Npn \__template_key_to_value_auxi:w \KeyValue #1
@@ -8269,11 +8221,11 @@
{ \__template_show_vars:nn {#1} {#2} }
\cs_new_protected:Npn \ShowInstanceValues #1#2
{ \__template_show_values:nn {#1} {#2} }
-\cs_new:Npn \IfInstanceExistTF #1#2
+\cs_new:Npn \IfInstanceExistsTF #1#2
{ \__template_if_instance_exist:nnTF {#1} {#2} }
-\cs_new:Npn \IfInstanceExistT #1#2
+\cs_new:Npn \IfInstanceExistsT #1#2
{ \__template_if_instance_exist:nnT {#1} {#2} }
-\cs_new:Npn \IfInstanceExistF #1#2
+\cs_new:Npn \IfInstanceExistsF #1#2
{ \__template_if_instance_exist:nnF {#1} {#2} }
\cs_new_protected:Npn \KeyValue #1 {#1}
\cs_new_protected:Npn \AssignTemplateKeys { \__template_assignments_pop: }
@@ -8699,7 +8651,7 @@ Type H <return> for immediate help.}%
\cs_set_eq:NN \par \para_end:
\cs_set_eq:NN \@@par \para_end:
\cs_set_eq:NN \endgraf \para_end:
-\everypar{\@nodocument} %% To get an error if text appears before the
+\everypar{\@nodocument} %% To get an error if text appears before the \document
\msg_new:nnnn { hooks } { para-mode }
{
Illegal~mode~ change~ in~ hook~ 'para/#1'.\\
@@ -13499,7 +13451,9 @@ Type H <return> for immediate help.}%
}
}
\prg_generate_conditional_variant:Nnn \property_if_exist:n {e} {TF}
-\cs_new_eq:NN \IfPropertyExistTF \property_if_exist:eTF
+\cs_new_eq:NN \IfPropertyExistsTF \property_if_exist:eTF
+\cs_new:Npn \IfPropertyExistsT #1#2 {\property_if_exist:eTF {#1}{#2}{} }
+\cs_new:Npn \IfPropertyExistsF #1 {\property_if_exist:eTF {#1}{} }
\prg_new_conditional:Npnn \property_if_recorded:n #1 { p , T , F, TF }
% #1 label
{
@@ -13512,7 +13466,9 @@ Type H <return> for immediate help.}%
}
}
\prg_generate_conditional_variant:Nnn \property_if_recorded:n {e} {TF}
-\cs_new_eq:NN \IfLabelExistTF \property_if_recorded:eTF
+\cs_new_eq:NN \IfLabelExistsTF \property_if_recorded:eTF
+\cs_new:Npn \IfLabelExistsT #1#2 {\property_if_exist:eTF {#1}{#2}{} }
+\cs_new:Npn \IfLabelExistsF #1 {\property_if_exist:eTF {#1}{} }
\prg_new_conditional:Npnn \property_if_recorded:nn #1#2 { p , T , F, TF }
% #1 label #2 property
{
@@ -14714,7 +14670,12 @@ Type H <return> for immediate help.}%
\box\@tempboxa
\@end@tempboxa}
\def\@finalstrut#1{%
- \unskip\ifhmode\nobreak\fi\vrule\@width\z@\@height\z@\@depth\dp#1}
+ \unskip
+ \ifhmode \nobreak
+ \else
+ \vskip-\baselineskip
+ \fi
+ \vrule\@width\z@\@height\z@\@depth\dp#1}
\def\@@line{\hb@xt@\hsize}
\DeclareRobustCommand\leftline[1]{\@@line{#1\hss}}
\DeclareRobustCommand\rightline[1]{\@@line{\hss#1}}
@@ -16148,6 +16109,24 @@ Type H <return> for immediate help.}%
\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 }
+ \tl_set:cn { g__mark_page_top_ #1 _tl }{ \__mark_id:n{0} }
+ \tl_set:cn { g__mark_page_first_ #1 _tl }{ \__mark_id:n{0} }
+ \tl_set:cn { g__mark_page_last_ #1 _tl }{ \__mark_id:n{0} }
+ \tl_set:cn { g__mark_previous-page_top_ #1 _tl }{ \__mark_id:n{0} }
+ \tl_set:cn { g__mark_previous-page_first_ #1 _tl }{ \__mark_id:n{0} }
+ \tl_set:cn { g__mark_previous-page_last_ #1 _tl }{ \__mark_id:n{0} }
+ \tl_set:cn { g__mark_column_top_ #1 _tl }{ \__mark_id:n{0} }
+ \tl_set:cn { g__mark_column_first_ #1 _tl }{ \__mark_id:n{0} }
+ \tl_set:cn { g__mark_column_last_ #1 _tl }{ \__mark_id:n{0} }
+ \tl_set:cn { g__mark_previous-column_top_ #1 _tl }{ \__mark_id:n{0} }
+ \tl_set:cn { g__mark_previous-column_first_ #1 _tl }{ \__mark_id:n{0} }
+ \tl_set:cn { g__mark_previous-column_last_ #1 _tl }{ \__mark_id:n{0} }
+ \tl_set:cn { g__mark_first-column_top_ #1 _tl }{ \__mark_id:n{0} }
+ \tl_set:cn { g__mark_first-column_first_ #1 _tl }{ \__mark_id:n{0} }
+ \tl_set:cn { g__mark_first-column_last_ #1 _tl }{ \__mark_id:n{0} }
+ \tl_set:cn { g__mark_last-column_top_ #1 _tl }{ \__mark_id:n{0} }
+ \tl_set:cn { g__mark_last-column_first_ #1 _tl }{ \__mark_id:n{0} }
+ \tl_set:cn { g__mark_last-column_last_ #1 _tl }{ \__mark_id:n{0} }
}
\box_new:N \l__mark_box
\box_new:N \l__mark_ii_box
@@ -16304,14 +16283,16 @@ Type H <return> for immediate help.}%
\group_begin:
\@kernel@before@insertmark
\hook_use:n { insertmark }
- \unrestored@protected@xdef \g__mark_tmp_tl {#2}
+ \unrestored@protected@xdef \g__mark_tmp_tl
+ {
+ \__mark_id:n{ \int_use:N\g__mark_int }
+ #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 } }
+ \exp_not:o { \g__mark_tmp_tl }
}
\group_end:
\if@nobreak\ifvmode\nobreak\fi\fi
@@ -16321,15 +16302,23 @@ Type H <return> for immediate help.}%
{ \tl_to_str:n {#1} }
}
}
+\cs_new_protected:Npn \__mark_id:n #1 { }
+\int_new:N \g__mark_int
\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:
+ \int_compare:nNnTF \g__mark_int < {99999}
+ { \int_gincr:N \g__mark_int }
+ { \int_gzero:N \g__mark_int }
+
}
\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 } }
+\cs_new:Npn \mark_use_first:nn #1#2 { \__mark_use:v { g__mark_#1_first_#2_tl } }
+\cs_new:Npn \mark_use_last:nn #1#2 { \__mark_use:v { g__mark_#1_last_#2_tl } }
+\cs_new:Npn \mark_use_top:nn #1#2 { \__mark_use:v { g__mark_#1_top_#2_tl } }
+\cs_new:Npn \__mark_use:n #1 { \exp_not:o { \use_none:nn #1 } }
+\cs_generate_variant:Nn \__mark_use:n { v }
\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 }
@@ -16491,10 +16480,19 @@ Type H <return> for immediate help.}%
{ 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 }
+
+ \tl_if_eq:ccTF { g__mark_first-column_top_ ##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 }
+ {
+ \tl_gset_eq:cc { g__mark_page_first_ ##1 _tl }
+ { g__mark_last-column_first_ ##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
@@ -16684,6 +16682,30 @@ Type H <return> for immediate help.}%
\let \IfClassLoadedTF \@ifclassloaded
\let \IfPackageLoadedWithOptionsTF \@ifpackagewith
\let \IfClassLoadedWithOptionsTF \@ifclasswith
+\def\IfPackageLoadedT #1#2{\IfPackageLoadedTF{#1}{#2}{}}
+\def\IfPackageLoadedF #1{\IfPackageLoadedTF{#1}{}}
+\def\IfClassLoadedT #1#2{\IfClassLoadedTF{#1}{#2}{}}
+\def\IfClassLoadedF #1{\IfClassLoadedTF{#1}{}}
+\def\IfPackageAtLeastT#1#2#3{\IfPackageAtLeastTF{#1}{#2}{#3}{}}
+\def\IfPackageAtLeastF #1#2{\IfPackageAtLeastTF{#1}{#2}{}}
+\def\IfClassAtLeastT #1#2#3{\IfClassAtLeastTF{#1}{#2}{#3}{}}
+\def\IfClassAtLeastF #1#2{\IfClassAtLeastTF{#1}{#2}{}}
+\def\IfFileAtLeastT #1#2#3{\IfFileAtLeastTF{#1}{#2}{#3}{}}
+\def\IfFileAtLeastF #1#2{\IfFileAtLeastTF{#1}{#2}{}}
+\def\IfFormatAtLeastT #1#2{\IfFormatAtLeastTF{#1}{#2}{}}
+\def\IfFormatAtLeastF #1{\IfFormatAtLeastTF{#1}{}}
+\def\IfPackageLoadedWithOptionsT #1#2#3{\IfPackageLoadedWithOptionsTF{#1}{#2}{#3}{}}
+\def\IfPackageLoadedWithOptionsF #1#2{\IfPackageLoadedWithOptionsTF{#1}{#2}{}}
+\def\IfClassLoadedWithOptionsT #1#2#3{\IfClassLoadedWithOptionsTF{#1}{#2}{#3}{}}
+\def\IfClassLoadedWithOptionsF #1#2{\IfClassLoadedWithOptionsTF{#1}{#2}{}}
+\def\IfFileLoadedTF#1{%
+ \expandafter\ifx\csname ver@#1\endcsname\relax
+ \expandafter\@secondoftwo
+ \else
+ \expandafter\@firstoftwo
+ \fi}
+\def\IfFileLoadedT#1#2{\IfFileLoadedTF{#1}{#2}{}}
+\def\IfFileLoadedF #1{\IfFileLoadedTF{#1}{}}
\def\ProvidesPackage#1{%
\xdef\@gtempa{#1}%
\@expandtwoargs\@expl@str@if@eq@@nnTF
@@ -17111,7 +17133,11 @@ Type H <return> for immediate help.}%
\ifx\@currext\@clsextension
document class%
\else
- package%
+ \ifx\@currext\@pkgextension
+ package%
+ \else
+ file%
+ \fi
\fi}
\@onlypreamble\@cls@pkg
\def\@unknownoptionerror{%
@@ -17315,6 +17341,13 @@ Type H <return> for immediate help.}%
\pkgcls@debug{\@spaces 4: #4}%
\def\pkgcls@name{#1}% % for info message
\def\pkgcls@arg {#3}% % for info message
+ \edef\pkgcls@ext{%
+ \ifx#4\@clsextension document class\else
+ \ifx#4\@pkgextension package\else
+ file
+ \fi
+ \fi
+ }% % for info message
\pkgcls@parse@date@arg{#3}%
\let\pkgcls@candidate\@empty
\begingroup
@@ -17356,7 +17389,7 @@ Type H <return> for immediate help.}%
\ifnum \@parse@version0#1//00\@nil > \pkgcls@targetdate
\@latex@warning@no@line{Suspicious rollback/min-date date given\MessageBreak
A minimal date of #1 has been specified for
- \@cls@pkg\MessageBreak '\pkgcls@name'.\MessageBreak
+ \pkgcls@ext\MessageBreak '\pkgcls@name'.\MessageBreak
But this is in conflict
with a rollback request to \requestedpatchdate}
\fi
@@ -19689,8 +19722,8 @@ Type H <return> for immediate help.}%
\int_compare:nNnT \g__tbl_col_int > 0
{
\tbl_count_missing_cells:n {#1}
- \cr
}
+ \crcr
}
\ExplSyntaxOff
\let\@kernel@refstepcounter\refstepcounter