diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex-dev/base/latexrelease.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex-dev/base/latexrelease.sty | 640 |
1 files changed, 472 insertions, 168 deletions
diff --git a/Master/texmf-dist/tex/latex-dev/base/latexrelease.sty b/Master/texmf-dist/tex/latex-dev/base/latexrelease.sty index 0e1035955f2..8a463b97ddb 100644 --- a/Master/texmf-dist/tex/latex-dev/base/latexrelease.sty +++ b/Master/texmf-dist/tex/latex-dev/base/latexrelease.sty @@ -226,6 +226,7 @@ \def\pkgcls@use@this@release#1#2{% \pkgcls@show@selection{#1}{#2}% \pkgcls@targetdate\z@ + \@addtofilelist{#1}% \@@input #1\relax \endinput } @@ -300,7 +301,7 @@ } %%% From File: ltvers.dtx \edef\latexreleaseversion - {2024-11-01} + {2025-06-01} \newif\if@includeinrelease \@includeinreleasefalse \def\IncludeInRelease#1{% @@ -5330,17 +5331,19 @@ of this package available from CTAN} {Providing~hooks} \cs_gset_protected:Npn \hook_activate_generic:n #1 { } \EndIncludeInRelease -\cs_new:Npn \__hook_parse_label_default:n #1 +\cs_new:Npn \__hook_parse_label_default:nN #1#2 { \tl_if_novalue:nTF {#1} { \__hook_currname_or_default: } - { \tl_trim_spaces_apply:nN {#1} \__hook_parse_dot_label:n } + { \tl_trim_spaces_apply:nN {#1} \__hook_parse_dot_label:nN #2 } } -\cs_new:Npn \__hook_parse_dot_label:n #1 +\cs_new:Npn \__hook_parse_dot_label:nN #1#2 { \tl_if_empty:nTF {#1} { - \msg_expandable_error:nn { hooks } { empty-label } + \bool_if:NTF #2 + { \msg_expandable_error:nn { hooks } { empty-label } } + { \msg_expandable_error:nn { hooks } { empty-hook } } \__hook_currname_or_default: } { @@ -5395,24 +5398,24 @@ of this package available from CTAN} \cs_new_protected:Npn \__hook_normalize_hook_args:Nn #1 #2 { \__hook_normalize_hook_args_aux:Nn #1 - { { \__hook_parse_label_default:n {#2} } } + { { \__hook_parse_label_default:nN {#2} \c_false_bool } } } \cs_new_protected:Npn \__hook_normalize_hook_args:Nnn #1 #2 #3 { \__hook_normalize_hook_args_aux:Nn #1 { - { \__hook_parse_label_default:n {#2} } - { \__hook_parse_label_default:n {#3} } + { \__hook_parse_label_default:nN {#2} \c_false_bool } + { \__hook_parse_label_default:nN {#3} \c_true_bool } } } \cs_new_protected:Npn \__hook_normalize_hook_rule_args:Nnnnn #1 #2 #3 #4 #5 { \__hook_normalize_hook_args_aux:Nn #1 { - { \__hook_parse_label_default:n {#2} } - { \__hook_parse_label_default:n {#3} } + { \__hook_parse_label_default:nN {#2} \c_false_bool } + { \__hook_parse_label_default:nN {#3} \c_true_bool } { \tl_trim_spaces:n {#4} } - { \__hook_parse_label_default:n {#5} } + { \__hook_parse_label_default:nN {#5} \c_true_bool } } } \tl_gset:Nn \g__hook_hook_curr_name_tl { top-level } @@ -6862,7 +6865,9 @@ of this package available from CTAN} { #2 { The~hook~is~empty } } { \__hook_log_line:x { Code~chunks: } - \prop_if_empty:cTF { g__hook_#1_code_prop } + \bool_lazy_or:nnTF + { ! \prop_if_exist_p:c { g__hook_#1_code_prop } } + { \prop_if_empty_p:c { g__hook_#1_code_prop } } { \__hook_log_line_indent:x { --- } } { \prop_map_inline:cn { g__hook_#1_code_prop } @@ -7069,16 +7074,19 @@ of this package available from CTAN} } \cs_new_protected:Npn \__hook_list_rules:nn #1 #2 { - \cs_set_protected:Npn \__hook_tmp:w ##1 ##2 ##3 {#2} - \prop_map_inline:cn { g__hook_#1_code_prop } + \prop_if_exist:cT { g__hook_#1_code_prop } { + \cs_set_protected:Npn \__hook_tmp:w ##1 ##2 ##3 {#2} \prop_map_inline:cn { g__hook_#1_code_prop } { - \__hook_if_label_case:nnnnn {##1} {####1} - { \prop_map_break: } - { \__hook_list_one_rule:nnn {##1} {####1} } - { \__hook_list_one_rule:nnn {####1} {##1} } - {#1} + \prop_map_inline:cn { g__hook_#1_code_prop } + { + \__hook_if_label_case:nnnnn {##1} {####1} + { \prop_map_break: } + { \__hook_list_one_rule:nnn {##1} {####1} } + { \__hook_list_one_rule:nnn {####1} {##1} } + {#1} + } } } } @@ -7616,6 +7624,10 @@ of this package available from CTAN} Empty~code~label~\msg_line_context:.~ Using~'\__hook_currname_or_default:'~instead. } +\msg_new:nnn { hooks } { empty-hook } + { + Empty~hook~name~\msg_line_context:. + } \msg_new:nnn { hooks } { no-default-label } { Missing~(empty)~default~label~\msg_line_context:. \\ @@ -7793,6 +7805,8 @@ of this package available from CTAN} \NewDocumentCommand \ClearHookRule { m m m } { \hook_gset_rule:nnnn {#1}{#2}{unrelated}{#3} } \cs_new_eq:NN \IfHookEmptyTF \hook_if_empty:nTF +\cs_new_eq:NN \IfHookEmptyT \hook_if_empty:nT +\cs_new_eq:NN \IfHookEmptyF \hook_if_empty:nF \cs_new_eq:NN \IfHookExistsTF \__hook_if_usable:nTF %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \cs_new_protected:Npn \hook_disable:n @@ -8628,7 +8642,7 @@ of this package available from CTAN} { \cs_generate_from_arg_count:cNnn { __socket_#1_plug_#2:w } - \cs_new_protected:Npn + \cs_new:Npn { \int_use:c { c__socket_#1_args_int } } {#3} \seq_put_right:cn { l__socket_#1_plugs_seq } {#2} @@ -8647,7 +8661,7 @@ of this package available from CTAN} { \cs_generate_from_arg_count:cNnn { __socket_#1_plug_#2:w } - \cs_set_protected:Npn + \cs_set:Npn { \int_use:c { c__socket_#1_args_int } } {#3} \__socket_debug_term:n @@ -8687,6 +8701,10 @@ of this package available from CTAN} \cs_new_eq:NN \socket_use:nn \socket_use:nw % socket with one input \cs_new_eq:NN \socket_use:nnn \socket_use:nw % socket with two inputs \cs_new_eq:NN \socket_use:nnnn \socket_use:nw % socket with three inputs +\cs_new:Npn \socket_use_expandable:nw #1 { + \use:c { __socket_#1_plug_ \str_use:c { l__socket_#1_plug_str } :w } +} +\cs_new_eq:NN \socket_use_expandable:n \socket_use_expandable:nw % socket with no inputs \msg_new:nnnn { socket } { already-declared } { Socket~ '#1'~ already~ declared! } @@ -9577,23 +9595,33 @@ of this package available from CTAN} } \cs_new_protected:Npn \__template_assign_variable: { - \__template_assign_variable:c + \exp_args:Ne \__template_assign_variable:n { - \__template_map_var_type: _ - \bool_if:NT \l__template_global_bool { g } set:Nn + \__template_map_var_type: + _ + \bool_if:NT \l__template_global_bool { g } + set:N } } -\cs_new_protected:Npn \__template_assign_variable:N #1 +\cs_new_protected:Npn \__template_assign_variable:n #1 { - \__template_if_key_value:VT \l__template_value_tl - { \__template_key_to_value: } - \tl_put_right:Ne \l__template_assignments_tl + \__template_if_key_value:VTF \l__template_value_tl { - #1 \exp_not:V \l__template_var_tl - { \exp_not:V \l__template_value_tl } + \__template_key_to_value: + \tl_put_right:Ne \l__template_assignments_tl + { + \exp_not:c { #1 V } \exp_not:V \l__template_var_tl + \exp_not:V \l__template_value_tl + } + } + { + \tl_put_right:Ne \l__template_assignments_tl + { + \exp_not:c { #1 n } \exp_not:V \l__template_var_tl + { \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 @@ -10178,6 +10206,32 @@ of this package available from CTAN} \let \IfDocumentMetadataTF \@firstoftwo \DocumentMetadata } +\IncludeInRelease{2024/11/01}% + {\MakeLinkTarget}{Record target name for tagging support}% +\ExplSyntaxOn +\int_new:N\g__kernel_target_int +\NewDocumentCommand\MakeLinkTarget{sO{}m}{% + \ifvmode + \special{}% + \else + \@savsf\spacefactor + \smash{}% + \spacefactor\@savsf + \fi + \IfBooleanTF {#1} + { + \tl_gset:Ne \@currentHref {#3} + } + { + \int_gincr:N\g__kernel_target_int + \tl_gset:Ne \@currentHref {target*.\int_use:N\g__kernel_target_int} + } + \UseTaggingSocket{recordtarget} + } +\ExplSyntaxOff +\EndIncludeInRelease +\IncludeInRelease{2022/06/01}% + {\MakeLinkTarget}{Record target name for tagging support}% \NewDocumentCommand\MakeLinkTarget{sO{}m}{% \ifvmode \special{}% @@ -10186,7 +10240,8 @@ of this package available from CTAN} \smash{}% \spacefactor\@savsf \fi} -\NewDocumentCommand\LinkTargetOn{}{} +\EndIncludeInRelease + \NewDocumentCommand\LinkTargetOn{}{} \NewDocumentCommand\LinkTargetOff{}{} \NewDocumentCommand\NextLinkTarget{m}{} \IncludeInRelease{0000/00/00}{ltmeta}% @@ -10346,6 +10401,20 @@ of this package available from CTAN} \fi \fi}% \EndIncludeInRelease +\IncludeInRelease{2024/11/01}% + {\addvspace}{drop unnecessary no-item error}% +\protected\def\addvspace#1{% + \ifhmode \ifinner \@LRmoderr \else \par \fi \fi + \if@minipage\else + \ifdim \lastskip =\z@ + \@vspace@calcify{#1}% + \else + \setlength\@tempskipb{#1}% + \@xaddvskip + \fi + \fi +} +\EndIncludeInRelease \IncludeInRelease{2020/10/01}% {\addvspace}{\addvspace calc support}% \def\addvspace#1{% @@ -10379,6 +10448,38 @@ of this package available from CTAN} \@noitemerr \fi} \EndIncludeInRelease +\IncludeInRelease{2024/11/01}% + {\addpenalty}{\addpenalty drop error}% +\protected\def\addpenalty#1{% + \ifhmode \ifinner \@LRmoderr \else \par \fi \fi + \if@minipage + \else + \if@nobreak + \else + \ifdim\lastskip=\z@ + \penalty#1\relax + \else + \@tempskipb\lastskip + \begingroup + \@tempskipa\@tempskipb + \advance \@tempskipb + \ifdim\prevdepth>\maxdepth\maxdepth\else + \ifdim \prevdepth = -\@m\p@ \z@ \else \prevdepth \fi + \fi + \vskip -\@tempskipb + \penalty#1% + \ifdim\@tempskipa=\@tempskipb + \else + \advance\@tempskipb -\@tempskipa + \vskip \@tempskipb + \fi + \vskip \@tempskipa + \endgroup + \fi + \fi + \fi +} +\EndIncludeInRelease \IncludeInRelease{2015/01/01}% {\addpenalty}{\addpenalty}% \def\addpenalty#1{% @@ -11315,6 +11416,54 @@ of this package available from CTAN} {Reset nested counters}%% \def\@stpelt#1{\global\csname c@#1\endcsname \z@}% \EndIncludeInRelease +\IncludeInRelease{2024/11/01}{\@definecounter} + {provide theHfoo commands}% +\def\@definecounter#1{\expandafter\newcount\csname c@#1\endcsname + \setcounter{#1}\z@ + \global\expandafter\let\csname cl@#1\endcsname\@empty + \@addtoreset{#1}{@ckpt}% + \global\expandafter\let\csname p@#1\endcsname\@empty + \expandafter\xdef\csname theH#1\endcsname{% + \noexpand\the\noexpand\value{#1}}% + \expandafter + \ifx\csname the#1\endcsname\relax + \expandafter + \gdef\csname the#1\expandafter\endcsname\expandafter + {\expandafter\@arabic\csname c@#1\endcsname}% + \else + \@latex@warning{Command `\string\the#1' already + defined -- not changed}% + \fi} +\EndIncludeInRelease +\IncludeInRelease{0000/00/00}{\@definecounter} + {provide theHfoo commands}%% +\def\@definecounter#1{\expandafter\newcount\csname c@#1\endcsname + \setcounter{#1}\z@ + \global\expandafter\let\csname cl@#1\endcsname\@empty + \@addtoreset{#1}{@ckpt}% + \global\expandafter\let\csname p@#1\endcsname\@empty + \expandafter + \ifx\csname the#1\endcsname\relax + \expandafter + \gdef\csname the#1\expandafter\endcsname\expandafter + {\expandafter\@arabic\csname c@#1\endcsname}% + \else + \@latex@warning{Command `\string\the#1' already + defined -- not changed}% + \fi} +\EndIncludeInRelease +\IncludeInRelease{2024/11/01}{\@addtoreset} + {provide theHfoo commands}% +\def\@addtoreset#1#2{\expandafter\@cons\csname cl@#2\endcsname {{#1}}% + \expandafter\xdef\csname theH#1\endcsname{% + \expandafter\noexpand\csname theH#2\endcsname.% + \noexpand\the\noexpand\value{#1}}% +} +\EndIncludeInRelease +\IncludeInRelease{0000/00/00}{\@addtoreset} + {provide theHfoo commands}%% +\def\@addtoreset#1#2{\expandafter\@cons\csname cl@#2\endcsname {{#1}}} +\EndIncludeInRelease \IncludeInRelease{2018-04-01} {\@removefromreset}{Add interfaces}% \def\@removefromreset#1#2{% @@ -11447,6 +11596,17 @@ of this package available from CTAN} {\setlength}{Using \setlength with \dimen0}% \def\setlength#1#2{#1#2\relax} \EndIncludeInRelease +\IncludeInRelease{2024/11/01}% + {\@settodim}{suspend tagging}% +\def\@settodim#1#2#3{\setbox\@tempboxa\hbox + {{\SuspendTagging{\@settodim}#3\ResumeTagging{\@settodim}}}#2#1\@tempboxa + \setbox\@tempboxa\box\voidb@x} +\EndIncludeInRelease +\IncludeInRelease{0000/00/00}% + {\@settodim}{suspend tagging}% +\def\@settodim#1#2#3{\setbox\@tempboxa\hbox{{#3}}#2#1\@tempboxa + \setbox\@tempboxa\box\voidb@x} +\EndIncludeInRelease %%% From File: ltfssbas.dtx %% Copyright (C) 1989-2002 Frank Mittelbach and Rainer Sch\"opf \IncludeInRelease{2020/02/02}% @@ -13807,45 +13967,6 @@ of this package available from CTAN} \egroup } \def\textcompsubstdefault{\rmsubstdefault} -\def\DeclareEncodingSubset#1#2{% - \DeclareEncodingSubset@aux{#1}#2*\DeclareEncodingSubset@aux -} -\def\DeclareEncodingSubset@aux#1#2*#3\DeclareEncodingSubset@aux#4{% - \expandafter\ifx\expandafter X\detokenize{#3}X% - \@DeclareEncodingSubset{#1}{#2}{#4}% - \else - \@DeclareEncodingSubset{#1}{#2LF}{#4}% - \@DeclareEncodingSubset{#1}{#2TLF}{#4}% - \@DeclareEncodingSubset{#1}{#2OsF}{#4}% - \@DeclareEncodingSubset{#1}{#2TOsF}{#4}% - \fi -} -\def\@DeclareEncodingSubset#1#2#3{% - \@ifundefined{#1:#2}% - {\@font@info{Setting #2 sub-encoding to #1/#3}}% - {\@font@info{Changing #2 sub-encoding to #1/#3}}% - \global\@namedef{#1:#2}{#3}} -\@onlypreamble\DeclareEncodingSubset -\@onlypreamble\DeclareEncodingSubset@aux -\@onlypreamble\@DeclareEncodingSubset - - -\def\CheckEncodingSubset#1#2#3#4#5{% - \ifnum #4>% - \expandafter\ifx\csname #2:\f@family\endcsname\relax - 0\csname #2:?\endcsname - \else - \csname #2:\f@family\endcsname - \fi - \relax - \expandafter\@firstoftwo - \else - \expandafter\@secondoftwo - \fi - {#1{#2}}{#3}% - #5% -} - \def\tc@errorwarn#1#2{\@latex@info{#1}} \def\tc@subst#1{% @@ -14162,11 +14283,7 @@ of this package available from CTAN} \DeclareEncodingSubset{TS1}{?}{9} \DeclareEncodingSubset{TS1}{ccr} {0} \DeclareEncodingSubset{TS1}{cmbr} {0} -\DeclareEncodingSubset{TS1}{cmr} {0} -\DeclareEncodingSubset{TS1}{cmss} {0} \DeclareEncodingSubset{TS1}{cmtl} {0} -\DeclareEncodingSubset{TS1}{cmtt} {0} -\DeclareEncodingSubset{TS1}{cmvtt} {0} \DeclareEncodingSubset{TS1}{pxr} {0} \DeclareEncodingSubset{TS1}{pxss} {0} \DeclareEncodingSubset{TS1}{pxtt} {0} @@ -14664,11 +14781,42 @@ of this package available from CTAN} \IncludeInRelease{2022/06/01}% {\Ref}{Add starred version}% \def\@currentcounter{} -\def\refstepcounter#1{\stepcounter{#1}% +\EndIncludeInRelease +\IncludeInRelease{2024/11/01}% + {\@currentHref}{set theHcounter representation}% +\NewSocket{refstepcounter}{1} +\NewSocket{refstepcounter/target}{1} +\NewSocketPlug{refstepcounter/target}{kernel} + {\xdef\@currentHref {#1.\csname theH#1\endcsname}}% +\AssignSocketPlug{refstepcounter/target}{kernel} +\def\refstepcounter#1{% + \UseSocket{refstepcounter}{% + \stepcounter{#1}% \edef\@currentcounter{#1}% \protected@edef\@currentlabel {\csname p@#1\expandafter\endcsname\csname the#1\endcsname}% + \UseSocket{refstepcounter/target}{#1}% + \UseTaggingSocket{recordtarget}% + }% } +\def\@kernel@refstepcounter#1{% + \UseSocket{refstepcounter}{% + \stepcounter{#1}% + \edef\@currentcounter{#1}% + \protected@edef\@currentlabel + {\csname p@#1\expandafter\endcsname\csname the#1\endcsname}}}% +\EndIncludeInRelease +\IncludeInRelease{2022/06/01}% + {\@currentHref}{set theHcounter representation}% +\def\refstepcounter#1{\stepcounter{#1}% + \edef\@currentcounter{#1}% + \protected@edef\@currentlabel + {\csname p@#1\expandafter\endcsname\csname the#1\endcsname}% +} +\let\@kernel@refstepcounter\refstepcounter +\EndIncludeInRelease +\IncludeInRelease{2022/06/01}% + {\Ref}{Add starred version}% \def\labelformat#1{\expandafter\def\csname p@#1\endcsname##1} \def\@kernel@Ref#1{\protected@edef\@tempa{\@kernel@ref{#1}}% \expandafter\MakeUppercase\@tempa} @@ -14774,14 +14922,11 @@ of this package available from CTAN} \cs_generate_variant:Nn \property_record:nn { nV , ee, oo } \cs_new_protected:Npn \__property_record:nn #1#2 { - \legacy_if:nT { @filesw } + \protected@write \@auxout {} { - \protected@write \@auxout {} - { - \token_to_str:N \new@label@record - {#1} - { \clist_map_function:nN {#2} \__property_record_value:n } - } + \token_to_str:N \new@label@record + {#1} + { \clist_map_function:nN {#2} \__property_record_value:n } } } \cs_generate_variant:Nn \__property_record:nn { e } @@ -14887,7 +15032,7 @@ of this package available from CTAN} \prg_return_false: } } -\prg_generate_conditional_variant:Nnn \property_if_exist:n {e} {TF} +\prg_generate_conditional_variant:Nnn \property_if_exist:n {e} { p , T , F, TF } \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}{} } @@ -14902,10 +15047,10 @@ of this package available from CTAN} \prg_return_false: } } -\prg_generate_conditional_variant:Nnn \property_if_recorded:n {e} {TF} +\prg_generate_conditional_variant:Nnn \property_if_recorded:n {e} { p , T , F, TF } \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}{} } +\cs_new:Npn \IfLabelExistsT #1#2 {\property_if_recorded:eTF {#1}{#2}{} } +\cs_new:Npn \IfLabelExistsF #1 {\property_if_recorded:eTF {#1}{} } \prg_new_conditional:Npnn \property_if_recorded:nn #1#2 { p , T , F, TF } % #1 label #2 property { @@ -14917,8 +15062,10 @@ of this package available from CTAN} \prg_return_false: } } -\prg_generate_conditional_variant:Nnn \property_if_recorded:nn {ee} {TF} +\prg_generate_conditional_variant:Nnn \property_if_recorded:nn {ee} { p , T , F, TF } \cs_new_eq:NN \IfPropertyRecordedTF \property_if_recorded:eeTF +\cs_new:Npn \IfPropertyRecordedT #1#2#3 { \property_if_recorded:eeTF {#1}{#2}{#3}{} } +\cs_new:Npn \IfPropertyRecordedF #1#2#3 { \property_if_recorded:eeTF {#1}{#2}{}{#3} } \cs_new_protected:Npn \property_ref_undefined_warn: { \flag_if_raised:nT { l__property_ref_flag } @@ -15222,7 +15369,7 @@ of this package available from CTAN} \EndIncludeInRelease \IncludeInRelease{2020/10/01}% {\begin}{Use hook system}% -\DeclareRobustCommand*\begin[1]{% +\protected\def\begin#1{% \UseHook{env/#1/before}% \@ifundefined{#1}% {\def\reserved@a{\@latex@error{Environment #1 undefined}\@eha}}% @@ -17330,6 +17477,9 @@ of this package available from CTAN} %% Frank Mittelbach, The LaTeX Project %%% From File: ltmarks.dtx + + + \ExplSyntaxOn \NewModuleRelease{2022/06/01}{ltmarks} {Marks~handling} @@ -17348,43 +17498,42 @@ of this package available from CTAN} { \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 } - \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} } + \__mark_init_region:nn {page}{#1} + \__mark_init_region:nn {previous-page}{#1} + \__mark_init_region:nn {column}{#1} + \__mark_init_region:nn {previous-column}{#1} + \__mark_init_region:nn {first-column}{#1} + \__mark_init_region:nn {last-column}{#1} + \__mark_init_region:nn {mcol-1}{#1} + \__mark_init_region:nn {mcol-2}{#1} + \__mark_init_region:nn {mcol-3}{#1} + \__mark_init_region:nn {mcol-4}{#1} + \__mark_init_region:nn {mcol-5}{#1} + \__mark_init_region:nn {mcol-6}{#1} + \__mark_init_region:nn {mcol-7}{#1} + \__mark_init_region:nn {mcol-8}{#1} + \__mark_init_region:nn {mcol-9}{#1} + \__mark_init_region:nn {mcol-10}{#1} + \__mark_init_region:nn {mcol-11}{#1} + \__mark_init_region:nn {mcol-12}{#1} + \__mark_init_region:nn {mcol-13}{#1} + \__mark_init_region:nn {mcol-14}{#1} + \__mark_init_region:nn {mcol-15}{#1} + \__mark_init_region:nn {mcol-16}{#1} + \__mark_init_region:nn {mcol-17}{#1} + \__mark_init_region:nn {mcol-18}{#1} + \__mark_init_region:nn {mcol-19}{#1} + \__mark_init_region:nn {mcol-20}{#1} +} +\cs_new_protected:Npn \__mark_init_region:nn #1 #2 { + \tl_new:c { g__mark_#1_top_ #2 _tl } + \tl_new:c { g__mark_#1_first_ #2 _tl } + \tl_new:c { g__mark_#1_last_ #2 _tl } + \tl_set_eq:cN { g__mark_#1_top_ #2 _tl } \c__mark_empty_tl + \tl_set_eq:cN { g__mark_#1_first_ #2 _tl } \c__mark_empty_tl + \tl_set_eq:cN { g__mark_#1_last_ #2 _tl } \c__mark_empty_tl } +\tl_const:Nn \c__mark_empty_tl { \__mark_value:nn{0}{} } \box_new:N \l__mark_box \box_new:N \l__mark_ii_box \tl_new:N \g__mark_tmp_tl @@ -17436,13 +17585,13 @@ of this package available from CTAN} \exp_not:N \l__mark_saved_parameters_tl } \tl_new:N \l__mark_saved_parameters_tl -\cs_new_protected:Npn \__mark_update_structure_from_material:nn #1#2 { +\cs_new_protected:Npn \mark_update_structure_from_material:nn #1#2 { \__mark_extract_and_handle_marks:nn { \__mark_update_structure_from_splitmarks:n {#1} } { #2 } } \cs_new_protected:Npn \__mark_update_structure_from_splitmarks:n #1 { - \__mark_update_structure_alias:nn { previous-#1 } {#1} + \mark_copy_structure:nn { previous-#1 } {#1} \seq_map_inline:Nn \g__mark_classes_seq { \tl_gset_eq:Nc \g__mark_new_top_tl { g__mark_#1_last_##1_tl } @@ -17466,9 +17615,9 @@ of this package available from CTAN} } } } -\cs_new_protected:Npn \__mark_get_marks_for_reinsertion:nNN #1#2#3 { - \tl_clear:N \g__mark_first_marks_tl - \tl_clear:N \g__mark_last_marks_tl +\cs_new_protected:Npn \mark_get_marks_for_reinsertion:nNN #1#2#3 { + \tl_gclear:N \g__mark_first_marks_tl + \tl_gclear:N \g__mark_last_marks_tl \__mark_extract_and_handle_marks:nn \__mark_get_from_splitmarks: { #1 } @@ -17486,12 +17635,14 @@ of this package available from CTAN} } { \tl_gput_right:Ne \g__mark_last_marks_tl - { \mark_insert:nn {##1} { \g__mark_tmp_tl } } + { \mark_insert:nn {##1} { \__mark_drop_id:o { \g__mark_tmp_tl } } } \tl_gput_right:Ne \g__mark_first_marks_tl { \mark_insert:nn {##1} { - \tex_splitfirstmarks:D - \use:c { c__mark_class_##1_mark } + \__mark_drop_id:o { + \tex_splitfirstmarks:D + \use:c { c__mark_class_##1_mark } + } } } } @@ -17499,7 +17650,7 @@ of this package available from CTAN} } \tl_new:N \g__mark_first_marks_tl \tl_new:N \g__mark_last_marks_tl -\cs_new_protected:Npn \__mark_update_structure_alias:nn #1#2 { +\cs_new_protected:Npn \mark_copy_structure:nn #1#2 { \seq_map_inline:Nn \g__mark_classes_seq { \tl_gset_eq:cc { g__mark_ #1 _top_ ##1 _tl } @@ -17510,16 +17661,27 @@ of this package available from CTAN} { g__mark_ #2 _last_ ##1 _tl } } } -\cs_new_protected:Npn \__mark_update_structure_to_err:n #1 { +\cs_new_protected:Npn \mark_clear_structure:n #1 { + \seq_map_inline:Nn \g__mark_classes_seq + { + \tl_gset_eq:cN { g__mark_ #1 _top_ ##1 _tl } + \c__mark_empty_tl + \tl_gset_eq:cN { g__mark_ #1 _first_ ##1 _tl } + \c__mark_empty_tl + \tl_gset_eq:cN { g__mark_ #1 _last_ ##1 _tl } + \c__mark_empty_tl + } +} +\cs_new_protected:Npn \mark_set_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} } + \tl_gset:ce { g__mark_ #1 _top_ ##1 _tl } { \__mark_value:nn{?}{\__mark_error:nn {#1}{?} }} + \tl_gset:ce { g__mark_ #1 _first_ ##1 _tl } { \__mark_value:nn{?}{\__mark_error:nn {#1}{?} }} + \tl_gset:ce { g__mark_ #1 _last_ ##1 _tl } { \__mark_value:nn{?}{\__mark_error:nn {#1}{?} }} } } -\cs_new_protected:Npn \__mark_error:n #1 { - \msg_error:nnn { mark } { invalid-use } {#1} +\cs_new_protected:Npn \__mark_error:nn #1#2 { + \msg_error:nnnn { mark } { invalid-use } {#1} {#2} } \cs_new_protected:Npn \mark_insert:nn #1#2 { @@ -17530,8 +17692,7 @@ of this package available from CTAN} \hook_use:n { insertmark } \unrestored@protected@xdef \g__mark_tmp_tl { - \__mark_id:n{ \int_use:N\g__mark_int } - #2 + \__mark_value:nn{ \int_use:N\g__mark_int }{#2} } \tex_marks:D \use:c { c__mark_class_ #1 _mark } { @@ -17545,7 +17706,7 @@ of this package available from CTAN} { \tl_to_str:n {#1} } } } -\cs_new_protected:Npn \__mark_id:n #1 { } +\cs_new_protected:Npn \__mark_value:nn #1#2 { #2 } \int_new:N \g__mark_int \cs_new:Npn \@kernel@before@insertmark { \cs_set_eq:NN \label \scan_stop: @@ -17557,11 +17718,16 @@ of this package available from CTAN} } \hook_new:n {insertmark} -\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 } +\cs_new:Npn \mark_use_first:nn #1#2 { \__mark_use_check:nnn { g__mark_#1_first_#2_tl } {#1} {#2} } +\cs_new:Npn \mark_use_last:nn #1#2 { \__mark_use_check:nnn { g__mark_#1_last_#2_tl } {#1} {#2} } +\cs_new:Npn \mark_use_top:nn #1#2 { \__mark_use_check:nnn { g__mark_#1_top_#2_tl } {#1} {#2} } +\cs_new:Npn \__mark_use_check:nnn #1#2#3 { + \tl_if_eq:cNTF {#1} \relax + { \__mark_error:nn {#2} {#3} } + { \__mark_drop_id:v {#1} } +} +\cs_new:Npn \__mark_drop_id:n #1 { \exp_not:o { #1 } } +\cs_generate_variant:Nn \__mark_drop_id:n { o, 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 } @@ -17592,13 +17758,14 @@ of this package available from CTAN} 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 } + { Mark~region~'#1'~not~usable~or~class~'#2'~unknown } { \c__msg_coding_error_text_tl - The~region~'#1'~can~only~be~used~after~ - all~columns~have~been~assembled. + The~region~'#1'~is~either~not~known~or~data~for~it~ + still~needs~to~be~assembled,~e.g.,~last-column~ + while~building~the~first-column.~ + Also~possible:~the~class~namne~'#2'~is~misspelled. \c__msg_return_text_tl } \bool_new:N \g__mark_debug_bool @@ -17620,7 +17787,7 @@ of this package available from CTAN} } \cs_new_eq:NN \DebugMarksOn \mark_debug_on: \cs_new_eq:NN \DebugMarksOff \mark_debug_off: -\cs_new_protected:Npn \ShowMarksAt #1 { +\NewDocumentCommand \ShowMarksAt {m O{4} } { } \cs_new_eq:NN \NewMarkClass \mark_new_class:n \@onlypreamble \NewMarkClass @@ -17634,38 +17801,44 @@ of this package available from CTAN} \NewExpandableDocumentCommand \IfMarksEqualTF {O{page}mmm} { \mark_if_eq:nnnnTF {#1}{#2}{#3}{#4} } +\NewExpandableDocumentCommand \IfMarksEqualT {O{page}mmm} { + \mark_if_eq:nnnnT {#1}{#2}{#3}{#4} +} +\NewExpandableDocumentCommand \IfMarksEqualF {O{page}mmm} { + \mark_if_eq:nnnnF {#1}{#2}{#3}{#4} +} \cs_new_protected:Npn \__mark_update_singlecol_structures: { \box_if_vertical:NTF \@outputbox { - \__mark_update_structure_from_material:nn {page} + \mark_update_structure_from_material:nn {page} { \vbox_unpack:N \@outputbox } } { - \__mark_update_structure_from_material:nn {page} + \mark_update_structure_from_material: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_copy_structure:nn {previous-column}{previous-page} + \mark_copy_structure:nn {column}{page} + \mark_copy_structure:nn {first-column}{page} + \mark_copy_structure:nn {last-column}{page} } \cs_new_protected:Npn \__mark_update_dblcol_structures: { \box_if_vertical:NTF \@outputbox { - \__mark_update_structure_from_material:nn {column} + \mark_update_structure_from_material:nn {column} { \vbox_unpack:N \@outputbox } } { - \__mark_update_structure_from_material:nn {column} + \mark_update_structure_from_material: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_copy_structure:nn {first-column}{column} + \mark_set_structure_to_err:n {last-column} } { - \__mark_update_structure_alias:nn {last-column}{column} + \mark_copy_structure:nn {last-column}{column} \seq_map_inline:Nn \g__mark_classes_seq { \tl_gset_eq:cc { g__mark_previous-page_top_ ##1 _tl } @@ -17692,6 +17865,7 @@ of this package available from CTAN} } } } + \cs_new_eq:NN \@expl@@@mark@update@singlecol@structures@@ \__mark_update_singlecol_structures: \cs_new_eq:NN \@expl@@@mark@update@dblcol@structures@@ @@ -17714,6 +17888,20 @@ of this package available from CTAN} \ExplSyntaxOff %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% From File: ltpage.dtx +\IncludeInRelease{2025/06/01}% + {\markboth}{Drop legacy mark support}% +\ExplSyntaxOn +\DeclareRobustCommand*\markboth[2]{% + \mark_insert:nn{2e-left}{#1} + \mark_insert:nn{2e-right}{#2} + \tl_if_empty:nF{#2}{ \mark_insert:nn{2e-right-nonempty}{#2} } +} +\DeclareRobustCommand*\markright[1]{% + \mark_insert:nn{2e-right}{#1} + \tl_if_empty:nF{#1}{ \mark_insert:nn{2e-right-nonempty}{#1} } +} +\ExplSyntaxOff +\EndIncludeInRelease \IncludeInRelease{2022/06/01}% {\markboth}{New mark support}% \ExplSyntaxOn @@ -17764,9 +17952,41 @@ of this package available from CTAN} \IncludeInRelease{0000/00/00}% {\markboth}{Make commands robust}% -\kernel@make@fragile\markboth -\kernel@make@fragile\markright +%\kernel@make@fragile\markboth +%\kernel@make@fragile\markright +\def\markboth#1#2{% + \begingroup + \let\label\relax \let\index\relax \let\glossary\relax + \unrestored@protected@xdef\@themark {{#1}{#2}}% + \@temptokena \expandafter{\@themark}% + \mark{\the\@temptokena}% + \endgroup + \if@nobreak\ifvmode\nobreak\fi\fi} +\def\markright#1{% + \begingroup + \let\label\relax \let\index\relax \let\glossary\relax + \expandafter\@markright\@themark {#1}% + \@temptokena \expandafter{\@themark}% + \mark{\the\@temptokena}% + \endgroup + \if@nobreak\ifvmode\nobreak\fi\fi} + +\EndIncludeInRelease +\IncludeInRelease{2025/06/01}% + {\leftmark}{Use new mark mechanism}% +\ExplSyntaxOn +\cs_new:Npn \leftmark {\mark_use_last:nn{page}{2e-left}} +\cs_new:Npn \rightmark {\mark_use_first:nn{page}{2e-right}} +\ExplSyntaxOff +\EndIncludeInRelease +\IncludeInRelease{0000/00/00}% + {\leftmark}{Use new mark mechanism}% +\def\leftmark{\expandafter\@leftmark\botmark\@empty\@empty} +\def\rightmark{\expandafter\@rightmark\firstmark\@empty\@empty} +\def\@themark{{}{}} +\def\@markright#1#2#3{\@temptokena {#1}% +\unrestored@protected@xdef\@themark{{\the\@temptokena}{#3}}} \EndIncludeInRelease %%% From File: ltclass.dtx @@ -18144,7 +18364,9 @@ of this package available from CTAN} \EndIncludeInRelease \IncludeInRelease{2021/06/01}% {\OptionNotUsed}{filter unused option list}% -\def\@remove@eq@value#1=#2\@nil{#1} +\ExplSyntaxOn +\def\@remove@eq@value#1=#2\@nil{\tl_trim_spaces:n{#1}} +\ExplSyntaxOff \def\OptionNotUsed{% \ifx\@currext\@clsextension \xdef\@unusedoptionlist{% @@ -20123,6 +20345,63 @@ of this package available from CTAN} \fi }% \EndIncludeInRelease +\IncludeInRelease{2025/06/01}% + {\@outputpage}{Use new mark mechanism}% +\def\@outputpage{% +\begingroup + \let \protect \noexpand + \language\document@default@language + \@resetactivechars + \global\let\@@if@newlist\if@newlist + \global\@newlistfalse + \@parboxrestore + \shipout \vbox{% + \set@typeset@protect + \aftergroup \endgroup + \aftergroup \set@typeset@protect + \if@specialpage + \global\@specialpagefalse\@nameuse{ps@\@specialstyle}% + \fi + \if@twoside + \ifodd\count\z@ \let\@thehead\@oddhead \let\@thefoot\@oddfoot + \let\@themargin\oddsidemargin + \else \let\@thehead\@evenhead + \let\@thefoot\@evenfoot \let\@themargin\evensidemargin + \fi + \fi + \reset@font + \normalsize + \normalsfcodes + \let\label\@gobble + \let\index\@gobble + \let\glossary\@gobble + \baselineskip\z@skip \lineskip\z@skip \lineskiplimit\z@ + \@begindvi + \vskip \topmargin + \moveright\@themargin \vbox {% + \setbox\@tempboxa \vbox to\headheight{% + \vfil + \color@hbox + \normalcolor + \hb@xt@\textwidth{\@thehead}% + \color@endbox + }% + \dp\@tempboxa \z@ + \box\@tempboxa + \vskip \headsep + \box\@outputbox + \baselineskip \footskip + \color@hbox + \normalcolor + \hb@xt@\textwidth{\@thefoot}% + \color@endbox + }% + }% + \global\let\if@newlist\@@if@newlist + \global \@colht \textheight + \stepcounter{page}% +} +\EndIncludeInRelease \IncludeInRelease{2017/04/15}% {\@outputpage}{Reset language for hyphenation}% \def\@outputpage{% @@ -20696,6 +20975,31 @@ of this package available from CTAN} \endgroup } \EndIncludeInRelease +\IncludeInRelease{2025/06/01}% + {\@outputdblcol}{Use new mark mechanism}% +\def\@outputdblcol{% + \if@firstcolumn + \global\@firstcolumnfalse + \global\setbox\@leftcolumn\copy\@outputbox + \else + \global\@firstcolumntrue + \setbox\@outputbox\vbox{% + \hb@xt@\textwidth{% + \hb@xt@\columnwidth{\box\@leftcolumn \hss}% + \hfil + {\normalcolor\vrule \@width\columnseprule}% + \hfil + \hb@xt@\columnwidth{\box\@outputbox \hss}}}% + \@combinedblfloats + \@outputpage + \begingroup + \@dblfloatplacement + \@startdblcolumn + \@whilesw\if@fcolmade \fi{\@outputpage + \@startdblcolumn}% + \endgroup + \fi}% +\EndIncludeInRelease \IncludeInRelease{2015/01/01}% {\@outputdblcol}{2 column marks}% \def\@outputdblcol{% @@ -20735,7 +21039,7 @@ of this package available from CTAN} \@whilesw\if@fcolmade \fi{\@outputpage \@startdblcolumn}% \endgroup - \fi}% + \fi} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@outputdblcol}{2 column marks}% |