%% %% This is file `latexrelease.sty', %% generated with the docstrip utility. %% %% The original source files were: %% %% ltclass.dtx (with options: `latexreleasefirst,tracerollback') %% ltvers.dtx (with options: `latexrelease') %% latexrelease.dtx (with options: `latexrelease') %% ltdirchk.dtx (with options: `latexrelease') %% ltplain.dtx (with options: `latexrelease') %% ltluatex.dtx (with options: `latexrelease') %% ltexpl.dtx (with options: `latexrelease') %% ltdefns.dtx (with options: `latexrelease') %% ltcmd.dtx (with options: `latexrelease') %% lthooks.dtx (with options: `latexrelease') %% ltcmdhooks.dtx (with options: `latexrelease') %% ltsockets.dtx (with options: `latexrelease') %% lttemplates.dtx (with options: `latexrelease') %% ltalloc.dtx (with options: `latexrelease') %% ltcntrl.dtx (with options: `latexrelease') %% lterror.dtx (with options: `latexrelease') %% ltpar.dtx (with options: `latexrelease') %% ltpara.dtx (with options: `latexrelease') %% ltmeta.dtx (with options: `latexrelease') %% ltspace.dtx (with options: `latexrelease') %% ltlogos.dtx (with options: `latexrelease') %% ltfiles.dtx (with options: `latexrelease') %% ltoutenc.dtx (with options: `latexrelease') %% ltcounts.dtx (with options: `latexrelease') %% ltlength.dtx (with options: `latexrelease') %% ltfssbas.dtx (with options: `latexrelease') %% ltfssaxes.dtx (with options: `latexrelease') %% ltfsstrc.dtx (with options: `latexrelease') %% ltfssdcl.dtx (with options: `latexrelease') %% ltfssini.dtx (with options: `latexrelease') %% fontdef.dtx (with options: `latexrelease') %% ltfntcmd.dtx (with options: `latexrelease') %% lttextcomp.dtx (with options: `latexrelease') %% ltpageno.dtx (with options: `latexrelease') %% ltxref.dtx (with options: `latexrelease') %% ltproperties.dtx (with options: `latexrelease') %% ltmiscen.dtx (with options: `latexrelease') %% ltmath.dtx (with options: `latexrelease') %% ltlists.dtx (with options: `latexrelease') %% ltboxes.dtx (with options: `latexrelease') %% lttab.dtx (with options: `latexrelease') %% ltpictur.dtx (with options: `latexrelease') %% ltthm.dtx (with options: `latexrelease') %% ltsect.dtx (with options: `latexrelease') %% ltfloat.dtx (with options: `latexrelease') %% ltidxglo.dtx (with options: `latexrelease') %% ltbibl.dtx (with options: `latexrelease') %% ltmarks.dtx (with options: `latexrelease') %% ltpage.dtx (with options: `latexrelease') %% ltclass.dtx (with options: `latexrelease,tracerollback') %% ltfilehook.dtx (with options: `latexrelease') %% ltshipout.dtx (with options: `latexrelease') %% ltoutput.dtx (with options: `latexrelease') %% ltfsscmp.dtx (with options: `latexrelease') %% ltfinal.dtx (with options: `latexrelease') %% latexrelease.dtx (with options: `latexrelease-finish') %% %% This is a generated file. %% %% The source is maintained by the LaTeX Project team and bug %% reports for it can be opened at https://latex-project.org/bugs.html %% (but please observe conditions on bug reports sent to that address!) %% %% %% Copyright (C) 1993-2024 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% %% This file was generated from file(s) of the LaTeX base system. %% -------------------------------------------------------------- %% %% It may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3c %% of this license or (at your option) any later version. %% The latest version of this license is in %% https://www.latex-project.org/lppl.txt %% and version 1.3c or later is part of all distributions of LaTeX %% version 2008 or later. %% %% This file has the LPPL maintenance status "maintained". %% %% This file may only be distributed together with a copy of the LaTeX %% base system. You may however distribute the LaTeX base system without %% such generated files. %% %% The list of all files belonging to the LaTeX base distribution is %% given in the file `manifest.txt'. See also `legal.txt' for additional %% information. %% %% The list of derived (unpacked) files belonging to the distribution %% and covered by LPPL is defined by the unpacking scripts (with %% extension .ins) which are part of the distribution. %%% From File: ltclass.dtx \def\@parse@version#1/#2/#3#4#5\@nil{% \@parse@version@dash#1-#2-#3#4\@nil } \def\@parse@version@dash#1-#2-#3#4#5\@nil{% \if\relax#2\relax\else#1\fi#2#3#4 } \let\pkgcls@debug\@gobble \def\requestedLaTeXdate{0} \ifx\pkgcls@targetdate\@undefined \newcount\pkgcls@targetdate \fi \let\pkgcls@targetlabel\@empty \def\pkgcls@innerdate{\maxdimen} \let\pkgcls@candidate\@empty \let\pkgcls@releasedate\@empty \ifx\load@onefilewithoptions\@undefined \let\load@onefilewithoptions\@onefilewithoptions \def\@onefilewithoptions#1[#2][#3]#4{% \pkgcls@debug{--- File loaded request (\noexpand\usepackage or ...)}% \pkgcls@debug{\@spaces 1: #1}% \pkgcls@debug{\@spaces 2: #2}% \pkgcls@debug{\@spaces 3: #3}% \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 \edef\reserved@a{% \endgroup \unexpanded{\load@onefilewithoptions#1[#2]}% [\pkgcls@mindate]% \unexpanded{#4}}% \reserved@a } \fi \def\pkgcls@parse@date@arg #1{% \ifx\@nil#1\@nil \pkgcls@targetdate\requestedLaTeXdate\relax \let\pkgcls@targetlabel\@empty \let\pkgcls@mindate\@empty \else \pkgcls@parse@date@arg@#1=\@nil\relax \fi } \def\pkgcls@parse@date@arg@#1=#2\@nil{% \pkgcls@targetdate \ifx\@nil#1\@nil \@parse@version0#2//00\@nil\relax \ifnum \pkgcls@targetdate=\z@ \pkgcls@targetdate\@ne \def\pkgcls@innerdate{\maxdimen}% \pkgcls@parse@date@arg@version#2% \else \edef\pkgcls@innerdate{\the\pkgcls@targetdate}% \fi \let\pkgcls@mindate\@empty \else \requestedLaTeXdate\relax \let\pkgcls@targetlabel\@empty \def\pkgcls@innerdate{\maxdimen}% \def\pkgcls@mindate{#1}% \ifnum \pkgcls@targetdate > \z@ \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 \pkgcls@ext\MessageBreak '\pkgcls@name'.\MessageBreak But this is in conflict with a rollback request to \requestedpatchdate} \fi \fi \fi } \def\pkgcls@parse@date@arg@version#1={% \def\pkgcls@targetlabel{#1}} \def\DeclareRelease#1#2#3{% \ifnum\pkgcls@targetdate>\z@ % some sort of rollback request \pkgcls@debug{---\string\DeclareRelease:}% \pkgcls@debug{\@spaces 1: #1}% \pkgcls@debug{\@spaces 2: #2}% \pkgcls@debug{\@spaces 3: #3}% \ifx\@nil#2\@nil \ifnum\pkgcls@targetdate=\@ne % named request \def\reserved@a{#1}% \ifx\pkgcls@targetlabel\reserved@a \pkgcls@use@this@release{#3}{}% \else \pkgcls@debug{Label doesn't match}% \fi \else \pkgcls@debug{Date request: ignored}% \fi \else \ifnum\pkgcls@targetdate>\@ne % a real request \ifnum\@parse@version#2//00\@nil >\pkgcls@targetdate \ifx\pkgcls@candidate\@empty \pkgcls@rollbackdate@error{#2}% \pkgcls@use@this@release{#3}{#2}% \else \pkgcls@use@this@release\pkgcls@candidate \pkgcls@releasedate \fi \else \def\pkgcls@candidate{#3}% \def\pkgcls@releasedate{#2}% \pkgcls@debug{New candidate: #3}% \fi \else \def\reserved@a{#1}% \ifx\pkgcls@targetlabel\reserved@a \pkgcls@use@this@release{#3}{#2}% \else \pkgcls@debug{Label doesn't match}% \fi \fi \fi \fi } \def\pkgcls@use@this@release#1#2{% \pkgcls@show@selection{#1}{#2}% \pkgcls@targetdate\z@ \@addtofilelist{#1}% \@@input #1\relax \endinput } \def\pkgcls@show@selection#1#2{% \pkgcls@debug{Result: use #1}% \GenericInfo {\@spaces\@spaces\space}{Rollback for \@cls@pkg\space'\@currname' requested -> \ifnum\pkgcls@targetdate>\@ne date \ifnum\requestedLaTeXdate=\pkgcls@targetdate \requestedpatchdate \else \expandafter\@gobble\pkgcls@arg \fi.\MessageBreak Best approximation is \else version '\pkgcls@targetlabel'.\MessageBreak This corresponds to \fi \ifx\@nil#2\@nil a special release% \else the release introduced on #2% \fi \@gobble}% } \def\pkgcls@rollbackdate@error#1{% \@latex@error{Suspicious rollback date given}% {The \@cls@pkg\space'\@currname' has no rollback data before #1 which\MessageBreak is after your requested rollback date --- so something may be wrong here.\MessageBreak Continue and we use the earliest known release.}} \def\DeclareCurrentRelease#1#2{% \ifnum\pkgcls@targetdate>\z@ % some sort of rollback request \pkgcls@debug{---DeclareCurrentRelease}% \pkgcls@debug{ 1: #1}% \pkgcls@debug{ 2: #2}% \ifnum\pkgcls@targetdate>\@ne % a date request \ifnum\@parse@version#2//00\@nil >\pkgcls@targetdate \ifx\pkgcls@candidate\@empty \pkgcls@rollbackdate@error{#2}% \else \pkgcls@use@this@release\pkgcls@candidate \pkgcls@releasedate \fi \else \pkgcls@show@selection{current version}{#2}% \fi \else % a label request \def\reserved@a{#1}% \ifx\pkgcls@targetlabel\reserved@a \pkgcls@show@selection{current version}{#2}% \else \@latex@error{Requested version '\pkgcls@targetlabel' for \@cls@pkg\space'\@currname' is unknown}\@ehc \fi \fi \fi } \DeclareRobustCommand\IfTargetDateBefore[1]{% \ifnum\pkgcls@innerdate <% \expandafter\@parse@version\expandafter0#1//00\@nil \typeout{Exclude code introduced on #1}% \expandafter\@firstoftwo \else \typeout{Include code introduced on #1}% \expandafter\@secondoftwo \fi } %%% From File: ltvers.dtx \edef\latexreleaseversion {2025-06-01} \newif\if@includeinrelease \@includeinreleasefalse \def\IncludeInRelease#1{% \if@includeinrelease \PackageError{latexrelease}{mis-matched IncludeInRelease}% {There is an \string\EndIncludeRelease\space missing}% \@includeinreleasefalse \fi \ifnum0% \ifx\new@moduledate\@empty\else 1\fi \ifnum \expandafter\@parse@version#1//00\@nil=0 1\fi =11 \expandafter\@firstoftwo \else \expandafter\@secondoftwo \fi {\finish@module@release{#1}}% {\kernel@ifnextchar[% {\@IncludeInRelease{#1}} {\@IncludeInRelease{#1}[#1]}}} \def\finish@module@release#1#2#3{% \toks@{[#1] #3}% \begingroup \edef\x{\detokenize\expandafter{\new@modulename}}% \edef\y{\detokenize{#2}}% \expandafter\endgroup \ifx\x\y \else \@latex@error{\noexpand\IncludeInRelease dated #1 in a module is not allowed.\MessageBreak Use a date at least equal to \new@moduledate \space for complete rollback}\@ehd \fi \ifnum\expandafter\@parse@version\new@moduledate//00\@nil >\expandafter\@parse@version\fmtversion//00\@nil \GenericInfo{}{Applying: \the\toks@}% \else \GenericInfo{}{Skipping: \the\toks@}% \expandafter\gobble@finish@module@release \fi} \long\def\gobble@finish@module@release#1\EndModuleRelease{% \EndModuleRelease} \def\@IncludeInRelease#1[#2]{\@IncludeInRele@se{#2}} \def\@IncludeInRele@se#1#2#3{% \toks@{[#1] #3}% \expandafter\ifx\csname\string#2+\@currname+IIR\endcsname\relax \ifnum\expandafter\@parse@version#1//00\@nil >\expandafter\@parse@version\fmtversion//00\@nil \GenericInfo{}{Skipping: \the\toks@}% \expandafter\expandafter\expandafter\@gobble@IncludeInRelease \else \GenericInfo{}{Applying: \the\toks@}% \@includeinreleasetrue \expandafter\let\csname\string#2+\@currname+IIR\endcsname\@empty \fi \else \GenericInfo{}{Already applied: \the\toks@}% \expandafter\@gobble@IncludeInRelease \fi } \def\EndIncludeInRelease{% \if@includeinrelease \@includeinreleasefalse \else \PackageError{latexrelease}{mis-matched EndIncludeInRelease}{}% \fi \if@skipping@module \expandafter\new@module@skip \fi} \long\def\@gobble@IncludeInRelease#1\EndIncludeInRelease{% \@includeinreleasefalse \@check@IncludeInRelease#1\IncludeInRelease\@check@IncludeInRelease \@end@check@IncludeInRelease} \long\def\@check@IncludeInRelease#1\IncludeInRelease #2#3\@end@check@IncludeInRelease{% \ifx\@check@IncludeInRelease#2\else \PackageError{latexrelease}{skipped IncludeInRelease for tag \string#2}{}% \fi \if@skipping@module \expandafter\new@module@skip \fi} \let\if@skipping@module\iffalse \def\@skipping@moduletrue{\let\if@skipping@module\iftrue} \def\@skipping@modulefalse{\let\if@skipping@module\iffalse} \let\new@modulename\@empty \let\new@moduledate\@empty \def\NewModuleRelease#1#2#3{% \ifx\new@modulename\@empty \else \@latex@error{Nested \noexpand\NewModuleRelease forbidden.}\@ehd \fi \edef\new@moduledate{#1}% \edef\new@modulename{#2}% \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 \ifnum\expandafter\@parse@version\fmtversion//00\@nil<% \expandafter\@parse@version\new@moduledate//00\@nil\relax \GenericInfo{}{Skipping module \new@modulename}% \expandafter\expandafter \expandafter\gobble@finish@module@release \else \GenericInfo{}{Applying module \new@modulename} \@skipping@modulefalse \fi \else \GenericInfo{}{Skipping module \new@modulename} \@skipping@moduletrue \expandafter\new@module@skip \fi} \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 \else \GenericInfo{}{END module: \new@modulename\space (\new@moduledate)}% \let\new@modulename\@empty \let\new@moduledate\@empty \@skipping@modulefalse \fi} \ProvidesPackage{latexrelease} [2024/08/11 v1.0p LaTeX release emulation and tests (including releases up to \latexreleaseversion)] \NeedsTeXFormat{LaTeX2e}[1996/06/01] \@ifundefined{sourceLaTeXdate}{% \edef\sourceLaTeXdate{% \expandafter\@parse@version\fmtversion//00\@nil}}{}% \DeclareOption*{% \def\@IncludeInRelease#1[#2]{\@IncludeInRele@se{#1}}% \let\requestedpatchdate\CurrentOption} \DeclareOption{latest}{% \let\requestedpatchdate\latexreleaseversion \AtEndOfPackage{\def\requestedLaTeXdate{0}}} \DeclareOption{current}{% \let\requestedpatchdate\fmtversion \AtEndOfPackage{\def\requestedLaTeXdate{0}}} \let\requestedpatchdate\fmtversion \ProcessOptions\relax \def\reserved@a{% \edef\requestedLaTeXdate{\the\count@}% \reserved@b} \def\reserved@b#1\\{% \def\reserved@b{#1}% \ifx\reserved@b\@empty\else \PackageError{latexrelease}% {Unexpected option \requestedpatchdate}% {The option must be of the form yyyy/mm/dd or yyyy-mm-dd}% \fi} \afterassignment\reserved@a \count@\expandafter \@parse@version\expandafter0\requestedpatchdate//00\@nil\\ \edef\currentLaTeXdate{% \expandafter\@parse@version\fmtversion//00\@nil} \ifnum\requestedLaTeXdate=\currentLaTeXdate \PackageWarningNoLine{latexrelease}{% Current format date selected, no patches applied} \expandafter\endinput \fi \ifnum\currentLaTeXdate >\expandafter\@parse@version\latexreleaseversion//00\@nil \PackageWarningNoLine{latexrelease}{% The current package is for an older LaTeX format:\MessageBreak LaTeX \latexreleaseversion\space\MessageBreak Obtain a newer version of this package!} \expandafter\endinput \fi \ifnum\requestedLaTeXdate >\expandafter\@parse@version\latexreleaseversion//00\@nil \PackageWarningNoLine{latexrelease}{% The current package is for LaTeX \latexreleaseversion:\MessageBreak It has no patches beyond that date\MessageBreak There may be an updated version\MessageBreak of this package available from CTAN} \expandafter\endinput \fi \let\fmtversion\requestedpatchdate \let\currentLaTeXdate\requestedLaTeXdate \csname ExplSyntaxOn\endcsname \csname ExplSyntaxOff\endcsname \begingroup \endlinechar=-1 \catcode95=11 % _ \catcode58=11 % : \catcode126=10 % ~ \catcode32=09 % \xdef\latexrelease@postltexpl{\unexpanded{% \cs_gset_protected:Npn \__latexrelease_declare_command:w { \@star@or@long \__latexrelease_declare_command:Nw } \cs_gset_protected:Npn \__latexrelease_declare_command:Nw #1 { \cs_if_exist:NTF #1 { \renew@command } { \new@command } #1 } \cs_gset_protected:Npn \__latexrelease_e@alloc:NnnnnN #1 #2 #3 #4 #5 #6 { \cs_if_free:NTF #6 { \use:n } { \exp_after:wN \__latexrelease_e@alloc:N \token_to_meaning:N #6 \scan_stop: {#2} #6 } { \__latexrelease_e@alloc #1 {#2} {#3} {#4} {#5} #6 } } \cs_gset_protected:Npn \__latexrelease_e@alloc:N #1 { \if_int_compare:w 0 < 0 \if_int_compare:w 10 < 9#1 ~ 1 \fi: \if_charcode:w " #1 1 \fi: \exp_stop_f: \tex_afterassignment:D \__latexrelease_e@alloc:w \@tempcnta #1 \use_i:nnn \fi: \use:n { \if_meaning:w \scan_stop: #1 \exp_after:wN \use_iv:nnnn \fi: \__latexrelease_e@alloc:N } } \cs_gset_protected:Npn \__latexrelease_e@alloc:w #1 \scan_stop: #2 #3 { #2 \__latexrelease_tmp:w = \@tempcnta \token_if_eq_meaning:NNTF #3 \__latexrelease_tmp:w { \int_set_eq:NN \allocationnumber \@tempcnta \use_none:n } { \cs_set_eq:NN #3 \tex_undefined:D \use:n } } \tl_clear_new:N \l__latexrelease_restores_tl \cs_gset:Npn \__latexrelease_redefines:w #1 #2 { \quark_if_recursion_tail_stop:N #1 \tl_put_right:Nn \l__latexrelease_restores_tl {#1} \cs_set_eq:cN { __latexrelease_ \cs_to_str:N #1 } #1 \cs_set_eq:NN #1 #2 \__latexrelease_redefines:w } \__latexrelease_redefines:w \__kernel_chk_if_free_cs:N \use_none:n \e@alloc \__latexrelease_e@alloc:NnnnnN \__kernel_msg_error:nnx \use_none:nnn \msg_new:nnnn \msg_gset:nnnn % \NewDocumentCommand \DeclareDocumentCommand % after ltcmd.dtx \newcommand \__latexrelease_declare_command:w \__kernel_msg_error:nnn \use_none:nnn % needed while redirect for kernel msgs doesn't work \q_recursion_tail \q_recursion_tail \q_recursion_stop \msg_redirect_name:nnn { hooks } { exists } { none } \msg_redirect_name:nnn { mark } { class-already-defined }{ none } \cs_gset_protected:Npn \latexrelease@postltcmd { \__latexrelease_redefines:w \NewDocumentCommand \DeclareDocumentCommand \q_recursion_tail \q_recursion_tail \q_recursion_stop } }}% \endgroup %%% From File: ltdirchk.dtx \ifx\directlua\undefined\else \IncludeInRelease{2015/10/01}{\luatexluafunction} {LuaTeX (prefixed names)}% \directlua{tex.enableprimitives("",% tex.extraprimitives("omega", "aleph", "luatex"))} \EndIncludeInRelease \IncludeInRelease{0000/00/00}{\luatexluafunction} {LuaTeX (prefixed names)}% \directlua{ tex.enableprimitives( "luatex", tex.extraprimitives("core","omega", "aleph", "luatex") ) } \EndIncludeInRelease \fi \IncludeInRelease{2019/10/01}{\filename@simple} {Final dot for extension}% \def\filename@simple#1.#2\\{% \ifx\\#2\\% \let\filename@ext\relax \edef\filename@base{#1}% \else \filename@dots{#1}#2\\% \fi} \def\filename@dots#1#2.#3\\{% \ifx\\#3\\% \def\filename@ext{#2}% \edef\filename@base{#1}% \else \filename@dots{#1.#2}#3\\% \fi} \EndIncludeInRelease \IncludeInRelease{0000/00/00}{\filename@simple} {Final dot for extension}% \def\filename@simple#1.#2\\{% \ifx\\#2\\% \let\filename@ext\relax \else \edef\filename@ext{\filename@dot#2\\}% \fi \edef\filename@base{#1}} \EndIncludeInRelease %%% From File: ltplain.dtx \IncludeInRelease{2015/01/01}% {\newcount}{Extended Allocation}% \def\newcount {\e@alloc\count \countdef {\count10}\insc@unt\float@count} \def\newdimen {\e@alloc\dimen \dimendef {\count11}\insc@unt\float@count} \def\newskip {\e@alloc\skip \skipdef {\count12}\insc@unt\float@count} \def\newmuskip {\e@alloc\muskip\muskipdef{\count13}\m@ne\e@alloc@top} \def\newbox {\e@alloc\box {\ifnum\allocationnumber<\@cclvi \expandafter\chardef \else \expandafter\e@alloc@chardef \fi} {\count14}\insc@unt\float@count} \def\newtoks {\e@alloc\toks \toksdef{\count15}\m@ne\e@alloc@top} \def\newread {\e@alloc\read \chardef{\count16}\m@ne\sixt@@n} \ifx\directlua\@undefined \def\newwrite {\e@alloc\write \chardef{\count17}\m@ne\sixt@@n} \else \def\newwrite {\e@alloc\write {\ifnum\allocationnumber=18 \advance\count17\@ne \allocationnumber\count17 % \fi \global\chardef}% {\count17}% \m@ne {128}} \fi \def\new@mathgroup {\e@alloc\mathgroup\chardef{\count18}\m@ne\e@mathgroup@top} \let\newfam\new@mathgroup \ifx\directlua\@undefined \def\newlanguage {\e@alloc\language \chardef{\count19}\m@ne\@cclvi} \else \def\newlanguage {\e@alloc\language \chardef{\count19}\m@ne{16384}} \fi \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\newcount}{Extended Allocation}% \def\newcount{\alloc@0\count\countdef\insc@unt} \def\newdimen{\alloc@1\dimen\dimendef\insc@unt} \def\newskip{\alloc@2\skip\skipdef\insc@unt} \def\newmuskip{\alloc@3\muskip\muskipdef\@cclvi} \def\newbox{\alloc@4\box\chardef\insc@unt} \def\newtoks{\alloc@5\toks\toksdef\@cclvi} \def\newread{\alloc@6\read\chardef\sixt@@n} \def\newwrite{\alloc@7\write\chardef\sixt@@n} \def\new@mathgroup{\alloc@8\fam\chardef\sixt@@n} \def\newlanguage{\alloc@9\language\chardef\@cclvi} \let\newfam\new@mathgroup \EndIncludeInRelease \IncludeInRelease{2015/01/01}% {\e@alloc@chardef}{Extended Allocation}% \ifx\directlua\@undefined \ifx\widowpenalties\@undefined \mathchardef\e@alloc@top=255 \let\e@alloc@chardef\chardef \else \mathchardef\e@alloc@top=32767 \let\e@alloc@chardef\mathchardef \fi \else \chardef\e@alloc@top=65535 \let\e@alloc@chardef\chardef \fi \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\e@alloc@chardef}{Extended Allocation}% \let\e@alloc@top\@undefined \let\e@alloc@chardef\@undefined \EndIncludeInRelease \IncludeInRelease{2015/01/01}% {\e@mathgroup@top}{Extended Allocation}% \ifx\Umathcode\@undefined \chardef\e@mathgroup@top=16 \else \chardef\e@mathgroup@top=256 \fi \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\e@mathgroup@top}{Extended Allocation}% \let\e@mathgroup@top\@undefined \EndIncludeInRelease \IncludeInRelease{2015/01/01}{\e@alloc}{Extended Allocation}% \def\e@alloc#1#2#3#4#5#6{% \global\advance#3\@ne \e@ch@ck{#3}{#4}{#5}#1% \allocationnumber#3\relax \global#2#6\allocationnumber \wlog{\string#6=\string#1\the\allocationnumber}}% \EndIncludeInRelease \IncludeInRelease{0000/00/00}{\e@alloc}{Extended Allocation}% \let\e@alloc\@undefined \EndIncludeInRelease \IncludeInRelease{2015/10/01} {\e@ch@ck}{Extended Allocation (checking)}% \gdef\e@ch@ck#1#2#3#4{% \ifnum#1<#2\else \ifnum#1=#2\relax \global#1\@cclvi \ifx\count#4\global\advance#1 10 \fi \fi \ifnum#1<#3\relax \else \errmessage{No room for a new \string#4}% \fi \fi}% \EndIncludeInRelease \IncludeInRelease{2015/01/01}% {\e@ch@ck}{Extended Allocation (checking)}% \gdef\e@ch@ck#1#2#3#4{% \ifnum#1<#2\else \ifnum#1=#2\relax #1\@cclvi \ifx\count#4\advance#1 10 \fi \fi \ifnum#1<#3\relax \else \errmessage{No room for a new #4}% \fi \fi}% \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\e@ch@ck}{Extended Allocation (checking)}% \let\e@ch@ck\@undefined \EndIncludeInRelease \IncludeInRelease{2015/01/01}% {\extrafloats}{Extra floats}% \let\float@count\e@alloc@top \ifx\numexpr\@undefined \def\extrafloats#1{% \count@#1\relax \ifnum\count@>\z@ \newinsert\reserved@a \global\expandafter\chardef \csname bx@\the\allocationnumber\endcsname\allocationnumber \@cons\@freelist{\csname bx@\the\allocationnumber\endcsname}% \advance\count@\m@ne \expandafter\extrafloats \expandafter\count@ \fi }% \else \def\extrafloats#1{% \ifnum#1>\z@ \count@\numexpr\float@count-1\relax \ifnum\count@<266 \ch@ck0\m@ne\insert\fi \ch@ck0\count@\count \ch@ck1\count@\dimen \ch@ck2\count@\skip \ch@ck4\count@\box \global\e@alloc@chardef\float@count\count@ \global\expandafter\e@alloc@chardef \csname bx@\the\float@count\endcsname\float@count \@cons\@freelist{\csname bx@\the\float@count\endcsname}% \expandafter\extrafloats\expandafter{\the\numexpr#1-1\expandafter}% \fi}% \fi \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\extrafloats}{Extra floats}% \let\float@count\@undefined \let\extrafloats\@undefined \EndIncludeInRelease \IncludeInRelease{2020/10/01} {\alloc@}{emulate alloc@}% \def\alloc@#1#2#3#4{\e@alloc#2#3{\count1#1}#4\float@count} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\alloc@}{emulate alloc@}% \def\alloc@#1#2#3#4#5{\global\advance\count1#1\@ne \ch@ck#1#4#2% \allocationnumber\count1#1% \global#3#5\allocationnumber \wlog{\string#5=\string#2\the\allocationnumber}} \EndIncludeInRelease \IncludeInRelease{2015/10/01} {\newinsert}{Extended \newinsert}% \ifx\numexpr\@undefined \def\newinsert#1{\global\advance\insc@unt \m@ne \ch@ck0\insc@unt\count \ch@ck1\insc@unt\dimen \ch@ck2\insc@unt\skip \ch@ck4\insc@unt\box \allocationnumber\insc@unt \global\chardef#1\allocationnumber \wlog{\string#1=\string\insert\the\allocationnumber}} \else \ifx\directlua\@undefined \chardef\e@insert@top255 \else \chardef\e@insert@top\e@alloc@top \fi \def\newinsert#1{% \@tempswafalse \global\advance\insc@unt\m@ne \ifnum\count10<\insc@unt \ifnum\count11<\insc@unt \ifnum\count12<\insc@unt \ifnum\count14<\insc@unt \@tempswatrue \fi\fi\fi\fi \if@tempswa \allocationnumber\insc@unt \else \global\advance\insc@unt\@ne \extrafloats\@ne \@next\@currbox\@freelist {\ifnum\@currbox<\e@insert@top \allocationnumber\@currbox \else \ch@ck0\m@ne\insert \fi}% {\ch@ck0\m@ne\insert}% \fi \global\chardef#1\allocationnumber \wlog{\string#1=\string\insert\the\allocationnumber}% } \fi \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\newinsert}{Extended \newinsert}% \let\e@insert@top\@undefined \def\newinsert#1{\global\advance\insc@unt \m@ne \ch@ck0\insc@unt\count \ch@ck1\insc@unt\dimen \ch@ck2\insc@unt\skip \ch@ck4\insc@unt\box \allocationnumber\insc@unt \global\chardef#1\allocationnumber \wlog{\string#1=\string\insert\the\allocationnumber}} \EndIncludeInRelease \IncludeInRelease{2021/06/01}{\tracingstacklevels}% {tracingstacklevels}% \ifx\directlua\@undefined % \tracingstacklevels=0 % added in 2021 \else \newcount\tracingstacklevels % Code for \tracingstacklevels defined in ltfinal.dtx \fi \EndIncludeInRelease \IncludeInRelease{0000/00/00}{\tracingstacklevels}% {tracingstacklevels}% \ifx\directlua\@undefined \else \let\tracingstacklevels\@undefined \fi \EndIncludeInRelease \IncludeInRelease{2022/06/01}{\obeylines}% {Add a redirection to obeylines and obeyspaces}% \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 \EndIncludeInRelease \IncludeInRelease{0000/00/00}{\obeylines}% {Add a redirection to obeylines and obeyspaces}% \expandafter\let\csname obeylines \endcsname\@undefined \expandafter\let\csname obeyspace \endcsname\@undefined \begingroup \catcode`\^^M=\active % these lines must end with % \gdef\obeylines{\catcode`\^^M\active \let^^M\par % }% \global\let^^M\RawParEnd % this is in case ^^M appears in a \write \endgroup \def\obeyspaces{\catcode`\ \active} \let\obeyedline\@undefined \let\obeyedspace\@undefined \EndIncludeInRelease \IncludeInRelease{2021/06/01}{\loggingall} {\tracingstacklevels and \tracinglostchars=3}% \edef\loggingall{% \tracingstats\tw@ \tracingpages\@ne \tracinglostchars\thr@@ \tracingparagraphs\@ne \tracinggroups\@ne \tracingifs\@ne \tracingscantokens\@ne \tracingnesting\@ne \errorcontextlines\maxdimen \ifdefined\tracingstacklevels \tracingstacklevels\maxdimen \fi \noexpand \loggingoutput \tracingmacros\tw@ \tracingcommands\thr@@ \tracingrestores\@ne \tracingassigns\@ne }% \def\tracingall{\showoverfull\loggingall} \EndIncludeInRelease \IncludeInRelease{2015/01/01}{\loggingall}{etex tracing}% \ifx\tracingscantokens\@undefined \gdef\loggingall{% \tracingstats\tw@ \tracingpages\@ne \tracinglostchars\@ne \tracingparagraphs\@ne \errorcontextlines\maxdimen \loggingoutput \tracingmacros\tw@ \tracingcommands\tw@ \tracingrestores\@ne }% \else \gdef\loggingall{% \tracingstats\tw@ \tracingpages\@ne \tracinglostchars\tw@ \tracingparagraphs\@ne \tracinggroups\@ne \tracingifs\@ne \tracingscantokens\@ne \tracingnesting\@ne \errorcontextlines\maxdimen \loggingoutput \tracingmacros\tw@ \tracingcommands\thr@@ \tracingrestores\@ne \tracingassigns\@ne }% \fi \gdef\tracingall{\showoverfull\loggingall} \EndIncludeInRelease \IncludeInRelease{0000/00/00}{\loggingall}{etex tracing}% \gdef\loggingall{\tracingcommands\tw@\tracingstats\tw@ \tracingpages\@ne\tracinglostchars\@ne \tracingmacros\tw@\tracingparagraphs\@ne\tracingrestores\@ne \errorcontextlines\maxdimen\loggingoutput} \gdef\tracingall{\loggingall\showoverfull} \EndIncludeInRelease \IncludeInRelease{2015/01/01}{\tracingnone}% {turn off etex tracing}% \edef\tracingnone{% \tracingassigns\z@ \tracingrestores\z@ \tracingonline\z@ \tracingcommands\z@ \showboxdepth\m@ne \showboxbreadth\m@ne \tracingoutput\z@ \errorcontextlines\m@ne \ifdefined\tracingstacklevels \tracingstacklevels\z@ \fi \tracingnesting\z@ \tracingscantokens\z@ \tracingifs\z@ \tracinggroups\z@ \tracingparagraphs\z@ \tracingmacros\z@ \tracinglostchars\tw@ \tracingpages\z@ \tracingstats\z@ }% \EndIncludeInRelease \IncludeInRelease{2015/01/01}{\tracingnone}% {turn off etex tracing}% \ifx\tracingscantokens\@undefined \def\tracingnone{% \tracingonline\z@ \tracingcommands\z@ \showboxdepth\m@ne \showboxbreadth\m@ne \tracingoutput\z@ \errorcontextlines\m@ne \tracingrestores\z@ \tracingparagraphs\z@ \tracingmacros\z@ \tracinglostchars\@ne \tracingpages\z@ \tracingstats\z@ }% \else \def\tracingnone{% \tracingassigns\z@ \tracingrestores\z@ \tracingonline\z@ \tracingcommands\z@ \showboxdepth\m@ne \showboxbreadth\m@ne \tracingoutput\z@ \errorcontextlines\m@ne \tracingnesting\z@ \tracingscantokens\z@ \tracingifs\z@ \tracinggroups\z@ \tracingparagraphs\z@ \tracingmacros\z@ \tracinglostchars\@ne \tracingpages\z@ \tracingstats\z@ }% \fi \EndIncludeInRelease \IncludeInRelease{0000/00/00}{\tracingnone}% {turn off etex tracing}% \let\tracingnone\@undefined \EndIncludeInRelease \IncludeInRelease{2015/01/01}{\hideoutput}% {hide output from tracing}% \def\hideoutput{% \tracingoutput\z@ \showboxbreadth\m@ne \showboxdepth\m@ne \tracingonline\m@ne }% \EndIncludeInRelease \IncludeInRelease{0000/00/00}{\hideoutput}% {hide output from tracing}% \let\hideoutput\@undefined \EndIncludeInRelease \ifx\directlua\@undefined\else \IncludeInRelease{2015/10/01} {\newluafunction}{LuaTeX}% \ifnum\luatexversion<60 % \wlog{***************************************************} \wlog{* LuaTeX version too old for ltluatex support *} \wlog{***************************************************} \expandafter\endinput \fi \long\def\@gobble#1{} \long\def\@firstofone#1{#1} \ifx\e@alloc@attribute@count\@undefined \countdef\e@alloc@attribute@count=258 \e@alloc@attribute@count=\z@ \fi \def\newattribute#1{% \e@alloc\attribute\attributedef \e@alloc@attribute@count\m@ne\e@alloc@top#1% } \def\setattribute#1#2{#1=\numexpr#2\relax} \def\unsetattribute#1{#1=-"7FFFFFFF\relax} \ifx\e@alloc@ccodetable@count\@undefined \countdef\e@alloc@ccodetable@count=259 \e@alloc@ccodetable@count=\z@ \fi \def\newcatcodetable#1{% \e@alloc\catcodetable\chardef \e@alloc@ccodetable@count\m@ne{"8000}#1% \initcatcodetable\allocationnumber } \newcatcodetable\catcodetable@initex \newcatcodetable\catcodetable@string \begingroup \def\setrangecatcode#1#2#3{% \ifnum#1>#2 % \expandafter\@gobble \else \expandafter\@firstofone \fi {% \catcode#1=#3 % \expandafter\setrangecatcode\expandafter {\number\numexpr#1 + 1\relax}{#2}{#3} }% } \@firstofone{% \catcodetable\catcodetable@initex \catcode0=12 % \catcode13=12 % \catcode37=12 % \setrangecatcode{65}{90}{12}% \setrangecatcode{97}{122}{12}% \catcode92=12 % \catcode127=12 % \savecatcodetable\catcodetable@string \endgroup }% \newcatcodetable\catcodetable@latex \newcatcodetable\catcodetable@atletter \begingroup \def\parseunicodedataI#1;#2;#3;#4\relax{% \parseunicodedataII#1;#3;#2 First>\relax }% \def\parseunicodedataII#1;#2;#3 First>#4\relax{% \ifx\relax#4\relax \expandafter\parseunicodedataIII \else \expandafter\parseunicodedataIV \fi {#1}#2\relax% }% \def\parseunicodedataIII#1#2#3\relax{% \ifnum 0% \if L#21\fi \if M#21\fi >0 % \catcode"#1=11 % \fi }% \def\parseunicodedataIV#1#2#3\relax{% \read\unicoderead to \unicodedataline \if L#2% \count0="#1 % \expandafter\parseunicodedataV\unicodedataline\relax \fi }% \def\parseunicodedataV#1;#2\relax{% \loop \unless\ifnum\count0>"#1 % \catcode\count0=11 % \advance\count0 by 1 % \repeat }% \def\storedpar{\par}% \chardef\unicoderead=\numexpr\count16 + 1\relax \openin\unicoderead=UnicodeData.txt % \loop\unless\ifeof\unicoderead % \read\unicoderead to \unicodedataline \unless\ifx\unicodedataline\storedpar \expandafter\parseunicodedataI\unicodedataline\relax \fi \repeat \closein\unicoderead \@firstofone{% \catcode64=12 % \savecatcodetable\catcodetable@latex \catcode64=11 % \savecatcodetable\catcodetable@atletter } \endgroup \ifx\e@alloc@luafunction@count\@undefined \countdef\e@alloc@luafunction@count=260 \e@alloc@luafunction@count=\z@ \fi \def\newluafunction{% \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@ \fi \def\newwhatsit#1{% \e@alloc\whatsit\e@alloc@chardef \e@alloc@whatsit@count\m@ne\e@alloc@top#1% } \ifx\e@alloc@bytecode@count\@undefined \countdef\e@alloc@bytecode@count=262 \e@alloc@bytecode@count=\z@ \fi \def\newluabytecode#1{% \e@alloc\luabytecode\e@alloc@chardef \e@alloc@bytecode@count\m@ne\e@alloc@top#1% } \ifx\e@alloc@luachunk@count\@undefined \countdef\e@alloc@luachunk@count=263 \e@alloc@luachunk@count=\z@ \fi \def\newluachunkname#1{% \e@alloc\luachunk\e@alloc@chardef \e@alloc@luachunk@count\m@ne\e@alloc@top#1% {\escapechar\m@ne \directlua{lua.name[\the\allocationnumber]="\string#1"}}% } \def\now@and@everyjob#1{% \everyjob\expandafter{\the\everyjob #1% }% #1% } \begingroup \attributedef\attributezero=0 % \chardef \charzero =0 % \countdef \CountZero =0 % \dimendef \dimenzero =0 % \mathchardef \mathcharzero =0 % \muskipdef \muskipzero =0 % \skipdef \skipzero =0 % \toksdef \tokszero =0 % \directlua{require("ltluatex")} \endgroup \EndIncludeInRelease \IncludeInRelease{0000/00/00} {\newluafunction}{LuaTeX}% \let\e@alloc@attribute@count\@undefined \let\newattribute\@undefined \let\setattribute\@undefined \let\unsetattribute\@undefined \let\e@alloc@ccodetable@count\@undefined \let\newcatcodetable\@undefined \let\catcodetable@initex\@undefined \let\catcodetable@string\@undefined \let\catcodetable@latex\@undefined \let\catcodetable@atletter\@undefined \let\e@alloc@luafunction@count\@undefined \let\newluafunction\@undefined \let\e@alloc@luafunction@count\@undefined \let\newwhatsit\@undefined \let\e@alloc@whatsit@count\@undefined \let\newluabytecode\@undefined \let\e@alloc@bytecode@count\@undefined \let\newluachunkname\@undefined \let\e@alloc@luachunk@count\@undefined \directlua{luatexbase.uninstall()} \EndIncludeInRelease \IncludeInRelease{2017/01/01}% {\fontencoding}{TU in everyjob}% \fontencoding{TU}\let\encodingdefault\f@encoding \ifx\directlua\@undefined\else \directlua{% if xpcall(function ()% require('luaotfload-main')% end,texio.write_nl) then % local _void = luaotfload.main ()% else % texio.write_nl('Error in luaotfload: reverting to OT1')% tex.print('\string\\def\string\\encodingdefault{OT1}')% end % }% \let\f@encoding\encodingdefault \expandafter\let\csname ver@luaotfload.sty\endcsname\fmtversion \fi \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\fontencoding}{TU in everyjob}% \fontencoding{OT1}\let\encodingdefault\f@encoding \EndIncludeInRelease \fi %%% From File: ltexpl.dtx \IncludeInRelease{2020/10/01}% {kernel@enddocument hooks}{Define several kernel hooks} \ifx\@kernel@after@enddocument\@undefined \let \@kernel@after@enddocument \@empty \let \@kernel@after@enddocument@afterlastpage \@empty \let \@kernel@before@begindocument \@empty \let \@kernel@after@begindocument \@empty \fi \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {kernel@enddocument hooks}{Define several kernel hooks} \let\@kernel@after@enddocument\@undefined \let\@kernel@after@enddocument@afterlastpage\@undefined \let\@kernel@before@begindocument\@undefined \let\@kernel@after@begindocument\@undefined \EndIncludeInRelease \IncludeInRelease{2020/10/01}% {\@expl@sys@load@backend@@}{Roll forward support}% \def\reserved@a#1{\ifdefined#1\else\def#1{}\fi} \reserved@a\@expl@sys@load@backend@@ \reserved@a\@expl@push@filename@@ \reserved@a\@expl@push@filename@aux@@ \reserved@a\@expl@pop@filename@@ \EndIncludeInRelease \IncludeInRelease{2020/10/01}% {expl3}{Pre-load expl3}% \expandafter\ifx\csname tex\string _let:D\endcsname\relax \expandafter\@firstofone \else \GenericInfo{}{Skipping: expl3 code already part of the format}% \expandafter\@gobble \fi {% \IfFileExists{expl3.ltx} {% \ifnum0% \ifdefined\pdffilesize 1\fi \ifdefined\filesize 1\fi \ifdefined\luatexversion\ifnum\luatexversion>94 1\fi\fi \ifdefined\kanjiskip 1\fi >0 % \expandafter\@firstofone \else \@latex@error{% LaTeX requires the e-TeX primitives and additional\MessageBreak functionality available in the engines:\MessageBreak - pdfTeX v1.40\MessageBreak - XeTeX v0.99992\MessageBreak - LuaTeX v0.95\MessageBreak - e-(u)pTeX mid-2012\MessageBreak or later% }\@ehd \expandafter\@gobble \fi } {% \@latex@warning@no@line {You need a format that already contains a recent\MessageBreak expl3 as part of the kernel, e.g. at least a kernel\MessageBreak from 2019 to roll forward to that date!\MessageBreak --- I'm giving up!\MessageBreak\MessageBreak Note that manually loading the expl3 package\MessageBreak from your distribution is not enough}% \batchmode \read -1 to \reserved@a }% {\input expl3.ltx }% } \EndIncludeInRelease \IncludeInRelease{2020/02/02}% {expl3}{Pre-load expl3}% \IfFileExists{expl3.ltx} {% \ifnum0% \ifdefined\pdffilesize 1\fi \ifdefined\filesize 1\fi \ifdefined\luatexversion\ifnum\luatexversion>94 1\fi\fi >0 % \else \message{Skipping expl3-dependent extensions} \expandafter\@gobbletwo \fi } {% \message{Skipping expl3-dependent extensions}% \@gobbletwo }% \input{expl3.ltx} \EndIncludeInRelease \@ifundefined{ExplSyntaxOff}{}{\latexrelease@postltexpl} \IncludeInRelease{2020/10/01}{\@expl@cs@to@str@@N}% {expl3 macros added for the 2020-10-01 release}% \ExplSyntaxOn \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_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 \ExplSyntaxOff \EndIncludeInRelease \IncludeInRelease{0000/00/00}{\@expl@cs@to@str@@N}% {expl3 macros added for the 2020-10-01 release}% \let \@expl@cs@to@str@@N \@undefined \let \@expl@str@if@eq@@nnTF \@undefined \let \@expl@cs@prefix@spec@@N \@undefined \let \@expl@cs@parameter@spec@@N \@undefined \let \@expl@cs@replacement@spec@@N \@undefined \let \@expl@str@map@function@@NN \@undefined \EndIncludeInRelease \IncludeInRelease{2022/06/01}% {\fpeval}{fp and int calculations}% \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 \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\fpeval}{fp and int calculations}% \let\fpeval\@undefined \let\inteval\@undefined \let\dimeval\@undefined \let\skipeval\@undefined \EndIncludeInRelease \IncludeInRelease{2022/06/01}% {\ExpandArgs}{Some pre-expansion commands}% \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 \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\ExpandArgs}{Some pre-expansion commands}% \let\UseName\@undefined \let\ExpandArgs\@undefined \EndIncludeInRelease \IncludeInRelease{2023/11/01}% {\IfExplAtLeastTF}{Test for expl3 date}% \def\IfExplAtLeastTF{\@ifl@t@r\ExplLoaderFileDate} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\IfExplAtLeastTF}{Test for expl3 date}% \def\IfExplAtLeastTF{\@ifl@t@r\ExplLoaderFileDate} \EndIncludeInRelease %%% From File: ltdefns.dtx \IncludeInRelease{2020/10/01}% {\typeout}{Allow "par" in \typeout}% \protected\long\def\typeout#1{\begingroup \set@display@protect \def\par{^^J^^J}% \immediate\write\@unused{#1}\endgroup} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\typeout}{Allow "par" in \typeout}% \def\typeout#1{\begingroup\set@display@protect \immediate\write\@unused{#1}\endgroup} \EndIncludeInRelease \IncludeInRelease{2020/10/01}{\@carcube}{Make \@carcube long}% \long\def\@carcube#1#2#3#4\@nil{#1#2#3} \EndIncludeInRelease \IncludeInRelease{0000/00/00}{\@carcube}{Undo: Make \@carcube long}% \def\@carcube#1#2#3#4\@nil{#1#2#3} \EndIncludeInRelease \IncludeInRelease{2022/11/01}% {\@expandtwoargs}{protected edef}% \def\@expandtwoargs#1#2#3{% \protected@edef\reserved@a{\noexpand#1{#2}{#3}}\reserved@a} \EndIncludeInRelease \IncludeInRelease{00/00/00}% {\@expandtwoargs}{protected edef}% \def\@expandtwoargs#1#2#3{% \edef\reserved@a{\noexpand#1{#2}{#3}}\reserved@a} \EndIncludeInRelease \IncludeInRelease{2020/10/01}{\MakeRobust}{\MakeRobust}% \def\MakeRobust#1{% \count@=\escapechar \escapechar=`\\ \@ifundefined{\expandafter\@gobble\string#1}{% \@latex@error{Command `\string#1' undefined.% \MessageBreak There is nothing here to make robust}% \@eha }% {% \@ifundefined{\expandafter\@gobble\string#1\space}% {% \expandafter\@kernel@rename@newcommand \csname\expandafter\@gobble\string#1\space\endcsname #1% \edef\reserved@a{\string#1}% \def\reserved@b{#1}% \edef\reserved@b{\expandafter\strip@prefix\meaning\reserved@b}% \xdef#1{% \ifx\reserved@a\reserved@b \noexpand\x@protect\noexpand#1% \fi \noexpand\protect\expandafter\noexpand \csname\expandafter\@gobble\string#1\space\endcsname}% }% {\@latex@info{Command `\string#1' is already robust}}% }% \escapechar=\count@ }% \def\@kernel@rename@newcommand#1#2{% \robust@command@chk@safe#2% {\@if@newcommand#2% {\afterassignment\global \global\@copy@newcommand#1#2% \global\let#2\@undefined \global\expandafter\let\csname\string#2\endcsname\@undefined}% {\global\let#1=#2}}% {\global\let#1=#2}} \EndIncludeInRelease \IncludeInRelease{2019/10/01}{\MakeRobust}{\MakeRobust}% \def\MakeRobust#1{% \@ifundefined{\expandafter\@gobble\string#1}{% \@latex@error{The control sequence `\string#1' is undefined!% \MessageBreak There is nothing here to make robust}% \@eha }% {% \@ifundefined{\expandafter\@gobble\string#1\space}% {% \global\expandafter\let\csname \expandafter\@gobble\string#1\space\endcsname=#1% \edef\reserved@a{\string#1}% \def\reserved@b{#1}% \edef\reserved@b{\expandafter\strip@prefix\meaning\reserved@b}% \xdef#1{% \ifx\reserved@a\reserved@b \noexpand\x@protect\noexpand#1% \fi \noexpand\protect\expandafter\noexpand \csname\expandafter\@gobble\string#1\space\endcsname}% }% {\@latex@info{The control sequence `\string#1' is already robust}}% }% }% \let\@kernel@rename@newcommand\@undefined \EndIncludeInRelease \IncludeInRelease{2015/01/01}{\MakeRobust}{\MakeRobust}% \def\MakeRobust#1{% \@ifundefined{\expandafter\@gobble\string#1}{% \@latex@error{The control sequence `\string#1' is undefined!% \MessageBreak There is nothing here to make robust}% \@eha }% {% \@ifundefined{\expandafter\@gobble\string#1\space}% {% \expandafter\let\csname \expandafter\@gobble\string#1\space\endcsname=#1% \edef\reserved@a{\string#1}% \def\reserved@b{#1}% \edef\reserved@b{\expandafter\strip@prefix\meaning\reserved@b}% \edef#1{% \ifx\reserved@a\reserved@b \noexpand\x@protect\noexpand#1% \fi \noexpand\protect\expandafter\noexpand \csname\expandafter\@gobble\string#1\space\endcsname}% }% {\@latex@info{The control sequence `\string#1' is already robust}}% }% }% \let\@kernel@rename@newcommand\@undefined \EndIncludeInRelease \IncludeInRelease{0000/00/00}{\MakeRobust}{\MakeRobust}% \let\MakeRobust\@undefined \let\@kernel@rename@newcommand\@undefined \EndIncludeInRelease \IncludeInRelease{2020/10/01}% {\kernel@make@fragile}{Undo robustness}% \def\kernel@make@fragile#1{% \@ifundefined{\expandafter\@gobble\string#1\space}% {}% {% \global\expandafter\let\expandafter #1\csname \expandafter\@gobble\string#1\space\endcsname \expandafter\@kernel@rename@newcommand \csname\expandafter\@gobble\string#1\expandafter\endcsname \csname\expandafter\@gobble\string#1\space\endcsname \global\expandafter\let\csname \expandafter\@gobble\string#1\space\endcsname\@undefined }% } \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\kernel@make@fragile}{Undo robustness}% \def\kernel@make@fragile#1{% \@ifundefined{\expandafter\@gobble\string#1\space}% {}% {% \global\expandafter\let\expandafter #1\csname \expandafter\@gobble\string#1\space\endcsname \global\expandafter\let\csname \expandafter\@gobble\string#1\space\endcsname\@undefined }% } \EndIncludeInRelease \IncludeInRelease{2020-10-01}{\robust@command@act} {Add \robust@command@act}% \long\def\robust@command@act#1#2#3#4{% \robust@command@chk@safe#2% {\expandafter\robust@command@act@loop \expandafter#2% #1{\@nnil\@nnil}% \robust@command@act@end}% {\robust@command@act@end}% {#3}{#4}}% \long\def\robust@command@act@loop#1#2{\robust@command@act@loop@aux#1#2} \long\def\robust@command@act@loop@aux#1#2#3{% \ifx\@nnil#2% \else #2{#1}% {\robust@command@act@do{#3}}% {\expandafter\robust@command@act@loop\expandafter#1}% \fi} \long\def\robust@command@act@do#1% \fi#2% \robust@command@act@end#3#4{% \fi #1#4} \long\def\robust@command@act@end#1#2{#1#2} \long\def\robust@command@chk@safe#1{% \begingroup \escapechar=`\\ \expandafter\endgroup\expandafter \robust@command@act@chk@args\meaning#1:->\@nil} \def\robust@command@act@chk@args#1:->#2\@nil{% \@expl@str@if@eq@@nnTF{#1}{macro}% {\@firstoftwo}% {\@expl@str@if@eq@@nnTF{#1}{\protected macro}% {\@firstoftwo}% {\@secondoftwo}}} \EndIncludeInRelease \IncludeInRelease{0000-00-00}{\robust@command@act} {Add \robust@command@act}% \let\robust@command@act\@undefined \let\robust@command@act@loop\@undefined \let\robust@command@act@loop@aux\@undefined \let\robust@command@act@do\@undefined \let\robust@command@act@end\@undefined \let\robust@command@chk@safe\@undefined \let\robust@command@act@chk@args\@undefined \EndIncludeInRelease \IncludeInRelease{2020-10-01}{\DeclareCommandCopy} {Add \NewCommandCopy, \RenewCommandCopy, and \DeclareCommandCopy}% \def\NewCommandCopy{% \declare@commandcopy {\@firstofone}% {\@firstoftwo\@notdefinable}} \def\RenewCommandCopy{% \declare@commandcopy {\@latex@error{Command \@backslashchar\reserved@a\space undefined}\@ehc \@firstofone}% {\@firstofone}} \def\DeclareCommandCopy{% \declare@commandcopy {\@firstofone}% {\@firstofone}} \long\def\declare@commandcopy#1#2#3#4{% \edef\reserved@a{\@expl@cs@to@str@@N#3}% \@ifundefined\reserved@a{#1}{#2}% {\declare@commandcopy@do{#3}{#4}}} \long\def\declare@commandcopy@do#1#2{% \robust@command@act \@declarecommandcopylisthook#2% \declare@commandcopy@let{#1#2}} \def\@declarecommandcopylisthook{% {\@if@DeclareRobustCommand \@copy@DeclareRobustCommand}% {\@if@newcommand \@copy@newcommand}} \long\def\declare@commandcopy@let#1#2{\let#1=#2\relax} \EndIncludeInRelease \IncludeInRelease{0000-00-00}{\DeclareCommandCopy} {Undefine \NewCommandCopy, \RenewCommandCopy, and \DeclareCommandCopy}% \let\NewCommandCopy\@undefined \let\RenewCommandCopy\@undefined \let\DeclareCommandCopy\@undefined \let\declare@commandcopy\@undefined \let\@declarecommandcopylisthook\@undefined \let\declare@commandcopy@let\@undefined \EndIncludeInRelease \IncludeInRelease{2023-06-01}{\DeclareEnvironmentCopy} {Add \NewEnvironmentCopy, \RenewEnvironmentCopy, and \DeclareEnvironmentCopy}% \def\NewEnvironmentCopy{% \declare@environmentcopy {\@firstofone}% {\@firstoftwo\@notdefinable}} \def\RenewEnvironmentCopy{% \declare@environmentcopy {\@latex@error{Environment \reserved@a\space undefined}\@ehc \@firstofone}% {\@firstofone}} \def\DeclareEnvironmentCopy{% \declare@environmentcopy {\@firstofone}% {\@firstofone}} \long\def\declare@environmentcopy#1#2#3#4{% \edef\reserved@a{\@ifundefined{#3}{end#3}{#3}}% \@ifundefined\reserved@a {\def\reserved@a{#3}#1}% {\def\reserved@a{#3}#2}% {\ExpandArgs{cc}\declare@commandcopy@do{#3}{#4}% \ExpandArgs{cc}\declare@commandcopy@do{end#3}{end#4}}} \EndIncludeInRelease \IncludeInRelease{0000-00-00}{\DeclareEnvironmentCopy} {Undefine \NewEnvironmentCopy, \RenewEnvironmentCopy, and \DeclareEnvironmentCopy}% \let\NewEnvironmentCopy\@undefined \let\RenewEnvironmentCopy\@undefined \let\DeclareEnvironmentCopy\@undefined \EndIncludeInRelease \IncludeInRelease{2020-10-01}{\ShowCommand}% {Add \ShowCommand}% \long\def\ShowCommand#1{% \robust@command@act \@showcommandlisthook#1% \show#1} \def\@showcommandlisthook{% {\@if@DeclareRobustCommand \@show@DeclareRobustCommand}% {\@if@newcommand \@show@newcommand}} \EndIncludeInRelease \IncludeInRelease{0000-00-00}{\ShowCommand} {Undefine \ShowCommand}% \let\ShowCommand\@undefined \let\@showcommandlisthook\@undefined \EndIncludeInRelease \IncludeInRelease{2020-10-01}{\@if@DeclareRobustCommand} {Add \@if@DeclareRobustCommand, \@if@newcommand, \@copy@DeclareRobustCommand, \@copy@newcommand, \@show@DeclareRobustCommand, \@show@newcommand}% \long\def\@if@DeclareRobustCommand#1{% \begingroup \escapechar=`\\ \edef\reserved@a{\string#1}% \edef\reserved@b{\detokenize{#1}}% \xdef\@gtempa{% \ifx\reserved@a\reserved@b \noexpand\x@protect \noexpand#1% \fi \noexpand\protect \expandafter\noexpand\csname\@expl@cs@to@str@@N#1 \endcsname}% \endgroup \ifx\@gtempa#1\relax \expandafter\@firstoftwo \else \expandafter\@secondoftwo \fi} \long\def\@copy@DeclareRobustCommand#1#2{% \begingroup \escapechar=`\\ \edef\reserved@a{\string#1}% \edef\reserved@b{\detokenize{#1}}% \edef\reserved@a{% \endgroup \def\noexpand#1{% \ifx\reserved@a\reserved@b \noexpand\x@protect \noexpand#1% \fi \noexpand\protect \expandafter\noexpand\csname\@expl@cs@to@str@@N#1 \endcsname}% \noexpand\copy@kernel@robust@command \expandafter\noexpand\csname\@expl@cs@to@str@@N#1 \endcsname \expandafter\noexpand\csname\@expl@cs@to@str@@N#2 \endcsname}% \reserved@a} \long\def\copy@kernel@robust@command#1#2{% \robust@command@chk@safe#2% {\@if@newcommand#2% {\@copy@newcommand}% {\declare@commandcopy@let}} {\declare@commandcopy@let}% #1#2} \long\def\@show@DeclareRobustCommand#1{% \typeout{> \string#1=robust macro:}% \typeout{->\@expl@cs@replacement@spec@@N#1.^^J}% \expandafter\show@kernel@robust@command \csname\@expl@cs@to@str@@N#1 \endcsname} \long\def\show@kernel@robust@command#1{% \robust@command@chk@safe#1% {\@if@newcommand#1% {\@show@newcommand}% {\@show@macro}}% {\@show@macro}% #1} \let\@show@macro\show \long\def\@if@newcommand#1{% \edef\reserved@a{% \noexpand\@protected@testopt \noexpand#1% \expandafter\noexpand\csname\@backslashchar\@expl@cs@to@str@@N#1\endcsname}% \edef\reserved@b{% \unexpanded\expandafter\expandafter\expandafter {\expandafter\@carcube#1{}{}{}\@nil}}% \ifx\reserved@a\reserved@b \expandafter\@firstoftwo \else \expandafter\@secondoftwo \fi} \long\def\@copy@newcommand#1#2{% \edef#1{\noexpand\@protected@testopt \noexpand#1% \expandafter\noexpand\csname\@backslashchar\@expl@cs@to@str@@N#1\endcsname \unexpanded\expandafter\expandafter\expandafter {\expandafter\@gobblethree#2}}% \expandafter \let\csname\@backslashchar\@expl@cs@to@str@@N#1\expandafter\endcsname \csname\@backslashchar\@expl@cs@to@str@@N#2\endcsname} \long\def\@show@newcommand#1{% \typeout{> \string#1=robust macro:}% \typeout{->\@expl@cs@replacement@spec@@N#1.^^J}% \expandafter\@show@newcommand@aux \csname\@backslashchar\@expl@cs@to@str@@N#1\expandafter\endcsname \expandafter{#1}\@show@tokens} \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@parameter@spec@@N#1->\@expl@cs@replacement@spec@@N#1}} \long\def\@show@tokens#1{% \edef\reserved@a{#1}% \showtokens\expandafter \expandafter\expandafter{\expandafter\reserved@a}} \EndIncludeInRelease \IncludeInRelease{0000-00-00}{\@if@DeclareRobustCommand} {Undefine \@if@DeclareRobustCommand, \@if@newcommand, \@copy@DeclareRobustCommand, \@copy@newcommand, \@show@DeclareRobustCommand, \@show@newcommand}% \let\@if@DeclareRobustCommand\@undefined \let\@copy@DeclareRobustCommand\@undefined \let\@show@DeclareRobustCommand\@undefined \let\@if@newcommand\@undefined \let\@copy@newcommand\@undefined \let\@show@newcommand\@undefined \let\copy@kernel@robust@command\@undefined \let\show@kernel@robust@command\@undefined \let\@show@newcommand@aux\@undefined \EndIncludeInRelease \IncludeInRelease{2023-06-01}{\ShowEnvironment} {Add \ShowEnvironment}% \def\ShowEnvironment#1{% \expandafter\@show@environment\csname #1\endcsname} \long\def\@show@environment#1{% \robust@command@act \@showenvironmentlisthook#1% \@show@normalenv#1} \def\@showenvironmentlisthook{% {\@if@DeclareRobustCommand \@show@DeclareRobustCommand@env}% {\@if@newcommand \@show@newcommand@env}} \long\def\@show@newcommand@env#1{% \@show@environment@begin#1% \expandafter\@show@newcommand@aux \csname\@backslashchar\@expl@cs@to@str@@N#1\expandafter\endcsname \expandafter{#1}\@show@typeout \@show@environment@end#1} \long\def\@show@DeclareRobustCommand@env#1{% \@show@environment@begin#1% \begingroup \let\@show@tokens\@show@typeout \let\@show@macro\@show@nonstop \expandafter\show@kernel@robust@command \csname\@expl@cs@to@str@@N#1 \endcsname \endgroup \@show@environment@end#1} \long\def\@show@environment@begin#1{% \typeout{> \string\begin{\@expl@cs@to@str@@N#1}=environment:}% \typeout{\@expl@cs@parameter@spec@@N#1->% \@expl@cs@replacement@spec@@N#1.^^J}} \long\def\@show@normalenv#1{% \@show@environment@begin#1% \@show@environment@end#1} \long\def\@show@environment@end#1{% \expandafter\@show@environment@end@aux \csname end\@expl@cs@to@str@@N#1\endcsname#1} \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@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@parameter@spec@@N#1->\@expl@cs@replacement@spec@@N#1.}} \def\@show@typeout#1{\typeout{> #1.^^J}} \EndIncludeInRelease \IncludeInRelease{0000-00-00}{\ShowEnvironment} {Undefine \ShowEnvironment}% \let\ShowEnvironment\@undefined \EndIncludeInRelease \IncludeInRelease{2018-04-01}{\@ifundefined} {Leave commands undefined in \@ifundefined}% \def\@ifundefined#1{% \ifcsname#1\endcsname\@ifundefin@d@i\else\@ifundefin@d@ii\fi{#1}} \long\def\@ifundefin@d@i#1\fi#2{\fi \expandafter\ifx\csname #2\endcsname\relax \@ifundefin@d@ii \fi \@secondoftwo} \long\def\@ifundefin@d@ii\fi#1#2#3{\fi #2} \ifx\numexpr\@undefined \def\@ifundefined#1{% \expandafter\ifx\csname#1\endcsname\relax \expandafter\@firstoftwo \else \expandafter\@secondoftwo \fi} \else\ifx\directlua\@undefined \else \def\@ifundefined#1{% \ifcsname#1\endcsname \expandafter\ifx\lastnamedcs\relax\else\@ifundefin@d@i\fi \fi \@firstoftwo} \long\def\@ifundefin@d@i#1#2#3#4#5{#1#2#5} \fi \fi \EndIncludeInRelease \IncludeInRelease{0000-00-00}{\@ifundefined} {Leave commands undefined in \@ifundefined}% \def\@ifundefined#1{% \expandafter\ifx\csname#1\endcsname\relax \expandafter\@firstoftwo \else \expandafter\@secondoftwo \fi} \EndIncludeInRelease \IncludeInRelease{2020/10/01}{\string@makeletter} {Add \string@makeletter}% \def\string@makeletter#1{% \@expl@str@map@function@@NN#1\@string@makeletter} \def\@string@makeletter#1{% \char@if@alph{#1}% {\@expl@char@generate@@nn{`#1}{11}}% {#1}} \def\char@if@alph#1{% \ifnum0\ifnum`#1<`A 1\fi\ifnum`#1>`z 1\fi \if\ifnum`#1>`Z @\fi\ifnum`#1<`a @\fi01\fi>0 \expandafter\@secondoftwo \else \expandafter\@firstoftwo \fi} \EndIncludeInRelease \IncludeInRelease{0000/00/00}{\string@makeletter} {Undefine \string@makeletter}% \let\string@makeletter\@undefined \let\@string@makeletter\@undefined \let\char@if@alph\@undefined \EndIncludeInRelease \IncludeInRelease{2020/10/01}{\-}{Use primitive \- in Lua\LaTeX}% \ifx\directlua\@undefined \DeclareRobustCommand{\-}{% \discretionary{% \char \ifnum\hyphenchar\font<\z@ \defaulthyphenchar \else \hyphenchar\font \fi }{}{}% } \else \let\-\@@hyph \fi \EndIncludeInRelease \IncludeInRelease{2017/04/15}{\-}{Use \hyphenchar in \-}% \DeclareRobustCommand{\-}{% \discretionary{% \char \ifnum\hyphenchar\font<\z@ \defaulthyphenchar \else \hyphenchar\font \fi }{}{}% } \EndIncludeInRelease \IncludeInRelease{0000/00/00}{\-}{Use \hyphenchar in \-}% \def\-{\discretionary{-}{}{}} \EndIncludeInRelease \let\@dischyph=\- \IncludeInRelease{2019/10/01}% {\allowbreak}{Make various commands robust}% \MakeRobust\allowbreak \MakeRobust\bigbreak \MakeRobust\break \MakeRobust\dotfill \MakeRobust\frenchspacing \MakeRobust\goodbreak \MakeRobust\hrulefill \MakeRobust\medbreak \MakeRobust\nobreak \MakeRobust\nonfrenchspacing \MakeRobust\obeylines \MakeRobust\obeyspaces \MakeRobust\slash \MakeRobust\smallbreak \MakeRobust\strut \MakeRobust\underbar \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\allowbreak}{Make various commands robust}% \kernel@make@fragile\allowbreak \kernel@make@fragile\bigbreak \kernel@make@fragile\break \kernel@make@fragile\dotfill \kernel@make@fragile\frenchspacing \kernel@make@fragile\goodbreak \kernel@make@fragile\hrulefill \kernel@make@fragile\medbreak \kernel@make@fragile\nobreak \kernel@make@fragile\nonfrenchspacing \kernel@make@fragile\obeylines \kernel@make@fragile\obeyspaces \kernel@make@fragile\slash \kernel@make@fragile\smallbreak \kernel@make@fragile\strut \kernel@make@fragile\underbar \EndIncludeInRelease %%% From File: ltcmd.dtx \def\ltcmdversion{v1.2f} \def\ltcmddate{2024-07-06} \edef\@latexrelease@catcode@null{\the\catcode`\^^@ } \catcode`\^^@=12 \ExplSyntaxOn \NewModuleRelease{2020/10/01}{ltcmd} {Document~command~parser}% \tl_new:N \l__cmd_arg_spec_tl \tl_new:N \l__cmd_args_tl \tl_new:N \l__cmd_args_i_tl \tl_new:N \l__cmd_args_ii_tl \int_new:N \l__cmd_current_arg_int \bool_new:N \l__cmd_defaults_bool \tl_new:N \l__cmd_defaults_tl \bool_new:N \l__cmd_environment_bool \str_new:N \l__cmd_environment_str \bool_new:N \l__cmd_expandable_bool \tl_new:N \l__cmd_expandable_aux_name_tl \tl_set:Nn \l__cmd_expandable_aux_name_tl { \l__cmd_function_tl \c_space_tl ( arg~ \int_use:N \l__cmd_current_arg_int ) } \int_new:N \g__cmd_grabber_int \tl_new:N \l__cmd_fn_tl \tl_new:N \l__cmd_fn_code_tl \tl_new:N \l__cmd_function_tl \bool_new:N \l__cmd_grab_expandably_bool \bool_new:N \l__cmd_obey_spaces_bool \tl_new:N \l__cmd_last_delimiters_tl \bool_new:N \l__cmd_long_bool \bool_new:N \l__cmd_suppress_strip_bool \int_new:N \l__cmd_m_args_int \bool_new:N \l__cmd_prefixed_bool \tl_new:N \l__cmd_process_all_tl \tl_new:N \l__cmd_process_one_tl \bool_new:N \l__cmd_process_some_bool \tl_new:N \l__cmd_saved_args_tl \tl_new:N \l__cmd_signature_tl \bool_new:N \l__cmd_some_obey_spaces_bool \bool_new:N \l__cmd_some_long_bool \bool_new:N \l__cmd_some_short_bool \quark_new:N \q__cmd_recursion_tail \quark_new:N \q__cmd_recursion_stop \__kernel_quark_new_test:N \__cmd_if_recursion_tail_stop_do:Nn \prop_new:N \l__cmd_tmp_prop \tl_new:N \l__cmd_tmpa_tl \tl_new:N \l__cmd_tmpb_tl \cs_new_eq:NN \__cmd_tmp:w ? \msg_redirect_module:nnn { cmd } { info } { none } \prop_gput:Nnn \g_msg_module_type_prop { cmd } { LaTeX } \cs_new_protected:Npn \__cmd_declare_cmd:Nnn { \bool_set_false:N \l__cmd_expandable_bool \__cmd_declare_cmd_aux:Nnn } \cs_new_protected:Npn \__cmd_declare_expandable_cmd:Nnn { \bool_set_true:N \l__cmd_expandable_bool \__cmd_declare_cmd_aux:Nnn } \cs_new_protected:Npn \__cmd_declare_cmd_aux:Nnn #1#2#3 { \cs_if_exist:NTF #1 { \msg_info:nnxx { cmd } { redefine } { \token_to_str:N #1 } { \tl_to_str:n {#2} } } { \bool_lazy_or:nnT { \cs_if_exist_p:c { \cs_to_str:N #1 ~ code } } { \cs_if_exist_p:c { \cs_to_str:N #1 ~ defaults } } { \msg_warning:nnx { cmd } { unsupported-let } { \token_to_str:N #1 } } \msg_info:nnxx { cmd } { define-command } { \token_to_str:N #1 } { \tl_to_str:n {#2} } } \bool_set_false:N \l__cmd_environment_bool \__cmd_declare_cmd_internal:Nnnn #1 {#2} {#3} { } } \cs_new_protected:Npn \__cmd_declare_cmd_internal:Nnnn #1#2#3#4 { \tl_set:Nx \l__cmd_function_tl { \cs_to_str:N #1 } \__cmd_normalize_arg_spec:n {#2} \exp_args:No \__cmd_prepare_signature:n \l__cmd_arg_spec_tl \__cmd_declare_cmd_code:Nnn #1 {#2} {#3} #4 \__cmd_break_point:n {#2} } \cs_new_eq:NN \__cmd_break_point:n \use_none:n \cs_new:Npn \__cmd_all_m_check:n #1 { \tl_map_function:nN {#1} \__cmd_all_m_check_aux:n } \cs_new:Npn \__cmd_all_m_check_aux:n #1 { \str_if_eq:nnF {#1} { m } { \str_if_eq:nnF {#1} { + } { X } } } \cs_new_protected:Npn \__cmd_declare_cmd_code:Nnn #1#2 { \bool_lazy_any:nTF { { \l__cmd_environment_bool } { \bool_lazy_and_p:nn { \l__cmd_some_short_bool } { \l__cmd_some_long_bool } } { ! \tl_if_blank_p:e { \__cmd_all_m_check:n {#2} } } } { \tl_set:Nx \l__cmd_fn_tl { \exp_not:c { \l__cmd_function_tl \c_space_tl } } \bool_if:NTF \l__cmd_grab_expandably_bool { \__cmd_declare_cmd_code_expandable:Nnn } { \__cmd_declare_cmd_code_aux:Nnn } } { \__cmd_declare_cmd_optimized:Nnn } #1 {#2} } \cs_new_protected:Npn \__cmd_declare_cmd_optimized:Nnn #1#2#3 { \bool_if:NTF \l__cmd_expandable_bool { \cs_set_nopar:Npe } { \cs_set_protected_nopar:Npe } #1 { \exp_not:N \__cmd_start_optimized: \exp_not:c { \l__cmd_function_tl \c_space_tl code } } \exp_args:Ncc \cs_generate_from_arg_count:NNnn { \l__cmd_function_tl \c_space_tl code } { cs_set \bool_if:NF \l__cmd_expandable_bool { _protected } \bool_if:NF \l__cmd_some_long_bool { _nopar } :Npn } \l__cmd_current_arg_int {#3} } \cs_new:Npn \__cmd_start_optimized: { } \cs_new_protected:Npn \__cmd_declare_cmd_code_aux:Nnn #1#2#3 { \cs_generate_from_arg_count:cNnn { \l__cmd_function_tl \c_space_tl code } \cs_set_protected:Npn \l__cmd_current_arg_int {#3} \cs_set_protected_nopar:Npx #1 { \bool_if:NTF \l__cmd_environment_bool { \__cmd_start_env:nnnnn { \exp_not:n {#2} } { \l__cmd_environment_str } } { \__cmd_start:nNNnnn { \exp_not:n {#2} } \exp_not:c { \l__cmd_function_tl \c_space_tl } \exp_not:c { \l__cmd_function_tl \c_space_tl code } } { \exp_not:o \l__cmd_signature_tl } { \bool_if:NT \l__cmd_defaults_bool { \exp_not:o \l__cmd_defaults_tl } } { \bool_if:NT \l__cmd_process_some_bool { \exp_not:o \l__cmd_process_all_tl } } } } \cs_new_protected:Npn \__cmd_declare_cmd_code_expandable:Nnn #1#2#3 { \exp_args:Ncc \cs_generate_from_arg_count:NNnn { \l__cmd_function_tl \c_space_tl code } { cs_set \bool_if:NF \l__cmd_expandable_bool { _protected } :Npn } \l__cmd_current_arg_int {#3} \bool_if:NT \l__cmd_defaults_bool { \use:x { \cs_generate_from_arg_count:cNnn { \l__cmd_function_tl \c_space_tl defaults } \cs_set:Npn \l__cmd_current_arg_int { \exp_not:o \l__cmd_defaults_tl } } } \bool_if:NTF \l__cmd_expandable_bool { \cs_set_nopar:Npx } { \cs_set_protected_nopar:Npx } #1 { \exp_not:N \__cmd_start_expandable:nNNNNn { \exp_not:n {#2} } \exp_not:c { \l__cmd_function_tl \c_space_tl } \exp_not:c { \l__cmd_function_tl \c_space_tl \bool_if:NT \l__cmd_some_short_bool { \bool_if:NT \l__cmd_some_long_bool { \c_space_tl } } } \exp_not:c { \l__cmd_function_tl \c_space_tl code } \bool_if:NTF \l__cmd_defaults_bool { \exp_not:c { \l__cmd_function_tl \c_space_tl defaults } } { ? } { \exp_not:o \l__cmd_signature_tl } } \bool_if:NTF \l__cmd_some_long_bool { \bool_if:NT \l__cmd_some_short_bool { \cs_set_nopar:cpx { \l__cmd_function_tl \c_space_tl \c_space_tl } ##1##2 { ##1 {##2} } } \cs_set:cpx } { \cs_set_nopar:cpx } { \l__cmd_function_tl \c_space_tl } ##1##2 { ##1 {##2} } } \IncludeInRelease{2024/11/01}{\__cmd_declare_env:nnnn}% {Use~space-trimmed~envname~directly} \cs_new_protected:Npn \__cmd_declare_env:nnnn #1#2 { \str_set:Nn \l__cmd_environment_str {#1} \cs_if_exist:cTF { #1 } { \msg_info:nnnn { cmd } { redefine-env } { #1 } { #2 } } { \msg_info:nnnn { cmd } { define-env } { #1 } { #2 } } \bool_set_false:N \l__cmd_expandable_bool \bool_set_true:N \l__cmd_environment_bool \__cmd_declare_env_internal:nnnn {#1} {#2} } \cs_generate_variant:Nn \__cmd_declare_env:nnnn { e } \EndIncludeInRelease \IncludeInRelease{2024/06/01}{\__cmd_declare_env:nnnn}% {Use~space-trimmed~envname~directly} \cs_new_protected:Npn \__cmd_declare_env:nnnn #1#2 { \str_set:Nx \l__cmd_environment_str {#1} \str_set:Nx \l__cmd_environment_str { \tl_trim_spaces:o { \l__cmd_environment_str } } \cs_if_exist:cTF { \l__cmd_environment_str } { \msg_info:nnxx { cmd } { redefine-env } { \l__cmd_environment_str } { \tl_to_str:n {#2} } } { \msg_info:nnxx { cmd } { define-env } { \l__cmd_environment_str } { \tl_to_str:n {#2} } } \bool_set_false:N \l__cmd_expandable_bool \bool_set_true:N \l__cmd_environment_bool \exp_args:NV \__cmd_declare_env_internal:nnnn \l__cmd_environment_str {#2} } \EndIncludeInRelease \cs_new_protected:Npn \__cmd_declare_env_internal:nnnn #1#2#3#4 { \exp_args:Nc \__cmd_declare_cmd_internal:Nnnn { environment~ #1 } {#2} {#3} { \cs_set_nopar:cpx { environment~ #1 ~end } { \exp_not:c { environment~ #1 ~end~aux } } \cs_generate_from_arg_count:cNnn { environment~ #1 ~end~aux~ } \cs_set:Npn \l__cmd_current_arg_int {#4} \cs_set_eq:cc {#1} { environment~ #1 } \cs_set_eq:cc { end #1 } { environment~ #1 ~end } } } \cs_new_protected:Npn \__cmd_set_environment_end:n #1 { \cs_set_nopar:cpx { environment~ #1 ~end~aux } { \exp_not:c { environment~ #1 ~end~aux~ } \exp_not:o \l__cmd_args_tl } } \cs_new_protected:Npn \__cmd_start_env:nnnnn #1#2 { \conditionally@traceoff \group_align_safe_begin: \str_set:Nn \l__cmd_environment_str {#2} \bool_set_true:N \l__cmd_environment_bool \__cmd_start_aux:ccnnnn { environment~ \l__cmd_environment_str \c_space_tl } { environment~ \l__cmd_environment_str \c_space_tl code } {#1} } \cs_new_protected:Npx \__cmd_start:nNNnnn #1#2#3 { \exp_not:c { xparse~function~is~not~expandable } \exp_not:N \conditionally@traceoff \exp_not:N \group_align_safe_begin: \exp_not:n { \bool_set_false:N \l__cmd_environment_bool } \exp_not:N \__cmd_start_aux:NNnnnn #2 #3 {#1} } \cs_new_protected:Npn \__cmd_start_aux:NNnnnn #1#2#3#4#5#6 { \tl_clear:N \l__cmd_args_tl \tl_set:Nn \l__cmd_fn_tl {#1} \tl_set:Nn \l__cmd_fn_code_tl {#2} \tl_set:Nn \l__cmd_defaults_tl {#5} \tl_set:Nn \l__cmd_process_all_tl {#6} #4 \__cmd_run_code: } \cs_generate_variant:Nn \__cmd_start_aux:NNnnnn { cc } \cs_new_protected:Npn \__cmd_run_code: { \tl_if_empty:NF \l__cmd_defaults_tl { \__cmd_defaults: } \tl_if_empty:NF \l__cmd_process_all_tl { \__cmd_args_process: } \bool_if:NT \l__cmd_environment_bool { \exp_args:No \__cmd_set_environment_end:n \l__cmd_environment_str } \group_align_safe_end: \conditionally@traceon \exp_after:wN \l__cmd_fn_code_tl \l__cmd_args_tl } \cs_new_protected:Npn \__cmd_defaults: { \__cmd_defaults_def: \tl_set_eq:NN \l__cmd_args_i_tl \l__cmd_args_tl \__cmd_defaults_aux: \__cmd_defaults_aux: \__cmd_defaults_aux: \__cmd_defaults_aux: \__cmd_defaults_aux: \__cmd_defaults_aux: \__cmd_defaults_aux: \__cmd_defaults_aux: \__cmd_defaults_aux: \__cmd_defaults_error:w \q_recursion_stop \tl_set_eq:NN \l__cmd_args_tl \l__cmd_args_i_tl } \cs_new_protected:Npn \__cmd_defaults_aux: { \tl_set:Nx \l__cmd_args_ii_tl { \exp_after:wN \__cmd_tmp:w \l__cmd_args_i_tl } \tl_if_eq:NNT \l__cmd_args_ii_tl \l__cmd_args_i_tl { \use_none_delimit_by_q_recursion_stop:w } \tl_set_eq:NN \l__cmd_args_i_tl \l__cmd_args_ii_tl } \cs_new_protected:Npn \__cmd_defaults_error:w \q_recursion_stop { \msg_error:nnx { cmd } { default-loop } { \__cmd_environment_or_command: } } \cs_new_protected:Npn \__cmd_defaults_def: { \tl_clear:N \l__cmd_tmpa_tl \int_zero:N \l__cmd_current_arg_int \__cmd_tl_mapthread_function:NNN \l__cmd_args_tl \l__cmd_defaults_tl \__cmd_defaults_def:nn \cs_generate_from_arg_count:NNno \__cmd_tmp:w \cs_set:Npn \l__cmd_current_arg_int \l__cmd_tmpa_tl } \cs_generate_variant:Nn \cs_generate_from_arg_count:NNnn { NNno } \cs_new_protected:Npn \__cmd_defaults_def:nn { \int_incr:N \l__cmd_current_arg_int \exp_args:NV \__cmd_defaults_def:nnn \l__cmd_current_arg_int } \cs_new_protected:Npn \__cmd_defaults_def:nnn #1#2#3 { \tl_put_right:Nx \l__cmd_tmpa_tl { { \exp_not:N \exp_not:n { \tl_if_novalue:nTF {#2} { \exp_not:o {#3} } { \exp_not:n { ## #1 } } } } } } \cs_new_protected:Npn \__cmd_args_process: { \tl_clear:N \l__cmd_args_ii_tl \__cmd_tl_mapthread_function:NNN \l__cmd_args_tl \l__cmd_process_all_tl \__cmd_args_process_loop:nn \tl_set_eq:NN \l__cmd_args_tl \l__cmd_args_ii_tl } \cs_new_protected:Npn \__cmd_args_process_loop:nn #1#2 { \tl_set:Nn \ProcessedArgument {#1} \tl_if_novalue:nF {#1} { \tl_map_function:nN {#2} \__cmd_args_process_aux:n } \tl_put_right:No \l__cmd_args_ii_tl { \exp_after:wN { \ProcessedArgument } } } \cs_new_protected:Npn \__cmd_args_process_aux:n #1 { \cs_generate_from_arg_count:NNnn \__cmd_tmp:w \cs_set:Npn { \tl_count:N \l__cmd_args_tl } {#1} \exp_args:NNNo \exp_after:wN \__cmd_tmp:w \l__cmd_args_tl { \ProcessedArgument } } \cs_new:Npn \__cmd_start_expandable:nNNNNn #1#2#3#4#5#6 { \group_align_safe_begin: #6 \__cmd_end_expandable:NNw #5 #4 \q__cmd #2#3 } \cs_new:Npn \__cmd_end_expandable:NNw #1#2 { \__cmd_end_expandable_aux:w #1#2 \prg_do_nothing: } \cs_new:Npn \__cmd_end_expandable_aux:w #1#2#3 \q__cmd { \exp_args:No \__cmd_end_expandable_aux:nNNNN {#3} #1 #2 } \cs_new:Npn \__cmd_end_expandable_aux:nNNNN #1#2#3#4#5 { \token_if_eq_charcode:NNT ? #2 { \exp_after:wN \use_iv:nnnn } \__cmd_end_expandable_defaults:nnnNNn {#1} { } {#1} #2#3 { } { } { } { } { } { } { } { } { } { } { \msg_expandable_error:nnf { cmd } { default-loop } { \exp_args:Nf \tl_trim_spaces:n { \token_to_str:N #4 } } \use_iv:nnnn } \q_stop } \cs_new:Npn \__cmd_end_expandable_defaults:nnnNNn #1#2#3#4#5#6 { #6 \str_if_eq:nnTF {#1} {#2} { \use_i_delimit_by_q_stop:nw { \group_align_safe_end: #5 #1 } } { \exp_args:No \__cmd_tl_mapthread_function:nnN { #4 #1 } {#3} \__cmd_end_expandable_defaults:nnw \__cmd_end_expandable_defaults:nnnNNn { } {#1} {#3} #4 #5 } } \cs_new:Npn \__cmd_end_expandable_defaults:nnw #1#2 { \tl_if_novalue:nTF {#2} { \exp_args:No \__cmd_end_expandable_defaults:nw {#1} } { \__cmd_end_expandable_defaults:nw {#2} } } \cs_new:Npn \__cmd_end_expandable_defaults:nw #1#2 \__cmd_end_expandable_defaults:nnnNNn #3 { #2 \__cmd_end_expandable_defaults:nnnNNn { #3 {#1} } } \cs_new_protected:Npn \__cmd_normalize_arg_spec:n #1 { \int_zero:N \l__cmd_current_arg_int \tl_clear:N \l__cmd_last_delimiters_tl \tl_clear:N \l__cmd_arg_spec_tl \bool_set_true:N \l__cmd_grab_expandably_bool \bool_set_false:N \l__cmd_obey_spaces_bool \bool_set_false:N \l__cmd_long_bool \bool_set_false:N \l__cmd_suppress_strip_bool \bool_set_false:N \l__cmd_some_obey_spaces_bool \bool_set_false:N \l__cmd_some_long_bool \bool_set_false:N \l__cmd_some_short_bool \__cmd_normalize_arg_spec_loop:n #1 \q_recursion_tail \q_recursion_tail \q_recursion_tail \q_recursion_stop \int_compare:nNnT \l__cmd_current_arg_int > 9 { \msg_error:nnxx { cmd } { too-many-args } { \__cmd_environment_or_command: } { \tl_to_str:n {#1} } \__cmd_bad_def:wn } \bool_if:NT \l__cmd_expandable_bool { \tl_if_empty:NF \l__cmd_last_delimiters_tl { \msg_error:nnxx { cmd } { expandable-ending-optional } { \iow_char:N \\ \l__cmd_function_tl } { \tl_to_str:n {#1} } \__cmd_bad_def:wn } } \bool_if:NT \l__cmd_expandable_bool { \bool_set_true:N \l__cmd_grab_expandably_bool } \bool_if:NT \l__cmd_environment_bool { \bool_set_false:N \l__cmd_grab_expandably_bool } } \cs_new_protected:Npn \__cmd_normalize_arg_spec_loop:n #1 { \quark_if_recursion_tail_stop:n {#1} \int_incr:N \l__cmd_current_arg_int \cs_if_exist_use:cF { __cmd_normalize_type_ \tl_to_str:n {#1} :w } { \bool_lazy_any:nTF { { \str_if_eq_p:nn {#1} { G } } { \str_if_eq_p:nn {#1} { g } } { \str_if_eq_p:nn {#1} { l } } { \str_if_eq_p:nn {#1} { u } } } { \msg_error:nnxx { cmd } { xparse-arg-type } { \__cmd_environment_or_command: } { \tl_to_str:n {#1} } } { \msg_error:nnxx { cmd } { unknown-argument-type } { \__cmd_environment_or_command: } { \tl_to_str:n {#1} } } \__cmd_bad_def:wn } } \cs_set_protected:Npn \__cmd_tmp:w #1 { \cs_new_protected:Npn \__cmd_normalize_type_d:w ##1##2 { \quark_if_recursion_tail_stop_do:nn {##2} { \__cmd_bad_arg_spec:wn } \__cmd_normalize_type_D:w {##1} {##2} {#1} } \cs_new_protected:Npn \__cmd_normalize_type_e:w ##1 { \quark_if_recursion_tail_stop_do:nn {##1} { \__cmd_bad_arg_spec:wn } \__cmd_normalize_type_E:w {##1} { } } \cs_new_protected:Npn \__cmd_normalize_type_o:w { \__cmd_normalize_type_D:w [ ] {#1} } \cs_new_protected:Npn \__cmd_normalize_type_O:w { \__cmd_normalize_type_D:w [ ] } \cs_new_protected:Npn \__cmd_normalize_type_r:w ##1##2 { \quark_if_recursion_tail_stop_do:nn {##2} { \__cmd_bad_arg_spec:wn } \__cmd_normalize_type_R:w {##1} {##2} {#1} } \cs_new_protected:Npn \__cmd_normalize_type_s:w { \__cmd_normalize_type_t:w * } } \exp_args:No \__cmd_tmp:w { \c_novalue_tl } \cs_new_protected:cpn { __cmd_normalize_type_>:w } #1#2 { \quark_if_recursion_tail_stop_do:nn {#2} { \__cmd_bad_arg_spec:wn } \bool_if:NT \l__cmd_expandable_bool { \msg_error:nnxx { cmd } { processor-in-expandable } { \iow_char:N \\ \l__cmd_function_tl } { \tl_to_str:n {#1} } \__cmd_bad_def:wn } \tl_put_right:Nx \l__cmd_arg_spec_tl { > { \tl_trim_spaces:n {#1} } } \int_decr:N \l__cmd_current_arg_int \bool_set_false:N \l__cmd_grab_expandably_bool \__cmd_normalize_arg_spec_loop:n {#2} } \cs_new_protected:cpn { __cmd_normalize_type_+:w } #1 { \__cmd_normalize_type_aux:NnNn + {#1} \l__cmd_long_bool { \bool_set_true:N \l__cmd_long_bool } } \cs_new_protected:cpn { __cmd_normalize_type_!:w } #1 { \__cmd_normalize_type_aux:NnNn ! {#1} \l__cmd_obey_spaces_bool { \bool_set_true:N \l__cmd_obey_spaces_bool \bool_set_true:N \l__cmd_some_obey_spaces_bool } } \cs_new_protected:cpn { __cmd_normalize_type_=:w } #1#2 { \__cmd_normalize_type_aux:NnNn = {#2} \l__cmd_suppress_strip_bool { \bool_if:NT \l__cmd_expandable_bool { \msg_error:nnxx { cmd } { keyval-in-expandable } { \iow_char:N \\ \l__cmd_function_tl } { \tl_to_str:n {#1} } \__cmd_bad_def:wn } \bool_set_true:N \l__cmd_suppress_strip_bool \bool_set_false:N \l__cmd_grab_expandably_bool \tl_put_right:Nx \l__cmd_arg_spec_tl { = { \tl_trim_spaces:n {#1} } } } } \cs_new_protected:Npn \__cmd_normalize_type_aux:NnNn #1#2#3#4 { \quark_if_recursion_tail_stop_do:nn {#2} { \__cmd_bad_arg_spec:wn } \bool_if:NT #3 { \msg_error:nnxx { cmd } { two-markers } { \__cmd_environment_or_command: } { #1 } \__cmd_bad_def:wn } #4 \int_decr:N \l__cmd_current_arg_int \__cmd_normalize_arg_spec_loop:n {#2} } \cs_new_protected:Npn \__cmd_normalize_type_D:w #1#2#3 { \quark_if_recursion_tail_stop_do:nn {#3} { \__cmd_bad_arg_spec:wn } \__cmd_single_token_check:n {#1} \__cmd_allowed_token_check:N #1 \__cmd_single_token_check:n {#2} \__cmd_add_arg_spec:n { D #1 #2 {#3} } \tl_put_right:Nn \l__cmd_last_delimiters_tl {#1} \bool_set_false:N \l__cmd_grab_expandably_bool \__cmd_normalize_arg_spec_loop:n } \cs_new_protected:Npn \__cmd_normalize_type_E:w #1#2 { \quark_if_recursion_tail_stop_do:nn {#2} { \__cmd_bad_arg_spec:wn } \tl_if_blank:nT {#1} { \__cmd_bad_arg_spec:wn } \tl_map_function:nN {#1} \__cmd_single_token_check:n \tl_map_function:nN {#1} \__cmd_allowed_token_check:N \__cmd_normalize_E_unique_check:w #1 \q_nil \q_stop \int_compare:nNnT { \tl_count:n {#2} } > { \tl_count:n {#1} } { \__cmd_bad_arg_spec:wn } \__cmd_add_arg_spec:n { E {#1} {#2} } \tl_put_right:Nn \l__cmd_last_delimiters_tl {#1} \bool_set_false:N \l__cmd_grab_expandably_bool \int_add:Nn \l__cmd_current_arg_int { \tl_count:n {#1} - 1 } \__cmd_normalize_arg_spec_loop:n } \cs_new_protected:Npn \__cmd_normalize_E_unique_check:w #1#2 \q_stop { \quark_if_nil:NF #1 { \tl_if_in:nnT {#2} {#1} { \__cmd_bad_arg_spec:wn } \__cmd_normalize_E_unique_check:w #2 \q_stop } } \cs_new_protected:Npn \__cmd_normalize_type_t:w #1 { \quark_if_recursion_tail_stop_do:Nn #1 { \__cmd_bad_arg_spec:wn } \__cmd_single_token_check:n {#1} \__cmd_allowed_token_check:N #1 \tl_put_right:Nx \l__cmd_arg_spec_tl { \bool_if:NT \l__cmd_obey_spaces_bool { ! } t \exp_not:n {#1} } \tl_put_right:Nn \l__cmd_last_delimiters_tl {#1} \bool_set_false:N \l__cmd_grab_expandably_bool \bool_set_false:N \l__cmd_obey_spaces_bool \bool_set_false:N \l__cmd_long_bool \__cmd_normalize_arg_spec_loop:n } \cs_new_protected:Npn \__cmd_normalize_type_m:w { \__cmd_delimiter_check:nnn { } { m } { \iow_char:N \{ } \__cmd_add_arg_spec_mandatory:n { m } \__cmd_normalize_arg_spec_loop:n } \cs_new_protected:Npn \__cmd_normalize_type_R:w #1#2#3 { \quark_if_recursion_tail_stop_do:nn {#3} { \__cmd_bad_arg_spec:wn } \__cmd_single_token_check:n {#1} \__cmd_allowed_token_check:N #1 \__cmd_single_token_check:n {#2} \__cmd_delimiter_check:nnn {#1} { R/r } { \tl_to_str:n {#1} } \bool_set_false:N \l__cmd_grab_expandably_bool \__cmd_add_arg_spec_mandatory:n { R #1 #2 {#3} } \__cmd_normalize_arg_spec_loop:n } \cs_new_protected:Npn \__cmd_normalize_type_v:w { \__cmd_normalize_check_gv:N v \__cmd_add_arg_spec_mandatory:n { v } \__cmd_normalize_arg_spec_loop:n } \cs_new_protected:Npn \__cmd_normalize_type_b:w #1 { \bool_if:NF \l__cmd_environment_bool { \msg_error:nnxx { cmd } { invalid-command-arg } { \__cmd_environment_or_command: } { b } \__cmd_bad_def:wn } \tl_clear:N \l__cmd_last_delimiters_tl \__cmd_add_arg_spec:n { b } \quark_if_recursion_tail_stop:n {#1} \msg_error:nnxx { cmd } { arg-after-body } { \__cmd_environment_or_command: } { \tl_to_str:n {#1} } \__cmd_bad_def:wn } \cs_new_protected:Npn \__cmd_single_token_check:n #1 { \tl_trim_spaces_apply:nN {#1} \tl_if_single_token:nF { \msg_error:nnxx { cmd } { not-single-token } { \__cmd_environment_or_command: } { \tl_to_str:n {#1} } \__cmd_bad_def:wn } } \cs_new_protected:Npn \__cmd_allowed_token_check:N #1 { \token_if_eq_meaning:NNTF #1 \c_group_begin_token { \use:n } { \token_if_eq_meaning:NNTF #1 \c_group_end_token { \use:n } { \use_none:n } } { \msg_error:nnxxx { cmd } { forbidden-group-token } { \__cmd_environment_or_command: } { \tl_to_str:n {#1} } { \token_if_eq_meaning:NNTF #1 \c_group_begin_token { begin } { end } } \__cmd_bad_def:wn } } \cs_new_protected:Npn \__cmd_normalize_check_gv:N #1 { \bool_if:NT \l__cmd_expandable_bool { \msg_error:nnxx { cmd } { invalid-expandable-arg } { \iow_char:N \\ \l__cmd_function_tl } { \tl_to_str:n {#1} } \__cmd_bad_def:wn } \bool_set_false:N \l__cmd_grab_expandably_bool } \cs_new_protected:Npn \__cmd_normalize_check_lu:N #1 { \bool_if:NT \l__cmd_expandable_bool { \tl_if_empty:NF \l__cmd_last_delimiters_tl { \msg_error:nnxx { cmd } { invalid-after-optional-expandably } { \iow_char:N \\ \l__cmd_function_tl } { \tl_to_str:n {#1} } \__cmd_bad_def:wn } } } \cs_new_protected:Npn \__cmd_delimiter_check:nnn #1#2#3 { \tl_map_inline:Nn \l__cmd_last_delimiters_tl { \tl_if_eq:nnT {##1} {#1} { \msg_warning:nnxx { cmd } { optional-mandatory } {#2} {#3} } } } \cs_new_protected:Npn \__cmd_bad_arg_spec:wn #1 \__cmd_break_point:n #2 { \msg_error:nnxx { cmd } { bad-arg-spec } { \__cmd_environment_or_command: } { \tl_to_str:n {#2} } } \cs_new_protected:Npn \__cmd_bad_def:wn #1 \__cmd_break_point:n #2 { } \cs_new_protected:Npn \__cmd_add_arg_spec:n #1 { \bool_lazy_and:nnT { ! \l__cmd_long_bool } { \l__cmd_some_long_bool } { \bool_if:NT \l__cmd_expandable_bool { \msg_error:nnx { cmd } { long-short-mix } { \iow_char:N \\ \l__cmd_function_tl } \__cmd_bad_def:wn } \bool_set_false:N \l__cmd_grab_expandably_bool } \bool_if:NTF \l__cmd_long_bool { \bool_set_true:N \l__cmd_some_long_bool } { \bool_set_true:N \l__cmd_some_short_bool } \tl_put_right:Nx \l__cmd_arg_spec_tl { \bool_if:NT \l__cmd_long_bool { + } \bool_if:NT \l__cmd_obey_spaces_bool { ! } \exp_not:n {#1} } \bool_set_false:N \l__cmd_long_bool \bool_set_false:N \l__cmd_obey_spaces_bool } \cs_new_protected:Npn \__cmd_add_arg_spec_mandatory:n #1 { \bool_if:NT \l__cmd_some_obey_spaces_bool { \msg_error:nnxx { cmd } { invalid-bang } { \__cmd_environment_or_command: } { \bool_if:NTF \l__cmd_obey_spaces_bool { \tl_to_str:n {'#1'} } { an~optional~argument~before~mandatory~ \tl_to_str:n {'#1'} } } \__cmd_bad_def:wn } \tl_clear:N \l__cmd_last_delimiters_tl \__cmd_add_arg_spec:n {#1} } \cs_new_protected:Npn \__cmd_prepare_signature:n #1 { \int_zero:N \l__cmd_current_arg_int \bool_set_false:N \l__cmd_long_bool \bool_set_false:N \l__cmd_obey_spaces_bool \bool_set_false:N \l__cmd_suppress_strip_bool \int_zero:N \l__cmd_m_args_int \bool_set_false:N \l__cmd_defaults_bool \tl_clear:N \l__cmd_defaults_tl \tl_clear:N \l__cmd_process_all_tl \tl_clear:N \l__cmd_process_one_tl \bool_set_false:N \l__cmd_process_some_bool \tl_clear:N \l__cmd_signature_tl \__cmd_prepare_signature:N #1 \q_recursion_tail \q_recursion_stop \bool_if:NF \l__cmd_expandable_bool { \__cmd_flush_m_args: } } \cs_new_protected:Npn \__cmd_prepare_signature:N { \bool_set_false:N \l__cmd_prefixed_bool \__cmd_prepare_signature_bypass:N } \cs_new_protected:Npn \__cmd_prepare_signature_bypass:N #1 { \quark_if_recursion_tail_stop:N #1 \use:c { __cmd_add \bool_if:NT \l__cmd_grab_expandably_bool { _expandable } _type_ \token_to_str:N #1 :w } } \cs_new_protected:cpn { __cmd_add_type_+:w } { \__cmd_flush_m_args: \bool_set_true:N \l__cmd_long_bool \bool_set_true:N \l__cmd_prefixed_bool \__cmd_prepare_signature_bypass:N } \cs_new_protected:cpn { __cmd_add_type_!:w } { \__cmd_flush_m_args: \bool_set_true:N \l__cmd_obey_spaces_bool \bool_set_true:N \l__cmd_prefixed_bool \__cmd_prepare_signature_bypass:N } \cs_new_protected:cpn { __cmd_add_type_>:w } #1 { \__cmd_flush_m_args: \bool_set_true:N \l__cmd_prefixed_bool \bool_set_true:N \l__cmd_process_some_bool \tl_put_left:Nn \l__cmd_process_one_tl { {#1} } \__cmd_prepare_signature_bypass:N } \cs_new_protected:cpn { __cmd_add_type_=:w } #1 { \__cmd_flush_m_args: \bool_set_true:N \l__cmd_prefixed_bool \bool_set_true:N \l__cmd_suppress_strip_bool \bool_set_true:N \l__cmd_process_some_bool \tl_put_left:Nn \l__cmd_process_one_tl { { \__cmd_arg_to_keyvalue:nn {#1} } } \__cmd_prepare_signature_bypass:N } \cs_new_protected:Npn \__cmd_add_type_b:w { \__cmd_flush_m_args: \__cmd_add_default: \__cmd_add_grabber:N b \__cmd_prepare_signature:N } \cs_new_protected:Npn \__cmd_add_type_D:w #1#2#3 { \__cmd_flush_m_args: \__cmd_add_default:n {#3} \__cmd_add_grabber:N D \tl_put_right:Nn \l__cmd_signature_tl { #1 #2 } \__cmd_prepare_signature:N } \cs_new_protected:Npn \__cmd_add_type_E:w #1#2 { \__cmd_flush_m_args: \__cmd_add_default_E:nn {#1} {#2} \use:x { \__cmd_replicate_processor:nn { \tl_count:n {#1} } { \exp_not:o \l__cmd_process_one_tl } } \__cmd_add_grabber:N E \tl_put_right:Nn \l__cmd_signature_tl { {#1} } \__cmd_prepare_signature:N } \cs_new_protected:Npn \__cmd_replicate_processor:nn #1 #2 { \int_compare:nNnF {#1} > { 1 } { \use_none:nnn } \tl_set:Nx \l__cmd_process_one_tl { \exp_not:n { \exp_not:n {#2} \if_false: { \fi: } } \prg_replicate:nn { #1 - 2 } { \exp_not:n { \exp_not:n { {#2} } } } \exp_not:n { { \if_false: } \fi: \exp_not:n {#2} } } } \cs_new_protected:Npn \__cmd_add_type_m:w { \__cmd_add_default: \bool_if:NTF \l__cmd_prefixed_bool { \__cmd_add_grabber:N m } { \int_incr:N \l__cmd_m_args_int } \__cmd_prepare_signature:N } \cs_new_protected:Npn \__cmd_add_type_R:w #1#2#3 { \__cmd_flush_m_args: \__cmd_add_default:n {#3} \__cmd_add_grabber:N R \tl_put_right:Nn \l__cmd_signature_tl { #1 #2 } \__cmd_prepare_signature:N } \cs_new_protected:Npn \__cmd_add_type_t:w #1 { \__cmd_flush_m_args: \__cmd_add_default: \__cmd_add_grabber:N t \tl_put_right:Nn \l__cmd_signature_tl {#1} \__cmd_prepare_signature:N } \cs_new_protected:Npn \__cmd_add_type_v:w { \__cmd_flush_m_args: \exp_args:No \__cmd_add_default:n \c_novalue_tl \__cmd_add_grabber:N v \__cmd_prepare_signature:N } \cs_new_protected:Npn \__cmd_flush_m_args: { \int_compare:nNnT \l__cmd_m_args_int > 0 { \tl_put_right:Nx \l__cmd_signature_tl { \exp_not:c { __cmd_grab_m_ \int_use:N \l__cmd_m_args_int :w } } \tl_put_right:Nx \l__cmd_process_all_tl { \prg_replicate:nn { \l__cmd_m_args_int } { { } } } } \int_zero:N \l__cmd_m_args_int } \cs_new_protected:Npn \__cmd_add_grabber:N #1 { \tl_put_right:Nx \l__cmd_signature_tl { \exp_not:c { __cmd_grab_ #1 \bool_if:NT \l__cmd_long_bool { _long } \bool_if:NT \l__cmd_obey_spaces_bool { _obey_spaces } \bool_lazy_and:nnT { \l__cmd_suppress_strip_bool } { \str_if_eq_p:nn {#1} { D } } { _no_strip } :w } } \bool_set_false:N \l__cmd_long_bool \bool_set_false:N \l__cmd_obey_spaces_bool \bool_set_false:N \l__cmd_suppress_strip_bool \tl_put_right:Nx \l__cmd_process_all_tl { { \if_charcode:w E #1 \use_i:nn \fi: \exp_not:o \l__cmd_process_one_tl } } \tl_clear:N \l__cmd_process_one_tl } \cs_new_protected:Npn \__cmd_add_default:n #1 { \tl_if_novalue:nTF {#1} { \__cmd_add_default: } { \int_incr:N \l__cmd_current_arg_int \bool_set_true:N \l__cmd_defaults_bool \tl_put_right:Nn \l__cmd_defaults_tl { { \prg_do_nothing: #1 } } } } \cs_new_protected:Npn \__cmd_add_default: { \int_incr:N \l__cmd_current_arg_int \tl_put_right:Nn \l__cmd_defaults_tl { \c_novalue_tl } } \cs_new_protected:Npn \__cmd_add_default_E:nn #1#2 { \tl_map_function:nN {#2} \__cmd_add_default:n \prg_replicate:nn { \tl_count:n {#1} - \tl_count:n {#2} } { \__cmd_add_default: } } \cs_new_protected:cpn { __cmd_add_expandable_type_+:w } { \bool_set_true:N \l__cmd_long_bool \__cmd_prepare_signature:N } \cs_new_protected:Npn \__cmd_add_expandable_type_D:w { \__cmd_add_expandable_type_D_aux:NNNn D } \cs_new_protected:Npn \__cmd_add_expandable_type_D_aux:NNNn #1#2#3#4 { \__cmd_add_default:n {#4} \tl_if_eq:nnTF {#2} {#3} { \__cmd_add_expandable_type_D_aux:NN #1 #2 } { \__cmd_add_expandable_type_D_aux:NNN #1 #2 #3 } \__cmd_prepare_signature:N } \cs_new_protected:Npn \__cmd_add_expandable_type_D_aux:NNN #1#2#3 { \bool_if:NTF \l__cmd_long_bool { \cs_set:cpx } { \cs_set_nopar:cpx } { \l__cmd_expandable_aux_name_tl } ##1 ##2 #2 ##3 \q__cmd ##4 #3 { ##1 {##2} {##3} {##4} } \__cmd_add_expandable_grabber:nn {#1} { \exp_not:c { \l__cmd_expandable_aux_name_tl } \exp_not:n { #2 #3 } } } \cs_new_protected:Npn \__cmd_add_expandable_type_D_aux:NN #1#2 { \bool_if:NTF \l__cmd_long_bool { \cs_set:cpx } { \cs_set_nopar:cpx } { \l__cmd_expandable_aux_name_tl } ##1 #2 ##2 #2 { ##1 {##2} } \__cmd_add_expandable_grabber:nn { #1_alt } { \exp_not:c { \l__cmd_expandable_aux_name_tl } \exp_not:n {#2} } } \cs_new_protected:Npn \__cmd_add_expandable_type_E:w #1#2 { \__cmd_add_default_E:nn {#1} {#2} \tl_clear:N \l__cmd_tmpb_tl \tl_map_function:nN {#1} \__cmd_add_expandable_type_E_aux:n \__cmd_add_expandable_grabber:nn { E \bool_if:NT \l__cmd_long_bool { _long } } { { \exp_not:o \l__cmd_tmpb_tl } { \prg_replicate:nn { \tl_count:n {#1} } { { \c_novalue_tl } } } } \__cmd_prepare_signature:N } \cs_new_protected:Npn \__cmd_add_expandable_type_E_aux:n #1 { \__cmd_get_grabber:NN #1 \l__cmd_tmpa_tl \tl_put_right:Nx \l__cmd_tmpb_tl { \exp_not:o \l__cmd_tmpa_tl \exp_not:N #1 } } \cs_new_protected:Npn \__cmd_add_expandable_type_m:w { \__cmd_add_default: \__cmd_add_expandable_grabber:nn { m \bool_if:NT \l__cmd_long_bool { _long } } { } \__cmd_prepare_signature:N } \cs_new_protected:Npn \__cmd_add_expandable_type_R:w { \__cmd_add_expandable_type_D_aux:NNNn R } \cs_new_protected:Npn \__cmd_add_expandable_type_t:w #1 { \__cmd_add_default: \__cmd_get_grabber:NN #1 \l__cmd_tmpa_tl \__cmd_add_expandable_grabber:nn { t } { \exp_not:o \l__cmd_tmpa_tl \exp_not:N #1 } \__cmd_prepare_signature:N } \cs_new_protected:Npn \__cmd_add_expandable_grabber:nn #1#2 { \tl_put_right:Nx \l__cmd_signature_tl { \exp_not:c { __cmd_expandable_grab_ #1 :w } #2 } } \cs_new_protected:Npn \__cmd_get_grabber:NN #1#2 { \cs_set:Npn \__cmd_tmp:w ##1 #1 {##1} \exp_args:Nc \__cmd_get_grabber_auxi:NN { __cmd_grabber_ \token_to_str:N #1 :w } #2 } \cs_new_protected:Npn \__cmd_get_grabber_auxi:NN #1#2 { \cs_if_eq:NNTF \__cmd_tmp:w #1 { \tl_set:Nn #2 {#1} } { \cs_if_exist:NTF #1 { \int_gincr:N \g__cmd_grabber_int \exp_args:Nc \__cmd_get_grabber_auxi:NN { __cmd_grabber_ - \int_use:N \g__cmd_grabber_int :w } #2 } { \__cmd_get_grabber_auxii:NN #1 #2 } } } \cs_new_protected:Npn \__cmd_get_grabber_auxii:NN #1#2 { \cs_set_eq:NN #1 \__cmd_tmp:w \tl_set:Nn #2 {#1} } \IncludeInRelease{2021/11/15}{\__cmd_copy:NN}% {Support~\NewCommandCopy~in~ltcmd} \cs_new_protected:Npn \__cmd_copy:NN #1 #2 { \use:x { \int_set:Nn \tex_escapechar:D { 92 } \exp_not:N \__cmd_cmd_type_cases:NnnnnnF \exp_not:N #2 { \__cmd_copy_command:nnNN } { \__cmd_copy_expandable:nnNN } { \__cmd_copy_optimized:nnNN } { \__cmd_copy_environment:nnNN } { \__cmd_copy_environment_end:nnNN } { \__cmd_cant_copy:nwn { non-ltcmd } } { \cs_to_str:N #1 } { \cs_to_str:N #2 } \exp_not:N #1 \exp_not:N #2 \exp_not:N \__cmd_break_point:n { \cs_to_str:N #2 } \int_set:Nn \tex_escapechar:D { \int_use:N \tex_escapechar:D } } } \cs_new_protected:Npn \__cmd_set_eq_if_exist:NN #1 #2 { \cs_if_exist:NTF #2 { \cs_set_eq:NN } { \use_none:nn } #1 #2 } \cs_generate_variant:Nn \__cmd_set_eq_if_exist:NN { cc } \cs_new_protected:Npn \__cmd_cant_copy:nwn #1 #2 \__cmd_break_point:n #3 { \msg_error:nnnn { cmd } { copy-bug } {#1} {#3} } \msg_new:nnn { cmd } { copy-bug } { Error~while~copying~command~\iow_char:N\\#2:\\ \str_case:nn {#1} { { non-ltcmd } { Command~is~not~a~valid~ltcmd~command. } { unknown-type } { Found~an~unknown~argument~type. } { invalid-end } { Target~command~is~not~named~\iow_char:N \\end. } } } \tl_gput_right:Nn \@declarecommandcopylisthook { { \__kernel_cmd_if_xparse:NTF \__cmd_copy:NN } } \cs_new_protected:Npn \__cmd_copy_command:nnNN #1 #2 #3 #4 { \cs_set_eq:cc { #1 ~ code } { #2 ~ code } \__cmd_set_eq_if_exist:cc { #1 ~ defaults } { #2 ~ defaults } \cs_set_protected_nopar:Npx #3 { \exp_after:wN \__cmd_copy_command:NnNNnnnn #4 {#1} } } \cs_new:Npn \__cmd_copy_command:NnNNnnnn #1 #2 #3 #4 #5 #6 #7 #8 { #1 \exp_not:n { {#2} } \exp_not:c { #8 ~ } \exp_not:c { #8 ~ code } \exp_not:n { {#5} {#6} {#7} } } \EndIncludeInRelease \IncludeInRelease{2020/10/01}{\__cmd_copy:NN}% {Support~\NewCommandCopy~in~ltcmd} \EndIncludeInRelease \IncludeInRelease{2023/06/01}{\__cmd_copy_expandable:nnNN}% {Distinguish~non-expandable~document~commands} \cs_new_protected:Npn \__cmd_copy_expandable:nnNN #1 #2 #3 #4 { \cs_set_eq:cc { #1 ~ code } { #2 ~ code } \__cmd_set_eq_if_exist:cc { #1 ~ } { #2 ~ } \__cmd_set_eq_if_exist:cc { #1 ~ \c_space_tl } { #2 ~ \c_space_tl } \__cmd_set_eq_if_exist:cc { #1 ~ defaults } { #2 ~ defaults } \exp_after:wN \__cmd_copy_expandable_signature:NnNNNNnnn #4 {#1} {#2} \token_if_protected_macro:NTF #4 { \cs_set_protected_nopar:Npx }{ \cs_set_nopar:Npx } #3 { \exp_after:wN \__cmd_copy_expandable:NnNNNNnnn #4 {#1} {#2} } } \EndIncludeInRelease \IncludeInRelease{2021/11/15}{\__cmd_copy_expandable:nnNN}% {Support~\NewCommandCopy~in~ltcmd} \cs_new_protected:Npn \__cmd_copy_expandable:nnNN #1 #2 #3 #4 { \cs_set_eq:cc { #1 ~ code } { #2 ~ code } \__cmd_set_eq_if_exist:cc { #1 ~ } { #2 ~ } \__cmd_set_eq_if_exist:cc { #1 ~ \c_space_tl } { #2 ~ \c_space_tl } \__cmd_set_eq_if_exist:cc { #1 ~ defaults } { #2 ~ defaults } \exp_after:wN \__cmd_copy_expandable_signature:NnNNNNnnn #4 {#1} {#2} \cs_set_nopar:Npx #3 { \exp_after:wN \__cmd_copy_expandable:NnNNNNnnn #4 {#1} {#2} } } \EndIncludeInRelease \IncludeInRelease{2020/10/01}{\__cmd_copy_expandable:nnNN}% {Support~\NewCommandCopy~in~ltcmd} \EndIncludeInRelease \cs_new_protected:Npn \__cmd_copy_optimized:nnNN #1#2#3#4 { \cs_set_eq:cc { #1 ~ code } { #2 ~ code } \token_if_protected_macro:NTF #4 { \cs_set_protected_nopar:Npe } { \cs_set_nopar:Npe } #3 { \exp_not:N \__cmd_start_optimized: \exp_not:c { #1 ~ code } } } \IncludeInRelease{2021/11/15}{\__cmd_copy:NN (part 2)}% {Support~\NewCommandCopy~in~ltcmd} \cs_new:Npn \__cmd_copy_expandable:NnNNNNnnn #1 #2 #3 #4 #5 #6 #7 #8 #9 { \exp_not:N #1 \exp_not:n { {#2} } \exp_not:c { #8 ~ } \exp_not:c { #8 ~ \str_if_eq:eeT { \exp_not:c { #9 ~ \c_space_tl } } { \exp_not:N #4 } { \c_space_tl } } \exp_not:c { #8 ~ code } \str_if_eq:eeTF { \exp_not:N #6 } { ? } { ? } { \exp_not:c { #8 ~ defaults } } { \exp_not:V \l__cmd_tmpa_tl } } \cs_new_protected:Npn \__cmd_copy_expandable_signature:NnNNNNnnn #1 #2 #3 #4 #5 #6 #7 #8 #9 { \int_zero:N \l__cmd_current_arg_int \tl_clear:N \l__cmd_tmpa_tl \__cmd_copy_expandable:nnN {#8} {#9} #7 \q_recursion_tail \q_recursion_stop } \cs_new_protected:Npn \__cmd_copy_expandable:nnN #1 #2 #3 { \quark_if_recursion_tail_stop:n {#3} \int_incr:N \l__cmd_current_arg_int \exp_after:wN \__cmd_copy_parse_grabber:w \token_to_str:N #3 {#1} {#2} } \use:x { \cs_new_protected:Npn \exp_not:N \__cmd_copy_parse_grabber:w ##1 \tl_to_str:n { expandable_grab_ } ##2 \tl_to_str:n { :w } { \tl_put_right:Nx \exp_not:N \l__cmd_tmpa_tl { \exp_not:N \exp_not:c { __cmd_expandable_grab_##2:w } } \exp_not:N \cs_if_exist_use:cF { __cmd_copy_grabber_##2:w } { \__cmd_cant_copy:nwn { unknown-type } } } } \cs_new_protected:Npn \__cmd_copy_grabber_D:w #1 #2 #3 #4 #5 { \tl_put_right:Nx \l__cmd_tmpa_tl { \exp_not:c { #1 ~ (arg ~ \int_use:N \l__cmd_current_arg_int ) } \exp_not:n { #4 #5 } } \cs_set_eq:cc { #1 ~ (arg ~ \int_use:N \l__cmd_current_arg_int ) } { #2 ~ (arg ~ \int_use:N \l__cmd_current_arg_int ) } \__cmd_copy_expandable:nnN {#1} {#2} } \cs_new_protected:Npn \__cmd_copy_grabber_D_alt:w #1 #2 #3 #4 { \__cmd_copy_grabber_D:w {#1} {#2} {#3} {#4} { } } \cs_new_eq:NN \__cmd_copy_grabber_R:w \__cmd_copy_grabber_D:w \cs_new_eq:NN \__cmd_copy_grabber_R_alt:w \__cmd_copy_grabber_D_alt:w \cs_new_protected:Npn \__cmd_copy_grabber_E:w #1 #2 #3 #4 { \tl_put_right:Nn \l__cmd_tmpa_tl { {#3} {#4} } \int_add:Nn \l__cmd_current_arg_int { \tl_count:n {#4} - 1 } \__cmd_copy_expandable:nnN {#1} {#2} } \cs_new_eq:NN \__cmd_copy_grabber_E_long:w \__cmd_copy_grabber_E:w \cs_new_protected:Npn \__cmd_copy_grabber_t:w #1 #2 #3 #4 { \tl_put_right:Nn \l__cmd_tmpa_tl { #3 #4 } \__cmd_copy_expandable:nnN {#1} {#2} } \cs_new_protected:Npn \__cmd_copy_grabber_m:w { \__cmd_copy_expandable:nnN } \cs_new_eq:NN \__cmd_copy_grabber_m_long:w \__cmd_copy_grabber_m:w \cs_new_protected:Npn \__cmd_copy_environment:nnNN #1 #2 #3 #4 { \cs_set_eq:cc { environment~ #1 ~ code } { environment~ #2 ~ code } \__cmd_set_eq_if_exist:cc { environment~ #1 ~ defaults } { environment~ #2 ~ defaults } \cs_set_protected_nopar:cpx { environment~ #1 } { \exp_after:wN \__cmd_copy_environment:Nnnnnnn #4 {#1} } \cs_set_eq:cc {#1} { environment~ #1 } } \cs_new:Npn \__cmd_copy_environment:Nnnnnnn #1 #2 #3 #4 #5 #6 #7 { #1 \exp_not:n { {#2} } {#7} \exp_not:n { {#4} {#5} {#6} } } \cs_new_protected:Npn \__cmd_copy_environment_end:nnNN #1 #2 { \__cmd_check_end:Nn \l__cmd_tmpa_tl {#1} \__cmd_check_end:Nn \l__cmd_tmpb_tl {#2} \exp_args:Noo \__cmd_copy_environment_end_aux:nnNN { \l__cmd_tmpa_tl } { \l__cmd_tmpb_tl } } \cs_new_protected:Npn \__cmd_copy_environment_end_aux:nnNN #1 #2 #3 #4 { \cs_set_nopar:cpx { environment~ #1 ~end } { \exp_not:c { environment~ #1 ~end~aux } } \cs_set_eq:cc { environment~ #1 ~end~aux~ } { environment~ #2 ~end~aux~ } \cs_set_eq:cc { end #1 } { environment~ #1 ~end } } \cs_new_protected:Npn \__cmd_check_end:Nn #1 #2 { \tl_set:Nx #1 { \__cmd_check_end:n {#2} } \token_if_eq_meaning:NNT #1 \q_nil { \__cmd_cant_copy:nwn { invalid-end } } } \cs_set_protected:Npn \__cmd_tmp:w #1 { \cs_new:Npn \__cmd_check_end:n ##1 { \exp_after:wN \__cmd_check_end:w \tl_to_str:n {##1} #1 \q_mark #1 \q_stop } \cs_new:Npn \__cmd_check_end:w ##1 #1 ##2 #1 ##3 \q_stop { \if_meaning:w ##2 \q_mark \exp_not:N \q_nil \else: ##2 \fi: } } \exp_args:No \__cmd_tmp:w { \tl_to_str:n { end } } \EndIncludeInRelease \IncludeInRelease{2020/10/01}{\__cmd_copy:NN (part 2)}% {Support~\NewCommandCopy~in~ltcmd} \EndIncludeInRelease \IncludeInRelease{2021/11/15}{\__cmd_show:N}% {Support~\ShowCommand~in~ltcmd} \cs_new_protected:Npn \__cmd_show:N #1 { \use:x { \int_set:Nn \tex_escapechar:D { 92 } \exp_not:N \__cmd_cmd_type_cases:NnnnnnF \exp_not:N #1 { \__cmd_show_command:N } { \__cmd_show_expandable:N } { \__cmd_show_optimized:N } { \__cmd_show_environment:N } { \__cmd_show_environment_end:N } { \__cmd_cant_copy:nwn { non-ltcmd } } \exp_not:N #1 \exp_not:N \__cmd_break_point:n { \cs_to_str:N #1 } \int_set:Nn \tex_escapechar:D { \int_use:N \tex_escapechar:D } } } \cs_new_protected:Npn \__cmd_show_command:N #1 { \exp_after:wN \__cmd_show_command:NnNNwN #1 \q__cmd #1 } \cs_new_protected:Npn \__cmd_show_command:NnNNwN #1 #2 #3 #4 #5 \q__cmd #6 { \__cmd_show_command_aux:NnNNn \tl_show:x { document~command } #6 #4 {#2} } \cs_new_protected:Npn \__cmd_show_expandable:N #1 { \exp_after:wN \__cmd_show_expandable:NnNNNNnN #1 #1 } \EndIncludeInRelease \IncludeInRelease{2020/10/01}{\__cmd_show:N}% {Support~\ShowCommand~in~ltcmd} \EndIncludeInRelease \IncludeInRelease{2023/06/01}{\__cmd_show_expandable:NnNNNNnN}% {Distinguish~non-expandable~document~commands} \cs_new_protected:Npn \__cmd_show_expandable:NnNNNNnN #1 #2 #3 #4 #5 #6 #7 #8 { \exp_args:NNe \__cmd_show_command_aux:NnNNn \tl_show:x { \token_if_protected_macro:NF #8 { expandable~ } document~command } #8 #5 {#2} } \EndIncludeInRelease \IncludeInRelease{2021/11/15}{\__cmd_show_expandable:NnNNNNnN}% {Support~\ShowCommand~in~ltcmd} \cs_new_protected:Npn \__cmd_show_expandable:NnNNNNnN #1 #2 #3 #4 #5 #6 #7 #8 { \__cmd_show_command_aux:NnNNn \tl_show:x { expandable~document~command } #8 #5 {#2} } \EndIncludeInRelease \IncludeInRelease{2020/10/01}{\__cmd_show_expandable:NnNNNNnN}% {Support~\ShowCommand~in~ltcmd} \EndIncludeInRelease \IncludeInRelease{2021/11/15}{\__cmd_show:N (part 2)}% {Support~\ShowCommand~in~ltcmd} \cs_new_protected:Npn \__cmd_show_command_aux:NnNNn #1 #2 #3 #4 #5 { \__cmd_split_signature:n {#5} #1 { \token_to_str:N #3 = #2: \iow_newline: \tl_use:N \l__cmd_tmpa_tl -> \cs_replacement_spec:N #4 } } \cs_new_protected:Npn \__cmd_show_optimized:N #1 { \exp_args:Nc \__cmd_show_optimized:NN { \cs_to_str:N #1 \c_space_tl code } #1 } \cs_new_protected:Npn \__cmd_show_optimized:NN #1#2 { \cs_set:Npe \__cmd_show_optimized_aux:N ##1 { \c_space_tl \c_space_tl \c_hash_str ##1 : \bool_lazy_or:nnT { \token_if_long_macro_p:N #1 } { \token_if_protected_long_macro_p:N #1 } { + } m \iow_newline: } \tl_show:e { \token_to_str:N #2 = \bool_lazy_or:nnF { \token_if_protected_macro_p:N #1 } { \token_if_protected_long_macro_p:N #1 } { expandable ~ } document~command: \iow_newline: \int_step_function:nN { \int_div_truncate:nn { \tl_count:e { \cs_parameter_spec:N #1 } } { 2 } } \__cmd_show_optimized_aux:N -> \cs_replacement_spec:N #1 } } \cs_generate_variant:Nn \tl_count:n { e } \cs_new_protected:Npn \__cmd_show_environment:N #1 { \exp_after:wN \__cmd_show_environment:Nnnw #1 \q__cmd \tl_show:x { \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~ } } } \cs_new_protected:Npn \__cmd_show_environment:Nnnw #1 #2 #3 #4 \q__cmd { \use:x { \__cmd_show_command_aux:NnNNn \__cmd_show:x { document~environment } { \exp_not:N \begin {#3} } \exp_not:c { environment~ #3 ~ code } {#2} } } \cs_new_protected:Npn \__cmd_show:x #1 { \iow_term:x { > ~ #1 . \iow_newline: } } \cs_new_protected:Npn \__cmd_show_environment_end:N #1 { \exp_args:NNx \__cmd_check_end:Nn \l__cmd_tmpa_tl { \cs_to_str:N #1 } \exp_args:Nc \__cmd_show_environment:N { \l__cmd_tmpa_tl } } \tl_gput_right:Nn \@showcommandlisthook { { \__kernel_cmd_if_xparse:NTF \__cmd_show:N } } \tl_gput_right:Nn \@showenvironmentlisthook { { \__kernel_cmd_if_xparse:NTF \__cmd_show:N } } \cs_new_protected:Npn \__cmd_split_signature:n #1 { \int_set:Nn \l__cmd_current_arg_int { 1 } \tl_clear:N \l__cmd_tmpa_tl \tl_clear:N \l__cmd_tmpb_tl \__cmd_split_signature_loop:Nw #1 \q_recursion_tail \q_recursion_stop } \cs_new_protected:Npn \__cmd_split_signature_loop:Nw #1 { \quark_if_recursion_tail_stop:N #1 \tl_if_empty:NT \l__cmd_tmpb_tl { \__cmd_split_start_item: } \tl_if_exist:cTF { c__cmd_show_type_#1_tl } { \use:c { __cmd_show_ \if_case:w \tl_use:c { c__cmd_show_type_#1_tl } \exp_stop_f: delim \or: delims \or: delims_opt \or: opt \or: e \or: E \or: prefix \or: processor \fi: :Nw } #1 } { \__cmd_split_end_item:n {#1} \__cmd_split_signature_loop:Nw } } \cs_set_protected:Npn \__cmd_tmp:w #1 #2 { \quark_if_nil:nF {#1} { \tl_const:cn { c__cmd_show_type_#1_tl } {#2} \__cmd_tmp:w } } \__cmd_tmp:w t0 r1 d1 R2 D2 O3 e4 E5 +6 !6 >7 =7 \q_nil \q_nil \cs_new_protected:Npn \__cmd_show_delim:Nw #1 #2 { \__cmd_split_end_item:n { #1 #2 } \__cmd_split_signature_loop:Nw } \cs_new_protected:Npn \__cmd_show_delims:Nw #1 #2 #3 { \__cmd_split_end_item:n { #1 #2 #3 } \__cmd_split_signature_loop:Nw } \cs_new_protected:Npn \__cmd_show_delims_opt:Nw #1 #2 #3 #4 { \__cmd_split_end_item:n { #1 #2 #3 {#4} } \__cmd_split_signature_loop:Nw } \cs_new_protected:Npn \__cmd_show_opt:Nw #1 #2 { \__cmd_split_end_item:n { #1 {#2} } \__cmd_split_signature_loop:Nw } \cs_new_protected:Npn \__cmd_show_e:Nw #1 #2 { \tl_map_inline:nn {#2} { \__cmd_split_start_item: \__cmd_split_end_item:n { #1 ##1 } } \__cmd_split_signature_loop:Nw } \cs_set_protected:Npn \__cmd_tmp:w #1 { \cs_new_protected:Npn \__cmd_show_E:Nw ##1 ##2 ##3 { \cs_set_protected:Npn \__cmd_tmp:w ####1 ####2 { \__cmd_split_start_item: \__cmd_split_end_item:n { ##1 ####1 {####2} } } \__cmd_tl_mapthread_function:nnN {##2} { ##3 {#1} {#1} {#1} {#1} {#1} {#1} {#1} {#1} {#1} } \__cmd_tmp:w \__cmd_split_signature_loop:Nw } } \exp_args:NV \__cmd_tmp:w \c_novalue_tl \cs_new_protected:Npn \__cmd_show_prefix:Nw #1 { \__cmd_split_add_item:n {#1} \__cmd_split_signature_loop:Nw } \cs_new_protected:Npn \__cmd_show_processor:Nw #1 #2 { \__cmd_split_add_item:n { #1 {#2} } \__cmd_split_signature_loop:Nw } \cs_new_protected:Npn \__cmd_split_start_item: { \tl_set:Nx \l__cmd_tmpb_tl { ~ \c_space_tl \c_hash_str \int_use:N \l__cmd_current_arg_int : } } \cs_new_protected:Npn \__cmd_split_add_item:n #1 { \tl_put_right:Nx \l__cmd_tmpb_tl { \tl_to_str:n {#1} } } \cs_new_protected:Npn \__cmd_split_end_item:n #1 { \tl_put_right:Nx \l__cmd_tmpa_tl { \l__cmd_tmpb_tl \tl_to_str:n {#1} \iow_newline: } \tl_clear:N \l__cmd_tmpb_tl \int_incr:N \l__cmd_current_arg_int } \EndIncludeInRelease \IncludeInRelease{2020/10/01}{\__cmd_show:N (part 2)}% {Support~\ShowCommand~in~ltcmd} \EndIncludeInRelease \cs_new_protected:Npn \__cmd_grab_b:w { \__cmd_grab_b_aux:NNw \cs_set_protected_nopar:Npn \tl_trim_spaces:n } \cs_new_protected:Npn \__cmd_grab_b_long:w { \__cmd_grab_b_aux:NNw \cs_set_protected:Npn \tl_trim_spaces:n } \cs_new_protected:Npn \__cmd_grab_b_obey_spaces:w { \__cmd_grab_b_aux:NNw \cs_set_protected_nopar:Npn \exp_not:n } \cs_new_protected:Npn \__cmd_grab_b_long_obey_spaces:w { \__cmd_grab_b_aux:NNw \cs_set_protected:Npn \exp_not:n } \cs_new_protected:Npn \__cmd_grab_b_aux:NNw #1#2#3 \__cmd_run_code: { \__cmd_grab_D_aux:NNnNN \begin \end {#3} #1 \use_ii:nn \tl_put_left:Nn \l__cmd_signature_tl { \__cmd_grab_b_end:Nw #2 } \tl_set_eq:NN \l__cmd_saved_args_tl \l__cmd_args_tl \tl_clear:N \l__cmd_args_tl \exp_args:Nc \l__cmd_fn_tl { begin ~ } } \cs_new_protected:Npn \__cmd_grab_b_end:Nw #1#2 \__cmd_run_code: { \tl_set:Nx \l__cmd_args_tl { \exp_not:V \l__cmd_saved_args_tl { \exp_after:wN #1 \l__cmd_args_tl } } #2 \__cmd_run_code: \end } \cs_new_protected:Npn \__cmd_grab_D:w #1#2#3 \__cmd_run_code: { \__cmd_grab_D_aux:NNnNNN #1 #2 {#3} \cs_set_protected_nopar:Npn \__cmd_peek_nonspace_remove:NTF \use_ii:nn } \cs_new_protected:Npn \__cmd_grab_D_long:w #1#2#3 \__cmd_run_code: { \__cmd_grab_D_aux:NNnNNN #1 #2 {#3} \cs_set_protected:Npn \__cmd_peek_nonspace_remove:NTF \use_ii:nn } \cs_new_protected:Npn \__cmd_grab_D_obey_spaces:w #1#2#3 \__cmd_run_code: { \__cmd_grab_D_aux:NNnNNN #1 #2 {#3} \cs_set_protected_nopar:Npn \__cmd_peek_meaning_remove:NTF \use_ii:nn } \cs_new_protected:Npn \__cmd_grab_D_long_obey_spaces:w #1#2#3 \__cmd_run_code: { \__cmd_grab_D_aux:NNnNNN #1 #2 {#3} \cs_set_protected:Npn \__cmd_peek_meaning_remove:NTF \use_ii:nn } \cs_new_protected:Npn \__cmd_grab_D_no_strip:w #1#2#3 \__cmd_run_code: { \__cmd_grab_D_aux:NNnNNN #1 #2 {#3} \cs_set_protected_nopar:Npn \__cmd_peek_nonspace_remove:NTF \use_none:n } \cs_new_protected:Npn \__cmd_grab_D_long_no_strip:w #1#2#3 \__cmd_run_code: { \__cmd_grab_D_aux:NNnNNN #1 #2 {#3} \cs_set_protected:Npn \__cmd_peek_nonspace_remove:NTF \use_none:n } \cs_new_protected:Npn \__cmd_grab_D_obey_spaces_no_strip:w #1#2#3 \__cmd_run_code: { \__cmd_grab_D_aux:NNnNNN #1 #2 {#3} \cs_set_protected_nopar:Npn \__cmd_peek_meaning_remove:NTF \use_none:n } \cs_new_protected:Npn \__cmd_grab_D_long_obey_spaces_no_strip:w #1#2#3 \__cmd_run_code: { \__cmd_grab_D_aux:NNnNNN #1 #2 {#3} \cs_set_protected:Npn \__cmd_peek_meaning_remove:NTF \use_none:n } \cs_new_protected:Npn \__cmd_grab_D_aux:NNnNNN #1#2#3#4#5#6 { \__cmd_grab_D_aux:NNnNN #1#2 {#3} #4 #6 #5 #1 { \__cmd_grab_D_call:Nw #1 } { \__cmd_add_arg:o \c_novalue_tl } } \cs_new_protected:Npn \__cmd_grab_D_aux:NNnNN #1#2#3#4#5 { \tl_set:Nn \l__cmd_signature_tl {#3} \exp_after:wN #4 \l__cmd_fn_tl ##1 #2 { \tl_if_in:nnTF {##1} {#1} { \__cmd_grab_D_nested:NNnN #1 #2 {##1} #4 } { \tl_if_blank:oTF { \use_none:n ##1 } { \__cmd_add_arg:o { \use_none:n ##1 } } { \str_if_eq:eeTF { \exp_not:o { \use_none:n ##1 } } { { \exp_not:o { \use_ii:nnn ##1 \q_nil } } } { \__cmd_add_arg:o { #5 ##1 } } { \__cmd_add_arg:o { \use_none:n ##1 } } } } } } \tl_new:N \l__cmd_nesting_a_tl \tl_new:N \l__cmd_nesting_b_tl \quark_new:N \q__cmd \cs_new_protected:Npn \__cmd_grab_D_nested:NNnN #1#2#3#4 { \tl_clear:N \l__cmd_nesting_a_tl \tl_clear:N \l__cmd_nesting_b_tl \exp_after:wN #4 \l__cmd_fn_tl ##1 #1 ##2 \q__cmd ##3 #2 { \tl_put_right:No \l__cmd_nesting_a_tl { \use_none:n ##1 #1 } \tl_put_right:No \l__cmd_nesting_b_tl { \use_i:nn #2 ##3 } \tl_if_in:nnTF {##2} {#1} { \l__cmd_fn_tl \q_nil ##2 \q__cmd \ERROR } { \tl_put_right:Nx \l__cmd_nesting_a_tl { \__cmd_grab_D_nested:w \q_nil ##2 \q_stop } \tl_if_in:NnTF \l__cmd_nesting_b_tl {#1} { \tl_set_eq:NN \l__cmd_tmpa_tl \l__cmd_nesting_b_tl \tl_clear:N \l__cmd_nesting_b_tl \exp_after:wN \l__cmd_fn_tl \exp_after:wN \q_nil \l__cmd_tmpa_tl \q_nil \q__cmd \ERROR } { \tl_put_right:No \l__cmd_nesting_a_tl \l__cmd_nesting_b_tl \__cmd_add_arg:V \l__cmd_nesting_a_tl } } } \l__cmd_fn_tl #3 \q_nil \q__cmd \ERROR } \cs_new:Npn \__cmd_grab_D_nested:w #1 \q_nil \q_stop { \exp_not:o { \use_none:n #1 } } \cs_new_protected_nopar:Npn \__cmd_grab_D_call:Nw #1 { \token_if_eq_catcode:NNTF + #1 { \exp_after:wN \exp_after:wN \exp_after:wN \l__cmd_fn_tl \char_generate:nn { `#1 } { 11 } } { \__cmd_token_if_cs:NTF #1 { \exp_after:wN \l__cmd_fn_tl \cs:w \cs_to_str:N #1 ~ \cs_end: } { \exp_after:wN \l__cmd_fn_tl \token_to_str:N #1 } } } \cs_new_protected:Npn \__cmd_grab_E:w #1#2 \__cmd_run_code: { \__cmd_grab_E:nnNN {#1} {#2} \cs_set_protected_nopar:Npn \__cmd_peek_nonspace_remove:NTF } \cs_new_protected:Npn \__cmd_grab_E_long:w #1#2 \__cmd_run_code: { \__cmd_grab_E:nnNN {#1} {#2} \cs_set_protected:Npn \__cmd_peek_nonspace_remove:NTF } \cs_new_protected:Npn \__cmd_grab_E_obey_spaces:w #1#2 \__cmd_run_code: { \__cmd_grab_E:nnNN {#1} {#2} \cs_set_protected_nopar:Npn \__cmd_peek_meaning_remove:NTF } \cs_new_protected:Npn \__cmd_grab_E_long_obey_spaces:w #1#2 \__cmd_run_code: { \__cmd_grab_E:nnNN {#1} {#2} \cs_set_protected:Npn \__cmd_peek_meaning_remove:NTF } \cs_new_protected:Npn \__cmd_grab_E:nnNN #1#2#3#4 { \exp_after:wN #3 \l__cmd_fn_tl ##1##2##3 { \prop_put:Nnn \l__cmd_tmp_prop {##1} {##3} \__cmd_grab_E_loop:NnN #4 { } ##2 \q_recursion_stop } \prop_clear:N \l__cmd_tmp_prop \tl_set:Nn \l__cmd_signature_tl {#2} \cs_set_protected:Npn \__cmd_grab_E_finalise: { \tl_map_inline:nn {#1} { \prop_get:NnNF \l__cmd_tmp_prop {####1} \l__cmd_tmpb_tl { \tl_set_eq:NN \l__cmd_tmpb_tl \c_novalue_tl } \tl_put_right:Nx \l__cmd_args_tl { { \exp_not:V \l__cmd_tmpb_tl } } } \l__cmd_signature_tl \__cmd_run_code: } \__cmd_grab_E_loop:NnN #4 { } #1 \q_recursion_tail \q_recursion_stop } \cs_new_protected:Npn \__cmd_grab_E_loop:NnN #1#2#3#4 \q_recursion_stop { \cs_if_eq:NNTF #3 \q_recursion_tail { \__cmd_grab_E_finalise: } { #1 #3 { \l__cmd_fn_tl #3 {#2#4} } { \__cmd_grab_E_loop:NnN #1 {#2#3} #4 \q_recursion_stop } } } \cs_new_protected:Npn \__cmd_grab_E_finalise: { } \cs_new_protected:Npn \__cmd_grab_m:w #1 \__cmd_run_code: { \tl_set:Nn \l__cmd_signature_tl {#1} \exp_after:wN \cs_set_protected_nopar:Npn \l__cmd_fn_tl ##1 { \__cmd_add_arg:n {##1} } \l__cmd_fn_tl } \cs_new_protected:Npn \__cmd_grab_m_long:w #1 \__cmd_run_code: { \tl_set:Nn \l__cmd_signature_tl {#1} \exp_after:wN \cs_set_protected:Npn \l__cmd_fn_tl ##1 { \__cmd_add_arg:n {##1} } \l__cmd_fn_tl } \cs_new_protected_nopar:Npn \__cmd_grab_m_aux:Nnnnnnnnn #1#2#3#4#5#6#7#8#9 { \tl_put_right:No \l__cmd_args_tl { #1 {#2} {#3} {#4} {#5} {#6} {#7} {#8} {#9} } \l__cmd_signature_tl \__cmd_run_code: } \cs_new_protected:cpn { __cmd_grab_m_1:w } #1 \__cmd_run_code: { \tl_set:Nn \l__cmd_signature_tl {#1} \exp_after:wN \cs_set_eq:NN \l__cmd_fn_tl \__cmd_grab_m_aux:Nnnnnnnnn \l__cmd_fn_tl \use_none:nnnnnnn { } { } { } { } { } { } { } } \cs_new_protected:cpn { __cmd_grab_m_2:w } #1 \__cmd_run_code: { \tl_set:Nn \l__cmd_signature_tl {#1} \exp_after:wN \cs_set_eq:NN \l__cmd_fn_tl \__cmd_grab_m_aux:Nnnnnnnnn \l__cmd_fn_tl \use_none:nnnnnn { } { } { } { } { } { } } \cs_new_protected:cpn { __cmd_grab_m_3:w } #1 \__cmd_run_code: { \tl_set:Nn \l__cmd_signature_tl {#1} \exp_after:wN \cs_set_eq:NN \l__cmd_fn_tl \__cmd_grab_m_aux:Nnnnnnnnn \l__cmd_fn_tl \use_none:nnnnn { } { } { } { } { } } \cs_new_protected:cpn { __cmd_grab_m_4:w } #1 \__cmd_run_code: { \tl_set:Nn \l__cmd_signature_tl {#1} \exp_after:wN \cs_set_eq:NN \l__cmd_fn_tl \__cmd_grab_m_aux:Nnnnnnnnn \l__cmd_fn_tl \use_none:nnnn { } { } { } { } } \cs_new_protected:cpn { __cmd_grab_m_5:w } #1 \__cmd_run_code: { \tl_set:Nn \l__cmd_signature_tl {#1} \exp_after:wN \cs_set_eq:NN \l__cmd_fn_tl \__cmd_grab_m_aux:Nnnnnnnnn \l__cmd_fn_tl \use_none:nnn { } { } { } } \cs_new_protected:cpn { __cmd_grab_m_6:w } #1 \__cmd_run_code: { \tl_set:Nn \l__cmd_signature_tl {#1} \exp_after:wN \cs_set_eq:NN \l__cmd_fn_tl \__cmd_grab_m_aux:Nnnnnnnnn \l__cmd_fn_tl \use_none:nn { } { } } \cs_new_protected:cpn { __cmd_grab_m_7:w } #1 \__cmd_run_code: { \tl_set:Nn \l__cmd_signature_tl {#1} \exp_after:wN \cs_set_eq:NN \l__cmd_fn_tl \__cmd_grab_m_aux:Nnnnnnnnn \l__cmd_fn_tl \use_none:n { } } \cs_new_protected:cpn { __cmd_grab_m_8:w } #1 \__cmd_run_code: { \tl_set:Nn \l__cmd_signature_tl {#1} \exp_after:wN \cs_set_eq:NN \l__cmd_fn_tl \__cmd_grab_m_aux:Nnnnnnnnn \l__cmd_fn_tl \prg_do_nothing: } \cs_new_protected:cpx { __cmd_grab_m_9:w } { \exp_not:c { __cmd_grab_m_5:w } \exp_not:c { __cmd_grab_m_4:w } } \cs_new_protected:Npn \__cmd_grab_R:w #1#2#3 \__cmd_run_code: { \__cmd_grab_R_aux:NNnN #1 #2 {#3} \cs_set_protected_nopar:Npn } \cs_new_protected:Npn \__cmd_grab_R_long:w #1#2#3 \__cmd_run_code: { \__cmd_grab_R_aux:NNnN #1 #2 {#3} \cs_set_protected:Npn } \cs_new_protected:Npn \__cmd_grab_R_aux:NNnN #1#2#3#4 { \__cmd_grab_D_aux:NNnNN #1 #2 {#3} #4 \use_ii:nn \__cmd_peek_nonspace_remove:NTF #1 { \__cmd_grab_D_call:Nw #1 } { \msg_error:nnxx { cmd } { missing-required } { \__cmd_environment_or_command: } { \token_to_str:N #1 } \__cmd_add_arg:o \c_novalue_tl } } \cs_new_protected:Npn \__cmd_grab_t:w { \__cmd_grab_t_aux:NNw \__cmd_peek_nonspace_remove:NTF } \cs_new_protected:Npn \__cmd_grab_t_obey_spaces:w { \__cmd_grab_t_aux:NNw \__cmd_peek_meaning_remove:NTF } \cs_new_protected:Npn \__cmd_grab_t_aux:NNw #1#2#3 \__cmd_run_code: { \tl_set:Nn \l__cmd_signature_tl {#3} \exp_after:wN \cs_set_protected:Npn \l__cmd_fn_tl { #1 #2 { \__cmd_add_arg:n { \BooleanTrue } } { \__cmd_add_arg:n { \BooleanFalse } } } \l__cmd_fn_tl } \tl_new:N \l__cmd_v_arg_tl \cs_new_protected:Npn \__cmd_grab_v:w { \bool_set_false:N \l__cmd_long_bool \__cmd_grab_v_aux:w } \cs_new_protected:Npn \__cmd_grab_v_long:w { \bool_set_true:N \l__cmd_long_bool \__cmd_grab_v_aux:w } \cs_new_protected:Npn \__cmd_grab_v_aux:w #1 \__cmd_run_code: { \tl_set:Nn \l__cmd_signature_tl {#1} \group_begin: \tex_escapechar:D = 92 \scan_stop: \tex_endlinechar:D = `\^^M \scan_stop: \tl_clear:N \l__cmd_v_arg_tl \peek_remove_spaces:n { \peek_meaning_remove:NTF \c_group_begin_token { \group_align_safe_end: \__cmd_grab_v_bgroup: } { \peek_N_type:TF { \__cmd_grab_v_aux_test:N } { \__cmd_grab_v_aux_abort:n { } } } } } \cs_new_protected:Npn \__cmd_grab_v_group_end: { \exp_args:NNNo \group_end: \tl_set:Nn \l__cmd_v_arg_tl { \l__cmd_v_arg_tl } } \cs_new_protected:Npn \__cmd_grab_v_aux_test:N #1 { \__cmd_grab_v_token_if_char:NTF #1 { \__cmd_grab_v_aux_put:N #1 \__cmd_grab_v_aux_catcodes: \__cmd_grab_v_aux_loop:N #1 } { \__cmd_grab_v_aux_abort:n {#1} #1 } } \cs_new_protected:Npn \__cmd_grab_v_aux_loop:N #1 { \peek_N_type:TF { \__cmd_grab_v_aux_loop:NN #1 } { \__cmd_grab_v_aux_abort:n { } } } \cs_new_protected:Npn \__cmd_grab_v_aux_loop:NN #1#2 { \__cmd_grab_v_token_if_char:NTF #2 { \token_if_eq_charcode:NNTF #1 #2 { \__cmd_grab_v_aux_loop_end: } { \__cmd_grab_v_aux_put:N #2 \__cmd_grab_v_aux_loop:N #1 } } { \__cmd_grab_v_aux_abort:n {#2} #2 } } \cs_new_protected:Npn \__cmd_grab_v_aux_loop_end: { \__cmd_grab_v_group_end: \__cmd_add_arg:x { \tl_tail:N \l__cmd_v_arg_tl } } \int_new:N \l__cmd_v_nesting_int \cs_new_protected:Npx \__cmd_grab_v_bgroup: { \exp_not:N \__cmd_grab_v_aux_catcodes: \exp_not:n { \int_set:Nn \l__cmd_v_nesting_int { 1 } } \exp_not:N \__cmd_grab_v_aux_put:N \iow_char:N \{ \exp_not:N \__cmd_grab_v_bgroup_loop: } \cs_new_protected:Npn \__cmd_grab_v_bgroup_loop: { \peek_N_type:TF { \__cmd_grab_v_bgroup_loop:N } { \__cmd_grab_v_aux_abort:n { } } } \cs_new_protected:Npn \__cmd_grab_v_bgroup_loop:N #1 { \__cmd_grab_v_token_if_char:NTF #1 { \token_if_eq_charcode:NNTF \c_group_end_token #1 { \int_decr:N \l__cmd_v_nesting_int \int_compare:nNnTF \l__cmd_v_nesting_int > 0 { \__cmd_grab_v_aux_put:N #1 \__cmd_grab_v_bgroup_loop: } { \__cmd_grab_v_aux_loop_end: } } { \token_if_eq_charcode:NNT \c_group_begin_token #1 { \int_incr:N \l__cmd_v_nesting_int } \__cmd_grab_v_aux_put:N #1 \__cmd_grab_v_bgroup_loop: } } { \__cmd_grab_v_aux_abort:n {#1} #1 } } \cs_new_protected:Npn \__cmd_grab_v_aux_catcodes: { \cs_set_eq:NN \do \char_set_catcode_other:N \dospecials \bool_if:NTF \l__cmd_long_bool { \char_set_catcode_other:n { \tex_endlinechar:D } } { \char_set_catcode_parameter:n { \tex_endlinechar:D } } } \cs_new_protected:Npn \__cmd_grab_v_aux_abort:n #1 { \__cmd_grab_v_group_end: \exp_after:wN \exp_after:wN \exp_after:wN \peek_meaning_remove:NTF \char_generate:nn { \tex_endlinechar:D } { 6 } { \msg_error:nnxxx { cmd } { verbatim-nl } { \__cmd_environment_or_command: } { \tl_to_str:N \l__cmd_v_arg_tl } { \tl_to_str:n {#1} } \__cmd_add_arg:o \c_novalue_tl } { \msg_error:nnxxx { cmd } { verbatim-tokenized } { \__cmd_environment_or_command: } { \tl_to_str:N \l__cmd_v_arg_tl } { \tl_to_str:n {#1} } \__cmd_add_arg:o \c_novalue_tl } } \IncludeInRelease{2024/06/01}{\__cmd_grab_v_aux_put:N}% {Endlines~as~\obeyedline} \cs_new_protected:Npn \__cmd_grab_v_aux_put:N #1 { \tl_put_right:Nx \l__cmd_v_arg_tl { \token_if_active:NTF #1 { \exp_not:N #1 } { \int_compare:nNnTF {`#1} = \tex_endlinechar:D { \exp_not:N \obeyedline } { \token_to_str:N #1 } } } } \EndIncludeInRelease \IncludeInRelease{2020/10/01}{\__cmd_grab_v_aux_put:N}% {Endlines~as~\obeyedline} \cs_new_protected:Npn \__cmd_grab_v_aux_put:N #1 { \tl_put_right:Nx \l__cmd_v_arg_tl { \token_if_active:NTF #1 { \exp_not:N #1 } { \token_to_str:N #1 } } } \EndIncludeInRelease \cs_new_protected:Npn \__cmd_grab_v_token_if_char:NTF #1 { \str_if_eq:eeTF { } { \str_tail:n {#1} } } \cs_new_protected:Npn \__cmd_add_arg:n #1 { \tl_put_right:Nn \l__cmd_args_tl { {#1} } \l__cmd_signature_tl \__cmd_run_code: } \cs_generate_variant:Nn \__cmd_add_arg:n { V , o , x } \cs_new:Npn \__cmd_expandable_grab_D:w #1 \q__cmd #2#3 { #2 { \__cmd_expandable_grab_D:NNNwNNn #1 \q__cmd #2 #3 } } \cs_set_protected:Npn \__cmd_tmp:w #1 { \cs_new:Npn \__cmd_expandable_grab_D:NNNwNNn ##1##2##3##4 \q__cmd ##5##6##7 { \str_if_eq:nnTF {##2} {##7} { \str_if_eq:onTF { ##1 { } { } ##7 ##2 \q__cmd ##3 } { { } {##2} { } } } { \use_ii:nn } { ##1 { \__cmd_expandable_grab_D:NNNwNNnnn ##1##2##3##4 \q__cmd ##5##6 } \q_nil { } ##2 \ERROR \q__cmd \ERROR } { ##4 {#1} \q__cmd ##5 ##6 {##7} } } } \exp_args:No \__cmd_tmp:w { \c_novalue_tl } \cs_new:Npn \__cmd_expandable_grab_D:NNNwNNnnn #1#2#3#4 \q__cmd #5#6#7#8#9 { \exp_args:Nof \__cmd_expandable_grab_D:nnNNNwNN { \use_ii:nn #7 #2 } { \__cmd_expandable_grab_D:Nw #3 \exp_stop_f: #8 #9 } #1#2#3 #4 \q__cmd #5 #6 } \cs_new:Npn \__cmd_expandable_grab_D:Nw #1#2 \ERROR \ERROR { #2 #1 } \cs_new:Npn \__cmd_expandable_grab_D:nnNNNwNN #1#2#3#4#5#6 \q__cmd #7#8 { \exp_args:No \tl_if_empty:oTF { #3 { \use_none:nnn } #2 \q__cmd #5 #4 \q__cmd #5 } { \tl_if_blank:oTF { \use_none:nn #1#2 } { \__cmd_put_arg_expandable:ow { \use_none:nn #1#2 } } { \str_if_eq:eeTF { \exp_not:o { \use_none:nn #1#2 } } { { \exp_not:o { \use_iii:nnnn #1#2 \q_nil } } } { \__cmd_put_arg_expandable:ow { \use_iii:nnn #1#2 } } { \__cmd_put_arg_expandable:ow { \use_none:nn #1#2 } } } #6 \q__cmd #7 #8 } { #3 { \__cmd_expandable_grab_D:NNNwNNnnn #3#4#5#6 \q__cmd #7 #8 } \q_nil {#1} #2 \ERROR \q__cmd \ERROR } } \cs_new:Npn \__cmd_expandable_grab_D_alt:w #1 \q__cmd #2#3 { #2 { \__cmd_expandable_grab_D_alt:NNwNNn #1 \q__cmd #2 #3 } } \cs_set_protected:Npn \__cmd_tmp:w #1 { \cs_new:Npn \__cmd_expandable_grab_D_alt:NNwNNn ##1##2##3 \q__cmd ##4##5##6 { \str_if_eq:nnTF {##6} {##2} { \str_if_eq:onTF { ##1 { } ##6 ##2 ##2 } { { } ##2 } } { \use_ii:nn } { ##1 { \__cmd_expandable_grab_D_alt:NNwn ##4 ##5 ##3 \q__cmd } ##6 \ERROR } { ##3 {#1} \q__cmd ##4 ##5 {##6} } } } \exp_args:No \__cmd_tmp:w { \c_novalue_tl } \cs_new:Npn \__cmd_expandable_grab_D_alt:NNwn #1#2#3 \q__cmd #4 { \tl_if_blank:oTF { \use_none:n #4 } { \__cmd_put_arg_expandable:ow { \use_none:n #4 } } { \str_if_eq:eeTF { \exp_not:o { \use_none:n #4 } } { { \exp_not:o { \use_ii:nnn #4 \q_nil } } } { \__cmd_put_arg_expandable:ow { \use_ii:nn #4 } } { \__cmd_put_arg_expandable:ow { \use_none:n #4 } } } #3 \q__cmd #1 #2 } \cs_new:Npn \__cmd_expandable_grab_E:w #1 \q__cmd #2#3 { \__cmd_expandable_grab_E_aux:w #1 \q__cmd #2 #3 #3 } \cs_new:Npn \__cmd_expandable_grab_E_long:w #1 \q__cmd #2#3 { \__cmd_expandable_grab_E_aux:w #1 \q__cmd #2 #3 #2 } \cs_new:Npn \__cmd_expandable_grab_E_aux:w #1 \q__cmd #2#3#4 { #2 { \__cmd_expandable_grab_E_test:nnw #1 \q__cmd #2 #3 #4 } } \cs_new:Npn \__cmd_expandable_grab_E_test:nnw #1#2#3 \q__cmd #4#5#6#7 { \__cmd_expandable_grab_E_loop:nnnNNw {#7} { } { } #1 \q_nil \q_nil \q_nil \q_mark #2 \q_nil #3 \q__cmd #4 #5 #6 } \cs_new:Npn \__cmd_expandable_grab_E_loop:nnnNNw #1#2#3#4#5#6 \q_nil #7 \q_mark #8 { \quark_if_nil:NTF #4 { \__cmd_expandable_grab_E_end:nnw {#1} {#3} } { \tl_if_novalue:nTF {#8} { \str_if_eq:onTF { #4 { } #1 #5 } {#5} } { \use_ii:nn } { \__cmd_expandable_grab_E_find:w { #2 #4 #5 #6 } {#3} ~ } { \__cmd_expandable_grab_E_loop:nnnNNw {#1} { #2 #4 #5 } { #3 {#8} } #6 \q_nil #7 \q_mark } } } \cs_new:Npn \__cmd_expandable_grab_E_find:w #1 \q__cmd #2#3#4 { #4 { \__cmd_expandable_grab_E_find:nnw #1 \q__cmd #2 #3 #4 } } \cs_new:Npn \__cmd_expandable_grab_E_find:nnw #1#2#3 \q_nil #4 \q__cmd #5#6#7#8 { \__cmd_expandable_grab_E_aux:w {#1} { #2 {#8} #3 } #4 \q__cmd #5 #6 #7 } \cs_new:Npn \__cmd_expandable_grab_E_end:nnw #1#2#3 \q__cmd #4#5#6 { #3 #2 \q__cmd #4 #5 {#1} } \cs_new:Npn \__cmd_expandable_grab_m:w #1 \q__cmd #2#3 { #3 { \__cmd_expandable_grab_m_aux:wNn #1 \q__cmd #2 #3 } } \cs_new:Npn \__cmd_expandable_grab_m_long:w #1 \q__cmd #2#3 { #2 { \__cmd_expandable_grab_m_aux:wNn #1 \q__cmd #2 #3 } } \cs_new:Npn \__cmd_expandable_grab_m_aux:wNn #1 \q__cmd #2#3#4 { #1 {#4} \q__cmd #2 #3 } \cs_new:Npn \__cmd_expandable_grab_R:w #1 \q__cmd #2#3 { #2 { \__cmd_expandable_grab_R_aux:NNNwNNn #1 \q__cmd #2#3 } } \cs_set_protected:Npn \__cmd_tmp:w #1 { \cs_new:Npn \__cmd_expandable_grab_R_aux:NNNwNNn ##1##2##3##4 \q__cmd ##5##6##7 { \str_if_eq:nnTF {##7} {##2} { \str_if_eq:onTF { ##1 { } { } ##7 ##2 \q__cmd ##3 } { { } {##2} { } } } { \use_ii:nn } { ##1 { \__cmd_expandable_grab_D:NNNwNNnnn ##1##2##3##4 \q__cmd ##5##6 } \q_nil { } ##2 \ERROR \q__cmd \ERROR } { \msg_expandable_error:nnff { cmd } { missing-required } { \exp_args:Nf \tl_trim_spaces:n { \token_to_str:N ##5 } } { \tl_to_str:n {##2} } ##4 {#1} \q__cmd ##5 ##6 {##7} } } } \exp_args:No \__cmd_tmp:w { \c_novalue_tl } \cs_new:Npn \__cmd_expandable_grab_R_alt:w #1 \q__cmd #2#3 { #2 { \__cmd_expandable_grab_R_alt_aux:NNwNNn #1 \q__cmd #2#3 } } \cs_set_protected:Npn \__cmd_tmp:w #1 { \cs_new:Npn \__cmd_expandable_grab_R_alt_aux:NNwNNn ##1##2##3 \q__cmd ##4##5##6 { \str_if_eq:nnTF {##6} {##2} { \str_if_eq:onTF { ##1 { } ##6 ##2 ##2 } { { } ##2 } } { \use_ii:nn } { ##1 { \__cmd_expandable_grab_D_alt:NNwn ##4 ##5 ##3 \q__cmd } ##6 \ERROR } { \msg_expandable_error:nnff { cmd } { missing-required } { \exp_args:Nf \tl_trim_spaces:n { \token_to_str:N ##4 } } { \tl_to_str:n {##2} } ##3 {#1} \q__cmd ##4 ##5 {##6} } } } \exp_args:No \__cmd_tmp:w { \c_novalue_tl } \cs_new:Npn \__cmd_expandable_grab_t:w #1 \q__cmd #2#3 { #2 { \__cmd_expandable_grab_t_aux:NNwn #1 \q__cmd #2 #3 } } \cs_new:Npn \__cmd_expandable_grab_t_aux:NNwn #1#2#3 \q__cmd #4#5#6 { \str_if_eq:onTF { #1 { } #6 #2 } {#2} { #3 { \BooleanTrue } \q__cmd #4 #5 } { #3 { \BooleanFalse } \q__cmd #4 #5 {#6} } } \cs_new:Npn \__cmd_put_arg_expandable:nw #1#2 \q__cmd { #2 {#1} \q__cmd } \cs_generate_variant:Nn \__cmd_put_arg_expandable:nw { o } \cs_new_protected:Npn \__cmd_bool_reverse:N #1 { \bool_if:NTF #1 { \tl_set:Nn \ProcessedArgument { \c_false_bool } } { \tl_set:Nn \ProcessedArgument { \c_true_bool } } } \seq_new:N \l__cmd_split_list_seq \tl_new:N \l__cmd_split_list_tl \cs_new_protected:Npn \__cmd_split_list:nn #1#2 { \tl_if_single:nTF {#1} { \token_if_cs:NTF #1 { \__cmd_split_list_multi:nn {#1} {#2} } { \__cmd_split_list_single:Nn #1 {#2} } } { \__cmd_split_list_multi:nn {#1} {#2} } } \cs_new_protected:Npn \__cmd_split_list_multi:nn #1#2 { \seq_set_split:Nnn \l__cmd_split_list_seq {#1} {#2} \tl_clear:N \ProcessedArgument \seq_map_inline:Nn \l__cmd_split_list_seq { \tl_put_right:Nn \ProcessedArgument { {##1} } } } \cs_generate_variant:Nn \__cmd_split_list_multi:nn { nV } \group_begin: \char_set_catcode_active:N \^^@ \cs_new_protected:Npn \__cmd_split_list_single:Nn #1#2 { \tl_set:Nn \l__cmd_split_list_tl {#2} \group_begin: \char_set_lccode:nn { `\^^@ } { `#1 } \tex_lowercase:D { \group_end: \tl_replace_all:Nnn \l__cmd_split_list_tl { ^^@ } } {#1} \__cmd_split_list_multi:nV {#1} \l__cmd_split_list_tl } \group_end: \cs_new_protected:Npn \__cmd_split_argument:nnn #1#2#3 { \__cmd_split_list:nn {#2} {#3} \exp_args:Nf \__cmd_split_argument_aux:nnnn { \tl_count:N \ProcessedArgument } {#1} {#2} {#3} } \cs_new_protected:Npn \__cmd_split_argument_aux:nnnn #1#2#3#4 { \int_compare:nNnF {#1} = { #2 + 1 } { \int_compare:nNnTF {#1} > { #2 + 1 } { \tl_set:Nx \ProcessedArgument { \exp_last_unbraced:NnNo \__cmd_split_argument_aux:n { #2 + 1 } \use_none_delimit_by_q_stop:w \ProcessedArgument \q_stop } \msg_error:nnxxx { cmd } { arg-split } { \tl_to_str:n {#3} } { \int_eval:n { #2 + 1 } } { \tl_to_str:n {#4} } } { \tl_put_right:Nx \ProcessedArgument { \prg_replicate:nn { #2 + 1 - (#1) } { { \exp_not:V \c_novalue_tl } } } } } } \cs_new:Npn \__cmd_split_argument_aux:n #1 { \prg_replicate:nn {#1} { \__cmd_split_argument_aux:wn } } \cs_new:Npn \__cmd_split_argument_aux:wn #1 \use_none_delimit_by_q_stop:w #2 { \exp_not:n { {#2} } #1 \use_none_delimit_by_q_stop:w } \cs_new_protected:Npn \__cmd_trim_spaces:n #1 { \tl_set:Nx \ProcessedArgument { \tl_trim_spaces:n {#1} } } \cs_new_protected:Npn \__cmd_arg_to_keyvalue:nn #1#2 { \tl_trim_spaces_apply:nN {#2} \__cmd_arg_to_keyvalue_braces:nnn {#1} {#2} } \cs_new_protected:Npn \__cmd_arg_to_keyvalue_braces:nnn #1#2#3 { \tl_if_head_is_group:nT {#1} { \tl_if_blank:oT { \use_none:n #1 } { \tl_set:Nx \ProcessedArgument { #2 = { \exp_not:n #1 } } \use_none:nnnn } } \__cmd_arg_to_keyvalue_auxi:nnn {#1} {#2} {#3} } \cs_new:Npn \__cmd_arg_to_keyvalue_auxi:nnn #1 { \tl_if_head_is_N_type:nTF {#1} { \__cmd_split_N_head_apply:Nn \__cmd_arg_to_keyvalue_auxii:Nnnn {#1} } { \__cmd_arg_to_keyvalue_auxv:nn } } \cs_new:Npn \__cmd_arg_to_keyvalue_auxii:Nnnn #1#2 { \str_if_eq:eeTF { \exp_not:n {#1} } { = } { \tl_trim_spaces_apply:nN {#2} \__cmd_arg_to_keyvalue_auxiii:nnn } { \__cmd_arg_to_keyvalue_auxv:nn } } \cs_new:Npn \__cmd_arg_to_keyvalue_auxiii:nnn #1 { \tl_if_head_is_N_type:nTF {#1} { \__cmd_split_N_head_apply:Nn \__cmd_arg_to_keyvalue_auxiv:Nnnn {#1} } { \__cmd_arg_to_keyvalue_auxv:nn } } \cs_new:Npn \__cmd_arg_to_keyvalue_auxiv:Nnnn #1#2 { \str_if_eq:eeTF { \exp_not:n {#1} } { , } { \tl_set:Nn \ProcessedArgument {#2} \use_none:nn } { \__cmd_arg_to_keyvalue_auxv:nn } } \cs_new_protected:Npn \__cmd_arg_to_keyvalue_auxv:nn #1#2 { \__cmd_arg_to_keyvalue_loop:w #2 \q__cmd_recursion_tail \q__cmd_recursion_stop {#1} {#2} } \cs_new_protected:Npn \__cmd_arg_to_keyvalue_loop:w #1 \q__cmd_recursion_stop { \tl_if_head_is_N_type:nTF {#1} { \__cmd_arg_to_keyvalue_loop_N_type:N } { \tl_if_head_is_group:nTF {#1} { \__cmd_arg_to_keyvalue_loop_group:n } { \__cmd_arg_to_keyvalue_loop_space:w } } #1 \q__cmd_recursion_stop } \cs_new_protected:Npn \__cmd_arg_to_keyvalue_loop_group:n #1 { \__cmd_arg_to_keyvalue_loop:w } \use:n { \cs_new_protected:Npn \__cmd_arg_to_keyvalue_loop_space:w } ~ { \__cmd_arg_to_keyvalue_loop:w } \cs_new_protected:Npn \__cmd_arg_to_keyvalue_loop_N_type:N #1 { \__cmd_if_recursion_tail_stop_do:Nn #1 { \__cmd_arg_to_keyvalue_set_default:nn } \str_if_eq:nnTF {#1} { = } { \__cmd_use_i_delimit_by_q_recursion_stop:nw { \__cmd_arg_to_keyvalue_set_keyvalue:nn } } { \bool_lazy_or:nnTF { \token_if_math_toggle_p:N #1 } { \str_if_eq_p:nn {#1} { \( } } { \__cmd_arg_to_keyvalue_math:w } { \__cmd_arg_to_keyvalue_loop:w } } } \cs_new_protected:Npn \__cmd_arg_to_keyvalue_math:w #1 \q__cmd_recursion_stop { \tl_if_head_is_N_type:nTF {#1} { \__cmd_arg_to_keyvalue_math_N_type:N } { \tl_if_head_is_group:nTF {#1} { \__cmd_arg_to_keyvalue_math_group:n } { \__cmd_arg_to_keyvalue_math_space:w } } #1 \q__cmd_recursion_stop } \cs_new_protected:Npn \__cmd_arg_to_keyvalue_math_N_type:N #1 { \__cmd_if_recursion_tail_stop_do:Nn #1 { \__cmd_arg_to_keyvalue_set_default:nn } \bool_lazy_or:nnTF { \token_if_math_toggle_p:N #1 } { \str_if_eq_p:nn {#1} { \) } } { \__cmd_arg_to_keyvalue_loop:w } { \__cmd_arg_to_keyvalue_math:w } } \cs_new_protected:Npn \__cmd_arg_to_keyvalue_math_group:n #1 { \__cmd_arg_to_keyvalue_math:w } \use:n { \cs_new_protected:Npn \__cmd_arg_to_keyvalue_math_space:w } ~ { \__cmd_arg_to_keyvalue_math:w } \cs_new_protected:Npn \__cmd_arg_to_keyvalue_set_default:nn #1#2 { \tl_set:Nn \ProcessedArgument { #1 = {#2} } } \cs_new_protected:Npn \__cmd_arg_to_keyvalue_set_keyvalue:nn #1#2 { \tl_set:Nn \ProcessedArgument {#2} } \cs_new:Npn \__cmd_split_N_head_apply:Nn #1#2 { \exp:w \if_false: { \fi: \__cmd_split_N_head_apply_aux:NNw #1#2 } } \cs_new:Npn \__cmd_split_N_head_apply_aux:NNw #1#2 { \exp_after:wN \exp_end: \exp_after:wN #1 \exp_after:wN #2 \exp_after:wN { \if_false: } \fi: } \cs_new_protected:Npn \__cmd_check_definable:nNT #1 { \tl_trim_spaces_apply:nN {#1} \__cmd_check_definable_aux:nN } \group_begin: \char_set_catcode_active:n { `? } \cs_new_protected:Npn \__cmd_check_definable_aux:nN #1#2 { \group_begin: \tl_if_single_token:nTF {#1} { \int_set:Nn \tex_escapechar:D { 92 } \exp_args:Nx \tl_if_empty:nTF { \exp_args:No \str_tail:n { \token_to_str:N #1 } } { \exp_args:Nx \char_set_lccode:nn { ` \str_head:n {#1} } { `? } \tex_lowercase:D { \tl_if_eq:nnTF {#1} } { ? } { \group_end: \use_iii:nnn } { \group_end: \use_i:nnn } } { \group_end: \use_iii:nnn } } { \group_end: \use_ii:nnn } { \msg_error:nnxx { cmd } { not-definable } { \tl_to_str:n {#1} } { \token_to_str:N #2 } } { \msg_error:nnxx { cmd } { not-one-token } { \tl_to_str:n {#1} } { \token_to_str:N #2 } } } \group_end: \cs_new_protected:Npn \__cmd_token_if_cs:NTF #1 { \group_begin: \int_set:Nn \tex_escapechar:D { 92 } \exp_args:Nx \tl_if_empty:nTF { \exp_args:No \str_tail:n { \token_to_str:N #1 } } { \group_end: \use_ii:nn } { \group_end: \use_i:nn } } \cs_new:Npn \__cmd_tl_mapthread_function:NNN #1#2#3 { \exp_after:wN \exp_after:wN \exp_after:wN \__cmd_tl_mapthread_loop:w \exp_after:wN \exp_after:wN \exp_after:wN #3 \exp_after:wN #1 \exp_after:wN \q_recursion_tail \exp_after:wN \q_mark #2 \q_recursion_tail \q_recursion_stop } \cs_new:Npn \__cmd_tl_mapthread_function:nnN #1#2#3 { \__cmd_tl_mapthread_loop:w #3 #1 \q_recursion_tail \q_mark #2 \q_recursion_tail \q_recursion_stop } \cs_new:Npn \__cmd_tl_mapthread_loop:w #1#2#3 \q_mark #4 { \quark_if_recursion_tail_stop:n {#2} \quark_if_recursion_tail_stop:n {#4} #1 {#2} {#4} \__cmd_tl_mapthread_loop:w #1#3 \q_mark } \cs_new_protected:Npn \__cmd_cmd_type_cases:NnnnnnF #1 #2 #3 #4 #5 #6 #7 { \exp_args:Ne \str_case_e:nnF { \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 } } } } { { \exp_not:N \__cmd_start:nNNnnn } {#2} { \exp_not:N \__cmd_start_expandable:nNNNNn } {#3} { \exp_not:N \__cmd_start_optimized: } {#4} { \exp_not:N \__cmd_start_env:nnnnn } {#5} { \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: } {#6} } {#7} } \cs_new_protected:Npn \__kernel_cmd_if_xparse:NTF #1 { \__cmd_cmd_type_cases:NnnnnnF #1 { } { } { } { } { } { \use_iii:nnn } \use_i:nn } \cs_new_protected:Npn \__cmd_peek_nonspace:NTF { \__cmd_peek_nonspace_aux:nNNTF { } \__cmd_peek_meaning:NTF } \cs_new_protected:Npn \__cmd_peek_nonspace_remove:NTF { \__cmd_peek_nonspace_aux:nNNTF { } \__cmd_peek_meaning_remove:NTF } \cs_new_protected:Npn \__cmd_peek_nonspace_aux:nNNTF #1#2#3#4#5 { \peek_meaning_remove:NTF \c_space_token { \__cmd_peek_nonspace_aux:nNNTF { #1 ~ } #2 #3 {#4} {#5} } { #2 #3 { #4 } { #5 #1 } } } \cs_new_protected:Npn \__cmd_peek_meaning:NTF { \__cmd_peek_meaning_aux:NNTF \c_false_bool } \cs_new_protected:Npn \__cmd_peek_meaning_remove:NTF { \__cmd_peek_meaning_aux:NNTF \c_true_bool } \cs_new_protected:Npn \__cmd_peek_meaning_aux:NNTF #1#2#3#4 { \tl_set:Nn \l__cmd_tmpa_tl {#3} \tl_set:Nn \l__cmd_tmpb_tl {#4} \peek_meaning:NTF #2 { \token_if_eq_meaning:NNTF #2 \c_group_begin_token { \__cmd_peek_true_remove:Nw #1 } { \__cmd_token_if_cs:NTF #2 { \__cmd_peek_cs_check_equal:NNN #1 #2 } { \__cmd_peek_true_remove:Nw #1 } } } { \l__cmd_tmpb_tl } } \cs_new_protected:Npn \__cmd_peek_cs_check_equal:NNN #1#2#3 { \str_if_eq:nnTF {#2} {#3} { \__cmd_peek_true_remove:Nw #1 } { \l__cmd_tmpb_tl } #3 } \cs_new_protected:Npn \__cmd_peek_true_remove:Nw #1 { \bool_if:NTF #1 { \tex_afterassignment:D \l__cmd_tmpa_tl \cs_set_eq:NN \__cmd_tmp:w } { \l__cmd_tmpa_tl } } \tl_const:Nn \c__cmd_ignore_def_tl { \\ \\ LaTeX~will~ignore~this~entire~definition. } \cs_new:Npn \__cmd_environment_or_command: { \bool_if:NTF \l__cmd_environment_bool { environment ~ ' \l__cmd_environment_str ' } { command ~ ' \c_backslash_str \tl_to_str:N \l__cmd_function_tl ' } } \msg_new:nnnn { cmd } { arg-after-body } { Argument~type~'b'~must~be~last~in~#1. } { The~'b'~argument~type~must~come~last~but~it~is~followed~ by~'#2'~in~the~argument~specification.~This~is~not~allowed. \c__cmd_ignore_def_tl } \msg_new:nnnn { cmd } { bad-arg-spec } { Bad~argument~specification~'#2'~for~#1. } { The~argument~specification~provided~is~not~valid:~ one~or~more~mandatory~parts~are~missing. \c__cmd_ignore_def_tl } \msg_new:nnnn { cmd } { already-defined } { Command~'#1'~already~defined. } { You~have~used~#2~ with~a~command~that~already~has~a~definition. \\ \\ The~existing~definition~of~'#1'~will~not~be~altered. } \msg_new:nnnn { cmd } { undefined } { Command ~'#1'~undefined. } { You~have~used~#2~ with~a~command~that~was~never~defined. \c__cmd_ignore_def_tl } \msg_new:nnnn { cmd } { env-already-defined } { Environment~'#1'~already~defined. } { You~have~used~\NewDocumentEnvironment with~an~environment~that~already~has~a~definition. \\ \\ The~existing~definition~of~'#1'~will~not~be~altered. } \msg_new:nnnn { cmd } { env-end-already-defined } { End~of~environment~'#1'~already~defined. } { You~have~used~\NewDocumentEnvironment with~an~environment~that~already~has~a~definition~for~'end#1'. \\ \\ The~existing~definition~of~'#1'~will~not~be~altered. } \msg_new:nnnn { cmd } { env-undefined } { Environment~'#1'~undefined. } { You~have~used~\RenewDocumentEnvironment with~an~environment~that~was~never~defined. \c__cmd_ignore_def_tl } \msg_new:nnnn { cmd } { expandable-ending-optional } { Bad~argument~specification~'#2'~for~#1. } { Expandable~commands~must~have~a~final~mandatory~argument~ (or~no~arguments~at~all).~You~cannot~have~a~terminal~optional~ argument~with~expandable~commands. } \msg_new:nnnn { cmd } { long-short-mix } { Invalid~argument~prefix~'+'~in~command~'#1'. } { The~arguments~for~an~expandable~command~must~not~involve~short~ arguments~after~long~arguments.~You~have~tried~to~mix~the~two~types~ when~defining~'#1'. } \msg_new:nnnn { cmd } { invalid-command-arg } { Invalid~argument~type~'#2'~in~#1. } { The~letter~'#2'~can~only~be~used~in~environment~argument~ specifications,~but~not~for~commands. \\ \\ LaTeX~will~ignore~the~entire~definition. } \msg_new:nnnn { cmd } { invalid-expandable-arg } { Invalid~argument~type~'#2'~in~#1. } { The~letter~'#2'~specifies~an~argument~type~which~cannot~be~used~ in~an~expandable~command. \c__cmd_ignore_def_tl } \msg_new:nnnn { cmd } { invalid-after-optional-expandably } { Argument~'#2'~invalid~after~optional~arg~in~#1. } { The~letter~'#2'~specifies~an~argument~type~which~cannot~be~used~ in~an~expandable~command~after~an~optional~argument. \c__cmd_ignore_def_tl } \msg_new:nnnn { cmd } { invalid-bang } { Invalid~argument~prefix~'!'~in~#1. } { The~prefix~'!'~is~only~allowed~for~trailing~optional~arguments.~ You~tried~to~apply~it~to~#2. \c__cmd_ignore_def_tl } \msg_new:nnnn { cmd } { not-definable } { First~argument~of~'#2'~must~be~a~command. } { The~first~argument~of~'#2'~should~be~the~document~command~that~will~ be~defined.~The~provided~argument~'#1'~is~a~character.~Perhaps~a~ backslash~is~missing? \c__cmd_ignore_def_tl } \msg_new:nnnn { cmd } { not-one-token } { First~argument~of~'#2'~must~be~a~command. } { The~first~argument~of~'#2'~should~be~the~document~command~that~will~ be~defined.~The~provided~argument~'#1'~contains~more~than~one~ token.~Perhaps~a~backslash~is~missing? \c__cmd_ignore_def_tl } \msg_new:nnnn { cmd } { not-single-token } { Argument~delimiter~'#2'~invalid~in~#1. } { The~argument~specification~contains~ \tl_if_empty:nTF{#2}{nothing}{'#2'}~ in~a~place~ where~a~single~token~is~required. \c__cmd_ignore_def_tl } \msg_new:nnnn { cmd } { forbidden-group-token } { Argument~delimiter~'#2'~invalid~in~#1. } { The~argument~specification~contains~the~implicit~ #3-group~token~'#2'~which~is~not~allowed~as~an~argument~delimiter. \c__cmd_ignore_def_tl } \msg_new:nnnn { cmd } { processor-in-expandable } { Invalid~argument~prefix~'>'~in~command~'#1'. } { The~argument~specification~for~'#1'~contains~the~processor~function~'>{#2}'.~ This~is~only~supported~for~robust~commands,~but~not~for~expandable~ones. \c__cmd_ignore_def_tl } \msg_new:nnnn { cmd } { keyval-in-expandable } { Invalid~argument~prefix~'='~in~command~'#1'. } { The~argument~specification~for~'#1'~contains~a~key--value~marker~'={#2}'.~ This~is~only~supported~for~robust~commands,~but~not~for~expandable~ones. \c__cmd_ignore_def_tl } \msg_new:nnnn { cmd } { too-many-args } { Too~many~arguments~for~#1. } { The~argument~specification~'#2'~asks~for~more~than~9~arguments.~ This~cannot~be~implemented. \c__cmd_ignore_def_tl } \msg_new:nnnn { cmd } { two-markers } { Invalid~argument~prefix~'#2'~in~#1. } { The~argument~specification~provided~for~#1~has~two~'#2'~markers~applied~ to~the~same~argument;~one~is~redundant. } \msg_new:nnnn { cmd } { unknown-argument-type } % should be unkown-arg-type but dep in xparse { Invalid~argument~type~'#2'~in~#1. } { The~letter~'#2'~does~not~specify~a~known~argument~type. \c__cmd_ignore_def_tl } \msg_new:nnnn { cmd } { xparse-arg-type } { Invalid~argument~type~'#2'~in~#1~(requires~xparse). } { The~letter~'#2'~specifies~a~known~but~deprecated~argument~type.~ If~you~really~need~it~you~have~to~load~the~xparse~package. \c__cmd_ignore_def_tl } \msg_new:nnn { cmd } { if-boolean } { Invalid~argument~{#1}~to~\iow_char:N\\IfBoolean... } \msg_new:nnnn { cmd } { default-loop } { Circular~dependency~in~defaults~of~#1. } { The~default~values~of~two~or~more~arguments~of~the~#1~ depend~on~each~other~in~a~way~that~cannot~be~resolved. } \msg_new:nnnn { cmd } { missing-required } { Required~argument~missing~for~#1. } { The~#1~expects~one~of~its~arguments~to~start~with~'#2'.~ LaTeX~did~not~find~this~argument~and~will~insert~a~default~value~ for~further~processing. } \msg_new:nnnn { cmd } { arg-split } { Too~many~'#1'~separators~in~argument. } { LaTeX~was~asked~to~split~the~input~'#3'~ at~each~occurrence~of~the~separator~'#1'~into~#2~parts.~ Too~many~separators~were~found. } \msg_new:nnnn { cmd } { verbatim-nl } { Verbatim-like~#1~ended~by~end~of~line. } { The~verbatim~argument~of~the~#1~cannot~contain~more~than~one~line,~ but~the~end~ of~the~current~line~has~been~reached.~You~may~have~forgotten~the~ closing~delimiter. \\ \\ LaTeX~will~ignore~'#2'~and~you~may~get~some~additional~ (low-level)~errors. } \msg_new:nnnn { cmd } { verbatim-tokenized } { Verbatim-like~#1~illegal~in~argument. } { The~#1~takes~a~verbatim~argument~and~should~therefore~normally~ not~be~used~in~arguments~of~other~commands~or~environments.~ LaTeX~found~an~illegal~token~ \tl_if_empty:nF {#3} { (#3)~ } after~'#2'~and~will~drop~everything~up~to~this~point. \\ \\ Expect~further~(low-level)~errors. } \msg_new:nnn { cmd } { define-command } % should be just ``define'' but dep in xparse { Defining~command~#1~ with~sig.~'#2'~\msg_line_context:. } \msg_new:nnn { cmd } { define-env } { Defining~environment~'#1'~ with~sig.~'#2'~\msg_line_context:. } \msg_new:nnn { cmd } { redefine } { Redefining~command~#1~ with~sig.~'#2'~\msg_line_context:. } \msg_new:nnn { cmd } { redefine-env } { Redefining~environment~'#1'~ with~sig.~'#2'~\msg_line_context:. } \msg_new:nnn { cmd } { optional-mandatory } { Optional~and~mandatory~argument~with~same~delimiter~'#2'. \\ \\ The~mandatory~argument~specified~with~ '\str_case:nnF{#1}{ {R/r}{r'~or~'R} }{#1}'~has~the~ same~delimiter~'#2'~as~an~earlier~optional~argument.~ It~will~therefore~not~be~possible~to~omit~all~the~earlier~ optional~arguments~when~calling~this~command. \\ \\ This~may~be~intentional,~but~then~it~might~be~a~mistake. } \msg_new:nnn { cmd } { unsupported-let } { The~command~'#1'~was~undefined~but~not~the~associated~commands~ '#1~code'~and/or~'#1~defaults'.~Maybe~you~tried~using~ \iow_char:N\\let.~This~may~lead~to~an~infinite~loop. } \cs_new_eq:NN \BooleanFalse \c_false_bool \cs_new_eq:NN \BooleanTrue \c_true_bool \cs_new_protected:Npn \NewDocumentCommand #1#2#3 { \__cmd_check_definable:nNT {#1} \NewDocumentCommand { \cs_if_exist:NTF #1 { \msg_error:nnxx { cmd } { already-defined } { \use:nnn \token_to_str:N #1 { } } { \token_to_str:N \NewDocumentCommand } } { \__cmd_declare_cmd:Nnn #1 {#2} {#3} } } } \cs_new_protected:Npn \RenewDocumentCommand #1#2#3 { \__cmd_check_definable:nNT {#1} \RenewDocumentCommand { \cs_if_exist:NTF #1 { \__cmd_declare_cmd:Nnn #1 {#2} {#3} } { \msg_error:nnxx { cmd } { undefined } { \use:nnn \token_to_str:N #1 { } } { \token_to_str:N \RenewDocumentCommand } } } } \cs_new_protected:Npn \ProvideDocumentCommand #1#2#3 { \__cmd_check_definable:nNT {#1} \ProvideDocumentCommand { \cs_if_exist:NF #1 { \__cmd_declare_cmd:Nnn #1 {#2} {#3} } } } \cs_new_protected:Npn \DeclareDocumentCommand #1#2#3 { \__cmd_check_definable:nNT {#1} \DeclareDocumentCommand { \__cmd_declare_cmd:Nnn #1 {#2} {#3} } } \IncludeInRelease{2024/11/01}{\NewDocumentEnvironment}% {Trim~spaces~from~envname~first} \cs_new_protected:Npn \NewDocumentEnvironment #1#2#3#4 { \__cmd_new_env:ennn { \tl_trim_spaces:e {#1} } {#2} {#3} {#4} } \cs_new_protected:Npn \RenewDocumentEnvironment #1#2#3#4 { \__cmd_renew_env:ennn { \tl_trim_spaces:e {#1} } {#2} {#3} {#4} } \cs_new_protected:Npn \ProvideDocumentEnvironment #1#2#3#4 { \__cmd_provide_env:ennn { \tl_trim_spaces:e {#1} } {#2} {#3} {#4} } \cs_new_protected:Npn \DeclareDocumentEnvironment #1#2#3#4 { \__cmd_declare_env:ennn { \tl_trim_spaces:e {#1} } {#2} {#3} {#4} } \cs_new_protected:Npn \__cmd_new_env:nnnn #1 { \cs_if_exist:cTF {#1} { \msg_error:nnx { cmd } { env-already-defined } {#1} \use_none:nnn } { \cs_if_exist:cTF { end #1 } { \msg_error:nnx { cmd } { env-end-already-defined } {#1} \use_none:nnn } { \__cmd_declare_env:nnnn {#1} } } } \cs_new_protected:Npn \__cmd_renew_env:nnnn #1 { \cs_if_exist:cTF {#1} { \__cmd_declare_env:nnnn {#1} } { \msg_error:nnx { cmd } { env-undefined } {#1} \use_none:nnn } } \cs_new_protected:Npn \__cmd_provide_env:nnnn #1 { \cs_if_exist:cTF {#1} { \use_none:nnn } { \__cmd_declare_env:nnnn {#1} } } \cs_generate_variant:Nn \__cmd_new_env:nnnn { e } \cs_generate_variant:Nn \__cmd_renew_env:nnnn { e } \cs_generate_variant:Nn \__cmd_provide_env:nnnn { e } \EndIncludeInRelease \IncludeInRelease{2024/06/01}{\NewDocumentEnvironment}% {Trim~spaces~from~envname~first} \cs_new_protected:Npn \NewDocumentEnvironment #1#2#3#4 { \cs_if_exist:cTF {#1} { \msg_error:nnx { cmd } { env-already-defined } {#1} } { \cs_if_exist:cTF { end #1 } { \msg_error:nnx { cmd } { env-end-already-defined } {#1} } { \__cmd_declare_env:nnnn {#1} {#2} {#3} {#4} } } } \cs_new_protected:Npn \RenewDocumentEnvironment #1#2#3#4 { \cs_if_exist:cTF {#1} { \__cmd_declare_env:nnnn {#1} {#2} {#3} {#4} } { \msg_error:nnx { cmd } { env-undefined } {#1} } } \cs_new_protected:Npn \ProvideDocumentEnvironment #1#2#3#4 { \cs_if_exist:cF {#1} { \__cmd_declare_env:nnnn {#1} {#2} {#3} {#4} } } \cs_new_protected:Npn \DeclareDocumentEnvironment #1#2#3#4 { \__cmd_declare_env:nnnn {#1} {#2} {#3} {#4} } \cs_undefine:N \__cmd_new_env:nnnn \cs_undefine:N \__cmd_new_env:ennn \cs_undefine:N \__cmd_renew_env:nnnn \cs_undefine:N \__cmd_renew_env:ennn \cs_undefine:N \__cmd_provide_env:nnnn \cs_undefine:N \__cmd_provide_env:ennn \EndIncludeInRelease \cs_new_protected:Npn \NewExpandableDocumentCommand #1#2#3 { \__cmd_check_definable:nNT {#1} \NewExpandableDocumentCommand { \cs_if_exist:NTF #1 { \msg_error:nnxx { cmd } { already-defined } { \use:nnn \token_to_str:N #1 { } } { \token_to_str:N \NewExpandableDocumentCommand } } { \__cmd_declare_expandable_cmd:Nnn #1 {#2} {#3} } } } \cs_new_protected:Npn \RenewExpandableDocumentCommand #1#2#3 { \__cmd_check_definable:nNT {#1} \RenewExpandableDocumentCommand { \cs_if_exist:NTF #1 { \__cmd_declare_expandable_cmd:Nnn #1 {#2} {#3} } { \msg_error:nnxx { cmd } { undefined } { \use:nnn \token_to_str:N #1 { } } { \token_to_str:N \RenewExpandableDocumentCommand } } } } \cs_new_protected:Npn \ProvideExpandableDocumentCommand #1#2#3 { \__cmd_check_definable:nNT {#1} \ProvideExpandableDocumentCommand { \cs_if_exist:NF #1 { \__cmd_declare_expandable_cmd:Nnn #1 {#2} {#3} } } } \cs_new_protected:Npn \DeclareExpandableDocumentCommand #1#2#3 { \__cmd_check_definable:nNT {#1} \DeclareExpandableDocumentCommand { \__cmd_declare_expandable_cmd:Nnn #1 {#2} {#3} } } \cs_new:Npn \IfBooleanTF #1 { \tl_if_single:nF {#1} { \prg_break:n { \use:n } } \tl_if_single_token:nF #1 { \prg_break:n { \use:n } } \token_if_eq_meaning:NNT #1 \c_true_bool { \prg_break:n { \use_ii:nnn } } \token_if_eq_meaning:NNT #1 \c_false_bool { \prg_break:n { \use_iii:nnn } } \prg_break:n { \use:n } \prg_break_point: { \msg_expandable_error:nnn { cmd } { if-boolean } {#1} \use_ii:nn } } \cs_new:Npn \IfBooleanT #1#2 { \IfBooleanTF {#1} {#2} { } } \cs_new:Npn \IfBooleanF #1 { \IfBooleanTF {#1} { } } \cs_new_eq:NN \IfNoValueF \tl_if_novalue:nF \cs_new_eq:NN \IfNoValueT \tl_if_novalue:nT \cs_new_eq:NN \IfNoValueTF \tl_if_novalue:nTF \cs_new:Npn \IfValueF { \tl_if_novalue:nT } \cs_new:Npn \IfValueT { \tl_if_novalue:nF } \cs_new:Npn \IfValueTF #1#2#3 { \tl_if_novalue:nTF {#1} {#3} {#2} } \IncludeInRelease{2022/06/01}% {\IfBlankTF}{Testing~for~empty~or~blank}% \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 \EndIncludeInRelease \IncludeInRelease{2021/11/15}% {\IfBlankTF}{Testing~for~empty~or~blank}% \cs_undefine:N \IfBlankF \cs_undefine:N \IfBlankT \cs_undefine:N \IfBlankTF \EndIncludeInRelease \tl_new:N \ProcessedArgument \cs_new_eq:NN \ReverseBoolean \__cmd_bool_reverse:N \cs_new_eq:NN \SplitArgument \__cmd_split_argument:nnn \cs_new_eq:NN \SplitList \__cmd_split_list:nn \cs_new_eq:NN \TrimSpaces \__cmd_trim_spaces:n \cs_new_eq:NN \ProcessList \tl_map_function:nN \cs_gset_eq:NN \__kernel_chk_if_free_cs:N \__cmd_chk_if_free_cs:N \cs_undefine:N \__cmd_chk_if_free_cs:N \IncludeInRelease{0000/00/00}{ltcmd}% {Document~command~parser}% \EndModuleRelease \ExplSyntaxOff \@ifundefined{ExplSyntaxOff}{}{\latexrelease@postltcmd} \catcode`\^^@=\@latexrelease@catcode@null\relax %%% From File: lthooks.dtx \ExplSyntaxOn \NewModuleRelease{2020/10/01}{lthooks} {The~hook~management~system} \bool_new:N \g__hook_debug_bool \cs_new_eq:NN \__hook_debug:n \use_none:n \cs_new_protected:Npn \hook_debug_on: { \bool_gset_true:N \g__hook_debug_bool \__hook_debug_gset: } \cs_new_protected:Npn \hook_debug_off: { \bool_gset_false:N \g__hook_debug_bool \__hook_debug_gset: } \cs_new_protected:Npn \__hook_debug_gset: { \cs_gset_protected:Npx \__hook_debug:n ##1 { \bool_if:NT \g__hook_debug_bool {##1} } } \cs_new_eq:NN \__hook_str_compare:nn \__str_if_eq:nn \bool_new:N \l__hook_tmpa_bool \tl_new:N \l__hook_return_tl \tl_new:N \l__hook_tmpa_tl \tl_new:N \l__hook_tmpb_tl \seq_new:N \g__hook_all_seq \tl_new:N \l__hook_cur_hook_tl \prop_new:N \l__hook_work_prop \prop_new:N \g__hook_used_prop \tl_new:N \g__hook_hook_curr_name_tl \seq_new:N \g__hook_name_stack_seq \cs_new_eq:NN \__hook_tmp:w ? \tl_const:Nn \c__hook_empty_tl { } \tl_const:Nn \c__hook_nine_parameters_tl { #1#2#3#4#5#6#7#8#9 } \cs_generate_variant:Nn \tl_gremove_once:Nn { Nx } \cs_generate_variant:Nn \tl_show:n { x } \cs_generate_variant:Nn \tl_log:n { x } \cs_generate_variant:Nn \tl_set:Nn { Ne } \cs_generate_variant:Nn \cs_replacement_spec:N { c } \cs_generate_variant:Nn \prop_put:Nnn { Nne } \cs_generate_variant:Nn \str_count:n { e } \scan_new:N \s__hook_mark \cs_new:Npn \__hook_use_none_delimit_by_s_mark:w #1 \s__hook_mark { } \cs_new:Npn \__hook_use_i_delimit_by_s_mark:nw #1 #2 \s__hook_mark {#1} \cs_new_protected:Npn \__hook_tl_set:cn #1#2 { \cs_set_nopar:cpx {#1} { \__kernel_exp_not:w {#2} } } \cs_new_protected:Npn \__hook_tl_gset:Nn #1#2 { \cs_gset_nopar:Npx #1 { \__kernel_exp_not:w {#2} } } \cs_new_protected:Npn \__hook_tl_gset:Nx #1#2 { \cs_gset_nopar:Npx #1 {#2} } \cs_generate_variant:Nn \__hook_tl_gset:Nn { c, co } \cs_generate_variant:Nn \__hook_tl_gset:Nx { c } \cs_new_protected:Npn \__hook_tl_gput_right:Nn #1#2 { \__hook_tl_gset:Nx #1 { \__kernel_exp_not:w \exp_after:wN { #1 #2 } } } \cs_generate_variant:Nn \__hook_tl_gput_right:Nn { Ne, cn } \cs_new_protected:Npn \__hook_tl_gput_left:Nn #1#2 { \__hook_tl_gset:Nx #1 { \__kernel_exp_not:w {#2} \__kernel_exp_not:w \exp_after:wN {#1} } } \cs_new_eq:NN \__hook_tl_gset_eq:NN \tl_gset_eq:NN \cs_new_protected:Npn \__hook_tl_gclear:N #1 { \__hook_tl_gset_eq:NN #1 \c_empty_tl } \cs_generate_variant:Nn \__hook_tl_gclear:N { c } \IncludeInRelease{2023/06/01}{\hook_new_with_args:nn} {Hooks~with~args} \cs_new_protected:Npn \hook_new:n #1 { \__hook_normalize_hook_args:Nn \__hook_new:nn {#1} { 0 } } \cs_new_protected:Npn \hook_new_with_args:nn #1 #2 { \__hook_normalize_hook_args:Nn \__hook_new:nn {#1} {#2} } \cs_new_protected:Npn \__hook_new:nn #1 #2 { \__hook_if_declared:nTF {#1} { \msg_error:nnn { hooks } { exists } {#1} } { \tl_new:c { g__hook_#1_declared_tl } \cs_undefine:c { __hook~#1 } \cs_undefine:c { c__hook_#1_parameter_tl } \__hook_make_usable:nn {#1} {#2} \__hook_update_hook_code:n {#1} } } \EndIncludeInRelease \IncludeInRelease{2020/10/01}{\hook_new_with_args:nn} {Hooks~with~args} \cs_gset_protected:Npn \hook_new:n #1 { \__hook_normalize_hook_args:Nn \__hook_new:n {#1} } \cs_undefine:N \__hook_new:nn \cs_gset_protected:Npn \__hook_new:n #1 { \__hook_if_declared:nTF {#1} { \msg_error:nnn { hooks } { exists } {#1} } { \tl_new:c { g__hook_#1_declared_tl } \__hook_make_usable:n {#1} } } \cs_gset_protected:Npn \hook_new_with_args:nn #1 { } \EndIncludeInRelease \IncludeInRelease{2023/06/01}{\__hook_make_usable:nn} {Hooks~with~args} \cs_new_protected:Npn \__hook_make_usable:nn #1 #2 { \__hook_if_usable:nF {#1} { \seq_gput_right:Nn \g__hook_all_seq {#1} \__kernel_cs_parm_from_arg_count:nnF { \tl_const:cn { c__hook_#1_parameter_tl } } {#2} { \msg_error:nnnn { hooks } { too-many-args } {#1} {#2} \tl_const:cx { c__hook_#1_parameter_tl } { \exp_not:V \c__hook_nine_parameters_tl } } \__hook_normalise_cs_args:nn { _toplevel } {#1} \__hook_normalise_cs_args:nn { _next } {#1} \__hook_code_gset:nn {#1} { } \__hook_init_structure:n {#1} \__hook_normalise_code_pool:n {#1} \clist_if_exist:cF { g__hook_#1_labels_clist } { \clist_new:c { g__hook_#1_labels_clist } \tl_new:c { g__hook_#1_reversed_tl } } \__hook_include_legacy_code_chunk:n {#1} } } \EndIncludeInRelease \IncludeInRelease{2020/10/01}{\__hook_make_usable:nn} {Hooks~with~args} \cs_undefine:N \__hook_make_usable:nn \cs_gset_protected:Npn \__hook_make_usable:n #1 { \tl_if_exist:cF { __hook~#1 } { \seq_gput_right:Nn \g__hook_all_seq {#1} \tl_new:c { __hook~#1 } \__hook_init_structure:n {#1} \clist_new:c { g__hook_#1_labels_clist } \tl_new:c { g__hook_#1_reversed_tl } \__hook_include_legacy_code_chunk:n {#1} } } \EndIncludeInRelease \IncludeInRelease{2023/06/01}{\__hook_init_structure:n} {Hooks~with~args} \cs_new_protected:Npn \__hook_init_structure:n #1 { \__hook_if_structure_exist:nF {#1} { \prop_new:c { g__hook_#1_code_prop } \__hook_toplevel_gset:nn {#1} { } \__hook_next_gset:nn {#1} { } } } \EndIncludeInRelease \IncludeInRelease{2020/10/01}{\__hook_init_structure:n} {Hooks~with~args} \cs_gset_protected:Npn \__hook_init_structure:n #1 { \__hook_if_structure_exist:nF {#1} { \prop_new:c { g__hook_#1_code_prop } \tl_new:c { __hook_toplevel~#1 } \tl_new:c { __hook_next~#1 } } } \EndIncludeInRelease \IncludeInRelease{2023/06/01}{\hook_new_reversed_with_args:nn} {Hooks~with~args} \cs_new_protected:Npn \hook_new_reversed:n #1 { \__hook_normalize_hook_args:Nn \__hook_new_reversed:nn {#1} { 0 } } \cs_new_protected:Npn \hook_new_reversed_with_args:nn #1 #2 { \__hook_normalize_hook_args:Nn \__hook_new_reversed:nn {#1} {#2} } \cs_new_protected:Npn \__hook_new_reversed:nn #1 #2 { \__hook_if_declared:nTF {#1} { \msg_error:nnn { hooks } { exists } {#1} } { \__hook_new:nn {#1} {#2} \tl_gset:cn { g__hook_#1_reversed_tl } { - } } } \EndIncludeInRelease \IncludeInRelease{2020/10/01}{\hook_new_reversed_with_args:nn} {Hooks~with~args} \cs_gset_protected:Npn \hook_new_reversed:n #1 { \__hook_normalize_hook_args:Nn \__hook_new_reversed:n {#1} } \cs_undefine:N \__hook_new_reversed:nn \cs_gset_protected:Npn \__hook_new_reversed:n #1 { \__hook_new:n {#1} \tl_gset:cn { g__hook_#1_reversed_tl } { - } } \cs_undefine:N \__hook_new_reversed:nn \cs_gset_protected:Npn \hook_new_reversed_with_args:nn #1 #2 { } \EndIncludeInRelease \IncludeInRelease{2023/06/01}{\hook_new_pair_with_args:nnn} {Hooks~with~args} \cs_new_protected:Npn \hook_new_pair:nn #1#2 { \__hook_normalize_hook_args:Nnn \__hook_new_pair:nnn {#1} {#2} { 0 } } \cs_new_protected:Npn \hook_new_pair_with_args:nnn #1#2#3 { \__hook_normalize_hook_args:Nnn \__hook_new_pair:nnn {#1} {#2} {#3} } \cs_new_protected:Npn \__hook_new_pair:nnn #1 #2 #3 { \__hook_if_declared:nTF {#1} { \msg_error:nnn { hooks } { exists } {#1} } { \__hook_if_declared:nTF {#2} { \msg_error:nnn { hooks } { exists } {#2} } { \__hook_new:nn {#1} {#3} \__hook_new_reversed:nn {#2} {#3} } } } \EndIncludeInRelease \IncludeInRelease{2020/10/01}{\hook_new_pair_with_args:nnn} {Hooks~with~args} \cs_gset_protected:Npn \hook_new_pair:nn #1#2 { \hook_new:n {#1} \hook_new_reversed:n {#2} } \cs_gset_protected:Npn \hook_new_pair_with_args:nnn #1#2#3 { } \EndIncludeInRelease \IncludeInRelease{2023/06/01}{\__hook_include_legacy_code_chunk:n} {Hooks~with~args} \cs_new_protected:Npn \__hook_include_legacy_code_chunk:n #1 { \tl_if_exist:cT { @#1hook } { \tl_if_empty:cF { @#1hook } { \__hook_replacing_args_false: \use:e { \__hook_hook_gput_code_do:nnn {#1} { legacy } { \exp_not:v { @#1hook } } } \__hook_replacing_args_reset: \__hook_tl_gclear:c { @#1hook } } } } \EndIncludeInRelease \IncludeInRelease{2020/10/01}{\__hook_include_legacy_code_chunk:n} {Hooks~with~args} \cs_gset_protected:Npn \__hook_include_legacy_code_chunk:n #1 { \tl_if_exist:cT { @#1hook } { \tl_if_empty:cF { @#1hook } { \exp_args:Nnnv \__hook_hook_gput_code_do:nnn {#1} { legacy } { @#1hook } \__hook_tl_gclear:c { @#1hook } } } } \EndIncludeInRelease \IncludeInRelease{2021/06/01}{\hook_disable_generic:n} {Disable~hooks} \cs_new_protected:Npn \hook_disable_generic:n #1 { \__hook_normalize_hook_args:Nn \__hook_disable:n {#1} } \cs_new_protected:Npn \__hook_disable:n #1 { \tl_gclear_new:c { g__hook_#1_declared_tl } \cs_undefine:c { __hook~#1 } } \prg_new_conditional:Npnn \__hook_if_disabled:n #1 { p, T, F, TF } { \bool_lazy_and:nnTF { \tl_if_exist_p:c { g__hook_#1_declared_tl } } { ! \cs_if_exist_p:c { __hook~#1 } } { \prg_return_true: } { \prg_return_false: } } \EndIncludeInRelease \IncludeInRelease{2020/10/01}{\hook_disable_generic:n} {Disable~hooks} \cs_new_protected:Npn \hook_disable_generic:n #1 {} \EndIncludeInRelease \IncludeInRelease{2023/06/01}{\hook_activate_generic:n} {Providing~hooks} \cs_new_protected:Npn \hook_activate_generic:n #1 { \__hook_normalize_hook_args:Nn \__hook_activate_generic:nn {#1} { } } \cs_new_protected:Npn \__hook_activate_generic:nn #1 #2 { \__hook_if_disabled:nTF {#1} { \msg_warning:nnn { hooks } { activate-disabled } {#1} } { \__hook_if_declared:nF {#1} { \tl_new:c { g__hook_#1_declared_tl } \__hook_make_usable:nn {#1} { 0 } \tl_gset:cx { g__hook_#1_reversed_tl } { \__hook_if_generic_reversed:nT {#1} { - } } \__hook_update_hook_code:n {#1} } } } \EndIncludeInRelease \IncludeInRelease{2021/06/01}{\hook_activate_generic:n} {Providing~hooks} \cs_gset_protected:Npn \__hook_activate_generic:nn #1 #2 { \__hook_if_disabled:nTF {#1} { \msg_warning:nnn { hooks } { activate-disabled } {#1} } { \__hook_if_declared:nF {#1} { \tl_new:c { g__hook_#1_declared_tl } \__hook_make_usable:n {#1} \tl_gset:cx { g__hook_#1_reversed_tl } { \__hook_if_generic_reversed:nT {#1} { - } } \__hook_update_hook_code:n {#1} } } } \EndIncludeInRelease \IncludeInRelease{2020/10/01}{\hook_activate_generic:n} {Providing~hooks} \cs_gset_protected:Npn \hook_activate_generic:n #1 { } \EndIncludeInRelease \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:nN #2 } } \cs_new:Npn \__hook_parse_dot_label:nN #1#2 { \tl_if_empty:nTF {#1} { \bool_if:NTF #2 { \msg_expandable_error:nn { hooks } { empty-label } } { \msg_expandable_error:nn { hooks } { empty-hook } } \__hook_currname_or_default: } { \str_if_eq:nnTF {#1} { . } { \__hook_currname_or_default: } { \__hook_parse_dot_label:w #1 ./ \s__hook_mark } } } \cs_new:Npn \__hook_parse_dot_label:w #1 ./ #2 \s__hook_mark { \tl_if_empty:nTF {#1} { \__hook_parse_dot_label_aux:w #2 \s__hook_mark } { \tl_if_empty:nTF {#2} { \__hook_make_name:n {#1} } { \__hook_parse_dot_label_cleanup:w #1 ./ #2 \s__hook_mark } } } \cs_new:Npn \__hook_parse_dot_label_cleanup:w #1 ./ \s__hook_mark {#1} \cs_new:Npn \__hook_parse_dot_label_aux:w #1 ./ \s__hook_mark { \__hook_currname_or_default: / \__hook_make_name:n {#1} } \cs_new:Npn \__hook_currname_or_default: { \tl_if_empty:NTF \g__hook_hook_curr_name_tl { \tl_if_empty:NTF \@currname { \msg_expandable_error:nnn { latex2e } { should-not-happen } { Empty~default~label. } \__hook_make_name:n { label-missing } } { \@currname } } { \g__hook_hook_curr_name_tl } } \cs_new:Npn \__hook_make_name:n #1 { \exp_after:wN \exp_after:wN \exp_after:wN \__hook_make_name:w \exp_after:wN \token_to_str:N \cs:w __hook~ #1 \cs_end: } \exp_last_unbraced:NNNNo \cs_new:Npn \__hook_make_name:w #1 \tl_to_str:n { __hook~ } { } \cs_new_protected:Npn \__hook_normalize_hook_args_aux:Nn #1 #2 { \group_begin: \use:e { \group_end: \exp_not:N #1 #2 } } \cs_new_protected:Npn \__hook_normalize_hook_args:Nn #1 #2 { \__hook_normalize_hook_args_aux:Nn #1 { { \__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: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:nN {#2} \c_false_bool } { \__hook_parse_label_default:nN {#3} \c_true_bool } { \tl_trim_spaces:n {#4} } { \__hook_parse_label_default:nN {#5} \c_true_bool } } } \tl_gset:Nn \g__hook_hook_curr_name_tl { top-level } \seq_if_empty:NT \g__hook_name_stack_seq { \seq_gput_right:Nn \g__hook_name_stack_seq { top-level } } \cs_set_protected:Npn \__hook_tmp:w #1 #2 #3 { \quark_if_recursion_tail_stop:n {#1} \seq_gput_right:Nn \g__hook_name_stack_seq {#1} \__hook_tmp:w } \exp_after:wN \__hook_tmp:w \@currnamestack \q_recursion_tail \q_recursion_tail \q_recursion_tail \q_recursion_stop \tl_gset:Nx \g__hook_hook_curr_name_tl { \@currname } \seq_gpop_right:NN \g__hook_name_stack_seq \l__hook_tmpa_tl \cs_new_protected:Npn \__hook_curr_name_push:n #1 { \exp_args:Nx \__hook_curr_name_push_aux:n { \__hook_make_name:n {#1} } } \cs_new_protected:Npn \__hook_curr_name_push_aux:n #1 { \tl_if_blank:nTF {#1} { \msg_error:nn { hooks } { no-default-label } } { \str_if_eq:nnTF {#1} { top-level } { \msg_error:nnnnn { hooks } { set-top-level } { to } { PushDefaultHookLabel } {#1} } { \seq_gpush:NV \g__hook_name_stack_seq \g__hook_hook_curr_name_tl \tl_gset:Nn \g__hook_hook_curr_name_tl {#1} } } } \cs_new_protected:Npn \__hook_curr_name_pop: { \seq_gpop:NNTF \g__hook_name_stack_seq \l__hook_return_tl { \tl_gset_eq:NN \g__hook_hook_curr_name_tl \l__hook_return_tl } { \msg_error:nn { hooks } { extra-pop-label } } } \tl_gput_right:Nn \@kernel@after@enddocument@afterlastpage { \__hook_end_document_label_check: } \cs_new_protected:Npn \__hook_end_document_label_check: { \seq_gpop:NNT \g__hook_name_stack_seq \l__hook_return_tl { \msg_error:nnx { hooks } { missing-pop-label } { \g__hook_hook_curr_name_tl } \tl_gset_eq:NN \g__hook_hook_curr_name_tl \l__hook_return_tl \__hook_end_document_label_check: } } \cs_new_protected:Npn \__hook_set_default_hook_label:n #1 { \seq_if_empty:NTF \g__hook_name_stack_seq { \msg_error:nnnnn { hooks } { set-top-level } { for } { SetDefaultHookLabel } {#1} } { \exp_args:Nx \__hook_set_default_label:n { \__hook_make_name:n {#1} } } } \cs_new_protected:Npn \__hook_set_default_label:n #1 { \str_if_eq:nnTF {#1} { top-level } { \msg_error:nnnnn { hooks } { set-top-level } { to } { SetDefaultHookLabel } {#1} } { \tl_gset:Nn \g__hook_hook_curr_name_tl {#1} } } \IncludeInRelease{2023/06/01}{\hook_gput_code:nnn} {Hooks~with~args} \cs_new_protected:Npn \hook_gput_code:nnn #1 #2 #3 { \__hook_replacing_args_false: \__hook_normalize_hook_args:Nnn \__hook_gput_code:nnn {#1} {#2} {#3} \__hook_replacing_args_reset: } \cs_new_protected:Npn \hook_gput_code_with_args:nnn #1 #2 #3 { \__hook_replacing_args_true: \__hook_normalize_hook_args:Nnn \__hook_gput_code:nnn {#1} {#2} {#3} \__hook_replacing_args_reset: } \cs_new_protected:Npn \__hook_gput_code:nnn #1 #2 #3 { \__hook_chk_args_allowed:nn {#1} { AddToHook } \__hook_if_execute_immediately:nTF {#1} { \__hook_if_replacing_args:TF { \msg_error:nnnn { hooks } { one-time-args } {#1} { AddToHook } } { } \use:n } { \__hook_gput_code_store:nnn {#1} {#2} } {#3} } \cs_new_protected:Npn \__hook_gput_code_store:nnn #1 #2 #3 { \__hook_if_usable:nTF {#1} { \__hook_hook_gput_code_do:nnn {#1} {#2} {#3} \__hook_update_hook_code:n {#1} } { \__hook_if_disabled:nTF {#1} { \msg_error:nnn { hooks } { hook-disabled } {#1} } { \__hook_try_declaring_generic_hook:nnn {#1} {#2} {#3} } } } \cs_new_protected:Npn \__hook_hook_gput_code_do:nnn #1 #2 #3 { \__hook_debug:n{\iow_term:x{****~ Add~ to~ \__hook_if_usable:nF {#1} { undeclared~ } hook~ #1~ (#2) \on@line\space <-~ \tl_to_str:n{#3}} } \str_if_eq:nnTF {#2} { top-level } { \str_if_eq:eeTF { top-level } { \__hook_currname_or_default: } { \__hook_init_structure:n {#1} \__hook_cs_gput_right:nnn { _toplevel } {#1} {#3} } { \msg_error:nnn { hooks } { misused-top-level } {#1} } } { \exp_args:Nx \__hook_prop_gput_labeled_cleanup:nnn { \__hook_if_replacing_args:TF { \exp_not:n } { \__hook_double_hashes:n } {#3} } {#1} {#2} } } \cs_new_protected:Npn \__hook_prop_gput_labeled_cleanup:nnn #1 #2 #3 { \tl_set:Nn \l__hook_return_tl {#1} \__hook_if_replacing_args:TF { \__hook_if_usable:nT {#2} { \__hook_set_normalise_fn:nn {#2} { Invalid~code~added~\msg_line_context: } \__hook_normalise_fn:nn {#3} {#1} \prop_get:NnN \l__hook_work_prop {#3} \l__hook_return_tl } } { } \exp_args:NcV \__hook_prop_gput_labeled_do:Nnn { g__hook_#2_code_prop } \l__hook_return_tl {#3} } \cs_new_protected:Npn \__hook_prop_gput_labeled_do:Nnn #1 #2 #3 { \prop_get:NnNTF #1 {#3} \l__hook_return_tl { \prop_gput:Nno #1 {#3} { \l__hook_return_tl #2 } } { \prop_gput:Nnn #1 {#3} {#2} } } \EndIncludeInRelease \IncludeInRelease{2020/10/01}{\hook_gput_code:nnn} {Providing~hooks} \cs_gset_protected:Npn \hook_gput_code:nnn #1 #2 { \__hook_normalize_hook_args:Nnn \__hook_gput_code:nnn {#1} {#2} } \cs_gset_protected:Npn \__hook_gput_code:nnn #1 #2 #3 { \__hook_if_execute_immediately:nTF {#1} {#3} { \__hook_if_usable:nTF {#1} { \__hook_hook_gput_code_do:nnn {#1} {#2} {#3} \__hook_update_hook_code:n {#1} } { \__hook_if_disabled:nTF {#1} { \msg_error:nnn { hooks } { hook-disabled } {#1} } { \__hook_try_declaring_generic_hook:nnn {#1} {#2} {#3} } } } } \cs_gset_protected:Npn \__hook_hook_gput_code_do:nnn #1 #2 #3 { \__hook_debug:n{\iow_term:x{****~ Add~ to~ \__hook_if_usable:nF {#1} { undeclared~ } hook~ #1~ (#2) \on@line\space <-~ \tl_to_str:n{#3}} } \str_if_eq:nnTF {#2} { top-level } { \str_if_eq:eeTF { top-level } { \__hook_currname_or_default: } { \__hook_init_structure:n {#1} \__hook_tl_gput_right:cn { __hook_toplevel~#1 } {#3} } { \msg_error:nnn { hooks } { misused-top-level } {#1} } } { \prop_get:cnNTF { g__hook_#1_code_prop } {#2} \l__hook_return_tl { \prop_gput:cno { g__hook_#1_code_prop } {#2} { \l__hook_return_tl #3 } } { \prop_gput:cnn { g__hook_#1_code_prop } {#2} {#3} } } } \cs_gset_protected:Npn \hook_gput_code_with_args:nnn #1#2#3 { } \EndIncludeInRelease \IncludeInRelease{2023/06/01}{\__hook_chk_args_allowed:nn} {Hooks~with~args} \cs_new_protected:Npn \__hook_chk_args_allowed:nn #1 #2 { \__hook_if_replacing_args:TF { \__hook_if_declared:nT {#1} { \tl_if_empty:cT { c__hook_#1_parameter_tl } { \use_ii:nn } } \use_none:n { \msg_error:nnnn { hooks } { without-args } {#1} {#2} \__hook_replacing_args_false: } } { } } \EndIncludeInRelease \IncludeInRelease{2020/10/01}{\__hook_chk_args_allowed:nn} {Hooks~with~args} \cs_undefine:N \__hook_chk_args_allowed:nn \EndIncludeInRelease \cs_new_protected:Npn \__hook_gput_undeclared_hook:nnn #1 #2 #3 { \__hook_init_structure:n {#1} \__hook_hook_gput_code_do:nnn {#1} {#2} {#3} } \IncludeInRelease{2023/06/01} {\__hook_try_declaring_generic_hook:nnn} {Hooks~with~args} \cs_new_protected:Npn \__hook_try_declaring_generic_hook:nnn #1 { \__hook_try_declaring_generic_hook:wnTF #1 / / / \scan_stop: {#1} \__hook_gput_code:nnn \__hook_gput_undeclared_hook:nnn {#1} } \cs_new_protected:Npn \__hook_try_declaring_generic_next_hook:nn #1 { \__hook_try_declaring_generic_hook:wnTF #1 / / / \scan_stop: {#1} \__hook_gput_next_code:nn \__hook_gput_next_do:nn {#1} } \EndIncludeInRelease \IncludeInRelease{2021/11/15} {\__hook_try_declaring_generic_hook:nnn} {Standardise~generic~hook~names} \cs_gset_protected:Npn \__hook_try_declaring_generic_hook:nnn #1 { \__hook_try_declaring_generic_hook:wnTF #1 / / / \scan_stop: {#1} \hook_gput_code:nnn \__hook_gput_undeclared_hook:nnn {#1} } \cs_gset_protected:Npn \__hook_try_declaring_generic_next_hook:nn #1 { \__hook_try_declaring_generic_hook:wnTF #1 / / / \scan_stop: {#1} \hook_gput_next_code:nn \__hook_gput_next_do:nn {#1} } \EndIncludeInRelease \IncludeInRelease{2020/10/01} {\__hook_try_declaring_generic_hook:nnn} {Standardise~generic~hook~names} \cs_new_protected:Npn \__hook_try_declaring_generic_hook:nnn #1 { \__hook_try_declaring_generic_hook:nNNnn {#1} \hook_gput_code:nnn \__hook_gput_undeclared_hook:nnn } \cs_new_protected:Npn \__hook_try_declaring_generic_next_hook:nn #1 { \__hook_try_declaring_generic_hook:nNNnn {#1} \hook_gput_next_code:nn \__hook_gput_next_do:nn } \cs_new_protected:Npn \__hook_try_declaring_generic_hook:nNNnn #1 { \__hook_if_file_hook:wTF #1 / / \s__hook_mark { \exp_args:Ne \__hook_try_declaring_generic_hook_split:nNNnn { \exp_args:Ne \__hook_file_hook_normalize:n {#1} } } { \__hook_try_declaring_generic_hook_split:nNNnn {#1} } } \cs_new_protected:Npn \__hook_try_declaring_generic_hook_split:nNNnn #1 #2 #3 { \__hook_try_declaring_generic_hook:wnTF #1 / / / \scan_stop: {#1} { #2 } { #3 } {#1} } \EndIncludeInRelease \IncludeInRelease{2023/06/01} {\__hook_try_declaring_generic_hook:wn} {Hooks~with~args} \prg_new_protected_conditional:Npnn \__hook_try_declaring_generic_hook:wn #1 / #2 / #3 / #4 \scan_stop: #5 { TF } { \__hook_if_generic:nTF {#5} { \__hook_if_usable:nF {#5} { \str_if_eq:nnT {#1} { cmd } { \__hook_try_put_cmd_hook:n {#5} \__hook_make_usable:nn {#5} { 9 } \use_none:nnn } \__hook_make_usable:nn {#5} { 0 } } \__hook_if_generic_reversed:nT {#5} { \tl_gset:cn { g__hook_#5_reversed_tl } { - } } \prg_return_true: } { \__hook_if_deprecated_generic:nTF {#5} { \__hook_deprecated_generic_warn:n {#5} \exp_after:wN \__hook_declare_deprecated_generic:NNn \exp:w % \exp_end: } { \prg_return_false: } } } \cs_new_protected:Npn \__hook_deprecated_generic_warn:n #1 { \__hook_deprecated_generic_warn:w #1 \s__hook_mark } \cs_new_protected:Npn \__hook_deprecated_generic_warn:w #1 / #2 / #3 \s__hook_mark { \if_cs_exist:w __hook~#1/#2/#3 \cs_end: \else: \msg_warning:nnnnn { hooks } { generic-deprecated } {#1} {#2} {#3} \fi: \cs_gset_eq:cN { __hook~#1/#2/#3 } \scan_stop: } \cs_new_protected:Npn \__hook_do_deprecated_generic:Nn #1 #2 { \__hook_do_deprecated_generic:Nw #1 #2 \s__hook_mark } \cs_new_protected:Npn \__hook_do_deprecated_generic:Nw #1 #2 / #3 / #4 \s__hook_mark { #1 { #2 / #4 / #3 } } \cs_new_protected:Npn \__hook_declare_deprecated_generic:NNn #1 #2 #3 { \__hook_declare_deprecated_generic:NNw #1 #2 #3 \s__hook_mark } \cs_new_protected:Npn \__hook_declare_deprecated_generic:NNw #1 #2 #3 / #4 / #5 \s__hook_mark { \__hook_try_declaring_generic_hook:wnTF #3 / #5 / #4 / \scan_stop: { #3 / #5 / #4 } #1 #2 { #3 / #5 / #4 } } \EndIncludeInRelease \IncludeInRelease{2021/11/15} {\__hook_try_declaring_generic_hook:wn} {Standardise~generic~hook~names} \prg_new_protected_conditional:Npnn \__hook_try_declaring_generic_hook:wn #1 / #2 / #3 / #4 \scan_stop: #5 { TF } { \__hook_if_generic:nTF {#5} { \__hook_if_usable:nF {#5} { \str_if_eq:nnT {#1} { cmd } { \__hook_try_put_cmd_hook:n {#5} } \__hook_make_usable:n {#5} } \__hook_if_generic_reversed:nT {#5} { \tl_gset:cn { g__hook_#5_reversed_tl } { - } } \prg_return_true: } { \__hook_if_deprecated_generic:nTF {#5} { \__hook_deprecated_generic_warn:n {#5} \exp_after:wN \__hook_declare_deprecated_generic:NNn \exp:w % \exp_end: } { \prg_return_false: } } } \EndIncludeInRelease \IncludeInRelease{2021/06/01} {\__hook_try_declaring_generic_hook:wn} {Support~cmd~hooks} \prg_new_protected_conditional:Npnn \__hook_try_declaring_generic_hook:wn #1 / #2 / #3 / #4 \scan_stop: #5 { TF } { \tl_if_empty:nTF {#2} { \prg_return_false: } { \prop_if_in:NnTF \c__hook_generics_prop {#1} { \__hook_if_usable:nF {#5} { \str_if_eq:nnT {#1} { cmd } { \__hook_try_put_cmd_hook:n {#5} } \__hook_make_usable:n {#5} } \prop_if_in:NnTF \c__hook_generics_reversed_ii_prop {#2} { \tl_gset:cn { g__hook_#5_reversed_tl } { - } } { \prop_if_in:NnT \c__hook_generics_reversed_iii_prop {#3} { \tl_gset:cn { g__hook_#5_reversed_tl } { - } } } \prg_return_true: } { \prg_return_false: } } } \EndIncludeInRelease \IncludeInRelease{2020/10/01} {\__hook_try_declaring_generic_hook:wn} {Support~cmd~hooks} \prg_new_protected_conditional:Npnn \__hook_try_declaring_generic_hook:wn #1 / #2 / #3 / #4 \scan_stop: #5 { TF } { \tl_if_empty:nTF {#2} { \prg_return_false: } { \prop_if_in:NnTF \c__hook_generics_prop {#1} { \__hook_if_declared:nF {#5} { \hook_new:n {#5} } \prop_if_in:NnTF \c__hook_generics_reversed_ii_prop {#2} { \tl_gset:cn { g__hook_#5_reversed_tl } { - } } { \prop_if_in:NnT \c__hook_generics_reversed_iii_prop {#3} { \tl_gset:cn { g__hook_#5_reversed_tl } { - } } } \prg_return_true: } { \prg_return_false: } } } \EndIncludeInRelease \IncludeInRelease{2021/11/15}{\__hook_if_file_hook:w} {Standardise~generic~hook~names} \EndIncludeInRelease \IncludeInRelease{2020/10/01}{\__hook_if_file_hook:w} {Standardise~generic~hook~names} \prg_new_conditional:Npnn \__hook_if_file_hook:w #1 / #2 / #3 \s__hook_mark { TF } { \str_if_eq:nnTF {#1} { file } { \bool_lazy_or:nnTF { \tl_if_empty_p:n {#3} } { \str_if_eq_p:nn {#3} { / } } { \prg_return_false: } { \prop_if_in:NnTF \c__hook_generics_file_prop {#2} { \prg_return_true: } { \prg_return_false: } } } { \prg_return_false: } } \EndIncludeInRelease \IncludeInRelease{2021/11/15}{\__hook_file_hook_normalize:n} {Standardise~generic~hook~names} \EndIncludeInRelease \IncludeInRelease{2020/10/01}{\__hook_file_hook_normalize:n} {Standardise~generic~hook~names} \cs_new:Npn \__hook_file_hook_normalize:n #1 { \__hook_strip_double_slash:n {#1} } \cs_new:Npn \__hook_strip_double_slash:n #1 { \__hook_strip_double_slash:w #1 // \s__hook_mark } \cs_new:Npn \__hook_strip_double_slash:w #1/#2/#3//#4\s__hook_mark { \tl_if_empty:nTF {#4} { #1/#2/#3 } { \__hook_strip_double_slash:w #1/#2/#3 /#4\s__hook_mark } } \EndIncludeInRelease \IncludeInRelease{2021/11/15}{\c__hook_generics_prop} {Standardise~generic~hook~names} \clist_map_inline:nn { cmd , env , file , package , class , include } { \tl_const:cn { c__hook_generic_#1/./before_tl } { + } \tl_const:cn { c__hook_generic_#1/./after_tl } { - } } \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 } { } \tl_const:cn { c__hook_deprecated_#1/./after_tl } { } } \tl_const:cn { c__hook_deprecated_include/./end_tl } { } \EndIncludeInRelease \IncludeInRelease{2020/10/01}{\c__hook_generics_prop} {Standardise~generic~hook~names} \prop_const_from_keyval:Nn \c__hook_generics_prop {cmd=,env=,file=,package=,class=,include=} \EndIncludeInRelease \IncludeInRelease{2021/11/15}{\c__hook_generics_reversed_ii_prop} {Standardise~generic~hook~names} \EndIncludeInRelease \IncludeInRelease{2020/10/01}{\c__hook_generics_reversed_ii_prop} {Standardise~generic~hook~names} \prop_const_from_keyval:Nn \c__hook_generics_reversed_ii_prop {after=,end=} \prop_const_from_keyval:Nn \c__hook_generics_reversed_iii_prop {after=} \prop_const_from_keyval:Nn \c__hook_generics_file_prop {before=,after=} \EndIncludeInRelease \IncludeInRelease{2023/06/01}{\c__hook_parameter_cmd/./before_tl} {Hooks~with~args} \tl_const:cn { c__hook_parameter_cmd/./before_tl } { #1#2#3#4#5#6#7#8#9 } \tl_const:cn { c__hook_parameter_cmd/./after_tl } { #1#2#3#4#5#6#7#8#9 } \EndIncludeInRelease \IncludeInRelease{2020/10/01}{\c__hook_parameter_cmd/./before_tl} {Hooks~with~args} \EndIncludeInRelease \IncludeInRelease{2023/06/01}{\hook_gremove_code:nn} {Hooks~with~args} \cs_new_protected:Npn \hook_gremove_code:nn #1 #2 { \__hook_normalize_hook_args:Nnn \__hook_gremove_code:nn {#1} {#2} } \cs_new_protected:Npn \__hook_gremove_code:nn #1 #2 { \__hook_if_structure_exist:nTF {#1} { \str_if_eq:nnTF {#2} {*} { \prop_gclear:c { g__hook_#1_code_prop } \__hook_toplevel_gset:nn {#1} { } \__hook_next_gset:nn {#1} { } } { \str_if_eq:nnTF {#2} { top-level } { \__hook_toplevel_gset:nn {#1} { } } { \prop_gpop:cnNF { g__hook_#1_code_prop } {#2} \l__hook_return_tl { \msg_warning:nnnn { hooks } { cannot-remove } {#1} {#2} } } } \__hook_if_usable:nT {#1} { \__hook_update_hook_code:n {#1} } } { \__hook_if_deprecated_generic:nTF {#1} { \__hook_deprecated_generic_warn:n {#1} \__hook_do_deprecated_generic:Nn \__hook_gremove_code:nn {#1} {#2} } { \msg_warning:nnnn { hooks } { cannot-remove } {#1} {#2} } } } \EndIncludeInRelease \IncludeInRelease{2020/10/01}{\hook_gremove_code:nn} {Hooks~with~args} \cs_new_protected:Npn \__hook_gremove_code:nn #1 #2 { \__hook_if_structure_exist:nTF {#1} { \str_if_eq:nnTF {#2} {*} { \prop_gclear:c { g__hook_#1_code_prop } \__hook_tl_gclear:c { __hook_toplevel~#1 } \__hook_tl_gclear:c { __hook_next~#1 } } { \str_if_eq:nnTF {#2} { top-level } { \__hook_tl_gclear:c { __hook_toplevel~#1 } } { \prop_gpop:cnNF { g__hook_#1_code_prop } {#2} \l__hook_return_tl { \msg_warning:nnnn { hooks } { cannot-remove } {#1} {#2} } } } \__hook_if_usable:nT {#1} { \__hook_update_hook_code:n {#1} } } { \__hook_if_deprecated_generic:nTF {#1} { \__hook_deprecated_generic_warn:n {#1} \__hook_do_deprecated_generic:Nn \__hook_gremove_code:nn {#1} {#2} } { \msg_warning:nnnn { hooks } { cannot-remove } {#1} {#2} } } } \EndIncludeInRelease \IncludeInRelease{2023/06/01}{\__hook_cs_gput_right:nnn} {Hooks~with~args} \cs_new_protected:Npn \__hook_cs_gput_right:nnn #1 #2 { \if:w T \__hook_if_declared:nF {#2} { F } \tl_if_empty:cF { c__hook_#2_parameter_tl } { F } T \exp_after:wN \__hook_cs_gput_right_fast:nnn \else: \exp_after:wN \__hook_cs_gput_right_slow:nnn \fi: {#1} {#2} } \cs_new_protected:Npn \__hook_cs_gput_right_fast:nnn #1 #2 #3 { \cs_gset:cpx { __hook#1~#2 } { \exp_not:v { __hook#1~#2 } \exp_not:n {#3} } } \cs_new_protected:Npn \__hook_cs_gput_right_slow:nnn #1 #2 #3 { \cs_if_exist:cF { __hook#1~#2 } { \__hook_code_gset_aux:nnn {#1} {#2} { } } \__hook_code_gset_auxi:eeen { \__hook_if_declared:nTF {#2} { \tl_use:c { c__hook_#2_parameter_tl } } { \__hook_if_generic:nTF {#2} { \__hook_generic_parameter:n {#2} } { \c__hook_nine_parameters_tl } } } { \exp_args:NNo \exp_args:No \__hook_double_hashes:n { \cs:w __hook#1~#2 \exp_last_unbraced:Ne \cs_end: { \__hook_braced_cs_parameter:n { __hook#1~#2 } } } } { \__hook_if_replacing_args:TF { \exp_not:n } { \__hook_double_hashes:n } {#3} } { __hook#1~#2 } } \cs_new_protected:Npn \__hook_code_gset_auxi:nnnn #1 #2 #3 #4 { \cs_gset:cpn {#4} #1 { #2 #3 } } \cs_generate_variant:Nn \__hook_code_gset_auxi:nnnn { eeen } \EndIncludeInRelease \IncludeInRelease{2020/10/01}{\__hook_cs_gput_right:nnn} {Hooks~with~args} \cs_undefine:N \__hook_cs_gput_right:nnn \cs_undefine:N \__hook_cs_gput_right_fast:nnn \cs_undefine:N \__hook_cs_gput_right_slow:nnn \cs_undefine:N \__hook_code_gset_auxi:nnnn \EndIncludeInRelease \IncludeInRelease{2023/06/01}{\__hook_code_gset:nn} {Hooks~with~args} \cs_new_protected:Npn \__hook_code_gset:nn { \__hook_code_gset_aux:nnn { } } \cs_new_protected:Npn \__hook_toplevel_gset:nn { \__hook_code_gset_aux:nnn { _toplevel } } \cs_new_protected:Npn \__hook_next_gset:nn { \__hook_code_gset_aux:nnn { _next } } \cs_new_protected:Npn \__hook_code_gset_aux:nnn #1 #2 #3 { \cs_gset:cpn { __hook#1~#2 \exp_last_unbraced:Ne } { \__hook_parameter:n {#2} } {#3} } \cs_generate_variant:Nn \__hook_code_gset:nn { ne } \EndIncludeInRelease \IncludeInRelease{2020/10/01}{\__hook_code_gset:nn} {Hooks~with~args} \cs_undefine:N \__hook_code_gset:nn \cs_undefine:N \__hook_toplevel_gset:nn \cs_undefine:N \__hook_next_gset:nn \cs_undefine:N \__hook_code_gset_aux:nnn \EndIncludeInRelease \IncludeInRelease{2023/06/01}{\__hook_normalise_cs_args:nn} {Hooks~with~args} \cs_new_protected:Npn \__hook_normalise_cs_args:nn #1 #2 { \cs_if_exist:cT { __hook#1~#2 } { \__hook_code_gset_auxi:eeen { \tl_use:c { c__hook_#2_parameter_tl } } { \exp_args:NNo \exp_args:No \__hook_double_hashes:n { \cs:w __hook#1~#2 \exp_last_unbraced:Ne \cs_end: { \__hook_braced_cs_parameter:n { __hook#1~#2 } } } } { } { __hook#1~#2 } } } \EndIncludeInRelease \IncludeInRelease{2020/10/01}{\__hook_normalise_cs_args:nn} {Hooks~with~args} \cs_undefine:N \__hook_normalise_cs_args:nn \EndIncludeInRelease \IncludeInRelease{2023/06/01}{\__hook_normalise_code_pool:n} {Hooks~with~args} \cs_new_protected:Npn \__hook_normalise_code_pool:n #1 { \__hook_set_normalise_fn:nn {#1} { Offending~label:~'##1' } \prop_clear:N \l__hook_work_prop \prop_map_function:cN { g__hook_#1_code_prop } \__hook_normalise_fn:nn \prop_gset_eq:cN { g__hook_#1_code_prop } \l__hook_work_prop } \cs_new_protected:Npn \__hook_set_normalise_fn:nn #1 #2 { \cs_set:Npn \__hook_tmp:w ##1##2##3##4##5##6##7##8##9 { } \tl_set:Ne \l__hook_tmpb_tl { \__hook_braced_cs_parameter:n { __hook_tmp:w } } \group_begin: \__hook_tl_set:cn { c__hook_hash_tl } { \exp_not:N \c__hook_hashes_tl } \use:e { \group_end: \tl_set:Nn \exp_not:N \l__hook_tmpb_tl { \l__hook_tmpb_tl } } \exp_last_unbraced:NNf \cs_set:Npn \__hook_tmp:w { \__hook_parameter:n {#1} } { } \tl_set:Ne \l__hook_tmpa_tl { \__hook_braced_cs_parameter:n { __hook_tmp:w } } \cs_gset_protected:Npx \__hook_normalise_fn:nn ##1 ##2 { \group_begin: \int_set:Nn \tex_escapechar:D { -1 } \cs_set:cpn { hook~'#1'. ^^J (hooks) \prg_replicate:nn { 13 } { ~ } #2 % more message text } \exp_not:v { c__hook_#1_parameter_tl } {##2} \group_end: \cs_set:Npn \exp_not:N \__hook_tmp:w \exp_not:V \c__hook_nine_parameters_tl { \prop_put:Nne \exp_not:N \l__hook_work_prop {##1} { \exp_not:N \__hook_double_hashes:n {##2} } } \exp_not:N \__hook_tmp:w \exp_not:V \l__hook_tmpa_tl \exp_args:No \exp_not:o { \exp_after:wN \__hook_tmp:w \l__hook_tmpb_tl } } } \cs_new_eq:NN \__hook_normalise_fn:nn ? \EndIncludeInRelease \IncludeInRelease{2020/10/01}{\__hook_normalise_code_pool:n} {Hooks~with~args} \cs_undefine:N \__hook_normalise_code_pool:n \EndIncludeInRelease \IncludeInRelease{2023/06/01}{\__hook_cs_if_empty:c} {Hooks~with~args} \prg_new_conditional:Npnn \__hook_cs_if_empty:c #1 { p, T, F, TF } { \if:w \scan_stop: \__hook_replacement_spec:c {#1} \scan_stop: \prg_return_true: \else: \prg_return_false: \fi: } \cs_new:Npn \__hook_replacement_spec:c #1 { \exp_args:Nc \token_if_macro:NT {#1} { \cs_replacement_spec:c {#1} } } \EndIncludeInRelease \IncludeInRelease{2020/10/01}{\__hook_cs_if_empty:c} {Hooks~with~args} \cs_undefine:N \__hook_cs_if_empty:c \EndIncludeInRelease \IncludeInRelease{2023/06/01}{\__hook_braced_cs_parameter:n} {Hooks~with~args} \cs_new:Npn \__hook_braced_cs_parameter:n #1 { \exp_last_unbraced:Ne \__hook_braced_hidden_loop:w { \exp_args:Nc \__hook_cs_parameter_count:N {#1} } ? \s__hook_mark } \cs_new:Npn \__hook_braced_hidden_loop:w #1 { \if:w ? #1 \__hook_use_i_delimit_by_s_mark:nw \fi: { \exp_not:N \c__hook_hash_tl #1 } \__hook_braced_hidden_loop:w } \cs_new:Npn \__hook_cs_parameter_count:N #1 { \exp_last_unbraced:Nf \__hook_cs_parameter_count:w { \token_if_macro:NT #1 { \cs_parameter_spec:N #1 } } ? \__hook_cs_end:w ? \__hook_cs_end:w ? \__hook_cs_end:w ? \__hook_cs_end:w ? \__hook_cs_end:w ? \__hook_cs_end:w ? \__hook_cs_end:w ? \__hook_cs_end:w ? \__hook_cs_end:w \s__hook_mark } \cs_new:Npn \__hook_cs_parameter_count:w #1#2 #3#4 #5#6 #7#8 { #2 #4 #6 #8 \__hook_cs_parameter_count:w } \cs_new:Npn \__hook_cs_end:w #1 \s__hook_mark { } \EndIncludeInRelease \IncludeInRelease{2020/10/01}{\__hook_braced_cs_parameter:n} {Hooks~with~args} \EndIncludeInRelease \IncludeInRelease{2023/06/01}{\__hook_braced_parameter:n} {Hooks~with~args} \cs_new:Npn \__hook_braced_parameter:n #1 { \if_case:w \int_eval:n { \exp_args:Nv \str_count:n { c__hook_#1_parameter_tl } / 3 } \exp_stop_f: \or: {##1} \or: {##1} {##2} \or: {##1} {##2} {##3} \or: {##1} {##2} {##3} {##4} \or: {##1} {##2} {##3} {##4} {##5} \or: {##1} {##2} {##3} {##4} {##5} {##6} \or: {##1} {##2} {##3} {##4} {##5} {##6} {##7} \or: {##1} {##2} {##3} {##4} {##5} {##6} {##7} {##8} \or: {##1} {##2} {##3} {##4} {##5} {##6} {##7} {##8} {##9} \else: \msg_expandable_error:nnn { latex2e } { should-not-happen } { Invalid~parameter~spec. } \fi: } \EndIncludeInRelease \IncludeInRelease{2020/10/01}{\__hook_braced_parameter:n} {Hooks~with~args} \cs_undefine:N \__hook_braced_parameter:n \EndIncludeInRelease \IncludeInRelease{2023/06/01}{\__hook_parameter:n} {Hooks~with~args} \cs_new:Npn \__hook_parameter:n #1 { \cs:w c__hook_ \tl_if_exist:cTF { c__hook_#1_parameter_tl } { #1_parameter } { empty } _tl \cs_end: } \cs_new:Npn \__hook_generic_parameter:n #1 { \__hook_generic_parameter:w #1 / / / \s__hook_mark } \cs_new:Npn \__hook_generic_parameter:w #1 / #2 / #3 / #4 \s__hook_mark { \cs_if_exist_use:cF { c__hook_parameter_#1/./#3_tl } { \c__hook_empty_tl } } \EndIncludeInRelease \IncludeInRelease{2020/10/01}{\__hook_parameter:n} {Hooks~with~args} \cs_undefine:N \__hook_parameter:n \cs_undefine:N \__hook_generic_parameter:n \EndIncludeInRelease \prop_new:c { g__hook_??_code_prop } \prop_new:c { __hook~?? } \tl_new:c { g__hook_??_reversed_tl } \IncludeInRelease{2023/06/01}{\c__hook_??_parameter_tl} {Hooks~with~args} \tl_const:cn { c__hook_??_parameter_tl } { } \EndIncludeInRelease \IncludeInRelease{2020/10/01}{\c__hook_??_parameter_tl} {Hooks~with~args} \cs_undefine:c { c__hook_??_parameter_tl } \EndIncludeInRelease \cs_new_protected:Npn \hook_gset_rule:nnnn #1#2#3#4 { \__hook_normalize_hook_rule_args:Nnnnn \__hook_gset_rule:nnnn {#1} {#2} {#3} {#4} } \IncludeInRelease{2022/06/01}{\__hook_gset_rule:nnnn} {Refuse~setting~rule~for~one-time~hooks} \cs_new_protected:Npn \__hook_gset_rule:nnnn #1#2#3#4 { \__hook_if_deprecated_generic:nT {#1} { \__hook_deprecated_generic_warn:n {#1} \__hook_do_deprecated_generic:Nn \__hook_gset_rule:nnnn {#1} {#2} {#3} {#4} \__hook_use_none_delimit_by_s_mark:w } \__hook_if_execute_immediately:nT {#1} { \msg_error:nnnnnn { hooks } { rule-too-late } {#1} {#2} {#3} {#4} \__hook_use_none_delimit_by_s_mark:w } \__hook_init_structure:n {#1} \__hook_rule_gclear:nnn {#1} {#2} {#4} \cs_if_exist_use:cTF { __hook_rule_#3_gset:nnn } { {#1} {#2} {#4} \__hook_update_hook_code:n {#1} } { \msg_error:nnnnnn { hooks } { unknown-rule } {#1} {#2} {#3} {#4} } \s__hook_mark } \EndIncludeInRelease \IncludeInRelease{2020/10/01}{\__hook_gset_rule:nnnn} {Refuse~setting~rule~for~one-time~hooks} \cs_new_protected:Npn \__hook_gset_rule:nnnn #1#2#3#4 { \__hook_if_deprecated_generic:nT {#1} { \__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_init_structure:n {#1} \__hook_rule_gclear:nnn {#1} {#2} {#4} \cs_if_exist_use:cTF { __hook_rule_#3_gset:nnn } { {#1} {#2} {#4} \__hook_update_hook_code:n {#1} } { \msg_error:nnnnnn { hooks } { unknown-rule } {#1} {#2} {#3} {#4} } } \EndIncludeInRelease \cs_new_protected:Npn \__hook_rule_before_gset:nnn #1#2#3 { \__hook_tl_gset:cx { g__hook_#1_rule_ \__hook_label_pair:nn {#2} {#3} _tl } { \__hook_label_ordered:nnTF {#2} {#3} { < } { > } } } \cs_new_eq:cN { __hook_rule_<_gset:nnn } \__hook_rule_before_gset:nnn \cs_new_protected:Npn \__hook_rule_after_gset:nnn #1#2#3 { \__hook_tl_gset:cx { g__hook_#1_rule_ \__hook_label_pair:nn {#3} {#2} _tl } { \__hook_label_ordered:nnTF {#3} {#2} { < } { > } } } \cs_new_eq:cN { __hook_rule_>_gset:nnn } \__hook_rule_after_gset:nnn \cs_new_protected:Npn \__hook_rule_voids_gset:nnn #1#2#3 { \__hook_tl_gset:cx { g__hook_#1_rule_ \__hook_label_pair:nn {#2} {#3} _tl } { \__hook_label_ordered:nnTF {#2} {#3} { -> } { <- } } } \cs_new_protected:cpn { __hook_rule_incompatible-error_gset:nnn } #1#2#3 { \__hook_tl_gset:cn { g__hook_#1_rule_ \__hook_label_pair:nn {#2} {#3} _tl } { xE } } \cs_new_protected:cpn { __hook_rule_incompatible-warning_gset:nnn } #1#2#3 { \__hook_tl_gset:cn { g__hook_#1_rule_ \__hook_label_pair:nn {#2} {#3} _tl } { xW } } \cs_new_protected:Npn \__hook_rule_unrelated_gset:nnn #1#2#3 { } \cs_new_protected:Npn \__hook_rule_gclear:nnn #1#2#3 { \cs_undefine:c { g__hook_#1_rule_ \__hook_label_pair:nn {#2} {#3} _tl } } \cs_new:Npn \__hook_label_pair:nn #1#2 { \if_case:w \__hook_str_compare:nn {#1} {#2} \exp_stop_f: #1 | #1 % 0 \or: #1 | #2 % +1 \else: #2 | #1 % -1 \fi: } \prg_new_conditional:Npnn \__hook_label_ordered:nn #1#2 { TF } { \if_int_compare:w \__hook_str_compare:nn {#1} {#2} > 0 \exp_stop_f: \prg_return_true: \else: \prg_return_false: \fi: } \cs_new:Npn \__hook_if_label_case:nnnnn #1#2 { \cs:w use_ \if_case:w \__hook_str_compare:nn {#1} {#2} i \or: ii \else: iii \fi: :nnn \cs_end: } \cs_new_eq:NN \__hook_update_hook_code:n \use_none:n \IncludeInRelease{2023/06/01}{\__hook_initialize_all:} {Hooks~with~args} \cs_new_protected:Npn \__hook_initialize_all: { \cs_gset_eq:NN \__hook_update_hook_code:n \__hook_initialize_hook_code:n \__hook_debug:n { \prop_gclear:N \g__hook_used_prop } \seq_map_inline:Nn \g__hook_all_seq { \tl_if_empty:cTF { c__hook_##1_parameter_tl } { \__hook_replacing_args_false: } { \__hook_replacing_args_true: } \__hook_update_hook_code:n {##1} \__hook_replacing_args_reset: } \__hook_debug:n { \iow_term:x { ^^J All~initialized~(non-empty)~hooks: } \prop_map_inline:Nn \g__hook_used_prop { \iow_term:x { ^^J ~ ##1 ~ -> ~ \cs_replacement_spec:c { __hook~##1 } ~ } } } \__hook_post_initialization_defs: } \EndIncludeInRelease \IncludeInRelease{2020/10/01}{\__hook_initialize_all:} {Hooks~with~args} \cs_gset_protected:Npn \__hook_initialize_all: { \cs_gset_eq:NN \__hook_update_hook_code:n \__hook_initialize_hook_code:n \__hook_debug:n { \prop_gclear:N \g__hook_used_prop } \seq_map_inline:Nn \g__hook_all_seq { \__hook_update_hook_code:n {##1} } \__hook_debug:n { \iow_term:x{^^JAll~ initialized~ (non-empty)~ hooks:} \prop_map_inline:Nn \g__hook_used_prop { \iow_term:x { ^^J ~ ##1 ~ -> ~ \cs_replacement_spec:c { __hook~##1 } ~ } } } \cs_gset_eq:NN \hook_use:n \__hook_use_initialized:n \cs_gset_eq:NN \__hook_preamble_hook:n \use_none:n } \cs_gset_eq:NN \@expl@@@initialize@all@@ \__hook_initialize_all: \EndIncludeInRelease \IncludeInRelease{2023/06/01}{\__hook_initialize_hook_code:n} {Hooks~with~args} \cs_new_protected:Npn \__hook_initialize_hook_code:n #1 { \__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} { \prop_if_empty:cTF { g__hook_#1_code_prop } { \__hook_code_gset:ne {#1} { \exp_not:c { __hook_toplevel~#1 } \__hook_braced_parameter:n {#1} \exp_not:c { __hook_next~#1 } \__hook_braced_parameter:n {#1} } } { \__hook_if_reversed:nTF {#1} { \cs_set_eq:NN \__hook_tl_gput:Nn \__hook_tl_gput_left:Nn \cs_set_eq:NN \__hook_clist_gput:NV \clist_gput_left:NV } { \cs_set_eq:NN \__hook_tl_gput:Nn \__hook_tl_gput_right:Nn \cs_set_eq:NN \__hook_clist_gput:NV \clist_gput_right:NV } \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} { } } } } } \EndIncludeInRelease \IncludeInRelease{2020/10/01}{\__hook_initialize_hook_code:n} {Hooks~with~args} \cs_gset_protected:Npn \__hook_initialize_hook_code:n #1 { \__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} { \prop_if_empty:cTF { g__hook_#1_code_prop } { \__hook_tl_gset:co { __hook~#1 } { \cs:w __hook_toplevel~#1 \exp_after:wN \cs_end: \cs:w __hook_next~#1 \cs_end: } } { \__hook_if_reversed:nTF {#1} { \cs_set_eq:NN \__hook_tl_gput:Nn \__hook_tl_gput_left:Nn \cs_set_eq:NN \__hook_clist_gput:NV \clist_gput_left:NV } { \cs_set_eq:NN \__hook_tl_gput:Nn \__hook_tl_gput_right:Nn \cs_set_eq:NN \__hook_clist_gput:NV \clist_gput_right:NV } \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} { } } } } } \EndIncludeInRelease \cs_new:Npn \__hook_tl_csname:n #1 { l__hook_label_#1_tl } \cs_new:Npn \__hook_seq_csname:n #1 { l__hook_label_#1_seq } \seq_new:N \l__hook_labels_seq \int_new:N \l__hook_labels_int \tl_new:N \l__hook_front_tl \tl_new:N \l__hook_rear_tl \tl_new:c { \__hook_tl_csname:n { 0 } } \IncludeInRelease{2023/06/01}{\__hook_initialize_single:NNn} {Hooks~with~args} \cs_new_protected:Npn \__hook_initialize_single:NNn #1#2#3 { \seq_clear:N \l__hook_labels_seq \int_zero:N \l__hook_labels_int \tl_set:Nn \l__hook_cur_hook_tl {#3} \prop_map_inline:Nn \l__hook_work_prop { \int_incr:N \l__hook_labels_int \seq_put_right:Nn \l__hook_labels_seq {##1} \__hook_tl_set:cn { \__hook_tl_csname:n {##1} } { 0 } \seq_clear_new:c { \__hook_seq_csname:n {##1} } } \prop_map_inline:Nn \l__hook_work_prop { \prop_map_inline:Nn \l__hook_work_prop { \__hook_if_label_case:nnnnn {##1} {####1} { \prop_map_break: } { \__hook_apply_label_pair:nnn {##1} {####1} } { \__hook_apply_label_pair:nnn {####1} {##1} } {#3} } } \__hook_debug:n { \__hook_debug_label_data:N \l__hook_work_prop } \tl_set:Nn \l__hook_rear_tl { 0 } \tl_set:cn { \__hook_tl_csname:n { 0 } } { 0 } \seq_map_inline:Nn \l__hook_labels_seq { \int_compare:nNnT { \cs:w \__hook_tl_csname:n {##1} \cs_end: } = 0 { \tl_set:cn { \__hook_tl_csname:n { \l__hook_rear_tl } }{##1} \tl_set:Nn \l__hook_rear_tl {##1} } } \tl_set_eq:Nc \l__hook_front_tl { \__hook_tl_csname:n { 0 } } \__hook_tl_gclear:N #1 \clist_gclear:N #2 \bool_while_do:nn { ! \str_if_eq_p:Vn \l__hook_front_tl { 0 } } { \int_decr:N \l__hook_labels_int \prop_get:NVN \l__hook_work_prop \l__hook_front_tl \l__hook_return_tl \exp_args:NNV \__hook_tl_gput:Nn #1 \l__hook_return_tl \__hook_clist_gput:NV #2 \l__hook_front_tl \__hook_debug:n{ \iow_term:x{Handled~ code~ for~ \l__hook_front_tl} } \seq_map_inline:cn { \__hook_seq_csname:n { \l__hook_front_tl } } { \tl_set:cx { \__hook_tl_csname:n {##1} } { \int_eval:n { \cs:w \__hook_tl_csname:n {##1} \cs_end: - 1 } } \int_compare:nNnT { \cs:w \__hook_tl_csname:n {##1} \cs_end: } = 0 { \tl_set:cn { \__hook_tl_csname:n { \l__hook_rear_tl } } {##1} \tl_set:Nn \l__hook_rear_tl {##1} } } \tl_set_eq:Nc \l__hook_front_tl { \__hook_tl_csname:n { \l__hook_front_tl } } } \int_compare:nNnF \l__hook_labels_int = 0 { \iow_term:x{====================} \iow_term:x{Error:~ label~ rules~ are~ incompatible:} \__hook_debug_label_data:N \l__hook_work_prop \iow_term:x{====================} } \exp_args:NNe \__hook_tl_gput:Nn #1 { \exp_not:c { __hook_toplevel~#3 } \__hook_braced_parameter:n {#3} } \__hook_tl_gput_right:Ne #1 { \exp_not:c { __hook_next~#3 } \__hook_braced_parameter:n {#3} } \use:e { \cs_gset:cpn { __hook~#3 } \use:c { c__hook_#3_parameter_tl } { \exp_not:V #1 } } } \cs_generate_variant:Nn \__hook_initialize_single:NNn { cc } \EndIncludeInRelease \IncludeInRelease{2020/10/01}{\__hook_initialize_single:NNn} {Hooks~with~args} \cs_new_protected:Npn \__hook_initialize_single:NNn #1#2#3 { \seq_clear:N \l__hook_labels_seq \int_zero:N \l__hook_labels_int \tl_set:Nn \l__hook_cur_hook_tl {#3} \prop_map_inline:Nn \l__hook_work_prop { \int_incr:N \l__hook_labels_int \seq_put_right:Nn \l__hook_labels_seq {##1} \__hook_tl_set:cn { \__hook_tl_csname:n {##1} } { 0 } \seq_clear_new:c { \__hook_seq_csname:n {##1} } } \prop_map_inline:Nn \l__hook_work_prop { \prop_map_inline:Nn \l__hook_work_prop { \__hook_if_label_case:nnnnn {##1} {####1} { \prop_map_break: } { \__hook_apply_label_pair:nnn {##1} {####1} } { \__hook_apply_label_pair:nnn {####1} {##1} } {#3} } } \__hook_debug:n { \__hook_debug_label_data:N \l__hook_work_prop } \tl_set:Nn \l__hook_rear_tl { 0 } \tl_set:cn { \__hook_tl_csname:n { 0 } } { 0 } \seq_map_inline:Nn \l__hook_labels_seq { \int_compare:nNnT { \cs:w \__hook_tl_csname:n {##1} \cs_end: } = 0 { \tl_set:cn { \__hook_tl_csname:n { \l__hook_rear_tl } } {##1} \tl_set:Nn \l__hook_rear_tl {##1} } } \tl_set_eq:Nc \l__hook_front_tl { \__hook_tl_csname:n { 0 } } \__hook_tl_gclear:N #1 \clist_gclear:N #2 \bool_while_do:nn { ! \str_if_eq_p:Vn \l__hook_front_tl { 0 } } { \int_decr:N \l__hook_labels_int \prop_get:NVN \l__hook_work_prop \l__hook_front_tl \l__hook_return_tl \exp_args:NNV \__hook_tl_gput:Nn #1 \l__hook_return_tl \__hook_clist_gput:NV #2 \l__hook_front_tl \__hook_debug:n{ \iow_term:x {Handled~ code~ for~ \l__hook_front_tl} } \seq_map_inline:cn { \__hook_seq_csname:n { \l__hook_front_tl } } { \tl_set:cx { \__hook_tl_csname:n {##1} } { \int_eval:n { \cs:w \__hook_tl_csname:n {##1} \cs_end: - 1 } } \int_compare:nNnT { \cs:w \__hook_tl_csname:n {##1} \cs_end: } = 0 { \tl_set:cn { \__hook_tl_csname:n { \l__hook_rear_tl } } {##1} \tl_set:Nn \l__hook_rear_tl {##1} } } \tl_set_eq:Nc \l__hook_front_tl { \__hook_tl_csname:n { \l__hook_front_tl } } } \int_compare:nNnF \l__hook_labels_int = 0 { \iow_term:x{====================} \iow_term:x{Error:~ label~ rules~ are~ incompatible:} \__hook_debug_label_data:N \l__hook_work_prop \iow_term:x{====================} } \exp_args:NNo \__hook_tl_gput:Nn #1 { \cs:w __hook_toplevel~#3 \cs_end: } \__hook_tl_gput_right:No #1 { \cs:w __hook_next~#3 \cs_end: } } \cs_generate_variant:Nn \__hook_tl_gput_right:Nn { No } \EndIncludeInRelease \cs_new:Npn \__hook_tl_gput:Nn { \ERROR } \cs_new:Npn \__hook_clist_gput:NV { \ERROR } \cs_new_protected:Npn \__hook_apply_label_pair:nnn #1#2#3 { \__hook_label_if_exist_apply:nnnF {#1} {#2} {#3} { \__hook_label_if_exist_apply:nnnF {#1} {#2} { ?? } { } } } \cs_new_protected:Npn \__hook_label_if_exist_apply:nnnF #1#2#3 { \if_cs_exist:w g__hook_ #3 _rule_ #1 | #2 _tl \cs_end: \__hook_apply_rule:nnn {#1} {#2} {#3} \exp_after:wN \use_none:n \else: \use:nn \fi: } \cs_new_protected:Npn \__hook_apply_rule:nnn #1#2#3 { \cs:w __hook_apply_ \cs:w g__hook_#3_reversed_tl \cs_end: rule_ \cs:w g__hook_ #3 _rule_ #1 | #2 _tl \cs_end: :nnn \cs_end: {#1} {#2} {#3} } \cs_new_protected:cpn { __hook_apply_rule_<:nnn } #1#2#3 { \__hook_debug:n { \__hook_msg_pair_found:nnn {#1} {#2} {#3} } \tl_set:cx { \__hook_tl_csname:n {#2} } { \int_eval:n{ \cs:w \__hook_tl_csname:n {#2} \cs_end: + 1 } } \seq_put_right:cn{ \__hook_seq_csname:n {#1} }{#2} } \cs_new_protected:cpn { __hook_apply_rule_>:nnn } #1#2#3 { \__hook_debug:n { \__hook_msg_pair_found:nnn {#1} {#2} {#3} } \tl_set:cx { \__hook_tl_csname:n {#1} } { \int_eval:n{ \cs:w \__hook_tl_csname:n {#1} \cs_end: + 1 } } \seq_put_right:cn{ \__hook_seq_csname:n {#2} }{#1} } \cs_new_protected:cpn { __hook_apply_rule_xE:nnn } #1#2#3 { \__hook_debug:n { \__hook_msg_pair_found:nnn {#1} {#2} {#3} } \msg_error:nnnnnn { hooks } { labels-incompatible } {#1} {#2} {#3} { 1 } \use:c { __hook_apply_rule_->:nnn } {#1} {#2} {#3} \use:c { __hook_apply_rule_<-:nnn } {#1} {#2} {#3} } \cs_new_protected:cpn { __hook_apply_rule_xW:nnn } #1#2#3 { \__hook_debug:n { \__hook_msg_pair_found:nnn {#1} {#2} {#3} } \msg_warning:nnnnnn { hooks } { labels-incompatible } {#1} {#2} {#3} { 0 } } \cs_new_protected:cpn { __hook_apply_rule_->:nnn } #1#2#3 { \__hook_debug:n { \__hook_msg_pair_found:nnn {#1} {#2} {#3} \iow_term:x{--->~ Drop~ '#2'~ code~ from~ \iow_char:N \\ g__hook_ \l__hook_cur_hook_tl _code_prop ~ because~ of~ '#1' } } \prop_put:Nnn \l__hook_work_prop {#2} { } } \cs_new_protected:cpn { __hook_apply_rule_<-:nnn } #1#2#3 { \__hook_debug:n { \__hook_msg_pair_found:nnn {#1} {#2} {#3} \iow_term:x{--->~ Drop~ '#1'~ code~ from~ \iow_char:N \\ g__hook_ \l__hook_cur_hook_tl _code_prop ~ because~ of~ '#2' } } \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_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} ~ rule~ \__hook_label_pair:nn {#1} {#2}:~ \use:c { g__hook_#3_rule_ \__hook_label_pair:nn {#1} {#2} _tl } ~ found} } \cs_new_protected:Npn \__hook_debug_label_data:N #1 { \iow_term:x{Code~ labels~ for~ sorting:} \iow_term:x{~ \seq_use:Nnnn\l__hook_labels_seq {~and~}{,~}{~and~} } \iow_term:x{^^J Data~ structure~ for~ label~ rules:} \prop_map_inline:Nn #1 { \iow_term:x{~ ##1~ =~ \tl_use:c{ \__hook_tl_csname:n {##1} }~ ->~ \seq_use:cnnn{ \__hook_seq_csname:n {##1} }{~->~}{~->~}{~->~} } } \iow_term:x{} } \cs_new_protected:Npn \hook_log:n #1 { \cs_set_eq:NN \__hook_log_cmd:x \iow_log:x \__hook_normalize_hook_args:Nn \__hook_log:nN {#1} \tl_log:x } \cs_new_protected:Npn \hook_show:n #1 { \cs_set_eq:NN \__hook_log_cmd:x \iow_term:x \__hook_normalize_hook_args:Nn \__hook_log:nN {#1} \tl_show:x } \cs_new_protected:Npn \__hook_log_line:x #1 { \__hook_log_cmd:x { >~#1 } } \cs_new_protected:Npn \__hook_log_line_indent:x #1 { \__hook_log_cmd:x { >~\@spaces #1 } } \IncludeInRelease{2023/06/01}{\__hook_log:nN} {Hooks~with~args} \cs_new_protected:Npn \__hook_log:nN #1 #2 { \__hook_if_deprecated_generic:nT {#1} { \__hook_deprecated_generic_warn:n {#1} \__hook_do_deprecated_generic:Nn \__hook_log:nN {#1} #2 \exp_after:wN \use_none:nnnnnnnnn \use_none:nnnnn } \__hook_preamble_hook:n {#1} \__hook_log_cmd:x { ^^J ->~The~ \__hook_if_generic:nT {#1} { generic~ } hook~'#1' \__hook_if_disabled:nF {#1} { \exp_args:Nne \__hook_print_args:nn {#1} { \int_eval:n { \str_count:e { \__hook_parameter:n {#1} } / 3 } } } : } \__hook_if_usable:nF {#1} { \__hook_log_line:x { The~hook~is~not~declared. } } \__hook_if_disabled:nT {#1} { \__hook_log_line:x { The~hook~is~disabled. } } \hook_if_empty:nTF {#1} { #2 { The~hook~is~empty } } { \__hook_log_line:x { Code~chunks: } \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 } { \exp_after:wN \cs_set:Npn \exp_after:wN \__hook_tmp:w \c__hook_nine_parameters_tl {##2} \__hook_log_line_indent:x { ##1~->~\cs_replacement_spec:N \__hook_tmp:w } } } \__hook_log_line:x { Document-level~(top-level)~code \__hook_if_usable:nT {#1} { ~(executed~\__hook_if_reversed:nTF {#1} {first} {last} ) } : } \__hook_log_line_indent:x { \__hook_cs_if_empty:cTF { __hook_toplevel~#1 } { --- } { -> ~ \cs_replacement_spec:c { __hook_toplevel~#1 } } } \__hook_log_line:x { Extra~code~for~next~invocation: } \__hook_log_line_indent:x { \__hook_cs_if_empty:cTF { __hook_next~#1 } { --- } { -> ~ \exp_last_unbraced:Nf \__hook_log_next_code:w { \cs_replacement_spec:c { __hook_next~#1 } } } } \__hook_log_line:x { Rules: } \bool_set_true:N \l__hook_tmpa_bool \__hook_list_rules:nn {#1} { \bool_set_false:N \l__hook_tmpa_bool \__hook_log_line_indent:x { ##2~ with~ \str_if_eq:nnT {##3} {??} { default~ } relation~ ##1 } } \bool_if:NT \l__hook_tmpa_bool { \__hook_log_line_indent:x { --- } } \bool_lazy_and:nnTF { \__hook_if_usable_p:n {#1} } { ! \hook_if_empty_p:n {#1} } { \__hook_log_line:x { Execution~order \bool_if:NTF \l__hook_tmpa_bool { \__hook_if_reversed:nT {#1} { ~(after~reversal) } } { ~(after~ \__hook_if_reversed:nT {#1} { reversal~and~ } applying~rules) } : } #2 % \tl_show:n { \@spaces \clist_if_empty:cTF { g__hook_#1_labels_clist } { --- } { \clist_use:cn { g__hook_#1_labels_clist } { ,~ } } } } { \__hook_log_line:x { Execution~order: } #2 { \@spaces Not~set~because~the~hook~ \__hook_if_usable:nTF {#1} { code~pool~is~empty } { is~\__hook_if_disabled:nTF {#1} {disabled} {undeclared} } } } } } \EndIncludeInRelease \IncludeInRelease{2020/10/01}{\__hook_log:nN} {Hooks~with~args} \cs_new_protected:Npn \__hook_log:nN #1 #2 { \__hook_if_deprecated_generic:nT {#1} { \__hook_deprecated_generic_warn:n {#1} \__hook_do_deprecated_generic:Nn \__hook_log:nN {#1} #2 \exp_after:wN \use_none:nnnnnnnnn \use_none:nnnnn } \__hook_preamble_hook:n {#1} \__hook_log_cmd:x { ^^J ->~The~ \__hook_if_generic:nT {#1} { generic~ } hook~'#1': } \__hook_if_usable:nF {#1} { \__hook_log_line:x { The~hook~is~not~declared. } } \__hook_if_disabled:nT {#1} { \__hook_log_line:x { The~hook~is~disabled. } } \hook_if_empty:nTF {#1} { #2 { The~hook~is~empty } } { \__hook_log_line:x { Code~chunks: } \prop_if_empty:cTF { g__hook_#1_code_prop } { \__hook_log_line_indent:x { --- } } { \prop_map_inline:cn { g__hook_#1_code_prop } { \__hook_log_line_indent:x { ##1~->~\tl_to_str:n {##2} } } } \__hook_log_line:x { Document-level~(top-level)~code \__hook_if_usable:nT {#1} { ~(executed~ \__hook_if_reversed:nTF {#1} {first} {last} ) } : } \__hook_log_line_indent:x { \tl_if_empty:cTF { __hook_toplevel~#1 } { --- } { -> ~ \exp_args:Nv \tl_to_str:n { __hook_toplevel~#1 } } } \__hook_log_line:x { Extra~code~for~next~invocation: } \__hook_log_line_indent:x { \tl_if_empty:cTF { __hook_next~#1 } { --- } { ->~ \exp_args:Nv \__hook_log_next_code:n { __hook_next~#1 } } } \__hook_log_line:x { Rules: } \bool_set_true:N \l__hook_tmpa_bool \__hook_list_rules:nn {#1} { \bool_set_false:N \l__hook_tmpa_bool \__hook_log_line_indent:x { ##2~ with~ \str_if_eq:nnT {##3} {??} { default~ } relation~ ##1 } } \bool_if:NT \l__hook_tmpa_bool { \__hook_log_line_indent:x { --- } } \bool_lazy_and:nnTF { \__hook_if_usable_p:n {#1} } { ! \hook_if_empty_p:n {#1} } { \__hook_log_line:x { Execution~order \bool_if:NTF \l__hook_tmpa_bool { \__hook_if_reversed:nT {#1}{ ~(after~reversal) } } { ~(after~ \__hook_if_reversed:nT {#1} { reversal~and~ } applying~rules) } : } #2 % \tl_show:n { \@spaces \clist_if_empty:cTF { g__hook_#1_labels_clist } { --- } { \clist_use:cn { g__hook_#1_labels_clist } { ,~ } } } } { \__hook_log_line:x { Execution~order: } #2 { \@spaces Not~set~because~the~hook~ \__hook_if_usable:nTF {#1} { code~pool~is~empty } { is~\__hook_if_disabled:nTF {#1} {disabled} {undeclared} } } } } } \EndIncludeInRelease \IncludeInRelease{2023/06/01}{\__hook_log_next_code:n} {Hooks~with~args} \exp_last_unbraced:NNNNo \cs_new:Npn \__hook_log_next_code:w #1 \c_right_brace_str { } \EndIncludeInRelease \IncludeInRelease{2020/10/01}{\__hook_log_next_code:n} {Hooks~with~args} \cs_gset:Npn \__hook_log_next_code:n #1 { \exp_args:No \tl_to_str:n { \use_none:nn #1 } } \EndIncludeInRelease \cs_new:Npn \__hook_print_args:nn #1 #2 { \int_compare:nNnT {#2} > { 0 } { \__hook_if_declared:nT {#1} { \use_none:nnn } \__hook_if_cmd_hook:nT {#1} { \use_i:nnn { ~ (unknown ~ } } \use:n { ~ (#2 ~ } argument \int_compare:nNnT {#2} > { 1 } { s } ) } } \cs_new_protected:Npn \__hook_list_rules:nn #1 #2 { \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 } { \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} } } } } \cs_new_protected:Npn \__hook_list_one_rule:nnn #1#2#3 { \__hook_list_if_rule_exists:nnnF {#1} {#2} {#3} { \__hook_list_if_rule_exists:nnnF {#1} {#2} { ?? } { } } } \cs_new_protected:Npn \__hook_list_if_rule_exists:nnnF #1#2#3 { \if_cs_exist:w g__hook_ #3 _rule_ #1 | #2 _tl \cs_end: \exp_args:Nv \__hook_tmp:w { g__hook_ #3 _rule_ #1 | #2 _tl } { #1 | #2 } {#3} \exp_after:wN \use_none:nn \fi: \use:n } \cs_new_protected:Npn \__hook_debug_print_rules:n #1 { \iow_term:n { The~hook~#1~contains~the~rules: } \cs_set_protected:Npn \__hook_tmp:w ##1 { \__hook_list_rules:nn {#1} { \iow_term:x { > ##1 {####2} ##1 => ##1 {####1} \str_if_eq:nnT {####3} {??} { ~(default) } } } } \exp_args:No \__hook_tmp:w { \use:nn { ~ } { ~ } } } \IncludeInRelease{2023/06/01}{\hook_gput_next_code:nn} {Hooks~with~args} \cs_new_protected:Npn \hook_gput_next_code:nn #1 #2 { \__hook_replacing_args_false: \__hook_normalize_hook_args:Nn \__hook_gput_next_code:nn {#1} {#2} \__hook_replacing_args_reset: } \cs_new_protected:Npn \hook_gput_next_code_with_args:nn #1 #2 { \__hook_replacing_args_true: \__hook_normalize_hook_args:Nn \__hook_gput_next_code:nn {#1} {#2} \__hook_replacing_args_reset: } \EndIncludeInRelease \IncludeInRelease{2020/10/01}{\hook_gput_next_code:nn} {Hooks~with~args} \cs_gset_protected:Npn \hook_gput_next_code:nn #1 { \__hook_normalize_hook_args:Nn \__hook_gput_next_code:nn {#1} } \cs_gset_protected:Npn \hook_gput_next_code_with_args:nn #1 #2 { } \EndIncludeInRelease \cs_new_protected:Npn \__hook_gput_next_code:nn #1 #2 { \__hook_if_disabled:nTF {#1} { \msg_error:nnn { hooks } { hook-disabled } {#1} } { \__hook_if_structure_exist:nTF {#1} { \__hook_gput_next_do:nn } { \__hook_try_declaring_generic_next_hook:nn } {#1} {#2} } } \IncludeInRelease{2023/06/01}{\__hook_gput_next_do:nn} {Hooks~with~args} \cs_new_protected:Npn \__hook_gput_next_do:nn #1 { \__hook_init_structure:n {#1} \__hook_chk_args_allowed:nn {#1} { AddToHookNext } \__hook_cs_if_empty:cT { __hook~#1 } { \__hook_update_hook_code:n {#1} } \__hook_cs_if_empty:cT { __hook_next~#1 } { \__hook_next_gset:nn {#1} { \__hook_clear_next:n {#1} } } \__hook_cs_gput_right:nnn { _next } {#1} } \EndIncludeInRelease \IncludeInRelease{2020/10/01}{\__hook_gput_next_do:nn} {Hooks~with~args} \cs_gset_protected:Npn \__hook_gput_next_do:nn #1 { \exp_args:Nc \__hook_gput_next_do:Nnn { __hook_next~#1 } {#1} } \cs_gset_protected:Npn \__hook_gput_next_do:Nnn #1 #2 { \tl_if_empty:cT { __hook~#2 } { \__hook_update_hook_code:n {#2} } \tl_if_empty:NT #1 { \__hook_tl_gset:Nn #1 { \__hook_clear_next:n {#2} } } \__hook_tl_gput_right:Nn #1 } \EndIncludeInRelease \cs_new_protected:Npn \hook_gclear_next_code:n #1 { \__hook_normalize_hook_args:Nn \__hook_clear_next:n {#1} } \IncludeInRelease{2023/06/01}{\__hook_clear_next:n} {Hooks~with~args} \cs_new_protected:Npn \__hook_clear_next:n #1 { \__hook_next_gset:nn {#1} { } } \EndIncludeInRelease \IncludeInRelease{2020/10/01}{\__hook_clear_next:n} {Hooks~with~args} \cs_gset_protected:Npn \__hook_clear_next:n #1 { \cs_gset_eq:cN { __hook_next~#1 } \c_empty_tl } \EndIncludeInRelease \IncludeInRelease{2023/06/01}{\hook_use:n} {Hooks~with~args} \cs_new_protected:Npn \hook_use:n #1 { \__hook_preamble_hook:n {#1} \__hook_use_initialized:n {#1} } \cs_new:Npn \__hook_use_initialized:n #1 { \if_cs_exist:w __hook~#1 \cs_end: \cs:w __hook~#1 \use_i:nn \fi: \use_none:n \cs_end: } \cs_new_protected:Npn \__hook_preamble_hook:n #1 { \if_cs_exist:w __hook~#1 \cs_end: \__hook_initialize_hook_code:n {#1} \fi: } \EndIncludeInRelease \IncludeInRelease{2021/11/15}{\hook_use:n} {Standardise~generic~hook~names} \cs_new_protected:Npn \hook_use:n #1 { \tl_if_exist:cT { __hook~#1 } { \__hook_preamble_hook:n {#1} \cs:w __hook~#1 \cs_end: } } \cs_new:Npn \__hook_use_initialized:n #1 { \if_cs_exist:w __hook~#1 \cs_end: \cs:w __hook~#1 \exp_after:wN \cs_end: \fi: } \cs_new_protected:Npn \__hook_preamble_hook:n #1 { \__hook_initialize_hook_code:n {#1} } \cs_new:Npn \hook_use:nnw #1 { } \EndIncludeInRelease \IncludeInRelease{2020/10/01}{\hook_use:n} {Standardise~generic~hook~names} \cs_new_protected:Npn \hook_use:n #1 { \tl_if_exist:cTF { __hook~#1 } { \__hook_preamble_hook:n {#1} \cs:w __hook~#1 \cs_end: } { \__hook_use:wn #1 / \s__hook_mark {#1} } } \cs_new:Npn \__hook_use_initialized:n #1 { \if_cs_exist:w __hook~#1 \cs_end: \else: \__hook_use_undefined:w \fi: \cs:w __hook~#1 \__hook_use_end: } \cs_new:Npn \__hook_use_undefined:w #1 #2 __hook~#3 \__hook_use_end: { #1 % fi \__hook_use:wn #3 / \s__hook_mark {#3} } \cs_new_protected:Npn \__hook_preamble_hook:n #1 { \__hook_initialize_hook_code:n {#1} } \cs_new_eq:NN \__hook_use_end: \cs_end: \cs_new:Npn \hook_use:nnw #1 { } \EndIncludeInRelease \IncludeInRelease{2023/06/01}{\hook_use:nnw} {Hooks~with~args} \cs_new_protected:Npn \hook_use:nnw #1 { \__hook_preamble_hook:n {#1} \__hook_use_initialized:nnw {#1} } \cs_new:Npn \__hook_use_initialized:nnw #1 #2 { \cs:w \if_cs_exist:w __hook~#1 \cs_end: __hook~#1 \else: use_none: \prg_replicate:nn {#2} { n } \fi: \cs_end: } \EndIncludeInRelease \IncludeInRelease{2020/10/01}{\hook_use:nnw} {Hooks~with~args} \cs_gset:Npn \hook_use:nnw #1 #2 { \use:c { use_none: \prg_replicate:nn {#2} { n } } } \EndIncludeInRelease \IncludeInRelease{2023/06/01}{\__hook_post_initialization_defs:} {Hooks~with~args} \cs_new_protected:Npn \__hook_post_initialization_defs: { \cs_gset_eq:NN \hook_use:n \__hook_use_initialized:n \cs_gset_eq:NN \hook_use:nnw \__hook_use_initialized:nnw \cs_gset_eq:NN \__hook_preamble_hook:n \use_none:n \cs_gset_eq:NN \__hook_post_initialization_defs: \prg_do_nothing: } \EndIncludeInRelease \IncludeInRelease{2020/10/01}{\__hook_post_initialization_defs:} {Hooks~with~args} \cs_undefine:N \__hook_post_initialization_defs: \EndIncludeInRelease \IncludeInRelease{2021/11/15}{\__hook_use:wn} {Standardise~generic~hook~names} \EndIncludeInRelease \IncludeInRelease{2020/10/01}{\__hook_use:wn} {Standardise~generic~hook~names} \cs_new:Npn \__hook_use:wn #1 / #2 \s__hook_mark #3 { \str_if_eq:nnTF {#1} { file } { \__hook_try_file_hook:n {#3} } { } % Hook doesn't exist } \cs_new_protected:Npn \__hook_try_file_hook:n #1 { \__hook_if_file_hook:wTF #1 / / \s__hook_mark { \exp_args:Ne \__hook_if_usable_use:n { \exp_args:Ne \__hook_file_hook_normalize:n {#1} } } { \__hook_if_usable_use:n {#1} } % file/ generic hook (e.g. file/before) } \cs_new_protected:Npn \__hook_if_usable_use:n #1 { \tl_if_exist:cT { __hook~#1 } { \__hook_preamble_hook:n {#1} \cs:w __hook~#1 \cs_end: } } \EndIncludeInRelease \IncludeInRelease{2023/06/01}{\hook_use_once:nnw} {Hooks~with~args} \cs_new_protected:Npn \hook_use_once:n #1 { \__hook_if_execute_immediately:nF {#1} { \__hook_normalize_hook_args:Nn \__hook_use_once:nn { \use:n {#1} } { 0 } } } \cs_new_protected:Npn \hook_use_once:nnw #1 #2 { \__hook_if_execute_immediately:nF {#1} { \__hook_normalize_hook_args:Nn \__hook_use_once:nn { \use:n {#1} } {#2} } } \EndIncludeInRelease \IncludeInRelease{2020/10/01}{\hook_use_once:nnw} {Hooks~with~args} \cs_gset_protected:Npn \hook_use_once:n #1 { \__hook_if_execute_immediately:nF {#1} { \__hook_normalize_hook_args:Nn \__hook_use_once:n { \use:n {#1} } } } \cs_gset:Npn \hook_use_once:nnw #1 #2 { \use:c { use_none: \prg_replicate:nn {#2} { n } } } \EndIncludeInRelease \IncludeInRelease{2023/06/01}{\__hook_use_once:nn} {Hooks~with~args} \cs_new_protected:Npn \__hook_use_once:nn #1 #2 { \__hook_preamble_hook:n {#1} \__hook_use_once_set:n {#1} \__hook_replacing_args_false: \__hook_cs_gput_right:nnn { _next } {#1} { \__hook_use_once_clear:n {#1} } \__hook_replacing_args_reset: \__hook_if_usable:nTF {#1} { \__hook_use_initialized:n {#1} } { \int_compare:nNnT {#2} > { 0 } { \use:c { use_none: \prg_replicate:nn {#2} { n } } } } } \EndIncludeInRelease \IncludeInRelease{2020/10/01}{\__hook_use_once:nn} {Hooks~with~args} \cs_gset_protected:Npn \__hook_use_once:n #1 { \__hook_preamble_hook:n {#1} \__hook_use_once_set:n {#1} \__hook_use_initialized:n {#1} \__hook_use_once_clear:n {#1} } \cs_undefine:N \__hook_use_once:nn \EndIncludeInRelease \IncludeInRelease{2023/06/01}{\__hook_use_once_clear:n} {Hooks~with~args} \cs_new_protected:Npn \__hook_use_once_set:n #1 { \__hook_tl_gset:cn { g__hook_#1_reversed_tl } { I } } \cs_new_protected:Npn \__hook_use_once_clear:n #1 { \__hook_code_gset:nn {#1} { } \__hook_next_gset:nn {#1} { } \__hook_toplevel_gset:nn {#1} { } \prop_gclear_new:c { g__hook_#1_code_prop } } \EndIncludeInRelease \IncludeInRelease{2020/10/01}{\__hook_use_once_clear:n} {Hooks~with~args} \cs_new_protected:Npn \__hook_use_once_clear:n #1 { \__hook_tl_gclear:c { __hook~#1 } \__hook_tl_gclear:c { __hook_next~#1 } \__hook_tl_gclear:c { __hook_toplevel~#1 } \prop_gclear_new:c { g__hook_#1_code_prop } } \EndIncludeInRelease \prg_new_conditional:Npnn \__hook_if_execute_immediately:n #1 { T, F, TF } { \exp_after:wN \__hook_use_none_delimit_by_s_mark:w \if:w I \if_cs_exist:w g__hook_#1_reversed_tl \cs_end: \cs:w g__hook_#1_reversed_tl \exp_after:wN \cs_end: \fi: X \s__hook_mark \prg_return_true: \else: \s__hook_mark \prg_return_false: \fi: } \IncludeInRelease{2023/06/01}{\hook_if_empty:n} {Hooks~with~args} \prg_new_conditional:Npnn \hook_if_empty:n #1 { p , T , F , TF } { \if:w T \prop_if_exist:cT { g__hook_#1_code_prop } { \prop_if_empty:cF { g__hook_#1_code_prop } { F } } \__hook_cs_if_empty:cF { __hook_toplevel~#1 } { F } \__hook_cs_if_empty:cF { __hook_next~#1 } { F } T \prg_return_true: \else: \prg_return_false: \fi: } \EndIncludeInRelease \IncludeInRelease{2020/10/01}{\hook_if_empty:n} {Hooks~with~args} \prg_new_conditional:Npnn \hook_if_empty:n #1 { p , T , F , TF } { \__hook_if_structure_exist:nTF {#1} { \bool_lazy_and:nnTF { \prop_if_empty_p:c { g__hook_#1_code_prop } } { \bool_lazy_and_p:nn { \tl_if_empty_p:c { __hook_toplevel~#1 } } { \tl_if_empty_p:c { __hook_next~#1 } } } { \prg_return_true: } { \prg_return_false: } } { \prg_return_true: } } \EndIncludeInRelease \prg_new_conditional:Npnn \__hook_if_usable:n #1 { p , T , F , TF } { \cs_if_exist:cTF { __hook~#1 } { \prg_return_true: } { \prg_return_false: } } \prg_new_conditional:Npnn \__hook_if_structure_exist:n #1 { p , T , F , TF } { \prop_if_exist:cTF { g__hook_#1_code_prop } { \prg_return_true: } { \prg_return_false: } } \prg_new_conditional:Npnn \__hook_if_declared:n #1 { p, T, F, TF } { \tl_if_exist:cTF { g__hook_#1_declared_tl } { \prg_return_true: } { \prg_return_false: } } \prg_new_conditional:Npnn \__hook_if_reversed:n #1 { p , T , F , TF } { \exp_after:wN \__hook_use_none_delimit_by_s_mark:w \if:w - \cs:w g__hook_#1_reversed_tl \cs_end: \s__hook_mark \prg_return_true: \else: \s__hook_mark \prg_return_false: \fi: } \prg_new_conditional:Npnn \__hook_if_generic:n #1 { T, TF } { \__hook_if_generic:w #1 / / / \s__hook_mark } \cs_new:Npn \__hook_if_generic:w #1 / #2 / #3 / #4 \s__hook_mark { \cs_if_exist:cTF { c__hook_generic_#1/./#3_tl } { \prg_return_true: } { \prg_return_false: } } \prg_new_conditional:Npnn \__hook_if_deprecated_generic:n #1 { T, TF } { \__hook_if_deprecated_generic:w #1 / / / \s__hook_mark } \cs_new:Npn \__hook_if_deprecated_generic:w #1 / #2 / #3 / #4 \s__hook_mark { \cs_if_exist:cTF { c__hook_deprecated_#1/./#2_tl } { \tl_if_empty:nTF {#3} { \prg_return_false: } { \prg_return_true: } } { \prg_return_false: } } \IncludeInRelease{2023/06/01}{\__hook_if_cmd_hook:n} {Hooks~with~args} \prg_new_conditional:Npnn \__hook_if_cmd_hook:n #1 { T } { \__hook_if_cmd_hook:w #1 / / / \s__hook_mark } \cs_new:Npn \__hook_if_cmd_hook:w #1 / #2 / #3 / #4 \s__hook_mark { \if:w Y \str_if_eq:nnF {#1} { cmd } { N } \tl_if_exist:cF { c__hook_generic_#1/./#3_tl } { N } Y \prg_return_true: \else: \prg_return_false: \fi: } \EndIncludeInRelease \IncludeInRelease{2020/10/01}{\__hook_if_cmd_hook:n} {Hooks~with~args} \cs_undefine:N \__hook_if_cmd_hook:nT \EndIncludeInRelease \prg_new_conditional:Npnn \__hook_if_generic_reversed:n #1 { T } { \__hook_if_generic_reversed:w #1 / / / \scan_stop: } \cs_new:Npn \__hook_if_generic_reversed:w #1 / #2 / #3 / #4 \scan_stop: { \if_charcode:w - \cs:w c__hook_generic_#1/./#3_tl \cs_end: \prg_return_true: \else: \prg_return_false: \fi: } \seq_new:N \g__hook_replacing_stack_seq \cs_new:Npn \__hook_misused_if_replacing_args:nn #1 #2 { \msg_expandable_error:nnn { latex2e } { should-not-happen } { Misused~\__hook_if_replacing_args:. } } \cs_new:Npn \__hook_if_replacing_args:TF { \__hook_misused_if_replacing_args:nn } \cs_new_protected:Npn \__hook_replacing_args_true: { \seq_gpush:No \g__hook_replacing_stack_seq { \__hook_if_replacing_args:TF } \cs_set:Npn \__hook_if_replacing_args:TF { \use_i:nn } } \cs_new_protected:Npn \__hook_replacing_args_false: { \seq_gpush:No \g__hook_replacing_stack_seq { \__hook_if_replacing_args:TF } \cs_set:Npn \__hook_if_replacing_args:TF { \use_ii:nn } } \cs_new_protected:Npn \__hook_replacing_args_reset: { \seq_gpop:NN \g__hook_replacing_stack_seq \l__hook_return_tl \cs_gset_eq:NN \__hook_if_replacing_args:TF \l__hook_return_tl } \prop_gput:Nnn \g_msg_module_type_prop { hooks } { LaTeX } \prop_gput:Nnn \g_msg_module_type_prop { latex2e } { LaTeX } \prop_gput:Nnn \g_msg_module_name_prop { latex2e } { kernel } \msg_new:nnnn { hooks } { labels-incompatible } { Labels~'#1'~and~'#2'~are~incompatible \str_if_eq:nnF {#3} {??} { ~in~hook~'#3' } .~ \int_compare:nNnTF {#4} = { 1 } { The~ code~ for~ both~ labels~ will~ be~ dropped. } { You~ may~ see~ errors~ later. } } { LaTeX~found~two~incompatible~labels~in~the~same~hook.~ This~indicates~an~incompatibility~between~packages. } \msg_new:nnnn { hooks } { exists } { Hook~'#1'~ has~ already~ been~ declared. } { There~ already~ exists~ a~ hook~ declaration~ with~ this~ name.\\ Please~ use~ a~ different~ name~ for~ your~ hook.} \IncludeInRelease{2023/06/01}{too-many-args} {Hooks~with~args} \msg_new:nnnn { hooks } { too-many-args } { Too~many~arguments~for~hook~'#1'. } { You~tried~to~declare~a~hook~with~#2~arguments,~but~a~ hook~can~only~have~up~to~nine.~LaTeX~will~define~this~ hook~with~nine~arguments. } \msg_new:nnnn { hooks } { without-args } { Hook~'#1'~has~no~arguments. } { You~tried~to~use~\iow_char:N\\#2WithArguments~ on~a~hook~that~takes~no~arguments.\\ Check~the~usage~of~the~hook~or~use~\iow_char:N\\#2~instead.\\ \\ LaTeX~will~use~\iow_char:N\\#2. } \msg_new:nnnn { hooks } { one-time-args } { You~can't~have~arguments~in~used~one-time~hook~'#1'. } { You~tried~to~use~\iow_char:N\\#2WithArguments~ on~a~one-time~hook~that~has~already~been~used.~ You~have~to~add~the~code~before~the~hook~is~used,~ or~add~the~code~without~arguments~using~\iow_char:N\\#2~instead.\\ \\ LaTeX~will~use~\iow_char:N\\#2. } \EndIncludeInRelease \IncludeInRelease{2020/10/01}{too-many-args} {Hooks~with~args} \EndIncludeInRelease \msg_new:nnnn { hooks } { hook-disabled } { Cannot~add~code~to~disabled~hook~'#1'. } { The~hook~'#1'~you~tried~to~add~code~to~was~previously~disabled~ with~\iow_char:N\\hook_disable_generic:n~or~ \iow_char:N\\DisableGenericHook,~so~ it~cannot~have~code~added~to~it. } \msg_new:nnn { hooks } { empty-label } { 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:. \\ This~command~was~ignored. } \msg_new:nnnn { hooks } { unknown-rule } { Unknown~ relationship~ '#3'~ between~ labels~ '#2'~ and~ '#4'~ \str_if_eq:nnF {#1} {??} { ~in~hook~'#1' }. ~ Perhaps~ a~ misspelling? } { The~ relation~ used~ not~ known~ to~ the~ system.~ Allowed~ values~ are~ 'before'~ or~ '<',~ 'after'~ or~ '>',~ 'incompatible-warning',~ 'incompatible-error',~ '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]{...}.\\ 'top-level'~is~reserved~for~the~user's~document. } { The~'top-level'~label~is~meant~for~user~code~only,~and~should~only~ be~used~(sparingly)~in~the~main~document.~Use~the~default~label~ '\__hook_currname_or_default:'~for~this~\@cls@pkg,~or~another~ suitable~label. } \msg_new:nnn { hooks } { set-top-level } { You~cannot~change~the~default~label~#1~'top-level'.~Illegal \\ \use:nn { ~ } { ~ } \iow_char:N \\#2{#3} \\ \msg_line_context:. } \msg_new:nnn { hooks } { extra-pop-label } { Extra~\iow_char:N \\PopDefaultHookLabel. \\ This~command~will~be~ignored. } \msg_new:nnn { hooks } { missing-pop-label } { Missing~\iow_char:N \\PopDefaultHookLabel. \\ The~label~'#1'~was~pushed~but~never~popped.~Something~is~wrong. } \msg_new:nnn { latex2e } { should-not-happen } { This~should~not~happen.~#1 \\ Please~report~at~https://github.com/latex3/latex2e. } \msg_new:nnn { hooks } { activate-disabled } { Cannot~ activate~ hook~ '#1'~ because~ it~ is~ disabled! } \msg_new:nnn { hooks } { cannot-remove } { Cannot~remove~chunk~'#2'~from~hook~'#1'~because~ \__hook_if_structure_exist:nTF {#1} { it~does~not~exist~in~that~hook. } { the~hook~does~not~exist. } } \msg_new:nnn { hooks } { generic-deprecated } { Generic~hook~'#1/#2/#3'~is~deprecated. \\ Use~hook~'#1/#3/#2'~instead. } \NewDocumentCommand \NewHook { m } { \hook_new:n {#1} } \NewDocumentCommand \NewReversedHook { m } { \hook_new_reversed:n {#1} } \NewDocumentCommand \NewMirroredHookPair { mm } { \hook_new_pair:nn {#1}{#2} } \IncludeInRelease{2023/06/01}{\NewHookWithArguments} {Hooks~with~args} \NewDocumentCommand \NewHookWithArguments { mm } { \hook_new_with_args:nn {#1} {#2} } \NewDocumentCommand \NewReversedHookWithArguments { mm } { \hook_new_reversed_with_args:nn {#1} {#2} } \NewDocumentCommand \NewMirroredHookPairWithArguments { mmm } { \hook_new_pair_with_args:nnn {#1} {#2} {#3} } \EndIncludeInRelease \IncludeInRelease{2020/10/01}{\NewHookWithArguments} {Hooks~with~args} \cs_new_protected:Npn \NewHookWithArguments #1 #2 { } \cs_new_protected:Npn \NewReversedHookWithArguments #1 #2 { } \cs_new_protected:Npn \NewMirroredHookPairWithArguments #1 #2 #3{} \EndIncludeInRelease \IncludeInRelease{2021/06/01}{\ActivateGenericHook} {Providing~hooks} \NewDocumentCommand \ActivateGenericHook { m } { \hook_activate_generic:n {#1} } \NewDocumentCommand \DisableGenericHook { m } { \hook_disable_generic:n {#1} } \EndIncludeInRelease \IncludeInRelease{2020/10/01}{\ActivateGenericHook} {Providing~hooks} \def \ActivateGenericHook #1 { } \def \DisableGenericHook #1 { } \EndIncludeInRelease \IncludeInRelease{2023/06/01}{\AddToHookWithArguments} {Hooks~with~args} \NewDocumentCommand \AddToHook { m o +m } { \hook_gput_code:nnn {#1} {#2} {#3} } \NewDocumentCommand \AddToHookWithArguments { m o +m } { \hook_gput_code_with_args:nnn {#1} {#2} {#3} } \EndIncludeInRelease \IncludeInRelease{2020/10/01}{\AddToHookWithArguments} {Hooks~with~args} \cs_new_protected:Npn \AddToHookWithArguments #1 #2 #3 { } \EndIncludeInRelease \IncludeInRelease{2023/06/01}{\AddToHookNextWithArguments} {Hooks~with~args} \NewDocumentCommand \AddToHookNext { m +m } { \hook_gput_next_code:nn {#1} {#2} } \NewDocumentCommand \AddToHookNextWithArguments { m +m } { \hook_gput_next_code_with_args:nn {#1} {#2} } \EndIncludeInRelease \IncludeInRelease{2020/10/01}{\AddToHookNextWithArguments} {Hooks~with~args} \cs_new_protected:Npn \AddToHookNextWithArguments #1 #2 { } \EndIncludeInRelease \NewDocumentCommand \ClearHookNext { m } { \hook_gclear_next_code:n {#1} } \NewDocumentCommand \RemoveFromHook { m o } { \hook_gremove_code:nn {#1} {#2} } \NewDocumentCommand \SetDefaultHookLabel { m } { \__hook_set_default_hook_label:n {#1} } \NewDocumentCommand \PushDefaultHookLabel { m } { \__hook_curr_name_push:n {#1} } \NewDocumentCommand \PopDefaultHookLabel { } { \__hook_curr_name_pop: } \cs_gset_protected:Npn \@expl@push@filename@aux@@ #1#2#3 { \__hook_curr_name_push:n {#3} \str_gset:Nx \g_file_curr_name_str {#3} #1 #2 {#3} } \IncludeInRelease{2023/06/01}{\UseHookWithArguments} {Hooks~with~args} \cs_new:Npn \UseHook { \hook_use:n } \cs_new:Npn \UseOneTimeHook { \hook_use_once:n } \cs_new:Npn \UseHookWithArguments { \hook_use:nnw } \cs_new:Npn \UseOneTimeHookWithArguments { \hook_use_once:nnw } \EndIncludeInRelease \IncludeInRelease{2020/10/01}{\UseHookWithArguments} {Hooks~with~args} \cs_new:Npn \UseHookWithArguments #1 #2 { } \cs_new:Npn \UseOneTimeHookWithArguments #1 #2 { } \EndIncludeInRelease \cs_new_protected:Npn \ShowHook { \hook_show:n } \cs_new_protected:Npn \LogHook { \hook_log:n } \cs_new_protected:Npn \DebugHooksOn { \hook_debug_on: } \cs_new_protected:Npn \DebugHooksOff { \hook_debug_off: } \NewDocumentCommand \DeclareHookRule { m m m m } { \hook_gset_rule:nnnn {#1}{#2}{#3}{#4} } \NewDocumentCommand \DeclareDefaultHookRule { m m m } { \hook_gset_rule:nnnn {??}{#1}{#2}{#3} } \@onlypreamble\DeclareDefaultHookRule \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 { \__hook_deprecated_warn:nn { hook_disable:n } { hook_disable_generic:n } \hook_disable_generic:n } \cs_new_protected:Npn \hook_provide:n { \__hook_deprecated_warn:nn { hook_provide:n } { hook_activate_generic:n } \hook_activate_generic:n } \cs_new_protected:Npn \hook_provide_reversed:n { \__hook_deprecated_warn:nn { hook_provide_reversed:n } { hook_activate_generic:n } \__hook_activate_generic_reversed:n } \cs_new_protected:Npn \hook_provide_pair:nn { \__hook_deprecated_warn:nn { hook_provide_pair:nn } { hook_activate_generic:n } \__hook_activate_generic_pair:nn } \cs_new_protected:Npn \__hook_activate_generic_reversed:n #1 { \__hook_normalize_hook_args:Nn \__hook_activate_generic:nn {#1} { - } } \cs_new_protected:Npn \__hook_activate_generic_pair:nn #1#2 { \hook_activate_generic:n {#1} \__hook_activate_generic_reversed:n {#2} } \cs_new_protected:Npn \DisableHook { \__hook_deprecated_warn:nn { DisableHook } { DisableGenericHook } \hook_disable_generic:n } \cs_new_protected:Npn \ProvideHook { \__hook_deprecated_warn:nn { ProvideHook } { ActivateGenericHook } \hook_activate_generic:n } \cs_new_protected:Npn \ProvideReversedHook { \__hook_deprecated_warn:nn { ProvideReversedHook } { ActivateGenericHook } \__hook_activate_generic_reversed:n } \cs_new_protected:Npn \ProvideMirroredHookPair { \__hook_deprecated_warn:nn { ProvideMirroredHookPair } { ActivateGenericHook } \__hook_activate_generic_pair:nn } \cs_new_protected:Npn \__hook_deprecated_warn:nn #1 #2 { \msg_warning:nnnn { hooks } { deprecated } {#1} {#2} } \msg_new:nnn { hooks } { deprecated } { Command~\iow_char:N\\#1~is~deprecated~and~will~be~removed~in~a~ future~release. \\ \\ Use~\iow_char:N\\#2~instead. } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \cs_new_eq:NN \@expl@@@initialize@all@@ \__hook_initialize_all: \cs_new_eq:NN \@expl@@@hook@curr@name@pop@@ \__hook_curr_name_pop: \IncludeInRelease{0000/00/00}{lthooks} {The~hook~management}% \def \NewHook#1{} \def \NewReversedHook#1{} \def \NewMirroredHookPair#1#2{} \def \DisableGenericHook #1{} \long\def\AddToHookNext#1#2{} \def\AddToHook#1{\@gobble@AddToHook@args} \providecommand\@gobble@AddToHook@args[2][]{} \def\RemoveFromHook#1{\@gobble@RemoveFromHook@arg} \providecommand\@gobble@RemoveFromHook@arg[1][]{} \def \UseHook #1{} \def \UseOneTimeHook #1{} \def \ShowHook #1{} \let \DebugHooksOn \@empty \let \DebugHooksOff\@empty \def \DeclareHookRule #1#2#3#4{} \def \DeclareDefaultHookRule #1#2#3{} \def \ClearHookRule #1#2#3{} \long\def \IfHookExistsTF #1#2#3{#3} \long\def \IfHookEmptyTF #1#2#3{#2} \EndModuleRelease \cs:w __hook_rollback_tidying: \cs_end: \bool_lazy_and:nnT { \int_compare_p:nNn { \sourceLaTeXdate } > { 20230600 } } { \int_compare_p:nNn { \requestedLaTeXdate } < { 20230601 } } { \cs_gset_protected:Npn \__hook_rollback_tidying: { \@latex@error { Rollback~code~executed~twice } { Something~went~wrong~(unless~this~was~ done~on~purpose~in~a~testing~environment). } \use_none:nnnn } \cs_set:Npn \__hook_tmp:w #1 #2 { \__hook_tl_gset:cx { __hook#1~#2 } { \exp_args:No \exp_not:o { \cs:w __hook#1~#2 \exp_last_unbraced:Ne \cs_end: { \__hook_braced_cs_parameter:n { __hook#1~#2 } } } } } \seq_map_inline:Nn \g__hook_all_seq { \exp_after:wN \cs_gset_nopar:Npn \cs:w g__hook_#1_code_prop \exp_args:NNo \exp_args:No \cs_end: { \cs:w g__hook_#1_code_prop \cs_end: } \__hook_tmp:w { _toplevel } {#1} \__hook_tmp:w { _next } {#1} } } \ExplSyntaxOff %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% From File: ltcmdhooks.dtx %% Copyright (C) 2020-2024 %% Frank Mittelbach, Phelype Oleinik, The LaTeX Project %%% From File: lthooks.dtx \ExplSyntaxOn \NewModuleRelease{2021/06/01}{ltcmdhooks} {The~hook~management~system~for~commands} \tl_new:N \g_hook_patch_action_list_tl \int_new:N \l__hook_patch_num_args_int \tl_new:N \l__hook_patch_prefixes_tl \tl_new:N \l__hook_param_text_tl \tl_new:N \l__hook_replace_text_tl \tl_const:Nn \c__hook_hash_tl { # } \tl_const:Nn \c__hook_hashes_tl { # # } \cs_new_eq:NN \__hook_exp_not:NN ? \cs_new_eq:NN \__hook_def_cmd:w ? \quark_new:N \q__hook_recursion_tail \quark_new:N \q__hook_recursion_stop \prop_new:N \g__hook_delayed_patches_prop \cs_new_protected:Npn \__hook_patch_debug:x #1 { \__hook_debug:n { \iow_term:x { [lthooks]~#1 } } } \cs_generate_variant:Nn \tl_rescan:nn { nV } \IncludeInRelease{2021/11/15}{\__hook_try_put_cmd_hook:n}% {Standardise~generic~hook~names} \cs_new_protected:Npn \__hook_try_put_cmd_hook:n #1 { \__hook_try_put_cmd_hook:w #1 / / / \s__hook_mark {#1} } \cs_new_protected:Npn \__hook_try_put_cmd_hook:w #1 / #2 / #3 / #4 \s__hook_mark #5 { \__hook_debug:n { \iow_term:n { ->~Adding~cmd~hook~to~'#2'~(#3): } } \exp_args:Nc \__hook_patch_cmd_or_delay:Nnn {#2} {#2} {#3} } \EndIncludeInRelease \IncludeInRelease{2021/06/01}{\__hook_try_put_cmd_hook:n}% {Standardise~generic~hook~names} \cs_new_protected:Npn \__hook_try_put_cmd_hook:n #1 { \__hook_try_put_cmd_hook:w #1 / / / \s__hook_mark {#1} } \cs_new_protected:Npn \__hook_try_put_cmd_hook:w #1 / #2 / #3 / #4 \s__hook_mark #5 { \__hook_debug:n { \iow_term:n { ->~Adding~cmd~hook~to~'#2'~(#3): } } \str_case:nnTF {#3} { { before } { } { after } { } } { \exp_args:Nc \__hook_patch_cmd_or_delay:Nnn {#2} {#2} {#3} } { \msg_error:nnnn { hooks } { wrong-cmd-hook } {#2} {#3} } } \EndIncludeInRelease \cs_new_protected:Npn \__hook_patch_cmd_or_delay:Nnn #1 #2 #3 { \__hook_debug:n { \iow_term:n { ->~Add~generic~cmd~hook~for~#2~(#3). } } \__hook_debug:n { \iow_term:n { !~In~the~preamble:~delaying. } } \prop_gput:Nnn \g__hook_delayed_patches_prop { #2 / #3 } { \__hook_cmd_try_patch:nn {#2} {#3} } } \cs_new_protected:Npn \__hook_cmd_begindocument_code: { \cs_gset_eq:NN \__hook_patch_cmd_or_delay:Nnn \__hook_patch_command:Nnn \prop_map_function:NN \g__hook_delayed_patches_prop { \use_ii:nn } \prop_gclear:N \g__hook_delayed_patches_prop \cs_undefine:N \__hook_cmd_begindocument_code: } \g@addto@macro \@kernel@after@begindocument { \__hook_cmd_begindocument_code: } \cs_new_protected:Npn \__hook_cmd_try_patch:nn #1 #2 { \__hook_debug:n { \iow_term:x { ->~\string\begin{document}~try~cmd / #1 / #2. } } \__hook_if_declared:nTF { cmd / #1 / #2 } { \__hook_debug:n { \iow_term:n { .->~Giving~up:~hook~already~created. } } } { \cs_if_exist:cT {#1} { \exp_args:Nc \__hook_patch_command:Nnn {#1} {#1} {#2} } } } \cs_new_protected:Npn \__hook_patch_command:Nnn #1 #2 #3 { \__hook_patch_debug:x { analyzing~'\token_to_str:N #1' } \__hook_patch_debug:x { \token_to_str:N #1 = \token_to_meaning:N #1 } \__hook_patch_check:NNnn \cs_if_exist:NTF #1 { undef } { \__hook_patch_debug:x { ++~control~sequence~is~defined } \__hook_patch_check:NNnn \token_if_macro:NTF #1 { macro } { \__hook_patch_debug:x { ++~control~sequence~is~a~macro } \__hook_patch_check:NNnn \__hook_if_public_command:NTF #1 { expl3 } { \__hook_patch_debug:x { ++~macro~is~not~private } \robust@command@act \g_hook_patch_action_list_tl #1 \__hook_retokenize_patch:Nnn { #1 {#2} {#3} } } } } } \cs_new_protected:Npn \__hook_patch_check:NNnn #1 #2 #3 #4 { #1 #2 {#4} { \msg_error:nnxx { hooks } { cant-patch } { \token_to_str:N #2 } {#3} } } \use:x { \prg_new_protected_conditional:Npnn \exp_not:N \__hook_if_public_command:N ##1 { TF } { \exp_not:N \exp_last_unbraced:Nf \exp_not:N \__hook_if_public_command:w { \exp_not:N \cs_to_str:N ##1 } \tl_to_str:n { _ _ } \s__hook_mark } } \exp_last_unbraced:NNNNo \cs_new_protected:Npn \__hook_if_public_command:w #1 \tl_to_str:n { _ _ } #2 \s__hook_mark { \tl_if_empty:nTF {#2} { \prg_return_true: } { \prg_return_false: } } \tl_gset:Nn \g_hook_patch_action_list_tl { { \@if@DeclareRobustCommand \__hook_patch_DeclareRobustCommand:Nnn } { \@if@newcommand \__hook_patch_newcommand:Nnn } { \__kernel_cmd_if_xparse:NTF \__hook_cmd_patch_xparse:Nnn } } \cs_new_protected:Npn \__hook_patch_DeclareRobustCommand:Nnn #1 { \exp_args:Nc \__hook_patch_DeclareRobustCommand_aux:Nnn { \cs_to_str:N #1 ~ } } \cs_new_protected:Npn \__hook_patch_DeclareRobustCommand_aux:Nnn #1 { \robust@command@chk@safe #1 { \@if@newcommand #1 } { \use_ii:nn } { \__hook_patch_newcommand:Nnn } { \__hook_patch_expand_redefine:NNnn \c_false_bool } #1 } \cs_new_protected:Npn \__hook_patch_newcommand:Nnn #1 { \exp_args:NNc \__hook_patch_expand_redefine:NNnn \c_true_bool { \c_backslash_str \cs_to_str:N #1 } } \cs_new_protected:Npn \__hook_cmd_patch_xparse:Nnn #1 { \exp_args:NNc \__hook_patch_expand_redefine:NNnn \c_false_bool { \cs_to_str:N #1 ~ code } } \IncludeInRelease{2023/06/01}{\__hook_patch_expand_redefine:NNnn} {cmd~hooks~with~args} \cs_new_protected:Npn \__hook_patch_expand_redefine:NNnn #1 #2 #3 #4 { \__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 { \__kernel_cs_parameter_spec:N #2 } / 2 \bool_if:NT #1 { -1 } } \int_compare:nNnTF { \l__hook_patch_num_args_int } > { \c_zero_int } { \tl_set:Nx \l__hook_tmpa_tl { \bool_if:NTF #1 { [ ] } { { } } } \int_step_inline:nnn { 2 } { \l__hook_patch_num_args_int } { \tl_put_right:Nn \l__hook_tmpa_tl { { } } } \exp_args:NNo \exp_args:No \__hook_if_has_hash:nTF { \exp_after:wN #2 \l__hook_tmpa_tl } { \cs_set_eq:NN \__hook_exp_not:n \exp_not:n } { \cs_set_eq:NN \__hook_exp_not:n \use:n } \cs_set_protected:Npn \__hook_tmp:w ##1 ##2 { ##1 \l__hook_param_text_tl { \use:n ##2 } ##1 \l__hook_replace_text_tl { \__hook_exp_not:n {##2} } } \bool_if:NTF #1 { \__hook_tmp:w \tl_set:Nx { [ \c__hook_hashes_tl 1 ] } } { \__hook_tmp:w \tl_set:Nx { { \c__hook_hashes_tl 1 } } } \int_step_inline:nnn { 2 } { \l__hook_patch_num_args_int } { \__hook_tmp:w \tl_put_right:Nx { { \c__hook_hashes_tl ##1 } } } \tl_set:Nx \l__hook_replace_text_tl { \exp_not:N #2 \exp_not:V \l__hook_replace_text_tl } \tl_set:Nx \l__hook_replace_text_tl { \token_if_eq_meaning:NNTF \__hook_exp_not:n \exp_not:n { \exp_args:NNV \exp_args:No \__hook_double_hashes:n } { \exp_args:NV \exp_not:o } \l__hook_replace_text_tl } \cs_set_eq:NN \__hook_def_cmd:w \tex_gdef:D \cs_set_eq:NN \__hook_exp_not:NN \prg_do_nothing: } { \tl_clear:N \l__hook_param_text_tl \tl_set_eq:NN \l__hook_replace_text_tl #2 \cs_set_eq:NN \__hook_def_cmd:w \tex_xdef:D \cs_set:Npn \__hook_exp_not:NN ##1 { \exp_not:N ##1 \exp_not:N } } \group_begin: \int_set:Nn \tex_escapechar:D { `\/ } \use:x { \group_end: \tl_set:Nx \exp_not:N \l__hook_patch_prefixes_tl { \exp_not:N \__hook_make_prefixes:w \cs_prefix_spec:N #2 / / } } \__hook_disable:n { cmd / #3 / #4 } \cs_undefine:c { c__hook_cmd / #3 / #4_parameter_tl } \__hook_make_usable:nn { cmd / #3 / #4 } { \l__hook_patch_num_args_int } \use:e { \__hook_redefine_with_hooks:Nnnn \exp_not:N #2 \str_if_eq:nnTF {#4} { after } { \use_ii_i:nn } { \use:nn } { { \__hook_exp_not:NN \exp_not:N \UseHookWithArguments { cmd / #3 / #4 } { \int_use:N \l__hook_patch_num_args_int } \__hook_braced_parameter:n { cmd / #3 / #4 } } } { { } } { \__hook_exp_not:NN \exp_not:V \l__hook_replace_text_tl } } \__hook_update_hook_code:n { cmd / #3 / #4 } } \EndIncludeInRelease \IncludeInRelease{2021/06/01}{\__hook_patch_expand_redefine:NNnn} {cmd~hooks~with~args} \cs_gset_protected:Npn \__hook_patch_expand_redefine:NNnn #1 #2 #3 #4 { \__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 { \__kernel_cs_parameter_spec:N #2 } / 2 \bool_if:NT #1 { -1 } } \int_compare:nNnTF { \l__hook_patch_num_args_int } > { \c_zero_int } { \tl_set:Nx \l__hook_tmpa_tl { \bool_if:NTF #1 { [ ] } { { } } } \int_step_inline:nnn { 2 } { \l__hook_patch_num_args_int } { \tl_put_right:Nn \l__hook_tmpa_tl { { } } } \exp_args:NNo \exp_args:No \__hook_if_has_hash:nTF { \exp_after:wN #2 \l__hook_tmpa_tl } { \cs_set_eq:NN \__hook_exp_not:n \exp_not:n } { \cs_set_eq:NN \__hook_exp_not:n \use:n } \cs_set_protected:Npn \__hook_tmp:w ##1 ##2 { ##1 \l__hook_param_text_tl { \use:n ##2 } ##1 \l__hook_replace_text_tl { \__hook_exp_not:n {##2} } } \bool_if:NTF #1 { \__hook_tmp:w \tl_set:Nx { [ \c__hook_hash_tl 1 ] } } { \__hook_tmp:w \tl_set:Nx { { \c__hook_hash_tl 1 } } } \int_step_inline:nnn { 2 } { \l__hook_patch_num_args_int } { \__hook_tmp:w \tl_put_right:Nx { { \c__hook_hash_tl ##1 } } } \tl_set:Nx \l__hook_replace_text_tl { \exp_not:N #2 \exp_not:V \l__hook_replace_text_tl } \tl_set:Nx \l__hook_replace_text_tl { \token_if_eq_meaning:NNTF \__hook_exp_not:n \exp_not:n { \exp_args:NNV \exp_args:No \__hook_double_hashes:n } { \exp_args:NV \exp_not:o } \l__hook_replace_text_tl } \cs_set_eq:NN \__hook_def_cmd:w \tex_gdef:D \cs_set_eq:NN \__hook_exp_not:NN \prg_do_nothing: } { \tl_clear:N \l__hook_param_text_tl \tl_set_eq:NN \l__hook_replace_text_tl #2 \cs_set_eq:NN \__hook_def_cmd:w \tex_xdef:D \cs_set:Npn \__hook_exp_not:NN ##1 { \exp_not:N ##1 \exp_not:N } } \group_begin: \int_set:Nn \tex_escapechar:D { `\/ } \use:x { \group_end: \tl_set:Nx \exp_not:N \l__hook_patch_prefixes_tl { \exp_not:N \__hook_make_prefixes:w \cs_prefix_spec:N #2 / / } } \use:x { \__hook_redefine_with_hooks:Nnnn \exp_not:N #2 \str_if_eq:nnTF {#4} { after } { \use_ii_i:nn } { \use:nn } { { \__hook_exp_not:NN \exp_not:N \UseHook { cmd / #3 / #4 } } } { { } } { \__hook_exp_not:NN \exp_not:V \l__hook_replace_text_tl } } } \EndIncludeInRelease \cs_new_protected:Npn \__hook_redefine_with_hooks:Nnnn #1 #2 #3 #4 { \l__hook_patch_prefixes_tl \exp_after:wN \__hook_def_cmd:w \exp_after:wN #1 \l__hook_param_text_tl { #2 #4 #3 } } \cs_new:Npn \__hook_make_prefixes:w / #1 / { \tl_if_empty:nF {#1} { \exp_not:c { tex_ \tl_trim_spaces:n {#1} :D } \__hook_make_prefixes:w / } } \prg_new_conditional:Npnn \__hook_if_has_hash:n #1 { TF } { \__hook_if_has_hash:w #1 ## \s__hook_mark } \cs_new:Npn \__hook_if_has_hash:w #1 { \tl_if_single_token:nTF {#1} { \token_if_eq_catcode:NNTF ## #1 { \__hook_if_has_hash_check:w } { \__hook_if_has_hash:w } } { \__hook_if_has_hash:w #1 } } \cs_new:Npn \__hook_if_has_hash_check:w #1 \s__hook_mark { \tl_if_empty:nTF {#1} { \prg_return_false: } { \prg_return_true: } } \cs_new:Npn \__hook_double_hashes:n #1 { \__hook_double_hashes:w #1 \q__hook_recursion_tail \q__hook_recursion_stop } \cs_new:Npn \__hook_double_hashes:w #1 \q__hook_recursion_stop { \tl_if_head_is_N_type:nTF {#1} { \__hook_double_hashes_output:N } { \tl_if_head_is_group:nTF {#1} { \__hook_double_hashes_group:n } { \__hook_double_hashes_space:w } } #1 \q__hook_recursion_stop } \cs_new:Npn \__hook_double_hashes_output:N #1 { \if_meaning:w \q__hook_recursion_tail #1 \__hook_double_hashes_stop:w \fi: \if:w ? \if_meaning:w \c__hook_hash_tl #1 ! \fi: \if_meaning:w \c__hook_hashes_tl #1 ! \fi: ? \else: \use_i:nnnn \fi: \use:n { \if_catcode:w ## \exp_not:N #1 \exp_after:wN \use_ii:nnnn \fi: \use_none:n { \exp_not:n { #1 #1 } } } \exp_not:N #1 \__hook_double_hashes:w } \cs_new:Npn \__hook_double_hashes_stop:w #1 \q__hook_recursion_stop { \fi: } \cs_new:Npn \__hook_double_hashes_group:n #1 { { \__hook_double_hashes:n {#1} } \__hook_double_hashes:w } \exp_last_unbraced:NNo \cs_new:Npn \__hook_double_hashes_space:w \c_space_tl { ~ \__hook_double_hashes:w } \cs_new_protected:Npn \__hook_retokenize_patch:Nnn #1 #2 #3 { \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 } \tl_set:Nx \l__hook_tmpa_tl { \int_compare:nNnTF { \char_value_catcode:n {`\@ } } = { 12 } { \exp_not:N \makeatletter } { \exp_not:N \makeatother } } \tl_set:Nx \l__hook_tmpb_tl { \bool_if:NTF \l__kernel_expl_bool { \ExplSyntaxOff } { \ExplSyntaxOn } } \use:x { \exp_not:N \__hook_try_patch_with_catcodes:Nnnnw \exp_not:n { #1 {#2} {#3} } { \prg_do_nothing: } { \exp_not:V \l__hook_tmpa_tl } % @ { \exp_not:V \l__hook_tmpb_tl } % _: { \exp_not:V \l__hook_tmpa_tl % @ \exp_not:V \l__hook_tmpb_tl % _: } } \q_recursion_tail \q_recursion_stop { \msg_error:nnxx { hooks } { cant-patch } { \c_backslash_str #2 } { retok } } } } \IncludeInRelease{2023/06/01}{\__hook_try_patch_with_catcodes:Nnnnw} {cmd~hooks~with~args} \cs_new_protected:Npn \__hook_try_patch_with_catcodes:Nnnnw #1 #2 #3 #4 { \quark_if_recursion_tail_stop_do:nn {#4} { \use:n } \__hook_patch_debug:x { ++~trying~to~patch~by~retokenization } \__hook_cmd_if_scanable:NnTF {#1} {#4} { \__hook_patch_debug:x { ++~macro~can~be~retokenized~cleanly } \__hook_patch_debug:x { ==~retokenizing~macro~now } \__hook_patch_retokenize:Nnnn #1 { cmd / #2 / #3 } {#3} {#4} \use_i_delimit_by_q_recursion_stop:nw \use_none:n } { \__hook_patch_debug:x { --~macro~cannot~be~retokenized~cleanly } \__hook_try_patch_with_catcodes:Nnnnw #1 {#2} {#3} } } \EndIncludeInRelease \IncludeInRelease{2021/06/01}{\__hook_try_patch_with_catcodes:Nnnnw} {cmd~hooks~with~args} \cs_gset_protected:Npn \__hook_try_patch_with_catcodes:Nnnnw #1 #2 #3 #4 { \quark_if_recursion_tail_stop_do:nn {#4} { \use:n } \__hook_patch_debug:x { ++~trying~to~patch~by~retokenization } \__hook_cmd_if_scanable:NnTF {#1} {#4} { \__hook_patch_debug:x { ++~macro~can~be~retokenized~cleanly } \__hook_patch_debug:x { ==~retokenizing~macro~now } \__hook_patch_retokenize:Nnnn #1 {#2} {#3} {#4} \use_i_delimit_by_q_recursion_stop:nw \use_none:n } { \__hook_patch_debug:x { --~macro~cannot~be~retokenized~cleanly } \__hook_try_patch_with_catcodes:Nnnnw #1 {#2} {#3} } } \EndIncludeInRelease \cs_new_eq:NN \kerneltmpDoNotUse ! \cs_new_protected:Npn \__hook_patch_required_catcodes: { \char_set_catcode_escape:N \\ \char_set_catcode_group_begin:N \{ \char_set_catcode_group_end:N \} \char_set_catcode_parameter:N \# % \int_set:Nn \tex_endlinechar:D { -1 } % \int_set:Nn \tex_newlinechar:D { -1 } } \prg_new_protected_conditional:Npnn \__hook_cmd_if_scanable:Nn #1 #2 { TF } { \cs_set_eq:NN \kerneltmpDoNotUse \scan_stop: \cs_set_eq:NN \__hook_tmp:w \scan_stop: \use:x { \cs_set:Npn \__hook_tmp:w ####1 \tl_to_str:n { macro: } ####2 -> ####3 \s__hook_mark { ####1 \def \kerneltmpDoNotUse ####2 {####3} } \tl_set:Nx \exp_not:N \l__hook_tmpa_tl { \exp_not:N \__hook_tmp:w \token_to_meaning:N #1 \s__hook_mark } } \tl_rescan:nV { #2 \__hook_patch_required_catcodes: } \l__hook_tmpa_tl \token_if_eq_meaning:NNTF #1 \kerneltmpDoNotUse { \prg_return_true: } { \prg_return_false: } } \IncludeInRelease{2023/06/01}{\__hook_guess_arg_count:NN} {cmd~hooks~with~args} \cs_new_protected:Npn \__hook_guess_arg_count:NN #1 { \exp_after:wN \__hook_guess_arg_count:wN \token_to_meaning:N #1 \s__hook_mark } \exp_last_unbraced:NNNNo \cs_new_protected:Npx \__hook_guess_arg_count:wN #1 { \tl_to_str:n { macro: } } #2 \s__hook_mark #3 { \int_set:Nn #3 { \exp_not:N \__hook_guess_arg_count:nw { 0 } #2 \c_hash_str 0 \s__hook_mark } } \use:e { \cs_new:Npn \exp_not:N \__hook_guess_arg_count:nw #1 #2 \c_hash_str #3 } { \int_compare:nNnTF { #1 + 1 } = {#3} { \__hook_guess_arg_count:nw {#3} } { #1 \__hook_use_none_delimit_by_s_mark:w } } \EndIncludeInRelease \IncludeInRelease{2021/06/01}{\__hook_guess_arg_count:NN} {cmd~hooks~with~args} \cs_undefine:N \__hook_guess_arg_count:NN \EndIncludeInRelease \IncludeInRelease{2023/06/01}{\__hook_patch_retokenize:Nnnn} {cmd~hooks~with~args} \cs_new_protected:Npn \__hook_patch_retokenize:Nnnn #1 #2 #3 #4 { \__hook_guess_arg_count:NN #1 \l__hook_patch_num_args_int \__hook_disable:n {#2} \cs_undefine:c { c__hook_#2_parameter_tl } \__hook_make_usable:nn {#2} { \l__hook_patch_num_args_int } \tl_set:Ne \l__hook_tmpa_tl { \exp_args:Ne \tl_to_str:n { \__hook_braced_parameter:n {#2} } } \use:x { \str_replace_all:Nnn \exp_not:N \l__hook_tmpa_tl { #### } { \c_hash_str } } \cs_set_eq:NN \kerneltmpDoNotUse \scan_stop: \cs_set_eq:NN \__hook_tmp:w \scan_stop: \use:x { \cs_set:Npn \__hook_tmp:w ####1 \tl_to_str:n { macro: } ####2 -> ####3 \s__hook_mark { ####1 \def \kerneltmpDoNotUse ####2 { \str_if_eq:nnT {#3} { before } { \token_to_str:N \UseHookWithArguments {#2} { \int_use:N \l__hook_patch_num_args_int } \l__hook_tmpa_tl } ####3 \str_if_eq:nnT {#3} { after } { \token_to_str:N \UseHookWithArguments {#2} { \int_use:N \l__hook_patch_num_args_int } \l__hook_tmpa_tl } } } \tl_set:Nx \exp_not:N \l__hook_tmpa_tl { \exp_not:N \__hook_tmp:w \token_to_meaning:N #1 \s__hook_mark } } \tl_rescan:nV { #4 \__hook_patch_required_catcodes: } \l__hook_tmpa_tl \cs_gset_eq:NN #1 \kerneltmpDoNotUse \__hook_update_hook_code:n {#2} } \EndIncludeInRelease \IncludeInRelease{2021/06/01}{\__hook_patch_retokenize:Nnnn} {cmd~hooks~with~args} \cs_gset_protected:Npn \__hook_patch_retokenize:Nnnn #1 #2 #3 #4 { \cs_set_eq:NN \kerneltmpDoNotUse \scan_stop: \cs_set_eq:NN \__hook_tmp:w \scan_stop: \use:x { \cs_set:Npn \__hook_tmp:w ####1 \tl_to_str:n { macro: } ####2 -> ####3 \s__hook_mark { ####1 \def \kerneltmpDoNotUse ####2 { \str_if_eq:nnT {#3} { before } { \token_to_str:N \UseHook { cmd / #2 / #3 } } ####3 \str_if_eq:nnT {#3} { after } { \token_to_str:N \UseHook { cmd / #2 / #3 } } } } \tl_set:Nx \exp_not:N \l__hook_tmpa_tl { \exp_not:N \__hook_tmp:w \token_to_meaning:N #1 \s__hook_mark } } \tl_rescan:nV { #4 \__hook_patch_required_catcodes: } \l__hook_tmpa_tl \cs_gset_eq:NN #1 \kerneltmpDoNotUse } \EndIncludeInRelease \IncludeInRelease{2023/06/01}{wrong-cmd-hook}% {Standardise~generic~hook~names} \EndIncludeInRelease \IncludeInRelease{2021/06/01}{wrong-cmd-hook}% {Standardise~generic~hook~names} \msg_new:nnnn { hooks } { wrong-cmd-hook } { Generic~hook~`cmd/#1/#2'~is~invalid. % The~hook~should~be~`cmd/#1/before'~or~`cmd/#1/after'. } { You~tried~to~add~a~generic~hook~to~command~\iow_char:N \\#1,~but~`#2'~ is~an~invalid~component.~Only~`before'~or~`after'~are~allowed. } \EndIncludeInRelease \msg_new:nnnn { hooks } { cant-patch } { Generic~hooks~cannot~be~added~to~'#1'. } { You~tried~to~add~a~hook~to~'#1',~but~LaTeX~was~unable~to~ patch~the~command~because~it~\__hook_unpatchable_cases:n {#2}. } \cs_new:Npn \__hook_unpatchable_cases:n #1 { \str_case:nn {#1} { { undef } { doesn't~exist } { macro } { is~not~a~macro } { expl3 } { is~a~private~expl3~macro } { retok } { can't~be~retokenized~cleanly } } } \IncludeInRelease{0000/00/00}{ltcmdhooks}% {The~hook~management~system~for~commands} \cs_set_eq:NN \__hook_cmd_begindocument_code: \prg_do_nothing: \EndModuleRelease \ExplSyntaxOff %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% From File: ltsockets.dtx \ExplSyntaxOn \NewModuleRelease{2023/11/01}{ltsockets} {The~socket~management~system} \bool_new:N \g__socket_debug_bool \cs_new_eq:NN \__socket_debug:n \use_none:n \cs_new_eq:NN \__socket_debug_term:n \use_none:n \cs_new_protected:Npn \socket_debug_on: { \bool_gset_true:N \g__socket_debug_bool \__socket_debug_gset: } \cs_new_protected:Npn \socket_debug_off: { \bool_gset_false:N \g__socket_debug_bool \__socket_debug_gset: } \cs_new_protected:Npn \__socket_debug_gset: { \cs_gset_protected:Npx \__socket_debug:n ##1 { \bool_if:NT \g__socket_debug_bool {##1} } \cs_gset_protected:Npx \__socket_debug_term:n ##1 { \bool_if:NT \g__socket_debug_bool { \iow_term:x { ^^J [Sockets]~ ==>~ ##1} } } } \cs_new_protected:Npn \socket_new:nn #1 #2 { \str_if_exist:cTF { l__socket_#1_plug_str } { \msg_error:nnn { socket } { already-declared } {#1} } { \int_if_zero:nTF \tex_currentgrouplevel:D { \str_new:c { l__socket_#1_plug_str } \seq_new:c { l__socket_#1_plugs_seq } \int_const:cn { c__socket_#1_args_int } {#2} \socket_new_plug:nnn {#1} { noop } {} \int_compare:nNnTF {#2} = 1 { \socket_new_plug:nnn {#1} { identity } {##1} \socket_assign_plug:nn {#1} { identity } } { \socket_assign_plug:nn {#1} { noop } } \__socket_debug_term:n { Socket~ '#1'~ declared~ with~ #2~ input(s) } } { \msg_error:nn { socket } { not-top-level } } } } \cs_new_protected:Npn \socket_log:n #1 { \typeout{ Socket~ #1:} \str_if_exist:cTF { l__socket_#1_plug_str } { \typeout{ \@spaces number~ of~ inputs~ =~ \int_use:c { c__socket_#1_args_int } } \typeout{ \@spaces available~plugs~ =~ \seq_use:cnnn { l__socket_#1_plugs_seq }{,~}{,~}{,~} } \typeout{ \@spaces current~ plug~ =~ \str_use:c { l__socket_#1_plug_str } } \typeout{ \@spaces definition~ =~ \cs_meaning:c { __socket_#1_plug_ \str_use:c { l__socket_#1_plug_str } :w } } \typeout{} } { \typeout { Socket~ is~ not~ declared! } } } \cs_new_protected:Npn \socket_show:n #1 {\socket_log:n {#1} \errmessage{}} \cs_new_protected:Npn \socket_new_plug:nnn #1#2#3 { \str_if_exist:cTF { l__socket_#1_plug_str } { \cs_if_exist:cTF { __socket_#1_plug_#2:w } { \msg_error:nnnn { socket } { plug-already-declared } {#1} {#2} } { \cs_generate_from_arg_count:cNnn { __socket_#1_plug_#2:w } \cs_new:Npn { \int_use:c { c__socket_#1_args_int } } {#3} \seq_put_right:cn { l__socket_#1_plugs_seq } {#2} \__socket_debug_term:n { Plug~ '#2'~ for~ socket~ '#1'~ declared. } } } { \msg_error:nnn { socket } { undeclared } {#1} } } \cs_new_protected:Npn \socket_set_plug:nnn #1#2#3 { \str_if_exist:cTF { l__socket_#1_plug_str } { \cs_if_exist:cTF { __socket_#1_plug_#2:w } { \cs_generate_from_arg_count:cNnn { __socket_#1_plug_#2:w } \cs_set:Npn { \int_use:c { c__socket_#1_args_int } } {#3} \__socket_debug_term:n { Plug~ '#2'~ for~ socket~ '#1'~ changed. } } { \msg_error:nnnn { socket } { plug-undeclared } {#1} {#2} } } { \msg_error:nnn { socket } { undeclared } {#1} } } \cs_new_protected:Npn \socket_assign_plug:nn #1 #2 { \str_if_exist:cTF { l__socket_#1_plug_str } { \cs_if_exist:cTF { __socket_#1_plug_#2:w } { \__socket_debug_term:n { Replacing~ plug~ '\str_use:c { l__socket_#1_plug_str }'~ with~ '#2'~ in~ socket~ '#1'. } \str_set:cn { l__socket_#1_plug_str } {#2} } { \msg_error:nnnn { socket } { plug-undeclared } {#1} {#2} } } { \msg_error:nnn { socket } { undeclared } {#1} } } \cs_new_protected:Npn \socket_use:nw #1 { \__socket_debug_term:n { Socket~ '#1'~ containing~ plug~ '\str_use:c { l__socket_#1_plug_str }'~ used. } \use:c { __socket_#1_plug_ \str_use:c { l__socket_#1_plug_str } :w } } \cs_new_eq:NN \socket_use:n \socket_use:nw % socket with no inputs \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! } { A~ socket~ can~ only~ be~ declared~ once.~ The~ name~ '#1'~ is~ already~ taken.~ Use~ \ShowSocket{#1}~ to~ see~ its~ definition. } \msg_new:nnnn { socket } { undeclared } { Socket~ '#1'~ undeclared! } { You~ tried~ to~ use~ a~ socket~ that~ was~ not~ declared~ before. } \msg_new:nnnn { socket } { not-top-level } { Sockets~ can~ only~ be~ declared~ at~ top-level! } { It~ is~ not~ allowed~ to~ declare~ sockets~ inside~ a~ group.~ Move~ the~ declaration~ to~ the~ top-level. } \msg_new:nnnn { socket } { plug-already-declared } { Plug~ '#2'~ for~ socket~ '#1'~ already~ declared! } { You~ can't~ change~ an~ existing~ plug~ with~ \NewSocketPlug~ and~ it~ is~ normally~ not~ sensible~ to~ do~ so.~ Use~ the~ L3~ programming~ layer~ function~ \socket_set_plug:nnn~ if~ you~ really~ have~ to. } \msg_new:nnnn { socket } { plug-undeclared } { Plug~ '#2'~ for~ socket~ '#1'~ undeclared! } { The~ plug~ name~ is~ unknown.~ Is~ the~ name~ misspelled~ or~ did~ you~ intend~ to~ assign~ it~ to~ a~ different~ socket? } \prop_gput:Nnn \g_msg_module_type_prop { socket } { LaTeX } \cs_new_eq:NN \NewSocket \socket_new:nn \cs_new_eq:NN \ShowSocket \socket_show:n \cs_new_eq:NN \LogSocket \socket_log:n \cs_new_eq:NN \NewSocketPlug \socket_new_plug:nnn \cs_new_eq:NN \AssignSocketPlug \socket_assign_plug:nn \cs_new_eq:NN \UseSocket \socket_use:nw \cs_new_eq:NN \DebugSocketsOn \socket_debug_on: \cs_new_eq:NN \DebugSocketsOff \socket_debug_off: \IncludeInRelease{0000/00/00}{ltsockets} {The~socket~management~(undo)}% \let \NewSocket \@undefined \let \ShowSocket \@undefined \let \LogSocket \@undefined \let \NewSocketPlug \@undefined \let \AssignSocketPlug \@undefined \let \UseSocket \@undefined \let \DebugSocketsOn \@undefined \let \DebugSocketsOff \@undefined \EndModuleRelease \ExplSyntaxOff %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% From File: lttemplates.dtx \ExplSyntaxOn \NewModuleRelease{2024/06/01}{lttemplates} {Prototype~document~commands}% \tl_const:Nn \c__template_code_root_tl { template~code~>~ } \tl_const:Nn \c__template_defaults_root_tl { template~defaults~>~ } \tl_const:Nn \c__template_instances_root_tl { template~instance~>~ } \tl_const:Nn \c__template_keytypes_root_tl { template~key~types~>~ } \tl_const:Nn \c__template_key_order_root_tl { template~key~order~>~ } \tl_const:Nn \c__template_values_root_tl { template~values~>~ } \tl_const:Nn \c__template_vars_root_tl { template~vars~>~ } \seq_const_from_clist:Nn \c__template_keytypes_arg_seq { choice , function , instance } \prop_new:N \g__template_type_prop \tl_new:N \l__template_assignments_tl \tl_new:N \l__template_default_tl \bool_new:N \l__template_error_bool \bool_new:N \l__template_global_bool \tl_new:N \l__template_key_name_tl \tl_new:N \l__template_keytype_tl \tl_new:N \l__template_keytype_arg_tl \tl_new:N \l__template_value_tl \tl_new:N \l__template_var_tl \prop_new:N \l__template_keytypes_prop \seq_new:N \l__template_key_order_seq \prop_new:N \l__template_values_prop \prop_new:N \l__template_vars_prop \clist_new:N \l__template_tmp_clist \dim_new:N \l__template_tmp_dim \int_new:N \l__template_tmp_int \muskip_new:N \l__template_tmp_muskip \skip_new:N \l__template_tmp_skip \tl_new:N \l__template_tmp_tl \scan_new:N \s__template_mark \scan_new:N \s__template_stop \quark_new:N \q__template_nil \__kernel_quark_new_conditional:Nn \__template_quark_if_nil:N { F } \cs_new_protected:Npn \__template_execute_if_arg_agree:nnT #1#2#3 { \prop_get:NnN \g__template_type_prop {#1} \l__template_tmp_tl \int_compare:nNnTF {#2} = \l__template_tmp_tl {#3} { \msg_error:nneee { template } { argument-number-mismatch } {#1} { \l__template_tmp_tl } {#2} } } \cs_new_protected:Npn \__template_execute_if_code_exist:nnT #1#2#3 { \cs_if_exist:cTF { \c__template_code_root_tl #1 / #2 } {#3} { \msg_error:nnnn { template } { no-template-code } {#1} {#2} } } \cs_new_protected:Npn \__template_execute_if_keytype_exist:nT #1#2 { \cs_if_exist:cTF { __template_store_value_ #1 :n } {#2} { \msg_error:nnn { template } { unknown-keytype } {#1} } } \cs_generate_variant:Nn \__template_execute_if_keytype_exist:nT { V } \cs_new_protected:Npn \__template_execute_if_type_exist:nT #1#2 { \prop_if_in:NnTF \g__template_type_prop {#1} {#2} { \msg_error:nnn { template } { unknown-type } {#1} } } \cs_new_protected:Npn \__template_if_keys_exist:nnT #1#2#3 { \cs_if_exist:cTF { \c__template_keytypes_root_tl #1 / #2 } {#3} { \msg_error:nnnn { template } { unknown-template } {#1} {#2} } } \prg_new_conditional:Npnn \__template_if_key_value:n #1 { T , F , TF } { \str_if_eq:noTF { \KeyValue } { \tl_head:w #1 \q_nil \q_stop } \prg_return_true: \prg_return_false: } \prg_generate_conditional_variant:Nnn \__template_if_key_value:n { V } { T , F , TF } \prg_new_conditional:Npnn \__template_if_instance_exist:nn #1#2 { T, F, TF } { \cs_if_exist:cTF { \c__template_instances_root_tl #1 / #2 } \prg_return_true: \prg_return_false: } \prg_new_conditional:Npnn \__template_if_use_template:n #1 { TF } { \str_if_eq:noTF { \UseTemplate } { \tl_head:w #1 \q_nil \q_stop } \prg_return_true: \prg_return_false: } \cs_new_protected:Npn \__template_store_defaults:nn #1#2 { \debug_suspend: \prop_gclear_new:c { \c__template_defaults_root_tl #1 / #2 } \prop_gset_eq:cN { \c__template_defaults_root_tl #1 / #2 } \l__template_values_prop \debug_resume: } \cs_new_protected:Npn \__template_store_keytypes:nn #1#2 { \debug_suspend: \prop_if_exist:cTF { \c__template_keytypes_root_tl #1 / #2 } { \msg_info:nnnn { template } { declare-template-interface } {#1} {#2} \prop_gclear:c { \c__template_keytypes_root_tl #1 / #2 } } { \prop_new:c { \c__template_keytypes_root_tl #1 / #2 } } \prop_gset_eq:cN { \c__template_keytypes_root_tl #1 / #2 } \l__template_keytypes_prop \seq_gclear_new:c { \c__template_key_order_root_tl #1 / #2 } \seq_gset_eq:cN { \c__template_key_order_root_tl #1 / #2 } \l__template_key_order_seq \debug_resume: } \cs_new_protected:Npn \__template_store_values:nn #1#2 { \debug_suspend: \prop_clear_new:c { \c__template_values_root_tl #1 / #2 } \prop_set_eq:cN { \c__template_values_root_tl #1 / #2 } \l__template_values_prop \debug_resume: } \cs_new_protected:Npn \__template_store_vars:nn #1#2 { \debug_suspend: \prop_gclear_new:c { \c__template_vars_root_tl #1 / #2 } \prop_gset_eq:cN { \c__template_vars_root_tl #1 / #2 } \l__template_vars_prop \debug_resume: } \cs_new_protected:Npn \__template_recover_defaults:nn #1#2 { \prop_if_exist:cTF { \c__template_defaults_root_tl #1 / #2 } { \prop_set_eq:Nc \l__template_values_prop { \c__template_defaults_root_tl #1 / #2 } } { \prop_clear:N \l__template_values_prop } } \cs_new_protected:Npn \__template_recover_keytypes:nn #1#2 { \prop_if_exist:cTF { \c__template_keytypes_root_tl #1 / #2 } { \prop_set_eq:Nc \l__template_keytypes_prop { \c__template_keytypes_root_tl #1 / #2 } } { \prop_clear:N \l__template_keytypes_prop } \seq_if_exist:cTF { \c__template_key_order_root_tl #1 / #2 } { \seq_set_eq:Nc \l__template_key_order_seq { \c__template_key_order_root_tl #1 / #2 } } { \seq_clear:N \l__template_key_order_seq } } \cs_new_protected:Npn \__template_recover_values:nn #1#2 { \prop_if_exist:cTF { \c__template_values_root_tl #1 / #2 } { \prop_set_eq:Nc \l__template_values_prop { \c__template_values_root_tl #1 / #2 } } { \prop_clear:N \l__template_values_prop } } \cs_new_protected:Npn \__template_recover_vars:nn #1#2 { \prop_if_exist:cTF { \c__template_vars_root_tl #1 / #2 } { \prop_set_eq:Nc \l__template_vars_prop { \c__template_vars_root_tl #1 / #2 } } { \prop_clear:N \l__template_vars_prop } } \cs_new_protected:Npn \__template_define_type:nn #1#2 { \prop_if_in:NnTF \g__template_type_prop {#1} { \msg_error:nnn { template } { type-already-defined } {#1} } { \__template_declare_type:nn {#1} {#2} } } \cs_new_protected:Npn \__template_declare_type:nn #1#2 { \int_set:Nn \l__template_tmp_int {#2} \int_compare:nTF { 0 <= \l__template_tmp_int <= 9 } { \msg_info:nnnV { template } { declare-type } {#1} \l__template_tmp_int \prop_gput:NnV \g__template_type_prop {#1} \l__template_tmp_int } { \msg_error:nnnV { template } { bad-number-of-arguments } {#1} \l__template_tmp_int } } \cs_new_protected:Npn \__template_declare_template_keys:nnnn #1#2#3#4 { \__template_execute_if_type_exist:nT {#1} { \__template_execute_if_arg_agree:nnT {#1} {#3} { \prop_clear:N \l__template_values_prop \prop_clear:N \l__template_keytypes_prop \seq_clear:N \l__template_key_order_seq \keyval_parse:NNn \__template_parse_keys_elt:n \__template_parse_keys_elt:nn {#4} \__template_store_defaults:nn {#1} {#2} \__template_store_keytypes:nn {#1} {#2} } } } \cs_new_protected:Npn \__template_parse_keys_elt:n #1 { \__template_split_keytype:n {#1} \bool_if:NF \l__template_error_bool { \__template_execute_if_keytype_exist:VT \l__template_keytype_tl { \seq_map_function:NN \c__template_keytypes_arg_seq \__template_parse_keys_elt_aux:n \bool_if:NF \l__template_error_bool { \seq_if_in:NoTF \l__template_key_order_seq \l__template_key_name_tl { \msg_error:nnV { template } { duplicate-key-interface } \l__template_key_name_tl } { \__template_parse_keys_elt_aux: } } } } } \cs_new_protected:Npn \__template_parse_keys_elt_aux:n #1 { \str_if_eq:VnT \l__template_keytype_tl {#1} { \tl_if_empty:NT \l__template_keytype_arg_tl { \msg_error:nnn { template } { keytype-requires-argument } {#1} \bool_set_true:N \l__template_error_bool \seq_map_break: } } } \cs_new_protected:Npn \__template_parse_keys_elt_aux: { \tl_set:Ne \l__template_tmp_tl { \l__template_keytype_tl \tl_if_empty:NF \l__template_keytype_arg_tl { { \l__template_keytype_arg_tl } } } \prop_put:NVV \l__template_keytypes_prop \l__template_key_name_tl \l__template_tmp_tl \seq_put_right:NV \l__template_key_order_seq \l__template_key_name_tl \str_if_eq:VnT \l__template_keytype_tl { choice } { \clist_if_in:NnT \l__template_keytype_arg_tl { unknown } { \msg_error:nn { template } { choice-unknown-reserved } } } } \cs_new_protected:Npn \__template_parse_keys_elt:nn #1#2 { \__template_parse_keys_elt:n {#1} \use:c { __template_store_value_ \l__template_keytype_tl :n } {#2} } \cs_new_protected:Npe \__template_split_keytype:n #1 { \exp_not:N \bool_set_false:N \exp_not:N \l__template_error_bool \tl_set:Nn \exp_not:N \l__template_tmp_tl {#1} \tl_replace_all:Nnn \exp_not:N \l__template_tmp_tl { : } { \token_to_str:N : } \tl_if_in:VnTF \exp_not:N \l__template_tmp_tl { \token_to_str:N : } { \exp_not:n { \tl_clear:N \l__template_key_name_tl \exp_after:wN \__template_split_keytype_aux:w \l__template_tmp_tl \s__template_stop } } { \exp_not:N \bool_set_true:N \exp_not:N \l__template_error_bool \msg_error:nnn { template } { missing-keytype } {#1} } } \use:e { \cs_new_protected:Npn \exp_not:N \__template_split_keytype_aux:w #1 \token_to_str:N : #2 \s__template_stop { \tl_put_right:Ne \exp_not:N \l__template_key_name_tl { \exp_not:N \tl_trim_spaces:e { \exp_not:N \tl_to_str:n {#1} } } \tl_if_in:nnTF {#2} { \token_to_str:N : } { \tl_put_right:Nn \exp_not:N \l__template_key_name_tl { \token_to_str:N : } \exp_not:N \__template_split_keytype_aux:w #2 \s__template_stop } { \exp_not:N \tl_if_empty:NTF \exp_not:N \l__template_key_name_tl { \msg_error:nnn { template } { empty-key-name } { \token_to_str:N : #2 } } { \exp_not:N \__template_split_keytype_arg:n {#2} } } } } \cs_new_protected:Npn \__template_split_keytype_arg:n #1 { \tl_set:Ne \l__template_keytype_tl { \tl_trim_spaces:n {#1} } \tl_clear:N \l__template_keytype_arg_tl \cs_set_protected:Npn \__template_split_keytype_arg_aux:n ##1 { \tl_if_in:nnT {#1} {##1} { \cs_set:Npn \__template_split_keytype_arg_aux:w ####1 ##1 ####2 \s__template_stop { \tl_if_blank:nT {####1} { \tl_set:Ne \l__template_keytype_tl { \tl_trim_spaces:n {##1} } \tl_if_blank:nF {####2} { \tl_set:Ne \l__template_keytype_arg_tl { \use:n ####2 } } \seq_map_break: } } \__template_split_keytype_arg_aux:w #1 \s__template_stop } } \seq_map_function:NN \c__template_keytypes_arg_seq \__template_split_keytype_arg_aux:n } \cs_generate_variant:Nn \__template_split_keytype_arg:n { V } \cs_new:Npn \__template_split_keytype_arg_aux:n #1 { } \cs_new:Npn \__template_split_keytype_arg_aux:w #1 \s__template_stop { } \cs_new_protected:Npn \__template_store_value_boolean:n #1 { \prop_put:Non \l__template_values_prop \l__template_key_name_tl {#1} } \cs_new_protected:Npn \__template_store_value:n #1 { \prop_put:Non \l__template_values_prop \l__template_key_name_tl {#1} } \cs_new_eq:NN \__template_store_value_choice:n \__template_store_value:n \cs_new_eq:NN \__template_store_value_function:n \__template_store_value:n \cs_new_eq:NN \__template_store_value_instance:n \__template_store_value:n \cs_new_protected:Npn \__template_store_value_aux:Nn #1#2 { \prop_put:Non \l__template_values_prop \l__template_key_name_tl {#2} } \cs_new_protected:Npn \__template_store_value_integer:n { \__template_store_value_aux:Nn \int_eval:n } \cs_new_protected:Npn \__template_store_value_length:n { \__template_store_value_aux:Nn \dim_eval:n } \cs_new_protected:Npn \__template_store_value_muskip:n { \__template_store_value_aux:Nn \muskip_eval:n } \cs_new_protected:Npn \__template_store_value_real:n { \__template_store_value_aux:Nn \fp_eval:n } \cs_new_protected:Npn \__template_store_value_skip:n { \__template_store_value_aux:Nn \skip_eval:n } \cs_new_protected:Npn \__template_store_value_tokenlist:n { \__template_store_value_aux:Nn \use:n } \cs_new_eq:NN \__template_store_value_commalist:n \__template_store_value_tokenlist:n \cs_new_protected:Npn \__template_declare_template_code:nnnnn #1#2#3#4#5 { \__template_execute_if_type_exist:nT {#1} { \__template_execute_if_arg_agree:nnT {#1} {#3} { \__template_if_keys_exist:nnT {#1} {#2} { \__template_store_key_implementation:nnn {#1} {#2} {#4} \regex_match:nnTF { \c { AssignTemplateKeys } } {#5} { \__template_declare_template_code:nnnn {#1} {#2} {#3} {#5} } { \__template_declare_template_code:nnnn {#1} {#2} {#3} { \AssignTemplateKeys #5 } } } } } } \cs_new_protected:Npn \__template_declare_template_code:nnnn #1#2#3#4 { \cs_if_exist:cT { \c__template_code_root_tl #1 / #2 } { \msg_info:nnnn { template } { declare-template-code } {#1} {#2} } \cs_generate_from_arg_count:cNnn { \c__template_code_root_tl #1 / #2 } \cs_gset_protected:Npn {#3} {#4} } \cs_new_protected:Npn \__template_store_key_implementation:nnn #1#2#3 { \__template_recover_defaults:nn {#1} {#2} \__template_recover_keytypes:nn {#1} {#2} \prop_clear:N \l__template_vars_prop \keyval_parse:nnn { \__template_parse_vars_elt:n } { \__template_parse_vars_elt:nnn { #1 / #2 } } {#3} \__template_store_vars:nn {#1} {#2} \prop_map_inline:Nn \l__template_keytypes_prop { \msg_error:nnnnn { template } { key-not-implemented } {##1} {#2} {#1} } } \cs_new_protected:Npn \__template_parse_vars_elt:n #1 { \msg_error:nnn { template } { key-no-variable } {#1} } \cs_new_protected:Npn \__template_parse_vars_elt:nnn #1#2#3 { \tl_set:Ne \l__template_key_name_tl { \tl_trim_spaces:e { \tl_to_str:n {#2} } } \prop_get:NVNTF \l__template_keytypes_prop \l__template_key_name_tl \l__template_keytype_tl { \__template_split_keytype_arg:V \l__template_keytype_tl \__template_parse_vars_elt_aux:nn {#1} {#3} \prop_remove:NV \l__template_keytypes_prop \l__template_key_name_tl } { \msg_error:nnn { template } { unknown-key } {#2} } } \cs_new_protected:Npn \__template_parse_vars_elt_aux:nn #1#2 { \__template_parse_vars_elt_aux:nw {#1} #2 global global \s__template_stop } \cs_new_protected:Npn \__template_parse_vars_elt_aux:nw #1#2 global #3 global #4 \s__template_stop { \tl_if_blank:nTF {#4} { \__template_parse_vars_elt_aux:nnn {#1} { } {#2} } { \tl_if_blank:nTF {#2} { \__template_parse_vars_elt_aux:nne {#1} { global } { \tl_trim_spaces:n {#3} } } { \msg_error:nnn { template } { bad-variable } { #2 global #3 } } } } \cs_new_protected:Npn \__template_parse_vars_elt_aux:nnn #1#2#3 { \str_case:VnF \l__template_keytype_tl { { choice } { \__template_implement_choices:nn {#1} {#3} } { function } { \cs_if_exist:NF #3 { \cs_new:Npn #3 { } } \__template_parse_vars_elt_key:nn {#1} { .code:n = { \cs_generate_from_arg_count:NNnn \exp_not:N #3 \exp_not:c { cs_ \str_if_eq:nnT {#1} { global } { g } set:Npn } { \exp_not:V \l__template_keytype_arg_tl } {##1} } } \prop_put:NVn \l__template_vars_prop \l__template_key_name_tl {#2#3} } { instance } { \__template_parse_vars_elt_key:nn {#1} { .code:n = { \exp_not:c { cs_ \str_if_eq:nnT {#1} { global } { g } set:Npn } \exp_not:N #3 { \UseInstance {##1} } } } \prop_put:NVn \l__template_vars_prop \l__template_key_name_tl {#2#3} } } { \tl_if_single:nTF {#3} { \cs_if_exist:NF #3 { \use:c { \__template_map_var_type: _new:N } #3 } \__template_parse_vars_elt_key:nn {#1} { . \__template_map_var_type: _ \str_if_eq:nnT {#1} { global } { g } set:N = \exp_not:N #3 } \prop_put:NVn \l__template_vars_prop \l__template_key_name_tl {#2#3} } { \msg_error:nnn { template } { bad-variable } {#2#3} } } } \cs_generate_variant:Nn \__template_parse_vars_elt_aux:nnn { nne } \cs_new_protected:Npn \__template_parse_vars_elt_key:nn #1#2 { \keys_define:ne { template / #1 } { \l__template_key_name_tl #2 } } \cs_new:Npn \__template_map_var_type: { \str_case:Vn \l__template_keytype_tl { { boolean } { bool } { commalist } { clist } { integer } { int } { length } { dim } { muskip } { muskip } { real } { fp } { skip } { skip } { tokenlist } { tl } } } \cs_new_protected:Npn \__template_implement_choices:nn #1#2 { \clist_set:NV \l__template_tmp_clist \l__template_keytype_arg_tl \prop_put:NVn \l__template_vars_prop \l__template_key_name_tl { } \keys_define:ne { template / #1 } { \l__template_key_name_tl .choice: } \keyval_parse:nnn { \__template_implement_choice_elt:n } { \__template_implement_choice_elt:nnn {#1} } {#2} \prop_get:NVNT \l__template_values_prop \l__template_key_name_tl \l__template_tmp_tl { \__template_implement_choices_default: } \clist_if_empty:NF \l__template_tmp_clist { \clist_map_inline:Nn \l__template_tmp_clist { \msg_error:nnn { template } { choice-not-implemented } {##1} } } } \cs_new_protected:Npn \__template_implement_choices_default: { \tl_set:Ne \l__template_tmp_tl { \l__template_key_name_tl \c_space_tl \l__template_tmp_tl } \prop_if_in:NVF \l__template_vars_prop \l__template_tmp_tl { \tl_set:Ne \l__template_tmp_tl { \l__template_key_name_tl \c_space_tl \l__template_tmp_tl } \prop_if_in:NVF \l__template_vars_prop \l__template_tmp_tl { \prop_get:NVN \l__template_keytypes_prop \l__template_key_name_tl \l__template_tmp_tl \__template_split_keytype_arg:V \l__template_tmp_tl \prop_get:NVN \l__template_values_prop \l__template_key_name_tl \l__template_tmp_tl \msg_error:nnVV { template } { unknown-default-choice } \l__template_key_name_tl \l__template_key_name_tl } } } \cs_new_protected:Npn \__template_implement_choice_elt:nnn #1#2#3 { \clist_if_empty:NTF \l__template_tmp_clist { \str_if_eq:nnTF {#2} { unknown } { \__template_implement_choice_elt_aux:nnn {#1} {#2} {#3} } { \__template_implement_choice_elt_aux:n {#2} } } { \clist_if_in:NnTF \l__template_tmp_clist {#2} { \clist_remove_all:Nn \l__template_tmp_clist {#2} \__template_implement_choice_elt_aux:nnn {#1} {#2} {#3} } { \__template_implement_choice_elt_aux:n {#2} } } } \cs_new_protected:Npn \__template_implement_choice_elt_aux:n #1 { \prop_get:NVN \l__template_keytypes_prop \l__template_key_name_tl \l__template_tmp_tl \__template_split_keytype_arg:V \l__template_tmp_tl \msg_error:nnVn { template } { unknown-choice } \l__template_key_name_tl {#1} } \cs_new_protected:Npn \__template_implement_choice_elt_aux:nnn #1#2#3 { \keys_define:ne { template / #1 } { \l__template_key_name_tl / #2 .code:n = { \exp_not:n {#3} } } \tl_set:Ne \l__template_tmp_tl { \l__template_key_name_tl \c_space_tl #2 } \prop_put:NVn \l__template_vars_prop \l__template_tmp_tl {#3} } \cs_new_protected:Npn \__template_implement_choice_elt:n #1 { \msg_error:nnVn { template } { choice-requires-code } \l__template_key_name_tl {#1} } \cs_new_protected:Npn \__template_edit_defaults:nnn #1#2#3 { \__template_if_keys_exist:nnT {#1} {#2} { \__template_recover_defaults:nn {#1} {#2} \__template_parse_values:nnn {#1} {#2} {#3} \__template_store_defaults:nn {#1} {#2} } } \cs_new_protected:Npn \__template_parse_values:nnn #1#2#3 { \__template_recover_keytypes:nn {#1} {#2} \keyval_parse:NNn \__template_parse_values_elt:n \__template_parse_values_elt:nn {#3} } \cs_new_protected:Npn \__template_parse_values_elt:n #1 { \bool_set_true:N \l__template_error_bool \msg_error:nnn { template } { key-no-value } {#1} } \cs_new_protected:Npn \__template_parse_values_elt:nn #1#2 { \tl_set:Ne \l__template_key_name_tl { \tl_trim_spaces:e { \tl_to_str:n {#1} } } \prop_get:NVNTF \l__template_keytypes_prop \l__template_key_name_tl \l__template_tmp_tl { \__template_parse_values_elt_aux:n {#2} } { \msg_error:nnV { template } { unknown-key } \l__template_key_name_tl } } \cs_new_protected:Npn \__template_parse_values_elt_aux:n #1 { \__template_split_keytype_arg:V \l__template_tmp_tl \use:c { __template_store_value_ \l__template_keytype_tl :n } {#1} } \cs_new_protected:Npn \__template_template_set_eq:nnn #1#2#3 { \__template_recover_defaults:nn {#1} {#3} \__template_store_defaults:nn {#1} {#2} \__template_recover_keytypes:nn {#1} {#3} \__template_store_keytypes:nn {#1} {#2} \__template_recover_vars:nn {#1} {#3} \__template_store_vars:nn {#1} {#2} \cs_if_exist:cT { \c__template_code_root_tl #1 / #2 } { \msg_info:nnnn { template } { declare-template-code } {#1} {#2} } \cs_gset_eq:cc { \c__template_code_root_tl #1 / #2 } { \c__template_code_root_tl #1 / #3 } } \cs_new_protected:Npn \__template_declare_instance:nnnn #1#2#3#4 { \__template_execute_if_code_exist:nnT {#1} {#2} { \__template_recover_defaults:nn {#1} {#2} \__template_recover_vars:nn {#1} {#2} \__template_declare_instance_aux:nnnn {#1} {#2} {#3} {#4} } } \cs_new_protected:Npn \__template_declare_instance_aux:nnnn #1#2#3#4 { \bool_set_false:N \l__template_error_bool \__template_parse_values:nnn {#1} {#2} {#4} \bool_if:NF \l__template_error_bool { \prop_put:Nnn \l__template_values_prop { from~template } {#2} \__template_store_values:nn {#1} {#3} \__template_convert_to_assignments: \cs_if_exist:cT { \c__template_instances_root_tl #1 / #3 } { \msg_info:nnnn { template } { declare-instance } {#3} {#1} } \cs_set_protected:cpe { \c__template_instances_root_tl #1 / #3 } { \exp_not:N \__template_assignments_push:n { \exp_not:V \l__template_assignments_tl } \exp_not:c { \c__template_code_root_tl #1 / #2 } } } } \cs_new_protected:Npn \__template_instance_set_eq:nnn #1#2#3 { \__template_if_instance_exist:nnTF {#1} {#3} { \__template_recover_values:nn {#1} {#3} \__template_store_values:nn {#1} {#2} \cs_if_exist:cT { \c__template_instances_root_tl #1 / #2 } { \msg_info:nnnn { template } { declare-instance } {#2} {#1} } \cs_set_eq:cc { \c__template_instances_root_tl #1 / #2 } { \c__template_instances_root_tl #1 / #3 } } { \msg_error:nnnn { template } { unknown-instance } {#1} {#3} } } \cs_new_protected:Npn \__template_edit_instance:nnn #1#2#3 { \__template_if_instance_exist:nnTF {#1} {#2} { \__template_recover_values:nn {#1} {#2} \prop_get:NnN \l__template_values_prop { from~template } \l__template_tmp_tl \__template_edit_instance_aux:nVnn {#1} \l__template_tmp_tl {#2} {#3} } { \msg_error:nnnn { template } { unknown-instance } {#1} {#2} } } \cs_new_protected:Npn \__template_edit_instance_aux:nnnn #1#2#3#4 { \__template_recover_vars:nn {#1} {#2} \__template_declare_instance_aux:nnnn {#1} {#2} {#3} {#4} } \cs_generate_variant:Nn \__template_edit_instance_aux:nnnn { nV } \cs_new_protected:Npn \__template_convert_to_assignments: { \tl_clear:N \l__template_assignments_tl \seq_map_function:NN \l__template_key_order_seq \__template_convert_to_assignments_aux:n } \cs_new_protected:Npn \__template_convert_to_assignments_aux:n #1 { \prop_get:NnN \l__template_keytypes_prop {#1} \l__template_tmp_tl \__template_convert_to_assignments_aux:nV {#1} \l__template_tmp_tl } \cs_new_protected:Npn \__template_convert_to_assignments_aux:nn #1#2 { \prop_get:NnNT \l__template_values_prop {#1} \l__template_value_tl { \prop_get:NnNTF \l__template_vars_prop {#1} \l__template_var_tl { \__template_split_keytype_arg:n {#2} \str_if_eq:VnF \l__template_keytype_tl { choice } { \str_if_eq:VnF \l__template_keytype_tl { code } { \__template_find_global: } } \tl_set:Nn \l__template_key_name_tl {#1} \cs_if_exist_use:cF { __template_assign_ \l__template_keytype_tl : } { \__template_assign_variable: } } { \msg_error:nnn { template } { unknown-attribute } {#1} } } } \cs_generate_variant:Nn \__template_convert_to_assignments_aux:nn { nV } \cs_new_protected:Npn \__template_find_global: { \bool_set_false:N \l__template_global_bool \tl_if_in:onT \l__template_var_tl { global } { \exp_after:wN \__template_find_global_aux:w \l__template_var_tl \s__template_stop } } \cs_new_protected:Npn \__template_find_global_aux:w #1 global #2 \s__template_stop { \tl_set:Nn \l__template_var_tl {#2} \bool_set_true:N \l__template_global_bool } \cs_new_protected:Npn \__template_use_template:nnn #1#2#3 { \__template_execute_if_code_exist:nnT {#1} {#2} { \__template_recover_defaults:nn {#1} {#2} \__template_recover_vars:nn {#1} {#2} \__template_parse_values:nnn {#1} {#2} {#3} \__template_convert_to_assignments: \use:c { \c__template_code_root_tl #1 / #2 } } } \cs_new_protected:Npn \__template_assign_boolean: { \bool_if:NTF \l__template_global_bool { \__template_assign_boolean_aux:n { bool_gset } } { \__template_assign_boolean_aux:n { bool_set } } } \cs_new_protected:Npn \__template_assign_boolean_aux:n #1 { \__template_if_key_value:VTF \l__template_value_tl { \__template_key_to_value: \tl_put_right:Ne \l__template_assignments_tl { \exp_not:c { #1 _eq:NN } \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 _ \l__template_value_tl :N } \exp_not:V \l__template_var_tl } } } \cs_new_protected:Npn \__template_assign_choice: { \__template_assign_choice_aux:eF { \l__template_key_name_tl \c_space_tl \l__template_value_tl } { \__template_assign_choice_aux:eF { \l__template_key_name_tl \c_space_tl unknown } { \prop_get:NVN \l__template_keytypes_prop \l__template_key_name_tl \l__template_tmp_tl \__template_split_keytype_arg:V \l__template_tmp_tl \msg_error:nnVV { template } { unknown-choice } \l__template_key_name_tl \l__template_value_tl } } } \cs_new_protected:Npn \__template_assign_choice_aux:nF #1 { \prop_get:NnNTF \l__template_vars_prop {#1} \l__template_tmp_tl { \tl_put_right:NV \l__template_assignments_tl \l__template_tmp_tl } } \cs_generate_variant:Nn \__template_assign_choice_aux:nF { e } \cs_new_protected:Npn \__template_assign_function: { \bool_if:NTF \l__template_global_bool { \__template_assign_function_aux:N \cs_gset:Npn } { \__template_assign_function_aux:N \cs_set:Npn } } \cs_new_protected:Npn \__template_assign_function_aux:N #1 { \tl_put_right:Ne \l__template_assignments_tl { \cs_generate_from_arg_count:NNnn \exp_not:V \l__template_var_tl \exp_not:N #1 { \exp_not:V \l__template_keytype_arg_tl } { \exp_not:V \l__template_value_tl } } } \cs_new_protected:Npn \__template_assign_instance: { \bool_if:NTF \l__template_global_bool { \__template_assign_instance_aux:N \cs_gset_protected:Npn } { \__template_assign_instance_aux:N \cs_set_protected:Npn } } \cs_new_protected:Npn \__template_assign_instance_aux:N #1 { \tl_put_right:Ne \l__template_assignments_tl { \exp_not:N #1 \exp_not:V \l__template_var_tl { \__template_use_instance:nn { \exp_not:V \l__template_keytype_arg_tl } { \exp_not:V \l__template_value_tl } } } } \cs_new_protected:Npn \__template_assign_variable: { \exp_args:Ne \__template_assign_variable:n { \__template_map_var_type: _ \bool_if:NT \l__template_global_bool { g } set:N } } \cs_new_protected:Npn \__template_assign_variable:n #1 { \__template_if_key_value:VTF \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_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 { \tl_set:Ne \l__template_tmp_tl { \tl_trim_spaces:e { \tl_to_str:n {#1} } } \prop_get:NVNTF \l__template_vars_prop \l__template_tmp_tl \l__template_value_tl { \exp_after:wN \__template_key_to_value_auxii:w \l__template_value_tl \s__template_mark global \q__template_nil \s__template_stop } { \msg_error:nnV { template } { unknown-attribute } \l__template_tmp_tl } } \cs_new_protected:Npn \__template_key_to_value_auxii:w #1 global #2#3 \s__template_stop { \__template_quark_if_nil:NF #2 { \tl_set:Nn \l__template_value_tl {#2} } } \cs_new_protected:Npn \__template_use_instance:nn #1#2 { \__template_if_use_template:nTF {#2} { \__template_use_instance_aux:nNnnn {#1} #2 } { \__template_use_instance_aux:nn {#1} {#2} } } \cs_new_protected:Npn \__template_use_instance_aux:nNnnn #1#2#3#4#5 { \str_if_eq:nnTF {#1} {#3} { \__template_use_template:nnn {#3} {#4} {#5} } { \msg_error:nnnn { template } { type-mismatch } {#1} {#3} } } \cs_new_protected:Npn \__template_use_instance_aux:nn #1#2 { \__template_if_instance_exist:nnTF {#1} {#2} { \use:c { \c__template_instances_root_tl #1 / #2 } } { \msg_error:nnnn { template } { unknown-instance } {#1} {#2} } } \cs_new:Npn \__template_assignments_pop: { \l__template_assignments_tl } \cs_new_protected:Npn \__template_assignments_push:n #1 { \tl_set:Nn \l__template_assignments_tl {#1} } \cs_new_protected:Npn \__template_show_code:nn #1#2 { \cs_show:c { \c__template_code_root_tl #1 / #2 } } \cs_new_protected:Npn \__template_show_defaults:nn #1#2 { \__template_if_keys_exist:nnT {#1} {#2} { \__template_recover_defaults:nn {#1} {#2} \__template_show:Nnnn \l__template_values_prop {#1} {#2} { default~values } } } \cs_new_protected:Npn \__template_show_keytypes:nn #1#2 { \__template_if_keys_exist:nnT {#1} {#2} { \__template_recover_keytypes:nn {#1} {#2} \__template_show:Nnnn \l__template_keytypes_prop {#1} {#2} { interface } } } \cs_new_protected:Npn \__template_show_vars:nn #1#2 { \__template_execute_if_code_exist:nnT {#1} {#2} { \__template_recover_vars:nn {#1} {#2} \__template_show:Nnnn \l__template_vars_prop {#1} {#2} { variable~mapping } } } \cs_new_protected:Npn \__template_show:Nnnn #1#2#3#4 { \msg_show:nneeee { template } { show-attribute } { \tl_to_str:n {#2} } { \tl_to_str:n {#3} } { \tl_to_str:n {#4} } { \prop_map_function:NN #1 \msg_show_item_unbraced:nn } } \cs_new_protected:Npn \__template_show_values:nn #1#2 { \__template_if_instance_exist:nnT {#1} {#2} { \__template_recover_values:nn {#1} {#2} \msg_show:nneee { template } { show-values } { \tl_to_str:n {#1} } { \tl_to_str:n {#2} } { \prop_map_function:NN \l__template_values_prop \msg_show_item_unbraced:nn } } } \msg_new:nnnn { template } { argument-number-mismatch } { Template~type~'#1'~takes~#2~argument(s). } { Templates~of~type~'#1'~require~#2~argument(s).\\ You~have~tried~to~make~a~template~for~'#1'~ with~#3~argument(s),~which~is~not~possible:~ the~number~of~arguments~must~agree. } \msg_new:nnnn { template } { bad-number-of-arguments } { Bad~number~of~arguments~for~template~type~'#1'. } { A~template~may~accept~between~0~and~9~arguments.\\ You~asked~to~use~#2~arguments:~this~is~not~supported. } \msg_new:nnnn { template } { bad-variable } { Incorrect~variable~description~'#1'. } { The~argument~'#1'~is~not~of~the~form \\ ~~''\\ ~or~\\ ~~'global~'.\\ It~must~be~given~in~one~of~these~formats~to~be~used~in~a~template. } \msg_new:nnnn { template } { choice-not-implemented } { The~choice~'#1'~has~no~implementation. } { Each~choice~listed~in~the~interface~for~a~template~must~ have~an~implementation. } \msg_new:nnnn { template } { choice-no-code } { The~choice~'#1'~requires~implementation~details. } { When~creating~template~code~using~\DeclareTemplateCode,~ each~choice~name~must~have~an~associated~implementation.\\ This~should~be~given~after~a~'='~sign:~LaTeX~did~not~find~one. } \msg_new:nnnn { template } { choice-requires-code } { The~choice~'#2'~for~key~'#1'~requires~an~implementation. } { You~should~have~put:\\ \ \ #1~:~choice~{~#2 = ~} \\ but~LaTeX~did~not~find~any~. } \msg_new:nnnn { template } { duplicate-key-interface } { Key~'#1'~appears~twice~in~interface~definition~\msg_line_context:. } { Each~key~can~only~have~one~interface~declared~in~a~template.\\ LaTeX~found~two~interfaces~for~'#1'. } \msg_new:nnnn { template } { keytype-requires-argument } { The~key~type~'#1'~requires~an~argument~\msg_line_context:. } { You~should~have~put:\\ \ \ ~:~#1~{~~} \\ but~LaTeX~did~not~find~an~. } \msg_new:nnnn { template } { invalid-keytype } { The~key~'#1'~is~missing~a~key-type~\msg_line_context:. } { Each~key~in~a~template~requires~a~key-type,~given~in~the~form:\\ \ \ ~:~\\ LaTeX~could~not~find~a~~in~your~input. } \msg_new:nnnn { template } { key-no-value } { The~key~'#1'~has~no~value~\msg_line_context:. } { When~creating~an~instance~of~a~template~ every~key~listed~must~include~a~value:\\ \ \ ~=~ } \msg_new:nnnn { template } { key-no-variable } { The~key~'#1'~requires~implementation~details~\msg_line_context:. } { When~creating~template~code~using~\DeclareTemplateCode,~ each~key~name~must~have~an~associated~implementation.\\ This~should~be~given~after~a~'='~sign:~LaTeX~did~not~find~one. } \msg_new:nnnn { template } { key-not-implemented } { Key~'#1'~has~no~implementation~\msg_line_context:. } { The~definition~of~key~implementations~for~template~'#2'~ of~template~type~'#3'~does~not~include~any~details~for~key~'#1'.\\ The~key~was~declared~in~the~interface~definition,~ and~so~an~implementation~is~required. } \msg_new:nnnn { template } { missing-keytype } { The~key~'#1'~is~missing~a~key-type~\msg_line_context:. } { Key~interface~definitions~should~be~of~the~form\\ \ \ #1~:~\\ but~LaTeX~could~not~find~a~. } \msg_new:nnnn { template } { no-template-code } { The~template~'#2'~of~type~'#1'~is~unknown~ or~has~no~implementation. } { There~is~no~code~available~for~the~template~name~given.\\ This~should~be~given~using~\DeclareTemplateCode. } \msg_new:nnnn { template } { type-already-defined } { Template~type~'#1'~already~defined. } { You~have~used~\NewTemplateType~ with~a~template~type~that~has~already~been~defined. } \msg_new:nnnn { template } { type-mismatch } { Template~types~'#1'~and~'#2'~do~not~agree. } { You~are~trying~to~use~a~template~directly~with~\UseInstance (or~a~similar~function),~but~the~template~types~do~not~match. } \msg_new:nnnn { template } { unknown-attribute } { The~template~attribute~'#1'~is~unknown. } { There~is~a~definition~in~the~current~template~reading\\ \ \ \token_to_str:N \KeyValue {~#1~} \\ but~there~is~no~key~called~'#1'. } \msg_new:nnnn { template } { unknown-choice } { The~choice~'#2'~was~not~declared~for~key~'#1'. } { The~key~'#1'~takes~a~fixed~list~of~choices~ and~this~list~does~not~include~'#2'. } \msg_new:nnnn { template } { unknown-default-choice } { The~default~choice~'#2'~was~not~declared~for~key~'#1'. } { The~key~'#1'~takes~a~fixed~list~of~choices~ and~this~list~does~not~include~'#2'. } \msg_new:nnnn { template } { unknown-instance } { The~instance~'#2'~of~type~'#1'~is~unknown. } { You~have~asked~to~use~an~instance~'#2',~ but~this~has~not~been~created. } \msg_new:nnnn { template } { unknown-key } { Unknown~template~key~'#1'. } { The~key~'#1'~was~not~declared~in~the~interface~ for~the~current~template. } \msg_new:nnnn { template } { unknown-keytype } { The~key-type~'#1'~is~unknown. } { Valid~key-types~are:\\ -~boolean;\\ -~choice;\\ -~commalist;\\ -~function;\\ -~instance;\\ -~integer;\\ -~length;\\ -~muskip;\\ -~real;\\ -~skip;\\ -~tokenlist. } \msg_new:nnnn { template } { unknown-type } { The~template~type~'#1'~is~unknown. } { A~template~type~needs~to~be~defined~with~\NewTemplateType prior~to~using~it. } \msg_new:nnnn { template } { unknown-template } { The~template~'#2'~of~type~'#1'~is~unknown. } { No~interface~has~been~declared~for~a~template~ '#2'~of~template~type~'#1'. } \msg_new:nnn { template } { declare-instance } { Declaring~instance~~'#1'~of~type~#2~\msg_line_context:. } \msg_new:nnn { template } { declare-template-code } { Declaring~code~for~template~'#2'~of~template~type~'#1'~\msg_line_context:. } \msg_new:nnn { template } { declare-template-interface } { Declaring~interface~for~template~'#2'~of~template~type~'#1'~ \msg_line_context:. } \msg_new:nnn { template } { declare-type } { Declaring~template~type~'#1'~taking~#2~argument(s)~\msg_line_context:. } \msg_new:nnn { template } { show-attribute } { The~template~'#2'~of~type~'#1'~has~ \tl_if_empty:nTF {#4} { no~#3. } { #3 : #4 } } \msg_new:nnn { template } { show-values } { The~instance~'#2'~of~type~'#1'~has~ \tl_if_empty:nTF {#3} { no~values. } { values: #3 } } \prop_gput:Nnn \g_msg_module_type_prop { template } { LaTeX } \cs_new_protected:Npn \NewTemplateType #1#2 { \__template_define_type:nn {#1} {#2} } \cs_new_protected:Npn \DeclareTemplateInterface #1#2#3#4 { \__template_declare_template_keys:nnnn {#1} {#2} {#3} {#4} } \cs_new_protected:Npn \DeclareTemplateCode #1#2#3#4#5 { \__template_declare_template_code:nnnnn {#1} {#2} {#3} {#4} {#5} } \cs_new_protected:Npn \DeclareTemplateCopy #1#2#3 { \__template_template_set_eq:nnn {#1} {#2} {#3} } \cs_new_protected:Npn \EditTemplateDefaults #1#2#3 { \__template_edit_defaults:nnn {#1} {#2} {#3} } \cs_new_protected:Npn \UseTemplate #1#2#3 { \__template_use_template:nnn {#1} {#2} {#3} } \cs_new_protected:Npn \DeclareInstance #1#2#3#4 { \__template_declare_instance:nnnn {#1} {#3} {#2} {#4} } \cs_new_protected:Npn \DeclareInstanceCopy #1#2#3 { \__template_instance_set_eq:nnn {#1} {#2} {#3} } \cs_new_protected:Npn \EditInstance #1#2#3 { \__template_edit_instance:nnn {#1} {#2} {#3} } \cs_new_protected:Npn \UseInstance #1#2 { \__template_use_instance:nn {#1} {#2} } \cs_new_protected:Npn \ShowTemplateCode #1#2 { \__template_show_code:nn {#1} {#2} } \cs_new_protected:Npn \ShowTemplateDefaults #1#2 { \__template_show_defaults:nn {#1} {#2} } \cs_new_protected:Npn \ShowTemplateInterface #1#2 { \__template_show_keytypes:nn {#1} {#2} } \cs_new_protected:Npn \ShowTemplateVariables #1#2 { \__template_show_vars:nn {#1} {#2} } \cs_new_protected:Npn \ShowInstanceValues #1#2 { \__template_show_values:nn {#1} {#2} } \cs_new:Npn \IfInstanceExistsTF #1#2 { \__template_if_instance_exist:nnTF {#1} {#2} } \cs_new:Npn \IfInstanceExistsT #1#2 { \__template_if_instance_exist:nnT {#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: } \cs_new_protected:Npn \SetTemplateKeys #1#2#3 { \keys_set_known:nnN { template / #1 / #2 } {#3} \l__template_tmp_clist } \IncludeInRelease{0000/00/00}{lttemplates}% {Prototype~document~commands}% \EndModuleRelease \ExplSyntaxOff %%% From File: ltalloc.dtx %%% From File: ltcntrl.dtx %%% From File: lterror.dtx \IncludeInRelease{2021/11/15}% {\ClassNote}{Notes for classes/packages}% \def\ClassNote#1#2{% \GenericWarning{% (#1) \space\space\@spaces\@spaces }{% Class #1 Info: #2% }% } \def\ClassNoteNoLine#1#2{\ClassNote{#1}{#2\@gobble}} \def\PackageNote#1#2{% \GenericWarning{% (#1) \@spaces\@spaces\@spaces }{% Package #1 Info: #2% }% } \def\PackageNoteNoLine#1#2{\PackageNote{#1}{#2\@gobble}} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\ClassNote}{Notes for classes/packages}% \EndIncludeInRelease \IncludeInRelease{2021/11/15}% {\@latex@note}{Display notes}% \def\@latex@note#1{% \GenericWarning{% \@spaces\@spaces\@spaces }{% LaTeX Info: #1% }% } \def\@latex@note@no@line#1{% \@latex@note{#1\@gobble}} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@latex@note}{Display notes}% \let\@latex@note\@latex@info \let\@latex@note@no@line\@latex@info@no@line \EndIncludeInRelease %%% From File: ltpar.dtx %% File: ltpara.dtx %% Copyright (C) 2020-2024 %% Frank Mittelbach, The LaTeX Project %%% From File: ltpara.dtx \ExplSyntaxOn \NewModuleRelease{2021/06/01}{ltpara} {Paragraph~handling~and~hooks} \hook_new_pair:nn{para/before}{para/after} \hook_new_pair:nn{para/begin}{para/end} \let \@kernel@before@para@before \@empty \let \@kernel@before@para@begin \@empty \let \@kernel@after@para@end \@empty \let \@kernel@after@para@after \@empty \IncludeInRelease{2023/06/01} {\g__para_standard_everypar_tl}{minipage~ fix} \tl_new:N \g__para_standard_everypar_tl \tl_gset:Nn \g__para_standard_everypar_tl { \box_gset_to_last:N \g_para_indent_box \group_begin: \tex_par:D \group_end: \tex_everypar:D { \msg_error:nnnn { hooks }{ para-mode }{before}{vertical} } \@kernel@before@para@before \hook_use:n {para/before} \group_begin: \tex_everypar:D {} \skip_set:Nn \tex_parskip:D { \if@minipage -\tex_parskip:D \else: \c_zero_skip \fi: } \tex_noindent:D \group_end: \tex_everypar:D{\g__para_standard_everypar_tl} \@kernel@before@para@begin \hook_use:n {para/begin} \if_mode_horizontal: \else: \msg_error:nnnn { hooks }{ para-mode }{begin}{horizontal} \fi: \__para_handle_indent: } \cs_set:Npn \__para_tmp:w #1#2#3#4#5 { } \tl_gput_right:Nx \g__para_standard_everypar_tl { \exp_not:N \the \exp_not:N \toks \exp_after:wN \__para_tmp:w \token_to_meaning:N \everypar \c_space_tl } \EndIncludeInRelease \IncludeInRelease{2021/06/01} {\g__para_standard_everypar_tl}{minipage~ fix} \tl_gset:Nn \g__para_standard_everypar_tl { \box_gset_to_last:N \g_para_indent_box \group_begin: \tex_par:D \group_end: \tex_everypar:D { \msg_error:nnnn { hooks }{ para-mode }{before}{vertical} } \@kernel@before@para@before \hook_use:n {para/before} \group_begin: \tex_everypar:D {} \skip_zero:N \tex_parskip:D \tex_noindent:D \group_end: \tex_everypar:D{\g__para_standard_everypar_tl} \@kernel@before@para@begin \hook_use:n {para/begin} \if_mode_horizontal: \else: \msg_error:nnnn { hooks }{ para-mode }{begin}{horizontal} \fi: \__para_handle_indent: } \cs_set:Npn \__para_tmp:w #1#2#3#4#5 { } \tl_gput_right:Nx \g__para_standard_everypar_tl { \exp_not:N \the \exp_not:N \toks \exp_after:wN \__para_tmp:w \token_to_meaning:N \everypar \c_space_tl } \EndIncludeInRelease \tex_everypar:D{\g__para_standard_everypar_tl} \newtoks \everypar \tl_gput_right:Nx \g__para_standard_everypar_tl { \exp_not:N \the \exp_not:N \toks \the \allocationnumber \c_space_tl } \box_new:N \g_para_indent_box \cs_new:Npn \__para_handle_indent: { \box_use_drop:N \g_para_indent_box } \cs_new:Npn \para_omit_indent: { \box_gclear:N \g_para_indent_box } \cs_set_eq:NN \IndentBox \g_para_indent_box \cs_set_eq:NN \OmitIndent \para_omit_indent: \cs_new_protected:Npn \para_end: { \scan_stop: \mode_if_horizontal:TF { \mode_if_inner:F { \tex_unskip:D \hook_use:n{para/end} \@kernel@after@para@end \mode_if_horizontal:TF { \if_int_compare:w 11 = \tex_lastnodetype:D \tex_hskip:D \c_zero_dim \fi: \tex_par:D \hook_use:n{para/after} \@kernel@after@para@after } { \msg_error:nnnn { hooks }{ para-mode }{end}{horizontal} } } } \tex_par:D } \cs_new:Npn \para_raw_indent: { \mode_if_vertical:TF { \tex_everypar:D { \box_gset_to_last:N \g_para_indent_box \tex_everypar:D { \g__para_standard_everypar_tl } \__para_handle_indent: \the\everypar } } { \msg_error:nn { latex2e }{ raw-para } } \tex_indent:D } \cs_new:Npn \para_raw_noindent: { \mode_if_vertical:TF { \tex_everypar:D { \tex_everypar:D { \g__para_standard_everypar_tl } \the\everypar } } { \msg_error:nn { latex2e }{ raw-para } } \tex_noindent:D } \cs_new_eq:NN \para_raw_end: \tex_par:D \cs_set_eq:NN \RawIndent \para_raw_indent: \cs_set_eq:NN \RawNoindent \para_raw_noindent: \cs_set_eq:NN \RawParEnd \para_raw_end: \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 \document \msg_new:nnnn { hooks } { para-mode } { Illegal~mode~ change~ in~ hook~ 'para/#1'.\\ Hook~ code~ did~ not~ remain~ in~ #2~ mode. } { Paragraph~ hooks~ cannot~ change~ the~ TeX~ mode~ without~ causing~ endless~ recursion.~ The~ hook~ code~ in~ 'para/#1'~ needs~ to~ stay~ in~ #2~ mode,~ but~ it~ didn't.~ Examine~ the~ hook~ code~ with~ \iow_char:N \\ShowHook~ to~ find~ the~ issue. } \msg_new:nnnn { latex2e } { raw-para } { Not~ in~ vertical~ mode. } { Starting~ a~ paragraph~ with~ \iow_char:N \\RawIndent~ or~ \iow_char:N \\RawNoindent \\ (or~ \iow_char:N \\para_raw_indent:~ or~ \iow_char:N \\para_raw_noindent:)~ is~ only~ allowed \\ if~ LaTeX~ is~ in~ vertical~ mode. } \IncludeInRelease{0000/00/00}% {ltpara}{Undo~hooks~for~paragraphs} \let \OmitIndent \@undefined \let \IndentBox \@undefined \let \RawIndent \@undefined \let \RawNoindent \@undefined \let \RawParEnd \@undefined \cs_set_eq:NN \par \tex_par:D \cs_set_eq:NN \@@par \tex_par:D \cs_set_eq:NN \endgraf \tex_par:D \tex_everypar:D {} \cs_set_eq:NN \everypar \tex_everypar:D \EndModuleRelease \ExplSyntaxOff %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% File: ltmeta.dtx %% Copyright (C) 2021-2024 %% Frank Mittelbach, The LaTeX Project %%% From File: ltmeta.dtx \NewModuleRelease{2022/06/01}{ltmeta} {Document Metadata handling} \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 } \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{}% \else \@savsf\spacefactor \smash{}% \spacefactor\@savsf \fi} \EndIncludeInRelease \NewDocumentCommand\LinkTargetOn{}{} \NewDocumentCommand\LinkTargetOff{}{} \NewDocumentCommand\NextLinkTarget{m}{} \IncludeInRelease{0000/00/00}{ltmeta}% {Undo Document Metadata handling} \let\DocumentMetadata\@undefined \EndModuleRelease %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% From File: ltspace.dtx \IncludeInRelease{2019/10/01}% {\pagebreak}{Make commands robust}% \DeclareRobustCommand\pagebreak{\@testopt{\@no@pgbk-}4} \DeclareRobustCommand\nopagebreak{\@testopt\@no@pgbk4} \DeclareRobustCommand\linebreak{\@testopt{\@no@lnbk-}4} \DeclareRobustCommand\nolinebreak{\@testopt\@no@lnbk4} \DeclareRobustCommand\samepage{\interlinepenalty\@M \predisplaypenalty\@M \postdisplaypenalty\@M \interdisplaylinepenalty\@M \@beginparpenalty\@M \@endparpenalty\@M \@itempenalty\@M \@secpenalty\@M \interfootnotelinepenalty\@M} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\pagebreak}{Make commands robust}% \kernel@make@fragile\pagebreak \kernel@make@fragile\nopagebreak \kernel@make@fragile\linebreak \kernel@make@fragile\nolinebreak \kernel@make@fragile\samepage \EndIncludeInRelease \IncludeInRelease{2020/02/02}% {\@normalcr}{Make robust}% \protected\def\@normalcr{% \let \reserved@e \relax \let \reserved@f \relax \@ifstar{\let \reserved@e \vadjust \let \reserved@f \nobreak \@xnewline}% \@xnewline} \let\\\@normalcr \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@normalcr}{Make robust}% \DeclareRobustCommand\\{% \let \reserved@e \relax \let \reserved@f \relax \@ifstar{\let \reserved@e \vadjust \let \reserved@f \nobreak \@xnewline}% \@xnewline} \expandafter\let\expandafter\@normalcr \csname\expandafter\@gobble\string\\ \endcsname \EndIncludeInRelease \IncludeInRelease{2020/10/01}% {\@vspace@calcify}{Add calc support}% \def\@vspace@calcify#1{\setlength\sp@ce@skip{#1}\vskip\sp@ce@skip} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@vspace@calcify}{Add calc support}% \let\@vspace@calcify\@undefined \EndIncludeInRelease \IncludeInRelease{2020/10/01}% {\@newline}{\newline calc support}% \def\@newline[#1]{\let \reserved@e \vadjust \@gnewline {\@vspace@calcify{#1}}} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@newline}{\newline calc support}% \def\@newline[#1]{\let \reserved@e \vadjust \@gnewline {\vskip #1}} \EndIncludeInRelease \IncludeInRelease{2018/10/10}% {\@esphack}{hyphenation and nobreak after space hack}% \def\@esphack{% \relax \ifhmode \spacefactor\@savsf \ifdim\@savsk>\z@ \ifdim\lastskip=\z@ \nobreak \hskip\z@skip \fi \ignorespaces \fi \else \ifvmode \if@nobreak\nobreak\else\if@noskipsec\nobreak\fi\fi \fi \fi}% \EndIncludeInRelease \IncludeInRelease{2015/10/01}% {\@esphack}{hyphenation and nobreak after space hack}% \def\@esphack{% \relax \ifhmode \spacefactor\@savsf \ifdim\@savsk>\z@ \ifdim\lastskip=\z@ \nobreak \hskip\z@skip \fi \ignorespaces \fi \fi}% \EndIncludeInRelease \IncludeInRelease{2015/01/01}% {\@esphack}{hyphenation and nobreak after space hack}% \def\@esphack{% \relax \ifhmode \spacefactor\@savsf \ifdim\@savsk>\z@ \nobreak \hskip\z@skip \ignorespaces \fi \fi}% \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@esphack}{hyphenation and nobreak after space hack}% \def\@esphack{% \relax \ifhmode \spacefactor\@savsf \ifdim\@savsk>\z@ \ignorespaces \fi \fi}% \EndIncludeInRelease \IncludeInRelease{2015/01/01}% {\@Esphack}{hyphenation after space hack}% \def\@Esphack{% \relax \ifhmode \spacefactor\@savsf \ifdim\@savsk>\z@ \nobreak \hskip\z@skip \@ignoretrue \ignorespaces \fi \fi}% \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@Esphack}{hyphenation after space hack}% \def\@Esphack{% \relax \ifhmode \spacefactor\@savsf \ifdim\@savsk>\z@ \@ignoretrue \ignorespaces \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{% \ifvmode \if@minipage\else \ifdim \lastskip =\z@ \@vspace@calcify{#1}% \else \setlength\@tempskipb{#1}% \@xaddvskip \fi \fi \else \@noitemerr \fi} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\addvspace}{\addvspace calc support}% \def\addvspace#1{% \ifvmode \if@minipage\else \ifdim \lastskip =\z@ \vskip #1\relax \else \@tempskipb#1\relax \@xaddvskip \fi \fi \else \@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{% \ifvmode \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 \else \@noitemerr \fi}% \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\addpenalty}{\addpenalty}% \def\addpenalty#1{% \ifvmode \if@minipage \else \if@nobreak \else \ifdim\lastskip=\z@ \penalty#1\relax \else \@tempskipb\lastskip \vskip -\lastskip \penalty#1% \vskip\@tempskipb \fi \fi \fi \else \@noitemerr \fi}% \EndIncludeInRelease \IncludeInRelease{2020/10/01}% {\@vspace}{Support calc in \vspace}% \def\@vspace #1{% \ifvmode \@vspace@calcify{#1}% \vskip\z@skip \else \@bsphack \vadjust{\@restorepar \@vspace@calcify{#1}% \vskip\z@skip }% \@esphack \fi} \def\@vspacer#1{% \ifvmode \dimen@\prevdepth \hrule \@height\z@ \nobreak \@vspace@calcify{#1}% \vskip\z@skip \prevdepth\dimen@ \else \@bsphack \vadjust{\@restorepar \hrule \@height\z@ \nobreak \@vspace@calcify{#1}% \vskip\z@skip}% \@esphack \fi} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@vspace}{Support calc in \vspace}% \def\@vspace #1{% \ifvmode \vskip #1 \vskip\z@skip \else \@bsphack \vadjust{\@restorepar \vskip #1 \vskip\z@skip }% \@esphack \fi} \def\@vspacer#1{% \ifvmode \dimen@\prevdepth \hrule \@height\z@ \nobreak \vskip #1 \vskip\z@skip \prevdepth\dimen@ \else \@bsphack \vadjust{\@restorepar \hrule \@height\z@ \nobreak \vskip #1 \vskip\z@skip}% \@esphack \fi} \EndIncludeInRelease \IncludeInRelease{2023/11/01}% {\tilde}{Protected tilde}% \protected\edef~{% \noexpand\ifincsname\noexpand\expandafter\string~% \noexpand\else \noexpand\expandafter\noexpand\nobreakspace \noexpand\fi } \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\tilde}{Protected tilde}% \def~{\nobreakspace{}} \EndIncludeInRelease \IncludeInRelease{2023/11/01}% {\@xobeytab}{Obeyed tabs}% \let\@xobeytab\@xobeysp \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@xobeytab}{Obeyed tabs}% \let\@xobeytab\@undefined \EndIncludeInRelease \IncludeInRelease{2015/01/01}% {\@}{Space after \@}% \def\@{\spacefactor\@m{}}% \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@}{Space after \@}% \def\@{\spacefactor\@m}% \EndIncludeInRelease \IncludeInRelease{2020/10/01}% {\@hspace}{Support calc with \hspace}% \newskip\sp@ce@skip \def\@hspace#1{\setlength\sp@ce@skip{#1}\hskip\sp@ce@skip} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@hspace}{Support calc with \hspace}% \def\@hspace#1{\hskip #1\relax} \EndIncludeInRelease \IncludeInRelease{2018/12/01}% {\thinspace}{Start LR-mode}% \DeclareRobustCommand\enspace{\leavevmode@ifvmode\kern.5em } \protected\def\leavevmode@ifvmode{\ifvmode\expandafter\indent\fi} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\thinspace}{Start LR-mode}% \def\thinspace{\kern .16667em } \def\negthinspace{\kern-.16667em } \def\enspace{\kern.5em } \let\leavevmode@ifvmode\@undefined \EndIncludeInRelease %%% From File: ltlogos.dtx %%% From File: ltfiles.dtx \IncludeInRelease{2020/10/01}% {\document}{Added hook to load l3backend code}% \def\document{% \UseOneTimeHook{begindocument/before}% \@kernel@after@begindocument@before \@expl@sys@load@backend@@ \ifx\@unusedoptionlist\@empty\else \@latex@warning@no@line{Unused global option(s):^^J% \@spaces[\@unusedoptionlist]}% \fi \@colht\textheight \@colroom\textheight \vsize\textheight \columnwidth\textwidth \@clubpenalty\clubpenalty \if@twocolumn \advance\columnwidth -\columnsep \divide\columnwidth\tw@ \hsize\columnwidth \@firstcolumntrue \fi \hsize\columnwidth \linewidth\hsize \begingroup\@floatplacement\@dblfloatplacement \makeatletter\let\@writefile\@gobbletwo \global \let \@multiplelabels \relax \@input{\jobname.aux}% \endgroup \if@filesw \immediate\openout\@mainaux\jobname.aux \immediate\write\@mainaux{\relax}% \fi \process@table \let\glb@currsize\@empty % Force math initialization. \normalsize \everypar{}% \ifx\normalsfcodes\@empty \ifnum\sfcode`\.=\@m \let\normalsfcodes\frenchspacing \else \let\normalsfcodes\nonfrenchspacing \fi \fi \ifx\document@default@language\m@ne \chardef\document@default@language\language \fi \@noskipsecfalse \let \@refundefined \relax \@kernel@before@begindocument \UseOneTimeHook{begindocument}% \@kernel@after@begindocument \ifdim\topskip<1sp\global\topskip 1sp\relax\fi \global\@maxdepth\maxdepth \global\let\@begindocumenthook\@undefined \ifx\@listfiles\@undefined \global\let\@filelist\relax \global\let\@addtofilelist\@gobble \fi \gdef\do##1{\global\let ##1\@notprerr}% \@preamblecmds \global\let \@nodocument \relax \global\let\do\noexpand \UseOneTimeHook{begindocument/end}% \ignorespaces} \let\do\noexpand \NewHook{begindocument} \NewHook{begindocument/before} \NewHook{begindocument/end} \edef \@kernel@after@begindocument@before {% \let\expandafter\noexpand\csname __hook env/document/begin\endcsname \noexpand\@empty} \EndIncludeInRelease \IncludeInRelease{2017/04/15}% {\document}{Save language for hyphenation}% \def\document{\endgroup \ifx\@unusedoptionlist\@empty\else \@latex@warning@no@line{Unused global option(s):^^J% \@spaces[\@unusedoptionlist]}% \fi \@colht\textheight \@colroom\textheight \vsize\textheight \columnwidth\textwidth \@clubpenalty\clubpenalty \if@twocolumn \advance\columnwidth -\columnsep \divide\columnwidth\tw@ \hsize\columnwidth \@firstcolumntrue \fi \hsize\columnwidth \linewidth\hsize \begingroup\@floatplacement\@dblfloatplacement \makeatletter\let\@writefile\@gobbletwo \global \let \@multiplelabels \relax \@input{\jobname.aux}% \endgroup \if@filesw \immediate\openout\@mainaux\jobname.aux \immediate\write\@mainaux{\relax}% \fi \process@table \let\glb@currsize\@empty % Force math initialization. \normalsize \everypar{}% \ifx\normalsfcodes\@empty \ifnum\sfcode`\.=\@m \let\normalsfcodes\frenchspacing \else \let\normalsfcodes\nonfrenchspacing \fi \fi \ifx\document@default@language\m@ne \chardef\document@default@language\language \fi \@noskipsecfalse \let \@refundefined \relax \let\AtBeginDocument\@firstofone \@begindocumenthook \ifdim\topskip<1sp\global\topskip 1sp\relax\fi \global\@maxdepth\maxdepth \global\let\@begindocumenthook\@undefined \ifx\@listfiles\@undefined \global\let\@filelist\relax \global\let\@addtofilelist\@gobble \fi \gdef\do##1{\global\let ##1\@notprerr}% \@preamblecmds \global\let \@nodocument \relax \global\let\do\noexpand \ignorespaces} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\document}{Save language for hyphenation} \def\document{\endgroup \ifx\@unusedoptionlist\@empty\else \@latex@warning@no@line{Unused global option(s):^^J% \@spaces[\@unusedoptionlist]}% \fi \@colht\textheight \@colroom\textheight \vsize\textheight \columnwidth\textwidth \@clubpenalty\clubpenalty \if@twocolumn \advance\columnwidth -\columnsep \divide\columnwidth\tw@ \hsize\columnwidth \@firstcolumntrue \fi \hsize\columnwidth \linewidth\hsize \begingroup\@floatplacement\@dblfloatplacement \makeatletter\let\@writefile\@gobbletwo \global \let \@multiplelabels \relax \@input{\jobname.aux}% \endgroup \if@filesw \immediate\openout\@mainaux\jobname.aux \immediate\write\@mainaux{\relax}% \fi \process@table \let\glb@currsize\@empty \normalsize \everypar{}% \ifx\normalsfcodes\@empty \ifnum\sfcode`\.=\@m \let\normalsfcodes\frenchspacing \else \let\normalsfcodes\nonfrenchspacing \fi \fi \@noskipsecfalse \let \@refundefined \relax \let\AtBeginDocument\@firstofone \@begindocumenthook \ifdim\topskip<1sp\global\topskip 1sp\relax\fi \global\@maxdepth\maxdepth \global\let\@begindocumenthook\@undefined \ifx\@listfiles\@undefined \global\let\@filelist\relax \global\let\@addtofilelist\@gobble \fi \gdef\do##1{\global\let ##1\@notprerr}% \@preamblecmds \global\let \@nodocument \relax \global\let\do\noexpand \ignorespaces} \EndIncludeInRelease \IncludeInRelease{2020/10/01}% {\includeonly}{Spaces in file names}% \def\include#1{\relax \ifnum\@auxout=\@partaux \@latex@error{\string\include\space cannot be nested}\@eha \else \set@curr@file{#1}% \edef\@curr@file{\@strip@tex@ext\@curr@file}% \expandafter\@include\expandafter{\@curr@file} % deliberate space \fi} \def\includeonly#1{% \@partswtrue \let\@partlist\@empty \@for\reserved@a:=#1 \do {% \expandafter\set@curr@file\expandafter{\reserved@a}% \ifx\@partlist\@empty \edef\@partlist{\@strip@tex@ext\@curr@file}% \else \edef\@partlist{\@partlist,\@strip@tex@ext\@curr@file}% \fi }% } \@onlypreamble\includeonly \def\reserved@a#1{% \def\@strip@tex@ext##1{% \expandafter\@strip@tex@ext@aux ##1\@nil\@nil #1\@nil\relax\@nnil} \def\@strip@tex@ext@aux##1#1\@nil##2\@nnil{% \ifx\relax##2\@empty \expandafter\@cdr\expandafter\@empty\@cdr{}##1% \else##1\fi}}% \expandafter\reserved@a \expandafter{\detokenize{.tex}} \EndIncludeInRelease \IncludeInRelease{2019/10/01}% {\includeonly}{Spaces in file names}% \def\includeonly#1{% \@partswtrue \set@curr@file{\zap@space#1 \@empty}% \let\@partlist\@curr@file } \def\include#1{\relax \ifnum\@auxout=\@partaux \@latex@error{\string\include\space cannot be nested}\@eha \else \set@curr@file{#1 }% \expandafter\@include\@curr@file \fi} \let\@strip@tex@ext\@undefined \let\@strip@tex@ext@aux\@undefined \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\includeonly}{Spaces in file names}% \def\includeonly#1{% \@partswtrue \edef\@partlist{\zap@space#1 \@empty}} \def\include#1{\relax \ifnum\@auxout=\@partaux \@latex@error{\string\include\space cannot be nested}\@eha \else \@include#1 \fi} \EndIncludeInRelease \IncludeInRelease{2022/06/01}% {\@include}{Spaces in file names and hooks}% \def\@include#1 {% \ifx\@nodocument\relax \clearpage \if@filesw \immediate\write\@mainaux{\string\@input{#1.aux}}% \fi \@tempswatrue \if@partsw \@tempswafalse \edef\reserved@b{#1}% \@for\reserved@a:=\@partlist\do {\ifx\reserved@a\reserved@b\@tempswatrue\fi}% \fi \if@tempswa \let\@auxout\@partaux \if@filesw \immediate\openout\@partaux "#1.aux" \immediate\write\@partaux{\relax}% \fi \@filehook@set@CurrentFile \UseHook{include/before}% \UseOneTimeHook{include/#1/before}% \@input@{#1.tex}% \UseOneTimeHook{include/#1/end}% \UseHook{include/end}% \clearpage \UseOneTimeHook{include/#1/after}% \UseHook{include/after}% \clearpage \@writeckpt{#1}% \if@filesw \immediate\closeout\@partaux \fi \else \deadcycles\z@ \@nameuse{cp@#1}% \UseHook{include/excluded}% \UseOneTimeHook{include/#1/excluded}% \fi \let\@auxout\@mainaux \else \@latex@warning{% \noexpand\include should only be used after \string\begin{document}}% \@input@{#1}% \fi} \NewHook{include/before} \NewReversedHook{include/end} \NewReversedHook{include/after} \NewHook{include/excluded} \EndIncludeInRelease \IncludeInRelease{2020/10/01}% {\@include}{Spaces in file names and hooks}% \EndIncludeInRelease \def\@include#1 {% \ifx\@nodocument\relax \clearpage \if@filesw \immediate\write\@mainaux{\string\@input{#1.aux}}% \fi \@tempswatrue \if@partsw \@tempswafalse \edef\reserved@b{#1}% \@for\reserved@a:=\@partlist\do {\ifx\reserved@a\reserved@b\@tempswatrue\fi}% \fi \if@tempswa \let\@auxout\@partaux \if@filesw \immediate\openout\@partaux "#1.aux" \immediate\write\@partaux{\relax}% \fi \@filehook@set@CurrentFile \UseHook{include/before}% \UseOneTimeHook{include/#1/before}% \@input@{#1.tex}% \UseOneTimeHook{include/#1/end}% \UseHook{include/end}% \clearpage \UseOneTimeHook{include/#1/after}% \UseHook{include/after}% \clearpage \@writeckpt{#1}% \if@filesw \immediate\closeout\@partaux \fi \else \deadcycles\z@ \@nameuse{cp@#1}% \fi \let\@auxout\@mainaux \else \@latex@warning{% \noexpand\include should only be used after \string\begin{document}}% \@input@{#1}% \fi} \NewHook{include/before} \NewReversedHook{include/end} \NewReversedHook{include/after} \IncludeInRelease{0000/00/00}% {\@include}{Spaces in file names and hooks}% \def\@include#1 {% \clearpage \if@filesw \immediate\write\@mainaux{\string\@input{#1.aux}}% \fi \@tempswatrue \if@partsw \@tempswafalse \edef\reserved@b{#1}% \@for\reserved@a:=\@partlist\do {\ifx\reserved@a\reserved@b\@tempswatrue\fi}% \fi \if@tempswa \let\@auxout\@partaux \if@filesw \immediate\openout\@partaux #1.aux \immediate\write\@partaux{\relax}% \fi \@input@{#1.tex}% \clearpage \@writeckpt{#1}% \if@filesw \immediate\closeout\@partaux \fi \else \deadcycles\z@ \@nameuse{cp@#1}% \fi \let\@auxout\@mainaux} \EndIncludeInRelease \IncludeInRelease{2019/10/01}% {\quote@name}{Quote file names}% \def\quote@name#1{"\quote@@name#1\@gobble""} \def\quote@@name#1"{#1\quote@@name} \def\unquote@name#1{\quote@@name#1\@gobble"} \DeclareRobustCommand\IfFileExists[1]{% \set@curr@file{#1}% \expandafter\IfFileExists@\expandafter{\@curr@file}} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\quote@name}{Quote file names}% \let\quote@name\@undefined \let\quote@@name\@undefined \let\unquote@name\@undefined \long\def \IfFileExists#1#2#3{% \openin\@inputcheck#1 % \ifeof\@inputcheck \ifx\input@path\@undefined \def\reserved@a{#3}% \else \def\reserved@a{\@iffileonpath{#1}{#2}{#3}}% \fi \else \closein\@inputcheck \edef\@filef@und{#1 }% \def\reserved@a{#2}% \fi \reserved@a} \EndIncludeInRelease \IncludeInRelease{2023/06/01}% {\IfFileExists@}{IfFileExists} \long\def \IfFileExists@#1#2#3{% \edef\@filef@und{\IfFileExists@@{#1}}% \ifx\@filef@und\@empty \if\relax\detokenize{#1}\relax \let\reserved@a\@firstoftwo \def\@filef@und{".tex" }% \else \let\reserved@a\@secondoftwo \fi \else \let\reserved@a\@firstoftwo \edef\@filef@und{"\@filef@und" }% \fi \expandafter\def\expandafter\reserved@a \expandafter{\reserved@a{#2}{#3}}% \reserved@a} \ExplSyntaxOn \cs_new:Npn \IfFileExists@@ #1 { \tl_if_blank:nF {#1} { \tl_if_head_eq_charcode:oNTF { \use:n #1 } | {#1} { \file_full_name:n {#1} } } } \cs_generate_variant:Nn \tl_if_head_eq_charcode:nNTF { o } \ExplSyntaxOff \EndIncludeInRelease \IncludeInRelease{2021/06/01}% {\IfFileExists@}{IfFileExists} \long\def \IfFileExists@#1#2#3{% \openin\@inputcheck"#1" % \ifeof\@inputcheck \ifx\input@path\@undefined \let\reserved@a\@secondoftwo \else \def\reserved@a{\@iffileonpath{#1}}% \fi \else \closein\@inputcheck \edef\@filef@und{"#1" }% \let\reserved@a\@firstoftwo \fi \expandafter\def\expandafter\reserved@a \expandafter{\reserved@a{#2}{#3}}% \reserved@a} \let\IfFileExists@@\@undefined \EndIncludeInRelease \IncludeInRelease{2019/10/01}% {\IfFileExists@}{IfFileExists} \long\def \IfFileExists@#1#2#3{% \openin\@inputcheck"#1" % \ifeof\@inputcheck \ifx\input@path\@undefined \def\reserved@a{#3}% \else \def\reserved@a{\@iffileonpath{#1}{#2}{#3}}% \fi \else \closein\@inputcheck \edef\@filef@und{"#1" }% \def\reserved@a{#2}% \fi \reserved@a} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\IfFileExists@}{IfFileExists} \let\IfFileExists@\@undefined \EndIncludeInRelease \IncludeInRelease{2019/10/01}% {\@iffileonpath}{Quote file names} \long\def\@iffileonpath#1{% \let\reserved@a\@secondoftwo \expandafter\@tfor\expandafter\reserved@b\expandafter :\expandafter=\input@path\do{% \openin\@inputcheck\expandafter\quote@name\expandafter{\reserved@b#1} % \ifeof\@inputcheck\else \edef\@filef@und{\expandafter\quote@name\expandafter{\reserved@b#1} }% \let\reserved@a\@firstoftwo% \closein\@inputcheck \@break@tfor \fi}% \reserved@a} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\quote@name}{Quote file names} \long\def\@iffileonpath#1{% \let\reserved@a\@secondoftwo \expandafter\@tfor\expandafter\reserved@b\expandafter :\expandafter=\input@path\do{% \openin\@inputcheck\reserved@b#1 % \ifeof\@inputcheck\else \edef\@filef@und{\reserved@b#1 }% \let\reserved@a\@firstoftwo% \closein\@inputcheck \@break@tfor \fi}% \reserved@a} \EndIncludeInRelease \IncludeInRelease{2019/10/01}% {\@swaptwoargs}{Don't lose the file name}% \long\def\@swaptwoargs#1#2{#2#1} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@swaptwoargs}{Don't lose the file name}% \let\@swaptwoargs\@undefined \EndIncludeInRelease \IncludeInRelease{2020/10/01}% {\@iinput}{Change in file error handling}% \def\@iinput#1{% \InputIfFileExists{#1}{}% {\filename@parse\@curr@file \edef\reserved@a{\noexpand\@missingfileerror {\filename@area\filename@base}% {\ifx\filename@ext\relax tex\else\filename@ext\fi}}% \reserved@a \edef\reserved@a{\noexpand\@iinput{% \@missingfile@area\@missingfile@base.\@missingfile@ext}}% \reserved@a}} \EndIncludeInRelease \IncludeInRelease{2019/10/01}% {\@iinput}{Quote file names}% \def\@iinput#1{% \InputIfFileExists{#1}{}% {\filename@parse\@curr@file \edef\reserved@a{\noexpand\@missingfileerror {\filename@area\filename@base}% {\ifx\filename@ext\relax tex\else\filename@ext\fi}}% \reserved@a}} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@iinput}{Quote file names}% \def\@iinput#1{% \InputIfFileExists{#1}{}% {\filename@parse{#1}% \edef\reserved@a{\noexpand\@missingfileerror {\filename@area\filename@base}% {\ifx\filename@ext\relax tex\else\filename@ext\fi}}% \reserved@a}} \EndIncludeInRelease \IncludeInRelease{2020/10/01}% {\@missingfileerror}{Do not load missing file immediately}% \gdef\@missingfileerror#1#2{% \typeout{^^J! LaTeX Error: File `#1.#2' not found.^^J^^J% Type X to quit or to proceed,^^J% or enter new name. (Default extension: #2)^^J}% \message{Enter file name: }% {\endlinechar\m@ne \global\read\m@ne to\@gtempa}% \ifx\@gtempa\@empty \let\@missingfile@area\@empty \let\@missingfile@base\@empty \def\@missingfile@ext{tex}% \else \def\reserved@b{\batchmode\read-1 to \reserved@a}% \def\reserved@a{x}\ifx\reserved@a\@gtempa\reserved@b\fi \def\reserved@a{X}\ifx\reserved@a\@gtempa\reserved@b\fi \filename@parse\@gtempa \edef\filename@ext{% \ifx\filename@ext\relax#2\else\filename@ext\fi}% \edef\reserved@a{% \noexpand\IfFileExists {\filename@area\filename@base.\filename@ext}% {\def\noexpand\@missingfile@area{\filename@area}% \def\noexpand\@missingfile@base{\filename@base}% \def\noexpand\@missingfile@ext {\filename@ext}}% {\noexpand\@missingfileerror {\filename@area\filename@base}{\filename@ext}}}% \reserved@a \fi } \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@missingfileerror}{Do not load missing file immediately}% \gdef\@missingfileerror#1#2{% \typeout{^^J! LaTeX Error: File `#1.#2' not found.^^J^^J% Type X to quit or to proceed,^^J% or enter new name. (Default extension: #2)^^J}% \message{Enter file name: }% {\endlinechar\m@ne \global\read\m@ne to\@gtempa}% \ifx\@gtempa\@empty \else \def\reserved@a{x}\ifx\reserved@a\@gtempa\batchmode\@@end\fi \def\reserved@a{X}\ifx\reserved@a\@gtempa\batchmode\@@end\fi \filename@parse\@gtempa \edef\filename@ext{% \ifx\filename@ext\relax#2\else\filename@ext\fi}% \edef\reserved@a{% \noexpand\InputIfFileExists {\filename@area\filename@base.\filename@ext}% {}% {\noexpand\@missingfileerror {\filename@area\filename@base}{\filename@ext}}}% \reserved@a \fi} \EndIncludeInRelease %%% From File: ltoutenc.dtx \IncludeInRelease{2017/04/15}{\DeclareTextCompositeCommand} {test for undeclared accent}% \def\DeclareTextCompositeCommand#1#2#3#4{% \expandafter\let\expandafter\reserved@a\csname#2\string#1\endcsname \ifx\reserved@a\relax \DeclareTextCommand#1{#2}{% \@latex@error{\string#1 undeclared in encoding #2}\@eha}% \@latex@info{Composite with undeclared \string#1 in encoding #2}% \expandafter\let\expandafter\reserved@a\csname#2\string#1\endcsname \fi \expandafter\expandafter\expandafter\ifx \expandafter\@car\reserved@a\relax\relax\@nil \@text@composite \else \edef\reserved@b##1{% \def\expandafter\noexpand \csname#2\string#1\endcsname####1{% \noexpand\@text@composite \expandafter\noexpand\csname#2\string#1\endcsname ####1\noexpand\@empty\noexpand\@text@composite {##1}}}% \expandafter\reserved@b\expandafter{\reserved@a{##1}}% \fi \expandafter\def\csname\expandafter\string\csname #2\endcsname\string#1-\string#3\@empty\endcsname{#4}% } \EndIncludeInRelease \IncludeInRelease{0000/00/00}{\DeclareTextCompositeCommand} {test for undeclared accent}% \def\DeclareTextCompositeCommand#1#2#3#4{% \expandafter\let\expandafter\reserved@a \csname#2\string#1\endcsname \expandafter\expandafter\expandafter\ifx \expandafter\@car\reserved@a\relax\relax\@nil \@text@composite \else \edef\reserved@b##1{% \def\expandafter\noexpand \csname#2\string#1\endcsname####1{% \noexpand\@text@composite \expandafter\noexpand\csname#2\string#1\endcsname ####1\noexpand\@empty\noexpand\@text@composite {##1}}}% \expandafter\reserved@b\expandafter{\reserved@a{##1}}% \fi \expandafter\def\csname\expandafter\string\csname #2\endcsname\string#1-\string#3\@empty\endcsname{#4}} \EndIncludeInRelease \IncludeInRelease{2019/10/01}% {\UseTextAccent}{Make commands robust}% \DeclareRobustCommand*\UseTextAccent[3]{% \hmode@start@before@group {% \let\hmode@start@before@group\@firstofone \let\@curr@enc\cf@encoding \@use@text@encoding{#1}% #2{\@use@text@encoding\@curr@enc#3}% }} \DeclareRobustCommand*\UseTextSymbol[2]{% \hmode@start@before@group {% \def\@wrong@font@char{\MessageBreak for \noexpand\symbol`\string#2'}% \@use@text@encoding{#1}% #2% }% } \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\UseTextAccent}{Make commands robust}% \kernel@make@fragile\UseTextAccent \kernel@make@fragile\UseTextSymbol \EndIncludeInRelease \IncludeInRelease{2015/10/01}{\textcommabelow}{comma accent}% \DeclareTextCommandDefault\textcommabelow[1] {\hmode@bgroup\ooalign{\null#1\crcr\hidewidth\raise-.31ex \hbox{\check@mathfonts\fontsize\ssf@size\z@ \math@fontsfalse\selectfont,}\hidewidth}\egroup} \EndIncludeInRelease \IncludeInRelease{0000/00/00}{\textcommabelow}{comma accent}% \let\textcommabelow\@undefined \expandafter \let\csname\string\T1\string\c-G\endcsname\@undefined \expandafter \let\csname\string\T1\string\c-K\endcsname\@undefined \expandafter \let\csname\string\T1\string\c-k\endcsname\@undefined \expandafter \let\csname\string\T1\string\c-L\endcsname\@undefined \expandafter \let\csname\string\T1\string\c-l\endcsname\@undefined \expandafter \let\csname\string\T1\string\c-N\endcsname\@undefined \expandafter \let\csname\string\T1\string\c-n\endcsname\@undefined \expandafter \let\csname\string\T1\string\c-R\endcsname\@undefined \expandafter \let\csname\string\T1\string\c-r\endcsname\@undefined \EndIncludeInRelease \IncludeInRelease{2016/02/01}{\textcommaabove}{comma above}% \DeclareTextCommandDefault\textcommaabove[1]{% \hmode@bgroup \ooalign{% \hidewidth \raise.7ex\hbox{% \check@mathfonts\fontsize\ssf@size\z@\math@fontsfalse\selectfont`% }% \hidewidth\crcr \null#1\crcr }% \egroup } \EndIncludeInRelease \IncludeInRelease{0000/00/00}{\textcommaabove}{comma above}% \let\textcommaabove\@undefined \expandafter \let\csname\string\OT1\string\c-g\endcsname\@undefined \expandafter \let\csname\string\T1\string\c-g\endcsname\@undefined \EndIncludeInRelease %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% From File: ltcounts.dtx \IncludeInRelease{2015/01/01}{\@stpelt} {Reset nested counters}% \def\@stpelt#1{\global\csname c@#1\endcsname \m@ne\stepcounter{#1}}% \EndIncludeInRelease \IncludeInRelease{0000/00/00}{\@stpelt} {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{% \@ifundefined{c@#2}\relax {\begingroup \expandafter\let\csname c@#1\endcsname\@removefromreset \def\@elt##1{% \expandafter\ifx\csname c@##1\endcsname\@removefromreset \else \noexpand\@elt{##1}% \fi}% \expandafter\xdef\csname cl@#2\endcsname {\csname cl@#2\endcsname}% \endgroup}} \def\@ifbothcounters#1#2#3{% \@ifundefined{c@#1}{\@nocounterr{#1}}% {% else counter is defined \@ifundefined{c@#2}{\@nocounterr{#2}}% {% else both counter and within are defined #3}}} \EndIncludeInRelease \IncludeInRelease{0000-00-00} {\@removefromreset}{Add interfaces}% \let \@removefromreset \undefined \let \@ifbothcounters \undefined \EndIncludeInRelease \IncludeInRelease{2021/11/15}% {\counterwithout}{counter without/within}% \NewDocumentCommand \counterwithout {sO{\arabic}mm}{% \@ifbothcounters{#3}{#4}{% \@removefromreset{#3}{#4}% \IfBooleanF #1% {\expandafter \gdef\csname the#3\endcsname {#2{#3}}}% }% } \NewDocumentCommand \counterwithin {sO{\arabic}mm}{% \@ifbothcounters{#3}{#4}{% \@addtoreset{#3}{#4}% \IfBooleanF #1% {\expandafter \gdef\csname the#3\expandafter\endcsname \expandafter {\csname the#4\endcsname .#2{#3}}}% }% } \EndIncludeInRelease \IncludeInRelease{2018-04-01} {\counterwithout}{counter without/within}% \def\counterwithout {\@ifstar\counterwithout@s\counterwithout@x} \def\counterwithout@s#1#2{% \@ifbothcounters{#1}{#2}{\@removefromreset{#1}{#2}}} \def\counterwithout@x#1#2{% \@ifbothcounters{#1}{#2}% {\@removefromreset{#1}{#2}% \expandafter \gdef\csname the#1\expandafter\endcsname\expandafter {\expandafter \@arabic\csname c@#1\endcsname}}} \def\counterwithin{\@ifstar\counterwithin@s\counterwithin@x} \def\counterwithin@s#1#2{% \@ifbothcounters{#1}{#2}{\@addtoreset{#1}{#2}}} \def\counterwithin@x#1#2{% \@ifbothcounters{#1}{#2}% {\@addtoreset{#1}{#2}% \expandafter \gdef\csname the#1\expandafter\endcsname\expandafter {\csname the#2\expandafter\endcsname\expandafter .\expandafter \@arabic\csname c@#1\endcsname}}} \EndIncludeInRelease \IncludeInRelease{0000-00-00} {\counterwithout}{counter without/within}% \let \counterwithout \undefined \let \counterwithout@s \undefined \let \counterwithout@x \undefined \let \counterwithin \undefined \let \counterwithin@s \undefined \let \counterwithin@x \undefined \EndIncludeInRelease \IncludeInRelease{2015/01/01}{\@fnsymbol}{Use \TextOrMath}% \def\@fnsymbol#1{% \ifcase#1\or \TextOrMath\textasteriskcentered *\or \TextOrMath \textdagger \dagger\or \TextOrMath \textdaggerdbl \ddagger \or \TextOrMath \textsection \mathsection\or \TextOrMath \textparagraph \mathparagraph\or \TextOrMath \textbardbl \|\or \TextOrMath {\textasteriskcentered\textasteriskcentered}{**}\or \TextOrMath {\textdagger\textdagger}{\dagger\dagger}\or \TextOrMath {\textdaggerdbl\textdaggerdbl}{\ddagger\ddagger}\else \@ctrerr \fi }% \EndIncludeInRelease \IncludeInRelease{0000/00/00}{\@fnsymbol}{Use \TextOrMath}% \def\@fnsymbol#1{\ensuremath{% \ifcase#1\or *\or \dagger\or \ddagger\or \mathsection\or \mathparagraph\or \|\or **\or \dagger\dagger \or \ddagger\ddagger \else\@ctrerr\fi}}% \EndIncludeInRelease \IncludeInRelease{2015/01/01}{\TextOrMath}{\TextOrMath}% \begingroup\expandafter\expandafter\expandafter\endgroup \expandafter\ifx\csname protected\endcsname\relax \DeclareRobustCommand\TextOrMath{% \ifmmode \expandafter\@secondoftwo \else \expandafter\@firstoftwo \fi} \protected@edef\TextOrMath#1#2{\TextOrMath{#1}{#2}} \else \protected\expandafter\def\csname TextOrMath\space\endcsname{% \ifmmode \expandafter\@secondoftwo \else \expandafter\@firstoftwo \fi} \edef\TextOrMath#1#2{% \expandafter\noexpand\csname TextOrMath\space\endcsname {#1}{#2}} \fi \EndIncludeInRelease \IncludeInRelease{0000/00/00}{\TextOrMath}{\TextOrMath}% \let\TextOrMath\@undefined \EndIncludeInRelease %%% From File: ltlength.dtx \IncludeInRelease{2015/01/01}% {\setlength}{Using \setlength with \dimen0}% \def\setlength#1#2{#1 #2\relax} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\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}% {\DeclareFontShape@}{Maybe drop one m}% \def\DeclareFontShape@#1#2#3#4#5#6{% \expandafter\ifx\csname #1+#2\endcsname\relax \@latex@error{Font family `#1+#2' unknown}\@eha \else \edef\reserved@a{#3}% \series@maybe@drop@one@m\reserved@a\reserved@b \ifx\reserved@a\reserved@b\else \@latex@note{Font shape #1/#2/#3/#4 has incorrect series value `#3'.\MessageBreak It should not contain an `m'! Please correct it.\MessageBreak Found}% \fi \expandafter \xdef\csname#1/#2/\reserved@b/#4\endcsname {\expandafter\noexpand\csname #5\endcsname}% \def\reserved@a{#6}% \global \expandafter\let\csname#5\expandafter\endcsname \ifx\reserved@a\@empty \@empty \else \reserved@a \fi \fi } \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\DeclareFontShape@}{Maybe drop one m}% \def\DeclareFontShape@#1#2#3#4#5#6{% \expandafter\ifx\csname #1+#2\endcsname\relax \@latex@error{Font family `#1+#2' unknown}\@eha \else \expandafter \xdef\csname#1/#2/#3/#4\endcsname{\expandafter\noexpand \csname #5\endcsname}% \def\reserved@a{#6}% \global \expandafter\let\csname#5\expandafter\endcsname \ifx\reserved@a\@empty \@empty \else \reserved@a \fi \fi } \EndIncludeInRelease \IncludeInRelease{2015/01/01}{\@DeclareMathSizes}% {Arbitrary units in \DeclareMathSizes}% \def\@DeclareMathSizes #1#2#3#4#5{% \@defaultunits\dimen@ #2pt\relax\@nnil \if $#3$% \expandafter\let\csname S@\strip@pt\dimen@\endcsname\math@fontsfalse \else \@defaultunits\dimen@ii #3pt\relax\@nnil \@defaultunits\@tempdima #4pt\relax\@nnil \@defaultunits\@tempdimb #5pt\relax\@nnil \toks@{#1}% \expandafter\xdef\csname S@\strip@pt\dimen@\endcsname{% \gdef\noexpand\tf@size{\strip@pt\dimen@ii}% \gdef\noexpand\sf@size{\strip@pt\@tempdima}% \gdef\noexpand\ssf@size{\strip@pt\@tempdimb}% \the\toks@ }% \fi }% \EndIncludeInRelease \IncludeInRelease{0000/00/00}{\@DeclareMathSizes}% {Arbitrary units in \DeclareMathSizes}% \def\@DeclareMathSizes#1#2#3#4#5{% \@defaultunits\dimen@#2pt\relax\@nnil \if$#3$% \expandafter \let \csname S@\strip@pt\dimen@\endcsname \math@fontsfalse \else \expandafter \gdef \csname S@\strip@pt\dimen@\endcsname {\gdef\tf@size{#3}\gdef\sf@size{#4}% \gdef\ssf@size{#5}% #1% }% \fi}% \EndIncludeInRelease \IncludeInRelease{2021/06/01}% {\usefont}{Force font face}% \DeclareRobustCommand\usefont[4]{\fontencoding{#1}% \edef\f@family{#2}% \set@target@series{#3}% \edef\f@shape{#4}% \let\delayed@f@adjustment\@empty \selectfont \ignorespaces} \EndIncludeInRelease \IncludeInRelease{2020/02/02}% {\usefont}{Drop m in usefont}% \DeclareRobustCommand\usefont[4]{\fontencoding{#1}% \edef\f@family{#2}% \set@target@series{#3}% \edef\f@shape{#4}\selectfont \ignorespaces} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\usefont}{Drop m in usefont}% \DeclareRobustCommand\usefont[4]{\fontencoding{#1}% \edef\f@family{#2}% \edef\f@series{#3}% \edef\f@shape{#4}\selectfont \ignorespaces} \EndIncludeInRelease \IncludeInRelease{2021/11/15} {\frozen@everydisplay}{Handle spaces after math}% \frozen@everydisplay = {% \aftergroup\@ignoretrue \aftergroup\ignorespaces \check@mathfonts \the\everydisplay} \frozen@everymath = {% \aftergroup\@ignorefalse \check@mathfonts \the\everymath} \EndIncludeInRelease \IncludeInRelease{2020/10/01} {\frozen@everydisplay}{Handle spaces after math}% \frozen@everydisplay = {\check@mathfonts \the\everydisplay} \frozen@everymath = {\check@mathfonts \the\everymath} \EndIncludeInRelease \IncludeInRelease{2020/02/02}% {\LoadFontDefinitionFile}{Loading .fd files}% \def\LoadFontDefinitionFile#1#2{% \begingroup \edef\f@encoding{#1}% \edef\f@family{#2}% \try@load@fontshape \endgroup } \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\LoadFontDefinitionFile}{Loading .fd files}% \let\LoadFontDefinitionFile\@undefined \EndIncludeInRelease \IncludeInRelease{2020/02/02}% {\DeclareFontFamilySubstitution}{Provide family substitution}% \begingroup \nfss@catcodes \gdef\DeclareFontFamilySubstitution#1#2#3{% \LoadFontDefinitionFile{#1}{#2}% \LoadFontDefinitionFile{#1}{#3}% \DeclareFontShape{#1}{#2}{m}{it}{<->ssub * #3/m/it}{}% \DeclareFontShape{#1}{#2}{m}{n}{<->ssub * #3/m/n}{}% \DeclareFontShape{#1}{#2}{m}{sc}{<->ssub * #3/m/sc}{}% \DeclareFontShape{#1}{#2}{m}{sl}{<->ssub * #3/m/sl}{}% \DeclareFontShape{#1}{#2}{m}{sw}{<->ssub * #3/m/sw}{}% \DeclareFontShape{#1}{#2}{m}{scit}{<->ssub * #3/m/scit}{}% \DeclareFontShape{#1}{#2}{m}{scsl}{<->ssub * #3/m/scsl}{}% \DeclareFontShape{#1}{#2}{b}{it}{<->ssub * #3/b/it}{}% \DeclareFontShape{#1}{#2}{b}{n}{<->ssub * #3/b/n}{}% \DeclareFontShape{#1}{#2}{b}{scit}{<->ssub * #3/b/scit}{}% \DeclareFontShape{#1}{#2}{b}{scsl}{<->ssub * #3/b/scsl}{}% \DeclareFontShape{#1}{#2}{b}{sc}{<->ssub * #3/b/sc}{}% \DeclareFontShape{#1}{#2}{b}{sl}{<->ssub * #3/b/sl}{}% \DeclareFontShape{#1}{#2}{b}{sw}{<->ssub * #3/b/sw}{}% \DeclareFontShape{#1}{#2}{bx}{it}{<->ssub * #3/bx/it}{}% \DeclareFontShape{#1}{#2}{bx}{n}{<->ssub * #3/bx/n}{}% \DeclareFontShape{#1}{#2}{bx}{scit}{<->ssub * #3/bx/scit}{}% \DeclareFontShape{#1}{#2}{bx}{scsl}{<->ssub * #3/bx/scsl}{}% \DeclareFontShape{#1}{#2}{bx}{sc}{<->ssub * #3/bx/sc}{}% \DeclareFontShape{#1}{#2}{bx}{sl}{<->ssub * #3/bx/sl}{}% \DeclareFontShape{#1}{#2}{bx}{sw}{<->ssub * #3/bx/sw}{}% } \endgroup \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\DeclareFontFamilySubstitution}{Provide family substitution}% \let\DeclareFontFamilySubstitution\@undefined \EndIncludeInRelease \IncludeInRelease{2019/10/01}% {\DeclareErrorFont}{No side effects please}% \def\DeclareErrorFont#1#2#3#4#5{% \xdef\error@fontshape{% \noexpand\expandafter\noexpand\split@name\noexpand\string \expandafter\noexpand\csname#1/#2/#3/#4/#5\endcsname \noexpand\@nil}% \gdef\default@family{#2}% \gdef\default@series{#3}% \gdef\default@shape{#4}% } \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\DeclareErrorFont}{No side effects please}% \def\DeclareErrorFont#1#2#3#4#5{% \xdef\error@fontshape{% \noexpand\expandafter\noexpand\split@name\noexpand\string \expandafter\noexpand\csname#1/#2/#3/#4/#5\endcsname \noexpand\@nil}% \gdef\default@family{#2}% \gdef\default@series{#3}% \gdef\default@shape{#4}% \global\let\f@family\default@family \global\let\f@series\default@series \global\let\f@shape\default@shape \gdef\f@size{#5}% \gdef\f@baselineskip{#5pt}% } \EndIncludeInRelease \IncludeInRelease{2015/01/01}{\wrong@fontshape}% {Font substitution in preamble}% \def\wrong@fontshape{% \csname D@\f@encoding\endcsname % install defaults if in math \edef\reserved@a{\csname\curr@fontshape\endcsname}% \ifx\last@fontshape\reserved@a \errmessage{Corrupted NFSS tables}% \error@fontshape \else \let\f@shape\default@shape \expandafter\ifx\csname\curr@fontshape\endcsname\relax \let\f@series\default@series \expandafter \ifx\csname\curr@fontshape\endcsname\relax \let\f@family\default@family \begingroup \try@load@fontshape \endgroup \fi \fi \fi \@font@warning{Font shape `\expandafter\string\reserved@a' \expandafter\@gobble\string\@undefined\MessageBreak using `\curr@fontshape' instead\@wrong@font@char}% \global\let\last@fontshape\reserved@a \gdef\@defaultsubs{% \@font@warning{Some font shapes were not available, defaults substituted.\@gobbletwo}}% \global\expandafter\expandafter\expandafter\let \expandafter\reserved@a \csname\curr@fontshape\endcsname \xdef\font@name{% \csname\curr@fontshape/\f@size\endcsname}% \pickup@font} \EndIncludeInRelease \IncludeInRelease{0000/00/00}{\wrong@fontshape}% {Font substitution in preamble}% \def\wrong@fontshape{% \csname D@\f@encoding\endcsname \edef\reserved@a{\csname\curr@fontshape\endcsname}% \ifx\last@fontshape\reserved@a \errmessage{Corrupted NFSS tables}% \error@fontshape \else \let\f@shape\default@shape \expandafter\ifx\csname\curr@fontshape\endcsname\relax \let\f@series\default@series \expandafter \ifx\csname\curr@fontshape\endcsname\relax \let\f@family\default@family \fi \fi \fi \@font@warning{Font shape `\expandafter\string\reserved@a' \expandafter\@gobble\string\@undefined \MessageBreak using `\curr@fontshape' instead\@wrong@font@char}% \global\let\last@fontshape\reserved@a \gdef\@defaultsubs{% \@font@warning{Some font shapes were not available, defaults substituted.\@gobbletwo}}% \global\expandafter\expandafter\expandafter\let \expandafter\reserved@a \csname\curr@fontshape\endcsname \xdef\font@name{% \csname\curr@fontshape/\f@size\endcsname}% \pickup@font} \EndIncludeInRelease \IncludeInRelease{2017/01/01}{\showhyphens}% {XeTeX support for \showhyphens}% \ifx\XeTeXcharclass\@undefined \DeclareRobustCommand\showhyphens[1]{% \setbox0\vbox{% \color@begingroup \everypar{}% \parfillskip\z@skip\hsize\maxdimen \normalfont \pretolerance\m@ne\tolerance\m@ne\hbadness\z@\showboxdepth\z@\ #1% \color@endgroup}} \else \DeclareRobustCommand\showhyphens[1]{% \setbox0\vbox{% \usefont{TU}{lmr}{m}{n}% \hsize 1sp % \hbadness\@M \hfuzz\maxdimen \tracingonline\z@ \tracinglostchars\z@ \everypar={}% \leftskip\z@skip \rightskip\z@skip \parfillskip\z@skip \hyphenpenalty=-\@M \pretolerance\m@ne \interlinepenalty\z@ \clubpenalty\z@ \widowpenalty\z@ \brokenpenalty1127 % \setbox\z@\hbox{}% \noindent \hskip\z@skip #1% \par \loop \@tempswafalse \ifnum\lastnodetype=11\unskip\@tempswatrue\fi \ifnum\lastnodetype=12\unkern\@tempswatrue\fi \ifnum\lastnodetype=13 % \count@\lastpenalty \unpenalty\@tempswatrue \fi \ifnum\lastnodetype=\@ne \setbox\tw@\lastbox\@tempswatrue \setbox0\hbox{\unhbox\tw@\unskip\unskip\unpenalty \ifnum\count@=1127 \else\ \fi \unhbox0}% \count@\z@ \fi \if@tempswa \repeat \hbadness\z@ \hsize\maxdimen \showboxdepth\z@ \tolerance\m@ne \hyphenpenalty\z@ \noindent\unhbox\z@ }} \fi \EndIncludeInRelease \IncludeInRelease{0000/00/00}{\showhyphens}% {XeTeX support for \showhyphens}% \gdef\showhyphens#1{% \setbox0\vbox{% \color@begingroup \everypar{}% \parfillskip\z@skip\hsize\maxdimen \normalfont \pretolerance\m@ne\tolerance\m@ne \hbadness\z@\showboxdepth\z@\ #1% \color@endgroup}} \EndIncludeInRelease %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% From File: ltfssaxes.dtx %% Copyright (C) 2019-2020 Frank Mittelbach \IncludeInRelease{2020/02/02}% {\DeclareFontSeriesChangeRule}{Series change rules}% \def\DeclareFontSeriesChangeRule#1#2#3#4{% \@namedef{series@#1@#2}{{#3}{#4}}} \DeclareFontSeriesChangeRule {bc}{b}{bc}{} \DeclareFontSeriesChangeRule {bc}{c}{bc}{} \DeclareFontSeriesChangeRule {bc}{eb}{ebc}{} \DeclareFontSeriesChangeRule {bc}{ec}{bec} {bc} \DeclareFontSeriesChangeRule {bc}{el}{elc}{} \DeclareFontSeriesChangeRule {bc}{l}{lc}{} \DeclareFontSeriesChangeRule {bc}{sb}{sbc}{} \DeclareFontSeriesChangeRule {bc}{sc}{bsc} {bc} \DeclareFontSeriesChangeRule {bc}{sl}{slc}{} \DeclareFontSeriesChangeRule {bc}{ub}{ubc}{} \DeclareFontSeriesChangeRule {bc}{ul}{ulc}{} \DeclareFontSeriesChangeRule {bc}{x}{bx}{} \DeclareFontSeriesChangeRule {bx}{b}{bx}{} \DeclareFontSeriesChangeRule {bx}{c} {bc} {bx} %<----- \DeclareFontSeriesChangeRule {bx}{eb}{ebx}{} \DeclareFontSeriesChangeRule {bx}{ec} {bec} {bx} %<----- \DeclareFontSeriesChangeRule {bx}{el}{elx}{} \DeclareFontSeriesChangeRule {bx}{l}{lx}{} \DeclareFontSeriesChangeRule {bx}{sb} {sbx} {} \DeclareFontSeriesChangeRule {bx}{sc} {bsc} {bx} %<----- \DeclareFontSeriesChangeRule {bx}{sl}{slx} {} \DeclareFontSeriesChangeRule {bx}{ub}{ubx}{} \DeclareFontSeriesChangeRule {bx}{ul}{ulx}{} \DeclareFontSeriesChangeRule {bx}{x}{bx}{} \DeclareFontSeriesChangeRule {b}{bx} {bx} {b} %<----- \DeclareFontSeriesChangeRule {b}{c} {bc} {b} %<----- \DeclareFontSeriesChangeRule {b}{ec} {bec} {b} %<----- \DeclareFontSeriesChangeRule {b}{sb} {sb} {b} %<----- \DeclareFontSeriesChangeRule {b}{sc} {bsc} {b} %<----- \DeclareFontSeriesChangeRule {b}{x} {bx} {b} %<----- \DeclareFontSeriesChangeRule {c}{bx} {bx} {b} %<----- \DeclareFontSeriesChangeRule {c}{b}{bc}{} \DeclareFontSeriesChangeRule {c}{eb}{ebc}{} \DeclareFontSeriesChangeRule {c}{el}{elc}{} \DeclareFontSeriesChangeRule {c}{l}{lc}{} \DeclareFontSeriesChangeRule {c}{sb}{sbc}{} \DeclareFontSeriesChangeRule {c}{sl}{slc}{} \DeclareFontSeriesChangeRule {c}{ub}{ubc}{} \DeclareFontSeriesChangeRule {c}{ul}{ulc}{} \DeclareFontSeriesChangeRule {c}{x}{x}{m} %<----- \DeclareFontSeriesChangeRule {ebc}{b}{bc}{} \DeclareFontSeriesChangeRule {ebc}{c}{ebc}{} \DeclareFontSeriesChangeRule {ebc}{eb}{ebc}{} \DeclareFontSeriesChangeRule {ebc}{ec}{ebec}{ebc} \DeclareFontSeriesChangeRule {ebc}{el}{elc}{} \DeclareFontSeriesChangeRule {ebc}{l}{lc}{} \DeclareFontSeriesChangeRule {ebc}{sb}{sbc}{} \DeclareFontSeriesChangeRule {ebc}{sc}{ebsc}{ebc} \DeclareFontSeriesChangeRule {ebc}{sl}{slc}{} \DeclareFontSeriesChangeRule {ebc}{ub}{ubc}{} \DeclareFontSeriesChangeRule {ebc}{ul}{ulc}{} \DeclareFontSeriesChangeRule {ebc}{x}{ebx}{} \DeclareFontSeriesChangeRule {ec}{bx} {bx} {b} %<----- \DeclareFontSeriesChangeRule {ec}{b}{bec}{} \DeclareFontSeriesChangeRule {ec}{eb}{ebec}{} \DeclareFontSeriesChangeRule {ec}{el}{elec}{} \DeclareFontSeriesChangeRule {ec}{l}{lec}{} \DeclareFontSeriesChangeRule {ec}{sb}{sbec}{} \DeclareFontSeriesChangeRule {ec}{sl}{slec}{} \DeclareFontSeriesChangeRule {ec}{ub}{ubec}{} \DeclareFontSeriesChangeRule {ec}{ul}{ulec}{} \DeclareFontSeriesChangeRule {ec}{x}{x}{m} %<----- \DeclareFontSeriesChangeRule {sc}{bx} {bx} {b} %<----- \DeclareFontSeriesChangeRule {sc}{b}{bsc}{} \DeclareFontSeriesChangeRule {sc}{eb}{ebsc}{} \DeclareFontSeriesChangeRule {sc}{el}{elsc}{} \DeclareFontSeriesChangeRule {sc}{l}{lsc}{} \DeclareFontSeriesChangeRule {sc}{sb}{sbsc}{} \DeclareFontSeriesChangeRule {sc}{sl}{slsc}{} \DeclareFontSeriesChangeRule {sc}{ub}{ubsc}{} \DeclareFontSeriesChangeRule {sc}{ul}{ulsc}{} \DeclareFontSeriesChangeRule {sc}{x}{x}{m} %<----- \DeclareFontSeriesChangeRule {ebx}{b}{bx}{} \DeclareFontSeriesChangeRule {ebx}{c}{ebc}{} \DeclareFontSeriesChangeRule {ebx}{eb}{ebx}{} \DeclareFontSeriesChangeRule {ebx}{ec}{ebec}{} \DeclareFontSeriesChangeRule {ebx}{el}{elx}{} \DeclareFontSeriesChangeRule {ebx}{l}{lx}{} \DeclareFontSeriesChangeRule {ebx}{sb}{sbx}{} \DeclareFontSeriesChangeRule {ebx}{sc}{ebsc}{} \DeclareFontSeriesChangeRule {ebx}{sl}{slx}{} \DeclareFontSeriesChangeRule {ebx}{ub}{ubx}{} \DeclareFontSeriesChangeRule {ebx}{ul}{ulx}{} \DeclareFontSeriesChangeRule {ebx}{x}{ebx}{} \DeclareFontSeriesChangeRule {eb}{c}{ebc}{} \DeclareFontSeriesChangeRule {eb}{ec}{ebec}{} \DeclareFontSeriesChangeRule {eb}{sc}{ebsc}{} \DeclareFontSeriesChangeRule {eb}{x}{ebx}{} \DeclareFontSeriesChangeRule {elc}{b}{bc}{} \DeclareFontSeriesChangeRule {elc}{c}{elc}{} \DeclareFontSeriesChangeRule {elc}{eb}{ebc}{} \DeclareFontSeriesChangeRule {elc}{ec}{elec}{} \DeclareFontSeriesChangeRule {elc}{el}{elc}{} \DeclareFontSeriesChangeRule {elc}{l}{lc}{} \DeclareFontSeriesChangeRule {elc}{sb}{sbc}{} \DeclareFontSeriesChangeRule {elc}{sc}{elsc}{} \DeclareFontSeriesChangeRule {elc}{sl}{slc}{} \DeclareFontSeriesChangeRule {elc}{ub}{ubc}{} \DeclareFontSeriesChangeRule {elc}{ul}{ulc}{} \DeclareFontSeriesChangeRule {elc}{x}{elx}{} \DeclareFontSeriesChangeRule {elx}{b}{bx}{} \DeclareFontSeriesChangeRule {elx}{c}{elc}{} \DeclareFontSeriesChangeRule {elx}{eb}{ebx}{} \DeclareFontSeriesChangeRule {elx}{ec}{elec}{} \DeclareFontSeriesChangeRule {elx}{el}{elx}{} \DeclareFontSeriesChangeRule {elx}{l}{lx}{} \DeclareFontSeriesChangeRule {elx}{sb}{sbx}{} \DeclareFontSeriesChangeRule {elx}{sc}{elsc}{} \DeclareFontSeriesChangeRule {elx}{sl}{slx}{} \DeclareFontSeriesChangeRule {elx}{ub}{ubx}{} \DeclareFontSeriesChangeRule {elx}{ul}{ulx}{} \DeclareFontSeriesChangeRule {elx}{x}{elx}{} \DeclareFontSeriesChangeRule {el}{c}{elc}{} \DeclareFontSeriesChangeRule {el}{ec}{elec}{} \DeclareFontSeriesChangeRule {el}{sc}{elsc}{} \DeclareFontSeriesChangeRule {el}{x}{elx}{} \DeclareFontSeriesChangeRule {lc}{b}{bc}{} \DeclareFontSeriesChangeRule {lc}{c}{lc}{} \DeclareFontSeriesChangeRule {lc}{eb}{ebc}{} \DeclareFontSeriesChangeRule {lc}{ec}{lec}{} \DeclareFontSeriesChangeRule {lc}{el}{elc}{} \DeclareFontSeriesChangeRule {lc}{l}{lc}{} \DeclareFontSeriesChangeRule {lc}{sb}{sbc}{} \DeclareFontSeriesChangeRule {lc}{sc}{lsc}{} \DeclareFontSeriesChangeRule {lc}{sl}{slc}{} \DeclareFontSeriesChangeRule {lc}{ub}{ubc}{} \DeclareFontSeriesChangeRule {lc}{ul}{ulc}{} \DeclareFontSeriesChangeRule {lc}{x}{lx}{} \DeclareFontSeriesChangeRule {lx}{b}{bx}{} \DeclareFontSeriesChangeRule {lx}{c}{lc}{} \DeclareFontSeriesChangeRule {lx}{eb}{ebx}{} \DeclareFontSeriesChangeRule {lx}{ec}{lec}{} \DeclareFontSeriesChangeRule {lx}{el}{elx}{} \DeclareFontSeriesChangeRule {lx}{l}{lx}{} \DeclareFontSeriesChangeRule {lx}{sb}{sbx}{} \DeclareFontSeriesChangeRule {lx}{sc}{lsc}{} \DeclareFontSeriesChangeRule {lx}{sl}{slx}{} \DeclareFontSeriesChangeRule {lx}{ub}{ubx}{} \DeclareFontSeriesChangeRule {lx}{ul}{ulx}{} \DeclareFontSeriesChangeRule {lx}{x}{lx}{} \DeclareFontSeriesChangeRule {l}{bx} {bx} {b} %<----- \DeclareFontSeriesChangeRule {l}{b} {b} {bx} %<----- \DeclareFontSeriesChangeRule {l}{c} {lc} {l} % ? %<----- \DeclareFontSeriesChangeRule {l}{ec} {lec} {l} % ? %<----- \DeclareFontSeriesChangeRule {l}{sb} {sb} {b} % ? %<----- \DeclareFontSeriesChangeRule {l}{sc} {lsc} {l} % ? %<----- \DeclareFontSeriesChangeRule {l}{x} {lx} {l} % ? %<----- \DeclareFontSeriesChangeRule {m}{bx} {bx} {b} %<----- \DeclareFontSeriesChangeRule {m}{b} {b} {bx} %<----- \DeclareFontSeriesChangeRule {m}{c} {c} {m} %<----- \DeclareFontSeriesChangeRule {m}{ec} {ec} {m} %<----- \DeclareFontSeriesChangeRule {m}{l} {l} {m} %<----- \DeclareFontSeriesChangeRule {m}{sb} {sb} {b} %<----- \DeclareFontSeriesChangeRule {m}{sc} {sc} {m} %<----- \DeclareFontSeriesChangeRule {m}{x} {x} {m} %<----- \DeclareFontSeriesChangeRule {sbc}{b}{bc}{} \DeclareFontSeriesChangeRule {sbc}{c}{sbc}{} \DeclareFontSeriesChangeRule {sbc}{eb}{ebc}{} \DeclareFontSeriesChangeRule {sbc}{ec}{sbec}{sbc} \DeclareFontSeriesChangeRule {sbc}{el}{elc}{} \DeclareFontSeriesChangeRule {sbc}{l}{lc}{} \DeclareFontSeriesChangeRule {sbc}{sb}{sbc}{} \DeclareFontSeriesChangeRule {sbc}{sc}{sbsc}{sbc} \DeclareFontSeriesChangeRule {sbc}{sl}{slc}{} \DeclareFontSeriesChangeRule {sbc}{ub}{ubc}{} \DeclareFontSeriesChangeRule {sbc}{ul}{ulc}{} \DeclareFontSeriesChangeRule {sbc}{x}{sbx}{} \DeclareFontSeriesChangeRule {sbx}{b}{bx}{} \DeclareFontSeriesChangeRule {sbx}{c}{sbc}{} \DeclareFontSeriesChangeRule {sbx}{eb}{ebx}{} \DeclareFontSeriesChangeRule {sbx}{ec}{sbec}{} \DeclareFontSeriesChangeRule {sbx}{el}{elx}{} \DeclareFontSeriesChangeRule {sbx}{l}{lx}{} \DeclareFontSeriesChangeRule {sbx}{sb}{sbx}{} \DeclareFontSeriesChangeRule {sbx}{sc}{sbsc}{} \DeclareFontSeriesChangeRule {sbx}{sl}{slx}{} \DeclareFontSeriesChangeRule {sbx}{ub}{ubx}{} \DeclareFontSeriesChangeRule {sbx}{ul}{ulx}{} \DeclareFontSeriesChangeRule {sbx}{x}{sbx}{} \DeclareFontSeriesChangeRule {sb}{c} {sbc} {bc} %? %<----- \DeclareFontSeriesChangeRule {sb}{ec} {sbec} {sbc} %? %<----- \DeclareFontSeriesChangeRule {sb}{sc} {sbsc} {sbc} %? %<----- \DeclareFontSeriesChangeRule {sb}{x} {sbx} {bx} %? %<----- \DeclareFontSeriesChangeRule {slc}{b}{bc}{} \DeclareFontSeriesChangeRule {slc}{c}{slc}{} \DeclareFontSeriesChangeRule {slc}{eb}{ebc}{} \DeclareFontSeriesChangeRule {slc}{ec}{slec}{} \DeclareFontSeriesChangeRule {slc}{el}{elc}{} \DeclareFontSeriesChangeRule {slc}{l}{lc}{} \DeclareFontSeriesChangeRule {slc}{sb}{sbc}{} \DeclareFontSeriesChangeRule {slc}{sc}{slsc}{} \DeclareFontSeriesChangeRule {slc}{sl}{slc}{} \DeclareFontSeriesChangeRule {slc}{ub}{ubc}{} \DeclareFontSeriesChangeRule {slc}{ul}{ulc}{} \DeclareFontSeriesChangeRule {slc}{x}{slx}{} \DeclareFontSeriesChangeRule {slx}{b}{bx}{} \DeclareFontSeriesChangeRule {slx}{c}{slc}{} \DeclareFontSeriesChangeRule {slx}{eb}{ebx}{} \DeclareFontSeriesChangeRule {slx}{ec}{slec}{} \DeclareFontSeriesChangeRule {slx}{el}{elx}{} \DeclareFontSeriesChangeRule {slx}{l}{lx}{} \DeclareFontSeriesChangeRule {slx}{sb}{sbx}{} \DeclareFontSeriesChangeRule {slx}{sc}{slsc}{} \DeclareFontSeriesChangeRule {slx}{sl}{slx}{} \DeclareFontSeriesChangeRule {slx}{ub}{ubx}{} \DeclareFontSeriesChangeRule {slx}{ul}{ulx}{} \DeclareFontSeriesChangeRule {slx}{x}{slx}{} \DeclareFontSeriesChangeRule {sl}{c}{slc}{} \DeclareFontSeriesChangeRule {sl}{ec}{slec}{} \DeclareFontSeriesChangeRule {sl}{sc}{slsc}{} \DeclareFontSeriesChangeRule {sl}{x}{slx}{} \DeclareFontSeriesChangeRule {ubc}{b}{bc}{} \DeclareFontSeriesChangeRule {ubc}{c}{ubc}{} \DeclareFontSeriesChangeRule {ubc}{eb}{ebc}{} \DeclareFontSeriesChangeRule {ubc}{ec}{ubec}{} \DeclareFontSeriesChangeRule {ubc}{el}{elc}{} \DeclareFontSeriesChangeRule {ubc}{l}{lc}{} \DeclareFontSeriesChangeRule {ubc}{sb}{sbc}{} \DeclareFontSeriesChangeRule {ubc}{sc}{ubsc}{} \DeclareFontSeriesChangeRule {ubc}{sl}{slc}{} \DeclareFontSeriesChangeRule {ubc}{ub}{ubc}{} \DeclareFontSeriesChangeRule {ubc}{ul}{ulc}{} \DeclareFontSeriesChangeRule {ubc}{x}{ubx}{} \DeclareFontSeriesChangeRule {ubx}{b}{bx}{} \DeclareFontSeriesChangeRule {ubx}{c}{ubc}{} \DeclareFontSeriesChangeRule {ubx}{eb}{ebx}{} \DeclareFontSeriesChangeRule {ubx}{ec}{ubec}{} \DeclareFontSeriesChangeRule {ubx}{el}{elx}{} \DeclareFontSeriesChangeRule {ubx}{l}{lx}{} \DeclareFontSeriesChangeRule {ubx}{sb}{sbx}{} \DeclareFontSeriesChangeRule {ubx}{sc}{ubsc}{} \DeclareFontSeriesChangeRule {ubx}{sl}{slx}{} \DeclareFontSeriesChangeRule {ubx}{ub}{ubx}{} \DeclareFontSeriesChangeRule {ubx}{ul}{ulx}{} \DeclareFontSeriesChangeRule {ubx}{x}{ubx}{} \DeclareFontSeriesChangeRule {ub}{c}{ubc}{} \DeclareFontSeriesChangeRule {ub}{ec}{ubec}{} \DeclareFontSeriesChangeRule {ub}{sc}{ubsc}{} \DeclareFontSeriesChangeRule {ub}{x}{ubx}{} \DeclareFontSeriesChangeRule {ulc}{b}{bc}{} \DeclareFontSeriesChangeRule {ulc}{c}{ulc}{} \DeclareFontSeriesChangeRule {ulc}{eb}{ebc}{} \DeclareFontSeriesChangeRule {ulc}{ec}{ulec}{ulc} \DeclareFontSeriesChangeRule {ulc}{el}{elc}{} \DeclareFontSeriesChangeRule {ulc}{l}{lc}{} \DeclareFontSeriesChangeRule {ulc}{sb}{sbc}{} \DeclareFontSeriesChangeRule {ulc}{sc}{ulsc}{ulc} \DeclareFontSeriesChangeRule {ulc}{sl}{slc}{} \DeclareFontSeriesChangeRule {ulc}{ub}{ubc}{} \DeclareFontSeriesChangeRule {ulc}{ul}{ulc}{} \DeclareFontSeriesChangeRule {ulc}{x}{ulx}{} \DeclareFontSeriesChangeRule {ulx}{b}{bx}{} \DeclareFontSeriesChangeRule {ulx}{c}{ulc}{} \DeclareFontSeriesChangeRule {ulx}{eb}{ebx}{} \DeclareFontSeriesChangeRule {ulx}{ec}{ulec}{} \DeclareFontSeriesChangeRule {ulx}{el}{elx}{} \DeclareFontSeriesChangeRule {ulx}{l}{lx}{} \DeclareFontSeriesChangeRule {ulx}{sb}{sbx}{} \DeclareFontSeriesChangeRule {ulx}{sc}{ulsc}{} \DeclareFontSeriesChangeRule {ulx}{sl}{slx}{} \DeclareFontSeriesChangeRule {ulx}{ub}{ubx}{} \DeclareFontSeriesChangeRule {ulx}{ul}{ulx}{} \DeclareFontSeriesChangeRule {ulx}{x}{ulx}{} \DeclareFontSeriesChangeRule {ul}{c}{ulc}{} \DeclareFontSeriesChangeRule {ul}{ec}{ulec}{} \DeclareFontSeriesChangeRule {ul}{sc}{ulsc}{} \DeclareFontSeriesChangeRule {ul}{x}{ulx}{} \DeclareFontSeriesChangeRule {x}{b}{bx}{} \DeclareFontSeriesChangeRule {x}{c}{c}{} \DeclareFontSeriesChangeRule {x}{eb}{ebx}{} \DeclareFontSeriesChangeRule {x}{ec}{ec}{} \DeclareFontSeriesChangeRule {x}{el}{elx}{} \DeclareFontSeriesChangeRule {x}{l}{lx}{} \DeclareFontSeriesChangeRule {x}{sb}{sbx}{} \DeclareFontSeriesChangeRule {x}{sc}{sc}{} \DeclareFontSeriesChangeRule {x}{sl}{slx}{} \DeclareFontSeriesChangeRule {x}{ub}{ubx}{} \DeclareFontSeriesChangeRule {x}{ul}{ulx}{} \DeclareFontSeriesChangeRule {bc}{m?}{c}{} \DeclareFontSeriesChangeRule {bec}{m?}{ec}{} \DeclareFontSeriesChangeRule {bsc}{m?}{sc}{} \DeclareFontSeriesChangeRule {bx}{m?}{x}{} \DeclareFontSeriesChangeRule {b}{m?}{m}{} \DeclareFontSeriesChangeRule {c}{m?}{c}{} \DeclareFontSeriesChangeRule {ebc}{m?}{c}{} \DeclareFontSeriesChangeRule {ebec}{m?}{ec}{} \DeclareFontSeriesChangeRule {ebsc}{m?}{sc}{} \DeclareFontSeriesChangeRule {ebx}{m?}{x}{} \DeclareFontSeriesChangeRule {eb}{m?}{m}{} \DeclareFontSeriesChangeRule {ec}{m?}{ec}{} \DeclareFontSeriesChangeRule {elc}{m?}{c}{} \DeclareFontSeriesChangeRule {elec}{m?}{ec}{} \DeclareFontSeriesChangeRule {elsc}{m?}{sc}{} \DeclareFontSeriesChangeRule {elx}{m?}{x}{} \DeclareFontSeriesChangeRule {el}{m?}{m}{} \DeclareFontSeriesChangeRule {lc}{m?}{c}{} \DeclareFontSeriesChangeRule {lec}{m?}{ec}{} \DeclareFontSeriesChangeRule {lsc}{m?}{sc}{} \DeclareFontSeriesChangeRule {lx}{m?}{x}{} \DeclareFontSeriesChangeRule {l}{m?}{m}{} \DeclareFontSeriesChangeRule {m}{m?}{m}{} \DeclareFontSeriesChangeRule {sbc}{m?}{c}{} \DeclareFontSeriesChangeRule {sbec}{m?}{ec}{} \DeclareFontSeriesChangeRule {sbsc}{m?}{sc}{} \DeclareFontSeriesChangeRule {sbx}{m?}{x}{} \DeclareFontSeriesChangeRule {sb}{m?}{m}{} \DeclareFontSeriesChangeRule {sc}{m?}{sc}{} \DeclareFontSeriesChangeRule {slc}{m?}{c}{} \DeclareFontSeriesChangeRule {slec}{m?}{ec}{} \DeclareFontSeriesChangeRule {slsc}{m?}{sc}{} \DeclareFontSeriesChangeRule {slx}{m?}{x}{} \DeclareFontSeriesChangeRule {sl}{m?}{m}{} \DeclareFontSeriesChangeRule {ubc}{m?}{c}{} \DeclareFontSeriesChangeRule {ubec}{m?}{ec}{} \DeclareFontSeriesChangeRule {ubsc}{m?}{sc}{} \DeclareFontSeriesChangeRule {ubx}{m?}{x}{} \DeclareFontSeriesChangeRule {ub}{m?}{ub}{} \DeclareFontSeriesChangeRule {ulc}{m?}{c}{} \DeclareFontSeriesChangeRule {ulec}{m?}{ec}{} \DeclareFontSeriesChangeRule {ulsc}{m?}{sc}{} \DeclareFontSeriesChangeRule {ulx}{m?}{x}{} \DeclareFontSeriesChangeRule {ul}{m?}{m}{} \DeclareFontSeriesChangeRule {x}{m?}{x}{} \DeclareFontSeriesChangeRule {bc}{?m}{b}{} \DeclareFontSeriesChangeRule {bec}{?m}{b}{} \DeclareFontSeriesChangeRule {bsc}{?m}{b}{} \DeclareFontSeriesChangeRule {bsc}{?m}{b}{} \DeclareFontSeriesChangeRule {bx}{?m}{b}{} \DeclareFontSeriesChangeRule {b}{?m}{b}{} \DeclareFontSeriesChangeRule {c}{?m}{m}{} \DeclareFontSeriesChangeRule {ebc}{?m}{eb}{} \DeclareFontSeriesChangeRule {ebec}{?m}{eb}{} \DeclareFontSeriesChangeRule {ebsc}{?m}{eb}{} \DeclareFontSeriesChangeRule {ebsc}{?m}{eb}{} \DeclareFontSeriesChangeRule {ebx}{?m}{eb}{} \DeclareFontSeriesChangeRule {eb}{?m}{eb}{} \DeclareFontSeriesChangeRule {ec}{?m}{m}{} \DeclareFontSeriesChangeRule {elc}{?m}{el}{} \DeclareFontSeriesChangeRule {elec}{?m}{el}{} \DeclareFontSeriesChangeRule {elsc}{?m}{el}{} \DeclareFontSeriesChangeRule {elsc}{?m}{el}{} \DeclareFontSeriesChangeRule {elx}{?m}{el}{} \DeclareFontSeriesChangeRule {el}{?m}{el}{} \DeclareFontSeriesChangeRule {lc}{?m}{l}{} \DeclareFontSeriesChangeRule {lec}{?m}{l}{} \DeclareFontSeriesChangeRule {lsc}{?m}{l}{} \DeclareFontSeriesChangeRule {lsc}{?m}{l}{} \DeclareFontSeriesChangeRule {lx}{?m}{l}{} \DeclareFontSeriesChangeRule {l}{?m}{l}{} \DeclareFontSeriesChangeRule {m}{?m}{m}{} \DeclareFontSeriesChangeRule {sbc}{?m}{sb}{} \DeclareFontSeriesChangeRule {sbec}{?m}{sb}{} \DeclareFontSeriesChangeRule {sbsc}{?m}{sb}{} \DeclareFontSeriesChangeRule {sbsc}{?m}{sb}{} \DeclareFontSeriesChangeRule {sbx}{?m}{sb}{} \DeclareFontSeriesChangeRule {sb}{?m}{sb}{} \DeclareFontSeriesChangeRule {sc}{?m}{m}{} \DeclareFontSeriesChangeRule {sc}{?m}{m}{} \DeclareFontSeriesChangeRule {slc}{?m}{sl}{} \DeclareFontSeriesChangeRule {slec}{?m}{sl}{} \DeclareFontSeriesChangeRule {slsc}{?m}{sl}{} \DeclareFontSeriesChangeRule {slsc}{?m}{sl}{} \DeclareFontSeriesChangeRule {slx}{?m}{sl}{} \DeclareFontSeriesChangeRule {sl}{?m}{sl}{} \DeclareFontSeriesChangeRule {ubc}{?m}{ub}{} \DeclareFontSeriesChangeRule {ubec}{?m}{ub}{} \DeclareFontSeriesChangeRule {ubsc}{?m}{ub}{} \DeclareFontSeriesChangeRule {ubsc}{?m}{ub}{} \DeclareFontSeriesChangeRule {ubx}{?m}{ub}{} \DeclareFontSeriesChangeRule {ub}{?m}{m}{} \DeclareFontSeriesChangeRule {ulc}{?m}{ul}{} \DeclareFontSeriesChangeRule {ulec}{?m}{ul}{} \DeclareFontSeriesChangeRule {ulsc}{?m}{ul}{} \DeclareFontSeriesChangeRule {ulsc}{?m}{ul}{} \DeclareFontSeriesChangeRule {ulx}{?m}{ul}{} \DeclareFontSeriesChangeRule {ul}{?m}{ul}{} \DeclareFontSeriesChangeRule {x}{?m}{m}{} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\DeclareFontSeriesChangeRule}{Series change rules}% \let\DeclareFontSeriesChangeRule\@undefined \EndIncludeInRelease \IncludeInRelease{2021/06/01}% {\fontseries}{delay fontseries update}% \DeclareRobustCommand\fontseries[1]{\@forced@seriesfalse \expandafter\def\expandafter\delayed@f@adjustment\expandafter {\delayed@f@adjustment\delayed@merge@font@series{#1}}} \let\delayed@f@adjustment\@empty \DeclareRobustCommand\fontseriesforce[1]{\@forced@seriestrue \expandafter\def\expandafter\delayed@f@adjustment\expandafter {\delayed@f@adjustment\edef\f@series{#1}}} \newif\if@forced@series \EndIncludeInRelease \IncludeInRelease{2020/02/02}% {\fontseries}{delay fontseries update}% \DeclareRobustCommand\fontseries[1]{\@forced@seriesfalse \merge@font@series{#1}} \DeclareRobustCommand\fontseriesforce[1]{\@forced@seriestrue \edef\f@series{#1}} \let\delayed@f@adjustment\@undefined \expandafter\newif\csname if@forced@series\endcsname \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\fontseries}{delay fontseries update}% \DeclareRobustCommand\fontseries[1]{\edef\f@series{#1}} \let\fontseriesforce\@undefined \EndIncludeInRelease \IncludeInRelease{2020/02/02}% {\merge@font@series}{Merge series values}% \def\merge@font@series#1{% \expandafter\expandafter\expandafter \merge@font@series@ \csname series@\f@series @#1\endcsname {#1}% \@nil } \def\merge@font@series@#1#2#3\@nil{% \def\reserved@a{#3}% \ifx\reserved@a\@empty \set@target@series{#2}% \else \edef\reserved@a{\f@encoding /\f@family /#1/\f@shape}% \ifcsname \reserved@a \endcsname \set@target@series{#1}% \else \ifcsname \f@encoding /\f@family /#2/\f@shape \endcsname \set@target@series{#2}% \@font@shape@subst@warning \else \set@target@series{#3}% \@font@shape@subst@warning \fi \fi \fi } \def\@font@shape@subst@warning{% \edef\reserved@b{\curr@fontshape}% \ifx\reserved@a\reserved@b \else \@font@warning{Font shape `\reserved@a' undefined\MessageBreak using `\reserved@b' instead}% \fi } \def\merge@font@series@without@substitution#1{% \expandafter\expandafter\expandafter \merge@font@series@without@substitution@ \csname series@\f@series @#1\endcsname {#1}% \@nil } \def\merge@font@series@without@substitution@#1#2#3\@nil{% \def\reserved@a{#3}% \ifx\reserved@a\@empty \set@target@series{#2}% \else \set@target@series{#1}% \fi } \let\delayed@merge@font@series\merge@font@series@without@substitution \def\maybe@load@fontshape{% \begingroup \let \typeout \@font@info \try@load@fontshape \endgroup} \def\set@target@series#1{% \edef\f@series{#1}% \series@maybe@drop@one@m\f@series\f@series } \def\series@maybe@drop@one@m#1{% \expandafter\series@maybe@drop@one@m@x\expandafter{#1}} \def\series@maybe@drop@one@m@x#1#2{% \def\in@@##1,#1,{}% \series@check@toks\expandafter{\in@@ ,ulm,elm,lm,slm,mm,sbm,bm,ebm,ubm,muc,mec,mc,msc,msx,mx,mex,mux,{}{},#1,}% \edef\in@@{\the\series@check@toks}% \ifx\in@@\@empty \edef#2{#1}% \else \edef#2{\expandafter\series@drop@one@m #1m\series@drop@one@m}% \fi } \newtoks\series@check@toks \def\series@drop@one@m#1m#2m#3\series@drop@one@m{% #1#2% } \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\merge@font@series}{Merge series values}% \let\merge@font@series\@undefined \let\merge@font@series@\@undefined \let\@font@shape@subst@warning\@undefined \let\merge@font@series@without@substitution\@undefined \let\merge@font@series@without@substitution@\@undefined \let\delayed@merge@font@series\@undefined \let\maybe@load@fontshape\@undefined \let\set@target@series\@undefined \let\series@maybe@drop@one@m\@undefined \let\series@drop@one@m\@undefined \EndIncludeInRelease \IncludeInRelease{2020/02/02}% {\DeclareFontShapeChangeRule}{Font shape change rules}% \def\DeclareFontShapeChangeRule #1#2#3#4{% \@namedef{shape@#1@#2}{{#3}{#4}}} \DeclareRobustCommand\ulcshape {\not@math@alphabet\ulcshape\relax \fontshape\ulcdefault\selectfont} \let\ulcdefault\@undefined % for rollback \newcommand\ulcdefault{ulc} \DeclareRobustCommand\swshape {\not@math@alphabet\swshape\relax \fontshape\swdefault\selectfont} \let\swdefault\@undefined % for rollback \newcommand\swdefault{sw} \DeclareRobustCommand\sscshape {\not@math@alphabet\sscshape\relax \fontshape\sscdefault\selectfont} \let\sscdefault\@undefined % for rollback \newcommand\sscdefault{ssc} \DeclareFontShapeChangeRule {n}{it} {it} {sl} \DeclareFontShapeChangeRule {n}{sl} {sl} {it} \DeclareFontShapeChangeRule {n}{ulc} {n} {} \DeclareFontShapeChangeRule {n}{up} {n} {} \DeclareFontShapeChangeRule {it}{sl} {sl} {it} \DeclareFontShapeChangeRule {it}{sc} {scit} {scsl} \DeclareFontShapeChangeRule {it}{ulc} {it} {} \DeclareFontShapeChangeRule {it}{up} {n} {} \DeclareFontShapeChangeRule {sl}{it} {it} {sl} \DeclareFontShapeChangeRule {sl}{sc} {scsl} {scit} \DeclareFontShapeChangeRule {sl}{ulc} {sl} {} \DeclareFontShapeChangeRule {sl}{up} {n} {} \DeclareFontShapeChangeRule {sc}{it} {scit} {scsl} \DeclareFontShapeChangeRule {sc}{sl} {scsl} {scit} \DeclareFontShapeChangeRule {sc}{sw} {scsw} {sw} \DeclareFontShapeChangeRule {sc}{ulc} {n} {} \DeclareFontShapeChangeRule {sc}{up} {n} {} \DeclareFontShapeChangeRule {scit}{it} {scit} {} \DeclareFontShapeChangeRule {scit}{sl} {scsl} {scit} \DeclareFontShapeChangeRule {scit}{sw} {scsw} {sc} % or scit? \DeclareFontShapeChangeRule {scit}{sc} {scit} {} \DeclareFontShapeChangeRule {scit}{ulc} {it} {} \DeclareFontShapeChangeRule {scit}{up} {sc} {} \DeclareFontShapeChangeRule {scsl}{it} {scit} {scsl} \DeclareFontShapeChangeRule {scsl}{sl} {scsl} {} \DeclareFontShapeChangeRule {scsl}{sw} {scsw} {sc} % or scsl? \DeclareFontShapeChangeRule {scsl}{sc} {scsl} {} \DeclareFontShapeChangeRule {scsl}{ulc} {sl} {} \DeclareFontShapeChangeRule {scsl}{up} {sc} {} \DeclareFontShapeChangeRule {scsw}{it} {scit} {scsw} \DeclareFontShapeChangeRule {scsw}{sl} {scsl} {} \DeclareFontShapeChangeRule {scsw}{sw} {scsw} {} \DeclareFontShapeChangeRule {scsw}{sc} {scsw} {} \DeclareFontShapeChangeRule {scsw}{ulc} {sw} {} \DeclareFontShapeChangeRule {scsw}{up} {sc} {} \DeclareFontShapeChangeRule {sw}{sc} {scsw} {} \DeclareFontShapeChangeRule {sw}{ulc} {sw} {} \DeclareFontShapeChangeRule {sw}{up} {n} {} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\DeclareFontShapeChangeRule}{Font shape change rules}% \let\DeclareFontShapeChangeRule\@undefined \let\ulcshape\@undefined \let\ulcdefault\@undefined \let\swshape\@undefined \let\swdefault\@undefined \let\sscshape\@undefined \let\sscdefault\@undefined \EndIncludeInRelease \IncludeInRelease{2021/06/01}% {\fontshape}{Font shape change}% \DeclareRobustCommand\fontshape[1] {\expandafter\def\expandafter\delayed@f@adjustment\expandafter {\delayed@f@adjustment\delayed@merge@font@shape{#1}}} \DeclareRobustCommand\fontshapeforce[1] {\expandafter\def\expandafter\delayed@f@adjustment\expandafter {\delayed@f@adjustment\edef\f@shape{#1}}} \EndIncludeInRelease \IncludeInRelease{2020/02/02}% {\fontshape}{Font shape change}% \DeclareRobustCommand\fontshape[1]{\merge@font@shape{#1}} \DeclareRobustCommand\fontshapeforce[1]{\edef\f@shape{#1}} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\fontshape}{Font shape change}% \DeclareRobustCommand\fontshape [1]{\edef\f@shape{#1}} \let\fontshapeforce\@undefined \EndIncludeInRelease \IncludeInRelease{2020/02/02}% {\merge@font@shape}{Font shape change rules}% \def\merge@font@shape#1{% \expandafter\expandafter\expandafter \merge@font@shape@ \csname shape@\f@shape @#1\endcsname {#1}% \@nil } \def\merge@font@shape@#1#2#3\@nil{% \def\reserved@a{#3}% \ifx\reserved@a\@empty \edef\f@shape{#2}% \else \edef\reserved@a{\f@encoding /\f@family /\f@series/#1}% \ifcsname \reserved@a\endcsname \edef\f@shape{#1}% \else \ifcsname \f@encoding /\f@family /\f@series/#2\endcsname \edef\f@shape{#2}% \@font@shape@subst@warning \else \edef\f@shape{#3}% \@font@shape@subst@warning \fi \fi \fi } \def\merge@font@shape@without@substitution#1{% \expandafter\expandafter\expandafter \merge@font@shape@without@substitution@ \csname shape@\f@shape @#1\endcsname {#1}% \@nil } \def\merge@font@shape@without@substitution@#1#2#3\@nil{% \def\reserved@a{#3}% \ifx\reserved@a\@empty \edef\f@shape{#2}% \else \edef\f@shape{#1}% \fi } \let\delayed@merge@font@shape\merge@font@shape@without@substitution \protected\def\normalshape {\not@math@alphabet\normalshape\relax \fontshape\shapedefault\selectfont}% \def\reinstall@nfss@defs{% \protected\def\upshape {\not@math@alphabet\upshape\relax \fontshape\updefault\selectfont}% \protected\def\slshape {\not@math@alphabet\slshape\relax \fontshape\sldefault\selectfont}% \protected\def\scshape {\not@math@alphabet\scshape\relax \fontshape\scdefault\selectfont}% \protected\def\itshape {\not@math@alphabet\itshape\mathit \fontshape\itdefault\selectfont}% \protected\def\ulcshape {\not@math@alphabet\ulcshape\relax \fontshape{ulc}\selectfont}% \protected\def\swshape {\not@math@alphabet\swshape\relax \fontshape\swdefault\selectfont}% \protected\def\sscshape {\not@math@alphabet\sscshape\relax \fontshape\sscdefault\selectfont}% } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\merge@font@shape}{Font shape change rules}% \DeclareRobustCommand\fontshape [1]{\edef\f@shape{#1}} \let\fontshapeforce\@undefined \let\merge@font@shape\@undefined \let\merge@font@shape@\@undefined \let\merge@font@shape@without@substitution\@undefined \let\merge@font@shape@without@substitution@\@undefined \let\delayed@merge@font@shape\@undefined \let\normalshape\@undefined \let\reinstall@nfss@defs\relax \EndIncludeInRelease \IncludeInRelease{2020/10/01}% {\reinstall@nfss@defs}{NFSS series init}% \g@addto@macro\@kernel@after@begindocument@before {\reinstall@nfss@defs\init@series@setup} \EndIncludeInRelease \IncludeInRelease{2020/02/02}% {\reinstall@nfss@defs}{NFSS series init}% \AtBeginDocument{\reinstall@nfss@defs\init@series@setup} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\reinstall@nfss@defs}{NFSS series init}% \EndIncludeInRelease %%% From File: ltfsstrc.dtx %% Copyright (C) 1989-97 by Frank Mittelbach and Rainer Sch\"opf. %% Copyright (C) 1994-97 by LaTeX Project. All rights reserved. \IncludeInRelease{2021/06/01}% {\selectfont}{Add hook to \selectfont}% \DeclareRobustCommand\selectfont {% \ifx\f@linespread\baselinestretch \else \set@fontsize\baselinestretch\f@size\f@baselineskip \fi \ifx\delayed@f@adjustment\@empty \else \let\f@shape@saved\f@shape \let\f@series@saved\f@series \delayed@f@adjustment \maybe@load@fontshape \ifcsname \f@encoding/\f@family/\f@series/\f@shape \endcsname \else \let\f@shape\f@shape@saved \let\f@series\f@series@saved \let\delayed@merge@font@shape\merge@font@shape \let\delayed@merge@font@series\merge@font@series \delayed@f@adjustment \let\delayed@merge@font@shape\merge@font@shape@without@substitution \let\delayed@merge@font@series\merge@font@series@without@substitution \fi \let\delayed@f@adjustment\@empty \fi \@forced@seriesfalse \xdef\font@name{% \csname\curr@fontshape/\f@size\endcsname}% \pickup@font \font@name \UseHook{selectfont}% \size@update \enc@update } \NewHook{selectfont} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\selectfont}{Add hook to \selectfont}% \DeclareRobustCommand\selectfont {% \ifx\f@linespread\baselinestretch \else \set@fontsize\baselinestretch\f@size\f@baselineskip \fi \xdef\font@name{% \csname\curr@fontshape/\f@size\endcsname}% \pickup@font \font@name \size@update \enc@update } \EndIncludeInRelease \IncludeInRelease{2020/02/02}% {\@font@aliasinfo}{alias size function}% \DeclareSizeFunction{alias}{\sub@sfcnt\@font@aliasinfo} \def\@font@aliasinfo#1{% \@font@info{Font\space shape\space `\curr@fontshape'\space aliased\space to\MessageBreak `\mandatory@arg'}% } \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@font@aliasinfo}{alias size function}% \let\s@fct@alias\@undefined \let\@font@aliasinfo\@undefined \EndIncludeInRelease %%% From File: ltfssdcl.dtx %% Copyright (C) 1989-1998 Frank Mittelbach and Rainer Sch\"opf, %% all rights reserved. \IncludeInRelease{2015/01/01} {\select@group}{\select@group}% \def\select@group#1#2#3#4{% \ifx\math@bgroup\bgroup\else\relax\expandafter\@firstofone\fi {% \ifmmode \ifnum\csname c@mv@\math@version\endcsname<\e@mathgroup@top \begingroup \escapechar\m@ne \getanddefine@fonts{\csname c@mv@\math@version\endcsname}#3% \globaldefs\@ne \math@fonts \endgroup \init@restore@version \xdef#1{\noexpand\use@mathgroup\noexpand#2% {\number\csname c@mv@\math@version\endcsname}}% \global\advance\csname c@mv@\math@version\endcsname\@ne \else \let#1\relax \@latex@error{Too many math alphabets used in version \math@version}% \@eha \fi \else \expandafter\non@alpherr\fi #1{#4}% }% } \EndIncludeInRelease \IncludeInRelease{0000/00/00} {\select@group}{\select@group}% \def\select@group#1#2#3#4{% \ifx\math@bgroup\bgroup\else\relax\expandafter\@firstofone\fi {% \ifmmode \ifnum\csname c@mv@\math@version\endcsname<\sixt@@n \begingroup \escapechar\m@ne \getanddefine@fonts {\csname c@mv@\math@version\endcsname}#3% \globaldefs\@ne \math@fonts \endgroup \init@restore@version \xdef#1{\noexpand\use@mathgroup\noexpand#2% {\number\csname c@mv@\math@version\endcsname}}% \global\advance\csname c@mv@\math@version\endcsname\@ne \else \let#1\relax \@latex@error{Too many math alphabets used in version \math@version}% \@eha \fi \else \expandafter\non@alpherr\fi #1{#4}% }% } \EndIncludeInRelease \IncludeInRelease{2021/11/15} {\document@select@group}{\document@select@group}% \ifx\c@localmathalphabets\@undefined \newcount\c@localmathalphabets \setcounter{localmathalphabets}{2} \fi \def\document@select@group#1#2#3#4{% \ifx\math@bgroup\bgroup\else\relax\expandafter\@firstofone\fi {% \ifmmode \ifnum\csname c@mv@\math@version\endcsname<\e@mathgroup@top \ifnum \numexpr\e@mathgroup@top-\c@localmathalphabets >\csname c@mv@\math@version\endcsname \else \ifcsname mv@\math@version @frozen\endcsname \else \expandafter\freeze@math@version\expandafter{\math@version}% \fi \fi \begingroup \escapechar\m@ne \getanddefine@fonts{\csname c@mv@\math@version\endcsname}#3% \globaldefs\@ne \math@fonts \endgroup \expandafter\extract@alph@from@version \csname mv@\math@version\expandafter\endcsname \expandafter{\number\csname c@mv@\math@version\endcsname}% #1% \global\advance\csname c@mv@\math@version\endcsname\@ne \else \let#1\relax \@latex@error{Too many math alphabets used in version \math@version}% \@eha \fi \else \expandafter\expandafter\expandafter\non@alpherr\fi \expandafter#1\ifx\math@bgroup\bgroup{#4}\else#4\fi }% } \EndIncludeInRelease \IncludeInRelease{2020/10/01} {\document@select@group}{\document@select@group}% \def\document@select@group#1#2#3#4{% \ifx\math@bgroup\bgroup\else\relax\expandafter\@firstofone\fi {% \ifmmode \ifnum\csname c@mv@\math@version\endcsname<\e@mathgroup@top \begingroup \escapechar\m@ne \getanddefine@fonts{\csname c@mv@\math@version\endcsname}#3% \globaldefs\@ne \math@fonts \endgroup \expandafter\extract@alph@from@version \csname mv@\math@version\expandafter\endcsname \expandafter{\number\csname c@mv@\math@version\endcsname}% #1% \global\advance\csname c@mv@\math@version\endcsname\@ne \else \let#1\relax \@latex@error{Too many math alphabets used in version \math@version}% \@eha \fi \else \expandafter\expandafter\expandafter\non@alpherr\fi \expandafter#1\ifx\math@bgroup\bgroup{#4}\else#4\fi }% } \EndIncludeInRelease \IncludeInRelease{2015/01/01} {\document@select@group}{\document@select@group}% \def\document@select@group#1#2#3#4{% \ifx\math@bgroup\bgroup\else\relax\expandafter\@firstofone\fi {% \ifmmode \ifnum\csname c@mv@\math@version\endcsname<\e@mathgroup@top \begingroup \escapechar\m@ne \getanddefine@fonts{\csname c@mv@\math@version\endcsname}#3% \globaldefs\@ne \math@fonts \endgroup \expandafter\extract@alph@from@version \csname mv@\math@version\expandafter\endcsname \expandafter{\number\csname c@mv@\math@version\endcsname}% #1% \global\advance\csname c@mv@\math@version\endcsname\@ne \else \let#1\relax \@latex@error{Too many math alphabets used in version \math@version}% \@eha \fi \else \expandafter\non@alpherr\fi #1{#4}% }% } \EndIncludeInRelease \IncludeInRelease{0000/00/00} {\document@select@group}{\document@select@group}% \def\document@select@group#1#2#3#4{% \ifx\math@bgroup\bgroup\else\relax\expandafter\@firstofone\fi {% \ifmmode \ifnum\csname c@mv@\math@version\endcsname<\sixt@@n \begingroup \escapechar\m@ne \getanddefine@fonts {\csname c@mv@\math@version\endcsname}#3% \globaldefs\@ne \math@fonts \endgroup \expandafter\extract@alph@from@version \csname mv@\math@version\expandafter\endcsname \expandafter{\number\csname c@mv@\math@version\endcsname}% #1% \global\advance\csname c@mv@\math@version\endcsname\@ne \else \let#1\relax \@latex@error{Too many math alphabets used in version \math@version}% \@eha \fi \else \expandafter\non@alpherr\fi #1{#4}% }% } \EndIncludeInRelease \IncludeInRelease{2022/11/01}% {\freeze@math@version}{freeze math version}% \ExplSyntaxOn \cs_new_protected:Npn\freeze@math@version #1 { \@font@info{Freeze~ math~ alphabet~ allocation~ in~ version~ #1.\MessageBreak Allocated~math~groups:~\int_use:c{ c@mv@ #1 }~ (local:~ \int_use:N\c@localmathalphabets) } \cs_gset_eq:cc { mv@#1@frozen }{ mv@#1 } \tl_gset:cx { g__nfss_frozen_mv_ #1 _tl }{ \int_use:c { c@mv@#1 } } \cs_gset:cpn{mv@#1@reset} { \int_compare:nNnTF { \int_use:c{c@mv@#1} } > { \tl_use:c{g__nfss_frozen_mv_ #1 _tl} } { \@font@info{Undo~ math~ alphabet~ allocation~ in~ version~ #1} \cs_gset_eq:cc { mv@#1 }{ mv@#1@frozen } \int_gset:cn { c@mv@#1 }{ \tl_use:c {g__nfss_frozen_mv_ #1 _tl} } \group_begin: \cs_set_eq:NN \getanddefine@fonts \use_none:nn \use:c {mv@#1} \group_end: } { \@font@info{No~ math~ alphabet~ change~ to~ frozen~ version~ #1} } \if@ignore \ignorespaces \fi } } \ExplSyntaxOff \EndIncludeInRelease \IncludeInRelease{2021/11/15} {\freeze@math@version}{freeze math version}% \ExplSyntaxOn \cs_set_protected:Npn\freeze@math@version #1 { \@font@info{Freeze~ math~ alphabet~ allocation~ in~ version~ #1.\MessageBreak Allocated~math~groups:~\int_use:c{ c@mv@ #1 }~ (local:~ \int_use:N\c@localmathalphabets) } \cs_gset_eq:cc { mv@#1@frozen }{ mv@#1 } \tl_gset:cx { g__nfss_frozen_mv_ #1 _tl }{ \int_use:c { c@mv@#1 } } \group_insert_after:N \__nfss_init_mv_freeze:N \exp_after:wN \group_insert_after:N \cs:w mv@#1@reset \cs_end: \tl_gput_right:No \check@mathfonts { \exp_after:wN \group_insert_after:N \cs:w mv@#1@reset \cs_end: } \cs_gset:cpn{mv@#1@reset} { \int_compare:nNnTF { \int_use:c{c@mv@#1} } > { \tl_use:c{g__nfss_frozen_mv_ #1 _tl} } { \@font@info{Undo~ math~ alphabet~ allocation~ in~ version~ #1} \cs_gset_eq:cc { mv@#1 }{ mv@#1@frozen } \int_gset:cn { c@mv@#1 }{ \tl_use:c {g__nfss_frozen_mv_ #1 _tl} } \group_begin: \cs_set_eq:NN \getanddefine@fonts \use_none:nn \use:c {mv@#1} \group_end: } { \@font@info{No~ math~ alphabet~ change~ to~ frozen~ version~ #1} } \if@ignore \ignorespaces \fi } } \cs_set_protected:Npn \__nfss_init_mv_freeze:N #1 {% \mode_if_math:T { \group_insert_after:N \__nfss_init_mv_freeze:N \group_insert_after:N } #1 } \ExplSyntaxOff \EndIncludeInRelease \IncludeInRelease{2022/11/01}% {\DeclareMathVersion}{local alphabets}% \def\DeclareMathVersion#1{% \@namedef{g__nfss_frozen_mv_#1_tl}{}% \expandafter\ifx\csname mv@#1\endcsname \relax \expandafter \g@addto@macro \expandafter \check@mathfonts \expandafter {\expandafter \aftergroup \csname mv@#1@reset\endcsname}% \@namedef{mv@#1@reset}{}% \fi \expandafter\new@mathversion\csname mv@#1\endcsname} \@onlypreamble\DeclareMathVersion \EndIncludeInRelease \IncludeInRelease{2021/11/15}% {\DeclareMathVersion}{local alphabets}% \def\DeclareMathVersion#1{% \@namedef{g__nfss_frozen_mv_#1_tl}{}% \expandafter\new@mathversion\csname mv@#1\endcsname} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\DeclareMathVersion}{local alphabets}% \def\DeclareMathVersion#1{% \expandafter\new@mathversion\csname mv@#1\endcsname} \EndIncludeInRelease \IncludeInRelease{2022/11/01}% {\DeclareSymbolFont}{maybe drop m}% \def\DeclareSymbolFont #1#2#3#4#5{% \def\reserved@a{\DeclareSymbolFont@m@dropped{#1}{#2}{#3}}% \edef\reserved@b{#4}% \series@maybe@drop@one@m\reserved@b\reserved@b \expandafter\reserved@a\expandafter{\reserved@b}{#5}% } \def\DeclareSymbolFont@m@dropped #1#2#3#4#5{% \@tempswafalse \edef\reserved@b{#2}% \def\cdp@elt##1##2##3##4{\def\reserved@c{##1}% \ifx\reserved@b\reserved@c \@tempswatrue\fi}% \cdp@list \if@tempswa \@ifundefined{sym#1}{% \ifnum\count18<15 % \expandafter\new@mathgroup\csname sym#1\endcsname \expandafter\new@symbolfont\csname sym#1\endcsname {#2}{#3}{#4}{#5}% \else \@latex@error{Too many symbol fonts declared}\@eha \fi }% {% \@font@info{Redeclaring symbol font `#1'}% \def\group@elt##1##2{% \noexpand\group@elt\noexpand##1% \expandafter\ifx\csname sym#1\endcsname##1% \expandafter\noexpand\csname#2/#3/#4/#5\endcsname \else \noexpand##2% \fi}% \xdef\group@list{\group@list}% \def\version@elt##1{% \expandafter \SetSymbolFont@\expandafter##1\csname#2/#3/#4/#5\expandafter \endcsname \csname sym#1\endcsname }% \version@list }% \else \@latex@error{Encoding scheme `#2' unknown}\@eha \fi } \@onlypreamble\DeclareSymbolFont \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\DeclareSymbolFont}{maybe drop m}% \let\DeclareSymbolFont\DeclareSymbolFont@m@dropped \let\DeclareSymbolFont@m@dropped\@undefined \EndIncludeInRelease \IncludeInRelease{2022/11/01}% {\SetSymbolFont}{maybe drop m}% \def\SetSymbolFont #1#2#3#4#5#6{% \def\reserved@a{\SetSymbolFont@m@dropped{#1}{#2}{#3}{#4}}% \edef\reserved@b{#5}% \series@maybe@drop@one@m\reserved@b\reserved@b \expandafter\reserved@a\expandafter{\reserved@b}{#6}% } \def\SetSymbolFont@m@dropped#1#2#3#4#5#6{% \@tempswafalse \edef\reserved@b{#3}% \def\cdp@elt##1##2##3##4{\def\reserved@c{##1}% \ifx\reserved@b\reserved@c \@tempswatrue\fi}% \cdp@list \if@tempswa \expandafter\SetSymbolFont@ \csname mv@#2\expandafter\endcsname\csname#3/#4/#5/#6\expandafter \endcsname \csname sym#1\endcsname \else \@latex@error{Encoding scheme `#3' unknown}\@eha \fi } \@onlypreamble\SetSymbolFont \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\SetSymbolFont}{maybe drop m}% \let\SetSymbolFont\SetSymbolFont@m@dropped \let\SetSymbolFont@m@dropped\@undefined \EndIncludeInRelease \IncludeInRelease{2019/10/01}% {DeclareMathAccent}{Make math accents robust}% \def\DeclareMathAccent#1#2#3#4{% \expandafter\in@\csname sym#3\expandafter\endcsname \expandafter{\group@list}% \ifin@ \begingroup \count\z@=#4\relax \count\tw@\count\z@ \divide\count\z@\sixt@@n \count@\count\z@ \multiply\count@\sixt@@n \advance\count\tw@-\count@ \if\relax\noexpand#1% is command? \edef\reserved@a{\noexpand\in@ {\expandafter\@gobble\string\mathaccent} {\expandafter\meaning \csname\expandafter\@gobble\string#1\space\endcsname}}% \reserved@a \ifin@ \expandafter\let \csname\expandafter\@gobble\string#1\space\endcsname \@undefined \expandafter\set@mathaccent \csname sym#3\endcsname#1#2% {\hexnumber@{\count\z@}\hexnumber@{\count\tw@}}% \@font@info{Redeclaring math accent \string#1}% \else \expandafter\ifx \csname\expandafter\@gobble\string#1\endcsname \relax \expandafter\set@mathaccent \csname sym#3\endcsname#1#2% {\hexnumber@{\count\z@}\hexnumber@{\count\tw@}}% \else \@latex@error{Command `\string#1' already defined}\@eha \fi \fi \else \@latex@error{Not a command name: `\noexpand#1'}\@eha \fi \endgroup \else \@latex@error{Symbol font `#3' is not defined}\@eha \fi } \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {DeclareMathAccent}{Make math accents robust}% \def\DeclareMathAccent#1#2#3#4{% \expandafter\in@\csname sym#3\expandafter\endcsname \expandafter{\group@list}% \ifin@ \begingroup \count\z@=#4\relax \count\tw@\count\z@ \divide\count\z@\sixt@@n \count@\count\z@ \multiply\count@\sixt@@n \advance\count\tw@-\count@ \if\relax\noexpand#1% is command? \edef\reserved@a{\noexpand\in@ {\expandafter\@gobble\string\mathaccent}{\meaning#1}}% \reserved@a \ifin@ \expandafter\set@mathaccent \csname sym#3\endcsname#1#2% {\hexnumber@{\count\z@}\hexnumber@{\count\tw@}}% \@font@info{Redeclaring math accent \string#1}% \else \expandafter\ifx \csname\expandafter\@gobble\string#1\endcsname \relax \expandafter\set@mathaccent \csname sym#3\endcsname#1#2% {\hexnumber@{\count\z@}\hexnumber@{\count\tw@}}% \else \@latex@error{Command `\string#1' already defined}\@eha \fi \fi \else \@latex@error{Not a command name: `\noexpand#1'}\@eha \fi \endgroup \else \@latex@error{Symbol font `#3' is not defined}\@eha \fi } \EndIncludeInRelease \IncludeInRelease{2019/10/01}% {\set@mathaccent}{makemath accents robust}% \def\set@mathaccent#1#2#3#4{% \xdef#2{\mathaccent"\mathchar@type#3\hexnumber@#1#4\relax}% \MakeRobust#2% } \@onlypreamble\set@mathaccent \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\set@mathaccent}{makemath accents robust}% \def\set@mathaccent#1#2#3#4{% \xdef#2{\mathaccent"\mathchar@type#3\hexnumber@#1#4\relax}} \EndIncludeInRelease \IncludeInRelease{2019/10/01}% {\set@mathdelimiter}{make delimiters robust}% \def\set@mathdelimiter#1#2#3#4#5#6{% \protected \xdef#3{\delimiter"\mathchar@type#4\hexnumber@#1#5% \hexnumber@#2#6 }% } \@onlypreamble\set@mathdelimiter \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\set@mathdelimiter}{make delimiters robust}% \def\set@mathdelimiter#1#2#3#4#5#6{% \xdef#3{\delimiter"\mathchar@type#4\hexnumber@#1#5% \hexnumber@#2#6 }} \EndIncludeInRelease %%% From File: ltfssini.dtx %% Copyright (C) 1989-2001 Frank Mittelbach and Rainer Sch\"opf, %% all rights reserved. \IncludeInRelease{2021/11/15}% {\DeclareFontSeriesDefault}{Custom series}% \let\DeclareFontSeriesDefault\@undefined % for rollback \newcommand\DeclareFontSeriesDefault[3][]{% \expand@font@defaults \maybe@update@bfseries@defaults \maybe@update@mdseries@defaults \def\reserved@a{#1}% \ifx\reserved@a\@empty \ifcsname #2series\endcsname % supported are % \[md/bf]default \expandafter\def \csname #2default\endcsname{#3\@empty}% \expandafter\def \csname #2default@previous\endcsname{#3\@empty}% \else \@latex@error{Wrong syntax for \string\DeclareFontSeriesDefault}% {Mandatory first argument must be 'md' or 'bf'.} \fi \else \ifcsname #2series@#1\endcsname % supported are % \[md/bf]series@[rm/sf/tt] \expandafter\edef \csname #2series@#1\endcsname{#3}% \expandafter\let \csname #2series@#1@kernel\endcsname\@undefined \else \@latex@error{Wrong syntax for \string\DeclareFontSeriesDefault}% {Optional argument must be 'rm', 'sf', or 'tt'. \MessageBreak Mandatory first argument must be 'md' or 'bf'.} \fi \fi } \EndIncludeInRelease \IncludeInRelease{2020/02/02}% {\DeclareFontSeriesDefault}{Custom series}% \let\DeclareFontSeriesDefault\@undefined % for rollback \newcommand\DeclareFontSeriesDefault[3][]{% \def\reserved@a{#1}% \ifx\reserved@a\@empty \ifcsname #2series\endcsname % supported are % \[md/bf]default \expandafter\def \csname #2default\endcsname{#3\@empty}% \expandafter\def \csname #2default@previous\endcsname{#3\@empty}% \else \@latex@error{Wrong syntax for \string\DeclareFontSeriesDefault}% {Mandatory first argument must be 'md' or 'bf'.} \fi \else \ifcsname #2series@#1\endcsname % supported are % \[md/bf]series@[rm/sf/tt] \expandafter\edef \csname #2series@#1\endcsname{#3}% \expandafter\let \csname #2series@#1@kernel\endcsname\@undefined \else \@latex@error{Wrong syntax for \string\DeclareFontSeriesDefault}% {Optional argument must be 'rm', 'sf', or 'tt'. \MessageBreak Mandatory first argument must be 'md' or 'bf'.} \fi \fi } \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\DeclareFontSeriesDefault}{Custom series}% \let\DeclareFontSeriesDefault\@undefined \let\bfseries@rm\@undefined \let\bfseries@sf\@undefined \let\bfseries@tt\@undefined \let\bfseries@rm@kernel\@undefined \let\bfseries@sf@kernel\@undefined \let\bfseries@tt@kernel\@undefined \let\mdseries@rm\@undefined \let\mdseries@sf\@undefined \let\mdseries@tt\@undefined \expandafter\let\csname ver@mweights.sty\endcsname\@undefined \let\@meta@family@list\@undefined \let\prepare@family@series@update\@undefined \let\update@series@target@value\@undefined \let\init@series@setup\relax \EndIncludeInRelease \IncludeInRelease{2020/02/02}% {\mdseries@rm}{Custom series}% \def\bfseries@rm{bx} \def\bfseries@sf{bx} \def\bfseries@tt{bx} \let\bfseries@rm@kernel\bfseries@rm \let\bfseries@sf@kernel\bfseries@sf \let\bfseries@tt@kernel\bfseries@tt \def\mdseries@rm{m} \def\mdseries@sf{m} \def\mdseries@tt{m} \def\@meta@family@list{\@elt{rm}\@elt{sf}\@elt{tt}} \def\prepare@family@series@update#1#2{% \if@forced@series \fontfamily#2% \else \expand@font@defaults \let\target@series@value\@empty \def\target@meta@family@value{#1}% \expandafter\edef\csname ??def@ult\endcsname{\f@family}% \let\@elt\update@series@target@value \@meta@family@list \@elt{??}% \let\@elt\relax \fontfamily#2% \ifx\target@series@value\@empty \else \ifx \f@series\target@series@value \else \maybe@load@fontshape \series@maybe@drop@one@m\target@series@value\f@series \fi \fi \fi } \def\update@series@target@value#1{% \def\reserved@a{#1}% \ifx\target@meta@family@value\reserved@a % rm -> rm do nothing \else \expandafter\ifx\csname#1def@ult\endcsname\f@family \let\@elt\@gobble \expandafter\let\expandafter\reserved@b \csname mdseries@\target@meta@family@value\endcsname \expandafter\let\expandafter\reserved@c \csname bfseries@\target@meta@family@value\endcsname \expandafter\series@maybe@drop@one@m \csname mdseries@#1\endcsname\reserved@d \ifx\reserved@d\f@series \let\target@series@value\reserved@b \else \expandafter\series@maybe@drop@one@m \csname bfseries@#1\endcsname\reserved@d \ifx\reserved@d\f@series \let\target@series@value\reserved@c \else\ifx\f@series\mddef@ult \let\target@series@value\reserved@b \else\ifx\f@series\bfdef@ult \let\target@series@value\reserved@c \fi\fi\fi\fi \fi \fi } \def\init@series@setup{% \ifx\bfseries@rm@kernel\bfseries@rm \expandafter\in@\expandafter{\rmdefault}% {cmr,cmss,cmtt,lcmss,lcmtt,lmr,lmss,lmtt}% \ifin@ \else \def\bfseries@rm{b}\fi\fi \ifx\bfseries@sf@kernel\bfseries@sf \expandafter\in@\expandafter{\sfdefault}% {cmr,cmss,cmtt,lcmss,lcmtt,lmr,lmss,lmtt}% \ifin@ \else \def\bfseries@sf{b}\fi\fi \ifx\bfseries@tt@kernel\bfseries@tt \expandafter\in@\expandafter{\ttdefault}% {cmr,cmss,cmtt,lcmss,lcmtt,lmr,lmss,lmtt}% \ifin@ \else \def\bfseries@tt{b}\fi\fi \reset@font \ifx\seriesdefault\seriesdefault@kernel \mdseries \let\seriesdefault\f@series \fi }% \expandafter\let\csname ver@mweights.sty\endcsname\fmtversion \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\mdseries@rm}{Custom series}% \let\bfseries@rm\@undefined \let\bfseries@sf\@undefined \let\bfseries@tt\@undefined \let\bfseries@rm@kernel\@undefined \let\bfseries@sf@kernel\@undefined \let\bfseries@tt@kernel\@undefined \let\mdseries@rm\@undefined \let\mdseries@sf\@undefined \let\mdseries@tt\@undefined \expandafter\let\csname ver@mweights.sty\endcsname\@undefined \let\@meta@family@list\@undefined \let\prepare@family@series@update\@undefined \let\update@series@target@value\@undefined \let\init@series@setup\relax \EndIncludeInRelease \IncludeInRelease{2021/11/15}% {\bfseries}{Custom series with hooks}% \DeclareRobustCommand\bfseries{% \not@math@alphabet\bfseries\mathbf \expand@font@defaults \maybe@update@bfseries@defaults \ifx\f@family\rmdef@ult \fontseries\bfseries@rm \else\ifx\f@family\sfdef@ult \fontseries\bfseries@sf \else\ifx\f@family\ttdef@ult \fontseries\bfseries@tt \else \fontseries\bfdefault \fi\fi\fi \UseHook{bfseries}% \selectfont } \def\maybe@update@bfseries@defaults{% \ifx\bfdefault\bfdefault@previous\else \expandafter\def\expandafter\bfdefault \expandafter{\bfdefault\@empty}% \let\bfdefault@previous\bfdefault \let\bfseries@rm\bfdef@ult \let\bfseries@sf\bfdef@ult \let\bfseries@tt\bfdef@ult \UseHook{bfseries/defaults}% \fi } \DeclareRobustCommand\mdseries{% \not@math@alphabet\mdseries\relax \expand@font@defaults \maybe@update@mdseries@defaults \ifx\f@family\rmdef@ult \fontseries\mdseries@rm \else\ifx\f@family\sfdef@ult \fontseries\mdseries@sf \else\ifx\f@family\ttdef@ult \fontseries\mdseries@tt \else \fontseries\mddefault \fi\fi\fi \UseHook{mdseries}% \selectfont } \def\maybe@update@mdseries@defaults{% \ifx\mddefault\mddefault@previous\else \expandafter\def\expandafter\mddefault\expandafter{\mddefault\@empty}% \let\mddefault@previous\mddefault \let\mdseries@rm\mddef@ult \let\mdseries@sf\mddef@ult \let\mdseries@tt\mddef@ult \UseHook{mdseries/defaults}% \fi } \EndIncludeInRelease \IncludeInRelease{2020/10/01}% {\bfseries}{Custom series with hooks}% \let\maybe@update@bfseries@defaults\@undefined \let\maybe@update@mdseries@defaults\@undefined \DeclareRobustCommand\bfseries{% \not@math@alphabet\bfseries\mathbf \expand@font@defaults \ifx\bfdefault\bfdefault@previous\else \expandafter\def\expandafter\bfdefault \expandafter{\bfdefault\@empty}% \let\bfdefault@previous\bfdefault \let\bfseries@rm\bfdef@ult \let\bfseries@sf\bfdef@ult \let\bfseries@tt\bfdef@ult \UseHook{bfseries/defaults}% \fi \ifx\f@family\rmdef@ult \fontseries\bfseries@rm \else\ifx\f@family\sfdef@ult \fontseries\bfseries@sf \else\ifx\f@family\ttdef@ult \fontseries\bfseries@tt \else \fontseries\bfdefault \fi\fi\fi \UseHook{bfseries}% \selectfont } \DeclareRobustCommand\mdseries{% \not@math@alphabet\mdseries\relax \expand@font@defaults \ifx\mddefault\mddefault@previous\else \expandafter\def\expandafter\mddefault\expandafter{\mddefault\@empty}% \let\mddefault@previous\mddefault \let\mdseries@rm\mddef@ult \let\mdseries@sf\mddef@ult \let\mdseries@tt\mddef@ult \UseHook{mdseries/defaults}% \fi \ifx\f@family\rmdef@ult \fontseries\mdseries@rm \else\ifx\f@family\sfdef@ult \fontseries\mdseries@sf \else\ifx\f@family\ttdef@ult \fontseries\mdseries@tt \else \fontseries\mddefault \fi\fi\fi \UseHook{mdseries}% \selectfont } \EndIncludeInRelease \IncludeInRelease{2020/02/02}% {\bfseries}{Custom series with hooks}% \DeclareRobustCommand\bfseries{% \not@math@alphabet\bfseries\mathbf \expand@font@defaults \ifx\f@family\rmdef@ult \fontseries\bfseries@rm \else\ifx\f@family\sfdef@ult \fontseries\bfseries@sf \else\ifx\f@family\ttdef@ult \fontseries\bfseries@tt \else \fontseries\bfdefault \fi\fi\fi \selectfont } \DeclareRobustCommand\mdseries{% \not@math@alphabet\mdseries\relax \expand@font@defaults \ifx\f@family\rmdef@ult \fontseries\mdseries@rm \else\ifx\f@family\sfdef@ult \fontseries\mdseries@sf \else\ifx\f@family\ttdef@ult \fontseries\mdseries@tt \else \fontseries\mddefault \fi\fi\fi \selectfont } \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\bfseries}{Custom series with hooks}% \DeclareRobustCommand\bfseries {\not@math@alphabet\bfseries\mathbf \fontseries\bfdefault\selectfont} \DeclareRobustCommand\mdseries {\not@math@alphabet\mdseries\relax \fontseries\mddefault\selectfont} \EndIncludeInRelease \IncludeInRelease{2020/10/01}% {\expand@font@defaults}{Custom series with hooks}% \def\expand@font@defaults{% \edef\rmdef@ult{\rmdefault}% \edef\sfdef@ult{\sfdefault}% \edef\ttdef@ult{\ttdefault}% \series@maybe@drop@one@m\bfdefault\bfdef@ult \series@maybe@drop@one@m\mddefault\mddef@ult \UseHook{expand@font@defaults}% } \DeclareRobustCommand\rmfamily{% \not@math@alphabet\rmfamily\mathrm \prepare@family@series@update{rm}\rmdefault \UseHook{rmfamily}% \selectfont} \DeclareRobustCommand\sffamily{% \not@math@alphabet\sffamily\mathsf \prepare@family@series@update{sf}\sfdefault \UseHook{sffamily}% \selectfont} \DeclareRobustCommand\ttfamily{% \not@math@alphabet\ttfamily\mathtt \prepare@family@series@update{tt}\ttdefault \UseHook{ttfamily}% \selectfont} \NewHook{rmfamily} \NewHook{sffamily} \NewHook{ttfamily} \NewHook{normalfont} \NewHook{expand@font@defaults} \NewHook{bfseries} \NewHook{bfseries/defaults} \NewHook{mdseries} \NewHook{mdseries/defaults} \let\@rmfamilyhook\@empty \let\@sffamilyhook\@empty \let\@ttfamilyhook\@empty \let\@defaultfamilyhook\@empty %FMi sort out \EndIncludeInRelease \IncludeInRelease{2020/02/02}% {\expand@font@defaults}{Custom series with hooks}% \def\expand@font@defaults{% \edef\rmdef@ult{\rmdefault}% \edef\sfdef@ult{\sfdefault}% \edef\ttdef@ult{\ttdefault}% \edef\bfdef@ult{\bfdefault}% \edef\mddef@ult{\mddefault}% \edef\famdef@ult{\familydefault}% } \DeclareRobustCommand\rmfamily{% \not@math@alphabet\rmfamily\mathrm \prepare@family@series@update{rm}\rmdefault \@rmfamilyhook \selectfont} \DeclareRobustCommand\sffamily{% \not@math@alphabet\sffamily\mathsf \prepare@family@series@update{sf}\sfdefault \@sffamilyhook \selectfont} \DeclareRobustCommand\ttfamily{% \not@math@alphabet\ttfamily\mathtt \prepare@family@series@update{tt}\ttdefault \@ttfamilyhook \selectfont} \let\@rmfamilyhook\@empty \let\@sffamilyhook\@empty \let\@ttfamilyhook\@empty \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\expand@font@defaults}{Custom series with hooks}% \let\expand@font@defaults\@undefined \DeclareRobustCommand\bfseries {\not@math@alphabet\bfseries\mathbf \fontseries\bfdefault\selectfont} \DeclareRobustCommand\mdseries {\not@math@alphabet\mdseries\relax \fontseries\mddefault\selectfont} \DeclareRobustCommand\rmfamily {\not@math@alphabet\rmfamily\mathrm \fontfamily\rmdefault\selectfont} \DeclareRobustCommand\sffamily {\not@math@alphabet\sffamily\mathsf \fontfamily\sfdefault\selectfont} \DeclareRobustCommand\ttfamily {\not@math@alphabet\ttfamily\mathtt \fontfamily\ttdefault\selectfont} \let\@rmfamilyhook\@undefined \let\@sffamilyhook\@undefined \let\@ttfamilyhook\@undefined \EndIncludeInRelease \IncludeInRelease{2020/10/01}% {\IfFontSeriesContextTF}{Font series context}% \DeclareRobustCommand\IfFontSeriesContextTF[1]{% \expand@font@defaults \@font@series@contextfalse \def\requested@test@context{#1}% \expandafter\edef\csname ??def@ult\endcsname{\f@family}% \let\@elt\test@font@series@context \@meta@family@list \@elt{??}% \let\@elt\relax \if@font@series@context \expandafter\@firstoftwo \else \expandafter\@secondoftwo \fi } \def\test@font@series@context#1{% \edef\reserved@a{\csname #1def@ult\endcsname}% \ifx\f@family\reserved@a \let\@elt\@gobble \expandafter\ifx \csname\requested@test@context series@#1\endcsname\f@series \@font@series@contexttrue \else \expandafter\ifx \csname\requested@test@context def@ult\endcsname\f@series \@font@series@contexttrue \fi\fi\fi } \newif\if@font@series@context \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\IfFontSeriesContextTF}{Font series context}% \let\IfFontSeriesContextTF\@undefined \let\test@font@series@context\@undefined \let\if@font@series@context\@undefined \let\@font@series@contexttrue\@undefined \let\@font@series@contextfalse\@undefined \EndIncludeInRelease \IncludeInRelease{2020/02/02}% {\DeclareEmphSequence}{Nested emph}% \def\DeclareEmphSequence#1{% \protected@edef\emfontdeclare@clist{\zap@space#1, \@empty\emforce\emreset}% } \let\emfontdeclare@clist\@empty \DeclareRobustCommand\emreset{\upshape\ulcshape} \DeclareRobustCommand\em{% \@nomath\em \ifx\emfontdeclare@clist\@empty \ifdim \fontdimen\@ne\font >\z@ \eminnershape \else \itshape \fi \else \edef\em@currfont{\csname\curr@fontshape/\f@size\endcsname}% \expandafter\do@emfont@update\emfontdeclare@clist\do@emfont@update \fi } \def\eminnershape{\upshape} \def\do@emfont@update#1,#2\do@emfont@update{% \def\emfontdeclare@clist{#2,#1}% #1\selectfont \expandafter\ifx\csname \curr@fontshape/\f@size\em@force \expandafter\endcsname \em@currfont \expandafter\do@emfont@update\emfontdeclare@clist\do@emfont@update \else \let\em@force\@empty \fi } \protected\def\emforce{\def\em@force{/}} \let\em@force\@empty \EndIncludeInRelease \IncludeInRelease{2015/01/01}{\DeclareEmphSequence}{Nested emph}% \let\DeclareEmphSequence\@undefined \let\emfontdeclare@clist\@undefined \let\emreset\@undefined \let\do@emfont@update\@undefined \let\emforce\@undefined \let\em@force\@undefined \DeclareRobustCommand\em {\@nomath\em \ifdim \fontdimen\@ne\font >\z@ \eminnershape \else \itshape \fi}% \EndIncludeInRelease \IncludeInRelease{0000/00/00}{\DeclareEmphSequence}{Nested emph}% \DeclareRobustCommand\em {\@nomath\em \ifdim \fontdimen\@ne\font >\z@ \upshape \else \itshape \fi}% \let\eminnershape\@undefined \EndIncludeInRelease \IncludeInRelease{2020/10/01}% {\symbol}{XeTeX change for math}% \ifdefined\XeTeXversion \DeclareRobustCommand\symbol[1]{\Ucharcat#1 12\relax} \else \DeclareRobustCommand\symbol[1]{\char#1\relax} \fi \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\symbol}{XeTeX change for math}% \DeclareRobustCommand\symbol[1]{\char#1\relax} \EndIncludeInRelease \IncludeInRelease{2021/06/01}% {\normalfont}{Add hook to \normalfont}% \DeclareRobustCommand\normalfont{% \fontencoding\encodingdefault \edef\f@family{\familydefault}% \edef\f@series{\seriesdefault}% \edef\f@shape{\shapedefault}% \let\delayed@f@adjustment\@empty \UseHook{normalfont}% \@defaultfamilyhook % hookname from 2020/02 will vanish \selectfont} \let\reset@font\normalfont \EndIncludeInRelease \IncludeInRelease{2020/10/01}% {\normalfont}{Add hook to \normalfont}% \DeclareRobustCommand\normalfont{% \fontencoding\encodingdefault \edef\f@family{\familydefault}% \edef\f@series{\seriesdefault}% \edef\f@shape{\shapedefault}% \UseHook{normalfont}% \@defaultfamilyhook % hookname from 2020/02 will vanish \selectfont} \let\reset@font\normalfont \EndIncludeInRelease \IncludeInRelease{2020/02/02}% {\normalfont}{Add hook to \normalfont}% \DeclareRobustCommand\normalfont{% \fontencoding\encodingdefault \edef\f@family{\familydefault}% \edef\f@series{\seriesdefault}% \edef\f@shape{\shapedefault}% \@defaultfamilyhook \selectfont} \let\reset@font\normalfont \let\@defaultfamilyhook\@empty \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\normalfont}{Add hook to \normalfont}% \DeclareRobustCommand\normalfont {\usefont\encodingdefault \familydefault \seriesdefault \shapedefault \relax} \let\reset@font\normalfont \let\@defaultfamilyhook\@undefined \EndIncludeInRelease %%% From File: fontdef.dtx \IncludeInRelease{2017/01/01}% {\encodingdefault}{TU encoding default}% \ifx\Umathcode\@undefined \renewcommand\encodingdefault{OT1} \fontencoding{\encodingdefault} \renewcommand\rmdefault{cmr} \fontfamily{\rmdefault} \renewcommand\sfdefault{cmss} \renewcommand\ttdefault{cmtt} \else \renewcommand\encodingdefault{TU} %done in everyjob\fontencoding{\encodingdefault} \renewcommand\rmdefault{lmr} \fontfamily{\rmdefault} \renewcommand\sfdefault{lmss} \renewcommand\ttdefault{lmtt} \fi \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\encodingdefault}{TU encoding default}% \fontencoding{OT1} \renewcommand\encodingdefault{OT1} \fontencoding{\encodingdefault} \renewcommand\rmdefault{cmr} \fontfamily{\rmdefault} \renewcommand\sfdefault{cmss} \renewcommand\ttdefault{cmtt} \EndIncludeInRelease \IncludeInRelease{2020/02/02}% {\updefault}{font defaults change}% \renewcommand\updefault{up} \renewcommand\bfdefault{b\@empty} \renewcommand\mddefault{m\@empty} \let\bfdefault@previous\bfdefault \let\mddefault@previous\mddefault \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\updefault}{font defaults change}% \renewcommand\updefault{n} \renewcommand\bfdefault{bx} \let\bfdefault@previous\undefined \let\mddefault@previous\undefined \EndIncludeInRelease \IncludeInRelease{2018/12/01}% {\Big}{Start LR-mode}% \DeclareRobustCommand\big[1]{\leavevmode@ifvmode {\hbox{$\left#1\vbox to8.5\p@{}\right.\n@space$}}} \DeclareRobustCommand\Big[1]{\leavevmode@ifvmode {\hbox{$\left#1\vbox to11.5\p@{}\right.\n@space$}}} \DeclareRobustCommand\bigg[1]{\leavevmode@ifvmode {\hbox{$\left#1\vbox to14.5\p@{}\right.\n@space$}}} \DeclareRobustCommand\Bigg[1]{\leavevmode@ifvmode {\hbox{$\left#1\vbox to17.5\p@{}\right.\n@space$}}} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\Big}{Start LR-mode}% \def\big#1{{\hbox{$\left#1\vbox to8.5\p@{}\right.\n@space$}}} \def\Big#1{{\hbox{$\left#1\vbox to11.5\p@{}\right.\n@space$}}} \def\bigg#1{{\hbox{$\left#1\vbox to14.5\p@{}\right.\n@space$}}} \def\Bigg#1{{\hbox{$\left#1\vbox to17.5\p@{}\right.\n@space$}}} \EndIncludeInRelease %%% From File: ltfntcmd.dtx %% \IncludeInRelease{2020/02/02}% {\textulc}{Additional text commands}% \DeclareTextFontCommand{\textulc}{\ulcshape} \DeclareTextFontCommand{\textsw}{\swshape} \DeclareTextFontCommand{\textssc}{\sscshape} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\textulc}{Additional text commands}% \let\textulc\@undefined \let\textsw\@undefined \let\textssc\@undefined \EndIncludeInRelease %%% From File: lttextcomp.dtx \NewModuleRelease{2020/02/02}{lttextcomp} {Text Companion symbols} \DeclareRobustCommand\legacyoldstylenums[1]{% \begingroup \spaceskip\fontdimen\tw@\font \usefont{OML}{\rmdefault}{\f@series}{it}% \mathgroup\symletters #1% \endgroup } \DeclareRobustCommand\oldstylenums[1]{% \begingroup \ifmmode \mathgroup\symletters #1% \else \CheckEncodingSubset\@use@text@encoding{TS1}\tc@oldstylesubst2{{#1}}% \fi \endgroup } \def\tc@oldstylesubst#1{% \tc@errorwarn {Oldstyle digits unavailable for family \f@family.\MessageBreak Default oldstyle digits used instead}\@eha \bgroup \expand@font@defaults \ifx\f@family\rmdef@ult \fontfamily\rmsubstdefault \else\ifx\f@family\sfdef@ult \fontfamily\sfsubstdefault \else\ifx\f@family\ttdef@ult \fontfamily\ttsubstdefault \else \fontfamily\textcompsubstdefault \fi\fi\fi \fontencoding{TS1}\selectfont#1% \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{% \tc@errorwarn {Symbol \string#1 not provided by\MessageBreak font family \f@family\space in TS1 encoding.\MessageBreak Default family used instead}\@eha \bgroup \expand@font@defaults \ifx\f@family\rmdef@ult \fontfamily\rmsubstdefault \else\ifx\f@family\sfdef@ult \fontfamily\sfsubstdefault \else\ifx\f@family\ttdef@ult \fontfamily\ttsubstdefault \else \fontfamily\textcompsubstdefault \fi\fi\fi \@namedef{TS1:\f@family}{0}% \selectfont#1% \egroup } \def\tc@fake@euro#1{% \leavevmode \@font@info{Faking \noexpand#1for font family \f@family\MessageBreak in TS1 encoding}% \valign{##\cr \vfil\hbox to 0.07em{\dimen@\f@size\p@ \math@fontsfalse \fontsize{.7\dimen@}\z@\selectfont=\hss}% \vfil\cr% \hbox{C}\crcr }% } \def\tc@check@symbol{\CheckEncodingSubset\UseTextSymbol{TS1}\tc@subst} \def\tc@check@accent#1{\CheckEncodingSubset\UseTextAccent {TS1}{\tc@swap@accent#1}} \def\tc@swap@accent#1#2{\UseTextAccent{T1}#1} \DeclareTextSymbolDefault{\textdollar}{TS1} \UndeclareTextCommand{\textdollar}{OT1} % don't use the OT1 def any longer \DeclareTextSymbolDefault{\textsterling}{TS1} \UndeclareTextCommand{\textsterling}{OT1}% don't use the OT1 def any longer \DeclareTextSymbolDefault{\textperthousand}{TS1} \UndeclareTextCommand{\textperthousand}{T1} % don't use the T1 def \DeclareTextSymbolDefault{\textasteriskcentered}{TS1} \DeclareTextSymbolDefault{\textbullet}{TS1} \DeclareTextSymbolDefault{\textdaggerdbl}{TS1} \DeclareTextSymbolDefault{\textdagger}{TS1} \DeclareTextSymbolDefault{\textparagraph}{TS1} \DeclareTextSymbolDefault{\textperiodcentered}{TS1} \DeclareTextSymbolDefault{\textsection}{TS1} %%\DeclareTextSymbolDefault{\textbardbl}{TS1} % subst in sub-enc 9 above \DeclareTextSymbolDefault{\textbrokenbar}{TS1} %%\DeclareTextSymbolDefault{\textcelsius}{TS1} % subst in sub-enc 9 above \DeclareTextSymbolDefault{\textcent}{TS1} \DeclareTextSymbolDefault{\textcopyright}{TS1} \DeclareTextSymbolDefault{\textdegree}{TS1} \DeclareTextSymbolDefault{\textdiv}{TS1} \DeclareTextSymbolDefault{\textlnot}{TS1} \DeclareTextSymbolDefault{\textonehalf}{TS1} \DeclareTextSymbolDefault{\textonequarter}{TS1} %%\DeclareTextSymbolDefault{\textonesuperior}{TS1} % subst in sub-enc 9 above \DeclareTextSymbolDefault{\textordfeminine}{TS1} \DeclareTextSymbolDefault{\textordmasculine}{TS1} \DeclareTextSymbolDefault{\textpm}{TS1} \DeclareTextSymbolDefault{\textquotesingle}{TS1} \DeclareTextSymbolDefault{\textquotestraightbase}{TS1} \DeclareTextSymbolDefault{\textquotestraightdblbase}{TS1} \DeclareTextSymbolDefault{\textregistered}{TS1} %%\DeclareTextSymbolDefault{\textthreequartersemdash}{TS1} % subst in sub-enc 9 above \DeclareTextSymbolDefault{\textthreequarters}{TS1} %%\DeclareTextSymbolDefault{\textthreesuperior}{TS1} % subst in sub-enc 9 above \DeclareTextSymbolDefault{\texttimes}{TS1} \DeclareTextSymbolDefault{\texttrademark}{TS1} %%\DeclareTextSymbolDefault{\texttwelveudash}{TS1} % subst in sub-enc 9 above %%\DeclareTextSymbolDefault{\texttwosuperior}{TS1} % subst in sub-enc 9 above \DeclareTextSymbolDefault{\textyen}{TS1} \DeclareTextSymbolDefault{\textcapitalcompwordmark}{TS1} \DeclareTextSymbolDefault{\textascendercompwordmark}{TS1} \DeclareTextCommandDefault{\textcircled} {\CheckEncodingSubset\UseTextAccent{TS1}{\UseTextAccent{OMS}}1\textcircled} \DeclareTextCommandDefault{\t} {\CheckEncodingSubset\UseTextAccent{TS1}{\UseTextAccent{OML}}2\t} \ifx\Umathcode\@undefined \DeclareTextCommandDefault{\capitalacute} {\tc@check@accent{\'}2\capitalacute} \DeclareTextCommandDefault{\capitalbreve} {\tc@check@accent{\u}2\capitalbreve} \DeclareTextCommandDefault{\capitalcaron} {\tc@check@accent{\v}2\capitalcaron} \DeclareTextCommandDefault{\capitalcedilla} {\tc@check@accent{\c}2\capitalcedilla} \DeclareTextCommandDefault{\capitalcircumflex} {\tc@check@accent{\^}2\capitalcircumflex} \DeclareTextCommandDefault{\capitaldieresis} {\tc@check@accent{\"}2\capitaldieresis} \DeclareTextCommandDefault{\capitaldotaccent} {\tc@check@accent{\.}2\capitaldotaccent} \DeclareTextCommandDefault{\capitalgrave} {\tc@check@accent{\`}2\capitalgrave} \DeclareTextCommandDefault{\capitalhungarumlaut} {\tc@check@accent{\H}2\capitalhungarumlaut} \DeclareTextCommandDefault{\capitalmacron} {\tc@check@accent{\=}2\capitalmacron} \DeclareTextCommandDefault{\capitalogonek} {\tc@check@accent{\k}2\capitalogonek} \DeclareTextCommandDefault{\capitalring} {\tc@check@accent{\r}2\capitalring} \DeclareTextCommandDefault{\capitaltie} {\tc@check@accent{\t}2\capitaltie} \DeclareTextCommandDefault{\capitaltilde} {\tc@check@accent{\~}2\capitaltilde} \DeclareTextCommandDefault{\newtie} {\tc@check@accent{\t}2\newtie} \DeclareTextCommandDefault{\capitalnewtie} {\tc@check@accent{\t}2\capitalnewtie} \else \DeclareTextCommandDefault\capitalacute{\@tabacckludge'} \DeclareTextCommandDefault\capitalbreve{\u} \DeclareTextCommandDefault\capitalcaron{\v} \DeclareTextCommandDefault\capitalcedilla{\c} \DeclareTextCommandDefault\capitalcircumflex{\^} \DeclareTextCommandDefault\capitaldieresis{\"} \DeclareTextCommandDefault\capitaldotaccent{\.} \DeclareTextCommandDefault\capitalgrave{\@tabacckludge`} \DeclareTextCommandDefault\capitalhungarumlaut{\H} \DeclareTextCommandDefault\capitalmacron{\@tabacckludge=} \DeclareTextCommandDefault\capitalnewtie{\t} \DeclareTextCommandDefault\capitalogonek{\k} \DeclareTextCommandDefault\capitalring{\r} \DeclareTextCommandDefault\capitaltie{\t} \DeclareTextCommandDefault\capitaltilde{\~} \DeclareTextCommandDefault\newtie{\t} \fi \DeclareTextCommandDefault{\textlbrackdbl} {\tc@check@symbol2\textlbrackdbl} \DeclareTextCommandDefault{\textrbrackdbl} {\tc@check@symbol2\textrbrackdbl} \DeclareTextCommandDefault{\texteightoldstyle} {\tc@check@symbol2\texteightoldstyle} \DeclareTextCommandDefault{\textfiveoldstyle} {\tc@check@symbol2\textfiveoldstyle} \DeclareTextCommandDefault{\textfouroldstyle} {\tc@check@symbol2\textfouroldstyle} \DeclareTextCommandDefault{\textnineoldstyle} {\tc@check@symbol2\textnineoldstyle} \DeclareTextCommandDefault{\textoneoldstyle} {\tc@check@symbol2\textoneoldstyle} \DeclareTextCommandDefault{\textsevenoldstyle} {\tc@check@symbol2\textsevenoldstyle} \DeclareTextCommandDefault{\textsixoldstyle} {\tc@check@symbol2\textsixoldstyle} \DeclareTextCommandDefault{\textthreeoldstyle} {\tc@check@symbol2\textthreeoldstyle} \DeclareTextCommandDefault{\texttwooldstyle} {\tc@check@symbol2\texttwooldstyle} \DeclareTextCommandDefault{\textzerooldstyle} {\tc@check@symbol2\textzerooldstyle} \DeclareTextCommandDefault{\textacutedbl} {\tc@check@symbol2\textacutedbl} \DeclareTextCommandDefault{\textasciiacute} {\tc@check@symbol2\textasciiacute} \DeclareTextCommandDefault{\textasciibreve} {\tc@check@symbol2\textasciibreve} \DeclareTextCommandDefault{\textasciicaron} {\tc@check@symbol2\textasciicaron} \DeclareTextCommandDefault{\textasciidieresis} {\tc@check@symbol2\textasciidieresis} \DeclareTextCommandDefault{\textasciigrave} {\tc@check@symbol2\textasciigrave} \DeclareTextCommandDefault{\textasciimacron} {\tc@check@symbol2\textasciimacron} \DeclareTextCommandDefault{\textgravedbl} {\tc@check@symbol2\textgravedbl} \DeclareTextCommandDefault{\texttildelow} {\tc@check@symbol2\texttildelow} \DeclareTextCommandDefault{\textbaht} {\tc@check@symbol2\textbaht} \DeclareTextCommandDefault{\textbigcircle} {\tc@check@symbol2\textbigcircle} \DeclareTextCommandDefault{\textborn} {\tc@check@symbol2\textborn} \DeclareTextCommandDefault{\textcentoldstyle} {\tc@check@symbol2\textcentoldstyle} \DeclareTextCommandDefault{\textcircledP} {\tc@check@symbol2\textcircledP} \DeclareTextCommandDefault{\textcopyleft} {\tc@check@symbol2\textcopyleft} \DeclareTextCommandDefault{\textdblhyphenchar} {\tc@check@symbol2\textdblhyphenchar} \DeclareTextCommandDefault{\textdblhyphen} {\tc@check@symbol2\textdblhyphen} \DeclareTextCommandDefault{\textdied} {\tc@check@symbol2\textdied} \DeclareTextCommandDefault{\textdiscount} {\tc@check@symbol2\textdiscount} \DeclareTextCommandDefault{\textdivorced} {\tc@check@symbol2\textdivorced} \DeclareTextCommandDefault{\textdollaroldstyle} {\tc@check@symbol2\textdollaroldstyle} \DeclareTextCommandDefault{\textguarani} {\tc@check@symbol2\textguarani} \DeclareTextCommandDefault{\textleaf} {\tc@check@symbol2\textleaf} \DeclareTextCommandDefault{\textlquill} {\tc@check@symbol2\textlquill} \DeclareTextCommandDefault{\textmarried} {\tc@check@symbol2\textmarried} \DeclareTextCommandDefault{\textmho} {\tc@check@symbol2\textmho} \DeclareTextCommandDefault{\textmusicalnote} {\tc@check@symbol2\textmusicalnote} \DeclareTextCommandDefault{\textnaira} {\tc@check@symbol2\textnaira} \DeclareTextCommandDefault{\textopenbullet} {\tc@check@symbol2\textopenbullet} \DeclareTextCommandDefault{\textpeso} {\tc@check@symbol2\textpeso} \DeclareTextCommandDefault{\textpilcrow} {\tc@check@symbol2\textpilcrow} \DeclareTextCommandDefault{\textrecipe} {\tc@check@symbol2\textrecipe} \DeclareTextCommandDefault{\textreferencemark} {\tc@check@symbol2\textreferencemark} \DeclareTextCommandDefault{\textrquill} {\tc@check@symbol2\textrquill} \DeclareTextCommandDefault{\textservicemark} {\tc@check@symbol2\textservicemark} \DeclareTextCommandDefault{\textsurd} {\tc@check@symbol2\textsurd} \DeclareTextCommandDefault{\textpertenthousand} {\tc@check@symbol2\textpertenthousand} \UndeclareTextCommand{\textpertenthousand}{T1} \DeclareTextCommandDefault{\textlangle} {\tc@check@symbol3\textlangle} \DeclareTextCommandDefault{\textrangle} {\tc@check@symbol3\textrangle} \DeclareTextCommandDefault{\textcolonmonetary} {\tc@check@symbol4\textcolonmonetary} \DeclareTextCommandDefault{\textdong} {\tc@check@symbol4\textdong} \DeclareTextCommandDefault{\textdownarrow} {\tc@check@symbol4\textdownarrow} \DeclareTextCommandDefault{\textleftarrow} {\tc@check@symbol4\textleftarrow} \DeclareTextCommandDefault{\textlira} {\tc@check@symbol4\textlira} \DeclareTextCommandDefault{\textrightarrow} {\tc@check@symbol4\textrightarrow} \DeclareTextCommandDefault{\textuparrow} {\tc@check@symbol4\textuparrow} \DeclareTextCommandDefault{\textwon} {\tc@check@symbol4\textwon} \DeclareTextCommandDefault{\textestimated} {\tc@check@symbol5\textestimated} \DeclareTextCommandDefault{\textnumero} {\tc@check@symbol5\textnumero} \DeclareTextCommandDefault{\textflorin} {\tc@check@symbol6\textflorin} \DeclareTextCommandDefault{\textcurrency} {\tc@check@symbol6\textcurrency} \DeclareTextCommandDefault{\textfractionsolidus} {\tc@check@symbol7\textfractionsolidus} \DeclareTextCommandDefault{\textohm} {\tc@check@symbol7\textohm} \DeclareTextCommandDefault{\textmu} {\tc@check@symbol7\textmu} \DeclareTextCommandDefault{\textminus} {\tc@check@symbol7\textminus} \DeclareTextCommandDefault{\textblank} {\tc@check@symbol{8}\textblank} \DeclareTextCommandDefault{\textinterrobangdown} {\tc@check@symbol{8}\textinterrobangdown} \DeclareTextCommandDefault{\textinterrobang} {\tc@check@symbol{8}\textinterrobang} \DeclareTextCommandDefault{\texteuro} {\CheckEncodingSubset\UseTextSymbol{TS1}\tc@fake@euro{8}\texteuro} \DeclareTextCommandDefault{\textcelsius} {\tc@check@symbol{9}\textcelsius} \DeclareTextCommandDefault{\textonesuperior} {\tc@check@symbol{9}\textonesuperior} \DeclareTextCommandDefault{\textthreequartersemdash} {\tc@check@symbol{9}\textthreequartersemdash} \DeclareTextCommandDefault{\textthreesuperior} {\tc@check@symbol{9}\textthreesuperior} \DeclareTextCommandDefault{\texttwelveudash} {\tc@check@symbol{9}\texttwelveudash} \DeclareTextCommandDefault{\texttwosuperior} {\tc@check@symbol{9}\texttwosuperior} \DeclareTextCommandDefault{\textbardbl} {\tc@check@symbol{9}\textbardbl} \ifx \Umathcode\@undefined \else \DeclareTextCommand{\textzerooldstyle} \UnicodeEncodingName{\oldstylenums{0}} \DeclareTextCommand{\textoneoldstyle} \UnicodeEncodingName{\oldstylenums{1}} \DeclareTextCommand{\texttwooldstyle} \UnicodeEncodingName{\oldstylenums{2}} \DeclareTextCommand{\textthreeoldstyle}\UnicodeEncodingName{\oldstylenums{3}} \DeclareTextCommand{\textfouroldstyle} \UnicodeEncodingName{\oldstylenums{4}} \DeclareTextCommand{\textfiveoldstyle} \UnicodeEncodingName{\oldstylenums{5}} \DeclareTextCommand{\textsixoldstyle} \UnicodeEncodingName{\oldstylenums{6}} \DeclareTextCommand{\textsevenoldstyle}\UnicodeEncodingName{\oldstylenums{7}} \DeclareTextCommand{\texteightoldstyle}\UnicodeEncodingName{\oldstylenums{8}} \DeclareTextCommand{\textnineoldstyle} \UnicodeEncodingName{\oldstylenums{9}} \DeclareTextSymbol{\textpilcrow} \UnicodeEncodingName{"00B6} \DeclareTextSymbol{\textborn} \UnicodeEncodingName{"002A} \DeclareTextSymbol{\textdied} \UnicodeEncodingName{"2020} \DeclareTextSymbol{\textlbrackdbl} \UnicodeEncodingName{"27E6} \DeclareTextSymbol{\textrbrackdbl} \UnicodeEncodingName{"27E7} \DeclareTextSymbol{\textguarani} \UnicodeEncodingName{"20B2} \DeclareTextSymbol{\textdollaroldstyle}{TS1}{138} \DeclareTextSymbol{\textcentoldstyle} {TS1}{139} \fi % --- END of Unicode engines specials \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} \DeclareEncodingSubset{TS1}{qag} {0} \DeclareEncodingSubset{TS1}{qbk} {0} \DeclareEncodingSubset{TS1}{qcr} {0} \DeclareEncodingSubset{TS1}{qcs} {0} \DeclareEncodingSubset{TS1}{qhvc} {0} \DeclareEncodingSubset{TS1}{qhv} {0} \DeclareEncodingSubset{TS1}{qpl} {0} \DeclareEncodingSubset{TS1}{qtm} {0} \DeclareEncodingSubset{TS1}{qzc} {0} \DeclareEncodingSubset{TS1}{txr} {0} \DeclareEncodingSubset{TS1}{txss} {0} \DeclareEncodingSubset{TS1}{txtt} {0} \DeclareEncodingSubset{TS1}{lmr} {1} \DeclareEncodingSubset{TS1}{lmdh} {1} \DeclareEncodingSubset{TS1}{lmss} {1} \DeclareEncodingSubset{TS1}{lmssq} {1} \DeclareEncodingSubset{TS1}{lmvtt} {1} \DeclareEncodingSubset{TS1}{lmtt} {1} % missing TM, SM and pertenthousand \DeclareEncodingSubset{TS1}{ptmx} {2} \DeclareEncodingSubset{TS1}{ptmj} {2} \DeclareEncodingSubset{TS1}{ul8} {2} \DeclareEncodingSubset{TS1}{bch} {5} % tofu for blank, ohm \DeclareEncodingSubset{TS1}{futj}{5} % tofu for blank, interrobang/down, ohm \DeclareEncodingSubset{TS1}{futs}{5} % tofu for blank, ohm \DeclareEncodingSubset{TS1}{futx}{5} % probably (currently broken distrib) \DeclareEncodingSubset{TS1}{pag} {5} % tofu for blank, interrobang/down, ohm \DeclareEncodingSubset{TS1}{pbk} {5} % tofu for blank, interrobang/down, ohm \DeclareEncodingSubset{TS1}{pcr} {5} % tofu for blank, interrobang/down, ohm \DeclareEncodingSubset{TS1}{phv} {5} % tofu for blank, interrobang/down, ohm \DeclareEncodingSubset{TS1}{pnc} {5} % tofu for blank, interrobang/down, ohm \DeclareEncodingSubset{TS1}{pplj}{5} % tofu for blank \DeclareEncodingSubset{TS1}{pplx}{5} % tofu for blank \DeclareEncodingSubset{TS1}{ppl} {5} % tofu for blank interrobang/down \DeclareEncodingSubset{TS1}{ptm} {5} % tofu for blank, interrobang/down, ohm \DeclareEncodingSubset{TS1}{pzc} {5} % tofu for blank, interrobang/down, ohm \DeclareEncodingSubset{TS1}{ul9} {5} % tofu for blank, interrobang/down, ohm \DeclareEncodingSubset{TS1}{dayroms}{6} % tofu for blank, interrobang/down, ohm \DeclareEncodingSubset{TS1}{dayrom} {6} % tofu for blank, interrobang/down, ohm \DeclareEncodingSubset{TS1}{augie}{8} % really only missing euro \DeclareEncodingSubset{TS1}{put} {8} \DeclareEncodingSubset{TS1}{uag} {8} % probably (currently broken distrib) \DeclareEncodingSubset{TS1}{ugq} {8} \DeclareEncodingSubset{TS1}{zi4} {9} \DeclareEncodingSubset{TS1}{hls} {5} \DeclareEncodingSubset{TS1}{hlst} {5} \DeclareEncodingSubset{TS1}{hlct} {5} \DeclareEncodingSubset{TS1}{hlh} {5} \DeclareEncodingSubset{TS1}{hlx} {8} \DeclareEncodingSubset{TS1}{hlce} {8} \DeclareEncodingSubset{TS1}{hlcn} {8} \DeclareEncodingSubset{TS1}{hlcw} {8} \DeclareEncodingSubset{TS1}{hlcf} {8} \DeclareEncodingSubset{TS1}{lato-*} {0} % with a bunch of tofu inside \DeclareEncodingSubset{TS1}{opensans-*} {0} % with a bunch of tofu inside \DeclareEncodingSubset{TS1}{cantarell-*} {0} % with a bunch of tofu inside \DeclareEncodingSubset{TS1}{tli} {1} % with lots of tofu inside \DeclareEncodingSubset{TS1}{fbb-*} {2} % missing centoldstyle \DeclareEncodingSubset{TS1}{Alegreya-*} {2} \DeclareEncodingSubset{TS1}{AlegreyaSans-*} {2} \DeclareEncodingSubset{TS1}{BaskervilleF-*} {2} \DeclareEncodingSubset{TS1}{DejaVuSans-TLF} {2} \DeclareEncodingSubset{TS1}{DejaVuSansCondensed-TLF} {2} \DeclareEncodingSubset{TS1}{DejaVuSansMono-TLF} {2} \DeclareEncodingSubset{TS1}{EBGaramond-*} {2} \DeclareEncodingSubset{TS1}{Merriwthr-OsF} {2} \DeclareEncodingSubset{TS1}{MerriwthrSans-OsF} {2} \DeclareEncodingSubset{TS1}{Montserrat-*} {2} \DeclareEncodingSubset{TS1}{MontserratAlternates-*} {2} \DeclareEncodingSubset{TS1}{NotoSansMono-TLF} {2} \DeclareEncodingSubset{TS1}{NotoSansMono-TOsF} {2} \DeclareEncodingSubset{TS1}{Tempora-TLF} {2} \DeclareEncodingSubset{TS1}{Tempora-TOsF} {2} \DeclareEncodingSubset{TS1}{XCharter-TLF} {2} \DeclareEncodingSubset{TS1}{XCharter-TOsF} {2} \DeclareEncodingSubset{TS1}{erewhon-*} {2} \DeclareEncodingSubset{TS1}{Arimo-TLF} {3} \DeclareEncodingSubset{TS1}{Crlt-*} {3} \DeclareEncodingSubset{TS1}{IBMPlexMono-TLF} {3} \DeclareEncodingSubset{TS1}{IBMPlexSans-TLF} {3} \DeclareEncodingSubset{TS1}{IBMPlexSerif-TLF} {3} \DeclareEncodingSubset{TS1}{SourceCodePro-TLF} {3} \DeclareEncodingSubset{TS1}{SourceCodePro-TOsF} {3} \DeclareEncodingSubset{TS1}{SourceSansPro-*} {3} \DeclareEncodingSubset{TS1}{SourceSerifPro-*} {3} \DeclareEncodingSubset{TS1}{Tinos-TLF} {3} \DeclareEncodingSubset{TS1}{AccanthisADFStdNoThree-LF}{4} \DeclareEncodingSubset{TS1}{Cabin-TLF} {4} \DeclareEncodingSubset{TS1}{Caladea-TLF} {4} \DeclareEncodingSubset{TS1}{Chivo-*} {4} \DeclareEncodingSubset{TS1}{ClearSans-TLF} {4} \DeclareEncodingSubset{TS1}{Coelacanth-LF} {4} \DeclareEncodingSubset{TS1}{CrimsonPro-*} {4} \DeclareEncodingSubset{TS1}{FiraMono-TLF} {4} \DeclareEncodingSubset{TS1}{FiraMono-TOsF} {4} \DeclareEncodingSubset{TS1}{FiraSans-*} {4} \DeclareEncodingSubset{TS1}{Go-TLF} {4} \DeclareEncodingSubset{TS1}{GoMono-TLF} {4} \DeclareEncodingSubset{TS1}{InriaSans-*} {4} \DeclareEncodingSubset{TS1}{InriaSerif-*} {4} \DeclareEncodingSubset{TS1}{LibertinusSans-*} {4} \DeclareEncodingSubset{TS1}{LibertinusSerif-*} {4} \DeclareEncodingSubset{TS1}{LibreBodoni-TLF} {4} \DeclareEncodingSubset{TS1}{LibreFranklin-TLF} {4} \DeclareEncodingSubset{TS1}{LinguisticsPro-LF} {4} \DeclareEncodingSubset{TS1}{LinguisticsPro-OsF} {4} \DeclareEncodingSubset{TS1}{LinuxBiolinumT-*} {4} \DeclareEncodingSubset{TS1}{LinuxLibertineT-*} {4} \DeclareEncodingSubset{TS1}{MintSpirit-*} {4} \DeclareEncodingSubset{TS1}{MintSpiritNoTwo-*} {4} \DeclareEncodingSubset{TS1}{PTMono-TLF} {4} \DeclareEncodingSubset{TS1}{PTSans-TLF} {4} \DeclareEncodingSubset{TS1}{PTSansCaption-TLF} {4} \DeclareEncodingSubset{TS1}{PTSansNarrow-TLF} {4} \DeclareEncodingSubset{TS1}{PTSerif-TLF} {4} \DeclareEncodingSubset{TS1}{PTSerifCaption-TLF} {4} \DeclareEncodingSubset{TS1}{Raleway-TLF} {4} \DeclareEncodingSubset{TS1}{Raleway-TOsF} {4} \DeclareEncodingSubset{TS1}{Roboto-*} {4} \DeclareEncodingSubset{TS1}{RobotoMono-TLF} {4} \DeclareEncodingSubset{TS1}{RobotoSlab-TLF} {4} \DeclareEncodingSubset{TS1}{Rosario-*} {4} \DeclareEncodingSubset{TS1}{SticksTooText-*} {4} \DeclareEncodingSubset{TS1}{UniversalisADFStd-LF} {4} \DeclareEncodingSubset{TS1}{Almndr-OsF} {5} \DeclareEncodingSubset{TS1}{Baskervaldx-*} {5} \DeclareEncodingSubset{TS1}{Bttr-TLF} {5} \DeclareEncodingSubset{TS1}{Cinzel-LF} {5} \DeclareEncodingSubset{TS1}{CinzelDecorative-LF} {5} \DeclareEncodingSubset{TS1}{Cochineal-*} {5} \DeclareEncodingSubset{TS1}{DejaVuSerif-TLF} {5} \DeclareEncodingSubset{TS1}{DejaVuSerifCondensed-TLF} {5} \DeclareEncodingSubset{TS1}{GilliusADF-LF} {5} \DeclareEncodingSubset{TS1}{GilliusADFCond-LF} {5} \DeclareEncodingSubset{TS1}{GilliusADFNoTwo-LF} {5} \DeclareEncodingSubset{TS1}{GilliusADFNoTwoCond-LF} {5} \DeclareEncodingSubset{TS1}{OldStandard-TLF} {5} \DeclareEncodingSubset{TS1}{PlyfrDisplay-TLF} {5} \DeclareEncodingSubset{TS1}{PlyfrDisplay-TOsF} {5} \DeclareEncodingSubset{TS1}{TheanoDidot-TLF} {5} \DeclareEncodingSubset{TS1}{TheanoDidot-TOsF} {5} \DeclareEncodingSubset{TS1}{TheanoModern-TLF} {5} \DeclareEncodingSubset{TS1}{TheanoModern-TOsF} {5} \DeclareEncodingSubset{TS1}{TheanoOldStyle-TLF} {5} \DeclareEncodingSubset{TS1}{TheanoOldStyle-TOsF} {5} \DeclareEncodingSubset{TS1}{charssil-TLF} {5} \DeclareEncodingSubset{TS1}{Crimson-TLF} {6} \DeclareEncodingSubset{TS1}{LibertinusSerifDisplay-LF}{6} \DeclareEncodingSubset{TS1}{LinuxLibertineDisplayT-*} {6} \DeclareEncodingSubset{TS1}{LinuxLibertineMonoT-LF} {6} \DeclareEncodingSubset{TS1}{LinuxLibertineMonoT-TLF} {6} \DeclareEncodingSubset{TS1}{Ovrlck-LF} {6} \DeclareEncodingSubset{TS1}{ComicNeue-TLF} {7} \DeclareEncodingSubset{TS1}{ComicNeueAngular-TLF} {7} \DeclareEncodingSubset{TS1}{CormorantGaramond-*} {7} \DeclareEncodingSubset{TS1}{Heuristica-TLF} {7} \DeclareEncodingSubset{TS1}{Heuristica-TOsF} {7} \DeclareEncodingSubset{TS1}{IMFELLEnglish-TLF} {7} \DeclareEncodingSubset{TS1}{LibreBskrvl-TLF} {7} \DeclareEncodingSubset{TS1}{LibreCsln-*} {7} \DeclareEncodingSubset{TS1}{Lbstr-LF} {7} \DeclareEncodingSubset{TS1}{Mrcls-LF} {7} \DeclareEncodingSubset{TS1}{NotoSans-*} {7} \DeclareEncodingSubset{TS1}{NotoSerif-*} {7} \DeclareEncodingSubset{TS1}{Quattro-LF} {7} \DeclareEncodingSubset{TS1}{QuattroSans-LF} {7} \DeclareEncodingSubset{TS1}{Frm-LF} {7} % the superiors are missing \DeclareEncodingSubset{TS1}{LibertinusMono-TLF} {8} \DeclareEncodingSubset{TS1}{AlgolRevived-TLF} {9} \def\UseLegacyTextSymbols{% \DeclareTextSymbolDefault{\textasteriskcentered}{OMS}% \DeclareTextSymbolDefault{\textbardbl}{OMS}% \DeclareTextSymbolDefault{\textbullet}{OMS}% \DeclareTextSymbolDefault{\textdaggerdbl}{OMS}% \DeclareTextSymbolDefault{\textdagger}{OMS}% \DeclareTextSymbolDefault{\textparagraph}{OMS}% \DeclareTextSymbolDefault{\textperiodcentered}{OMS}% \DeclareTextSymbolDefault{\textsection}{OMS}% \UndeclareTextCommand{\textsection}{T1}% \expandafter\let\csname oldstylenums \expandafter\endcsname \csname legacyoldstylenums \endcsname } \DeclareTextSymbol{\textlegacyasteriskcentered}{OMS}{3} % "03 \DeclareTextSymbol{\textlegacybardbl}{OMS}{107} % "6B \DeclareTextSymbol{\textlegacybullet}{OMS}{15} % "0F \DeclareTextSymbol{\textlegacydaggerdbl}{OMS}{122} % "7A \DeclareTextSymbol{\textlegacydagger}{OMS}{121} % "79 \DeclareTextSymbol{\textlegacyparagraph}{OMS}{123} % "7B \DeclareTextSymbol{\textlegacyperiodcentered}{OMS}{1} % "01 \DeclareTextSymbol{\textlegacysection}{OMS}{120} % "78 \DeclareTextSymbolDefault{\textlegacyasteriskcentered}{OMS} \DeclareTextSymbolDefault{\textlegacybardbl}{OMS} \DeclareTextSymbolDefault{\textlegacybullet}{OMS} \DeclareTextSymbolDefault{\textlegacydaggerdbl}{OMS} \DeclareTextSymbolDefault{\textlegacydagger}{OMS} \DeclareTextSymbolDefault{\textlegacyparagraph}{OMS} \DeclareTextSymbolDefault{\textlegacyperiodcentered}{OMS} \DeclareTextSymbolDefault{\textlegacysection}{OMS} \IncludeInRelease{0000/00/00}% {lttextcomp}{Undefine text companion symbols}% \DeclareRobustCommand\oldstylenums[1]{% \begingroup \spaceskip\fontdimen\tw@\font \usefont{OML}{\rmdefault}{\f@series}{it}% \mathgroup\symletters #1% \endgroup } \let\legacyoldstylenums\@undefined \def\textcompsubstdefault{cmr} \let\DeclareEncodingSubset\@undefined \let\CheckEncodingSubset\@undefined \DeclareTextSymbolDefault{\textdollar}{OT1} \DeclareTextSymbolDefault{\textsterling}{OT1} \DeclareTextCommand{\textdollar}{OT1}{\hmode@bgroup \ifdim \fontdimen\@ne\font >\z@ \slshape \else \upshape \fi \char`\$\egroup} \DeclareTextCommand{\textsterling}{OT1}{\hmode@bgroup \ifdim \fontdimen\@ne\font >\z@ \itshape \else \fontshape{ui}\selectfont \fi \char`\$\egroup} \DeclareTextCommand{\textperthousand}{T1} {\%\char 24 } \DeclareTextSymbolDefault{\textasteriskcentered}{OMS} \DeclareTextSymbolDefault{\textbullet}{OMS} \DeclareTextSymbolDefault{\textdaggerdbl}{OMS} \DeclareTextSymbolDefault{\textdagger}{OMS} \DeclareTextSymbolDefault{\textparagraph}{OMS} \DeclareTextSymbolDefault{\textperiodcentered}{OMS} \DeclareTextSymbolDefault{\textsection}{OMS} \DeclareTextSymbolDefault{\textbardbl}{OMS} \let\textbrokenbar\@undefined \let\textcelsius\@undefined \let\textcent\@undefined \DeclareTextCommandDefault{\textcopyright} {\textcircled{c}} \let\textdegree\@undefined \let\textdiv\@undefined \let\textlnot\@undefined \let\textonehalf\@undefined \let\textonequarter\@undefined \let\textonesuperior\@undefined \DeclareTextCommandDefault{\textordfeminine} {\textsuperscript{a}} \DeclareTextCommandDefault{\textordmasculine} {\textsuperscript{o}} \let\textpm\@undefined \let\textquotesingle\@undefined \let\textquotestraightbase\@undefined \let\textquotestraightdblbase\@undefined \DeclareTextCommandDefault{\textregistered} {\textcircled{% \check@mathfonts\fontsize\sf@size\z@ \math@fontsfalse\selectfont R}} \let\textthreequartersemdash\@undefined \let\textthreequarters\@undefined \let\textthreesuperior\@undefined \let\texttimes\@undefined \DeclareTextCommandDefault{\texttrademark} {\textsuperscript{TM}} \let\texttwelveudash\@undefined \let\texttwosuperior\@undefined \let\textyen\@undefined \let\textcapitalcompwordmark\@undefined \let\textascendercompwordmark\@undefined \DeclareTextAccentDefault{\textcircled}{OMS} \DeclareTextAccentDefault{\t}{OML} \let\capitalacute\@undefined \let\capitalbreve\@undefined \let\capitalcaron\@undefined \let\capitalcedilla\@undefined \let\capitalcircumflex\@undefined \let\capitaldieresis\@undefined \let\capitaldotaccent\@undefined \let\capitalgrave\@undefined \let\capitalhungarumlaut\@undefined \let\capitalmacron\@undefined \let\capitalnewtie\@undefined \let\capitalogonek\@undefined \let\capitalring\@undefined \let\capitaltie\@undefined \let\capitaltilde\@undefined \let\newtie\@undefined \let\textlbrackdbl\@undefined \let\textrbrackdbl\@undefined \let\texteightoldstyle\@undefined \let\textfiveoldstyle\@undefined \let\textfouroldstyle\@undefined \let\textnineoldstyle\@undefined \let\textoneoldstyle\@undefined \let\textsevenoldstyle\@undefined \let\textsixoldstyle\@undefined \let\textthreeoldstyle\@undefined \let\texttwooldstyle\@undefined \let\textzerooldstyle\@undefined \let\textacutedbl\@undefined \let\textasciiacute\@undefined \let\textasciibreve\@undefined \let\textasciicaron\@undefined \let\textasciidieresis\@undefined \let\textasciigrave\@undefined \let\textasciimacron\@undefined \let\textgravedbl\@undefined \let\texttildelow\@undefined \let\textbaht\@undefined \let\textbigcircle\@undefined \let\textborn\@undefined \let\textcentoldstyle\@undefined \let\textcircledP\@undefined \let\textcopyleft\@undefined \let\textdblhyphenchar\@undefined \let\textdblhyphen\@undefined \let\textdied\@undefined \let\textdiscount\@undefined \let\textdivorced\@undefined \let\textdollaroldstyle\@undefined \let\textguarani\@undefined \let\textleaf\@undefined \let\textlquill\@undefined \let\textmarried\@undefined \let\textmho\@undefined \let\textmusicalnote\@undefined \let\textnaira\@undefined \let\textopenbullet\@undefined \let\textpeso\@undefined \let\textpilcrow\@undefined \let\textrecipe\@undefined \let\textreferencemark\@undefined \let\textrquill\@undefined \let\textservicemark\@undefined \let\textsurd\@undefined \DeclareTextCommand{\textpertenthousand}{T1} {\%\char 24\char 24 } \let\textlangle\@undefined \let\textrangle\@undefined \let\textcolonmonetary\@undefined \let\textdong\@undefined \let\textdownarrow\@undefined \let\textleftarrow\@undefined \let\textlira\@undefined \let\textrightarrow\@undefined \let\textuparrow\@undefined \let\textwon\@undefined \let\textestimated\@undefined \let\textnumero\@undefined \let\textflorin\@undefined \let\textcurrency\@undefined \let\textfractionsolidus\@undefined \let\textohm\@undefined \let\textmu\@undefined \let\textminus\@undefined \let\textblank\@undefined \let\textinterrobangdown\@undefined \let\textinterrobang\@undefined \let\texteuro\@undefined \let\textcelsius\@undefined \let\textonesuperior\@undefined \let\textthreequartersemdash\@undefined \let\textthreesuperior\@undefined \let\texttwelveudash\@undefined \let\texttwosuperior\@undefined \let\textbardbl\@undefined \let\UseLegacyTextSymbols\@undefined \let\textlegacyasteriskcentered\@undefined \let\textlegacybardbl\@undefined \let\textlegacybullet\@undefined \let\textlegacydaggerdbl\@undefined \let\textlegacydagger\@undefined \let\textlegacyparagraph\@undefined \let\textlegacyperiodcentered\@undefined \let\textlegacysection\@undefined \EndModuleRelease %%% From File: ltpageno.dtx %%% From File: ltxref.dtx \IncludeInRelease{2023/06/01}% {\@kernel@sref}{store five arguments}% \def\@setref#1#2#3{% \ifx#1\relax \protect\G@refundefinedtrue \nfss@text{\reset@font\bfseries ??}% \@latex@warning{Reference `#3' on page \thepage \space undefined}% \else \expandafter#2#1\@empty\@empty\@empty\null \fi} \long\def\@firstoffive#1#2#3#4#5{#1} \long\def\@secondoffive#1#2#3#4#5{#2} \def\@kernel@sref#1{\expandafter\@setref\csname r@#1\endcsname\@firstoffive{#1}} \def\@kernel@spageref#1{\expandafter\@setref\csname r@#1\endcsname \@secondoffive{#1}} \EndIncludeInRelease \IncludeInRelease{2022/06/01}% {\@kernel@sref}{store five arguments}% \def\@setref#1#2#3{% \ifx#1\relax \protect\G@refundefinedtrue \nfss@text{\reset@font\bfseries ??}% \@latex@warning{Reference `#3' on page \thepage \space undefined}% \else \expandafter#2#1\null \fi} \let\@firstoffive\undefined \let\@secondoffive\undefined \def\@kernel@sref#1{\expandafter\@setref\csname r@#1\endcsname\@firstoftwo{#1}} \def\@kernel@spageref#1{\expandafter\@setref\csname r@#1\endcsname \@secondoftwo{#1}} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@kernel@sref}{store five arguments}% \def\@setref#1#2#3{% \ifx#1\relax \protect\G@refundefinedtrue \nfss@text{\reset@font\bfseries ??}% \@latex@warning{Reference `#3' on page \thepage \space undefined}% \else \expandafter#2#1\null \fi} \let\@firstoffive\undefined \let\@secondoffive\undefined \let\@kernel@sref\undefined \let\@kernel@spageref\undefined \EndIncludeInRelease \IncludeInRelease{2022/06/01}% {\ref}{Add starred reference commands}% \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}} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\ref}{Add starred reference commands}% \def\ref#1{\expandafter\@setref\csname r@#1\endcsname\@firstoftwo{#1}} \def\pageref#1{\expandafter\@setref\csname r@#1\endcsname \@secondoftwo{#1}} \EndIncludeInRelease \IncludeInRelease{2023/06/01}% {\label}{store five label arguments}% \providecommand\@currentlabelname{} \providecommand\@currentHref{} \providecommand\@kernel@reserved@label@data{} \NewHookWithArguments{label}{1} \def\label#1{\@bsphack \begingroup \UseHookWithArguments{label}{1}{#1}% \protected@write\@auxout{}% {\string\newlabel{#1}{{\@currentlabel}{\thepage}% {\@currentlabelname}{\@currentHref}{\@kernel@reserved@label@data}}}% \endgroup \@esphack} \EndIncludeInRelease \IncludeInRelease{2022/06/01}% {\Ref}{Add starred version}% \def\@currentcounter{} \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} \def\@kernel@sRef#1{\protected@edef\@tempa{\@kernel@sref{#1}}% \expandafter\MakeUppercase\@tempa} \NewDocumentCommand\Ref{s} {\IfBooleanTF{#1}{\@kernel@sRef}{\@kernel@Ref}} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\label}{store five label arguments}% \let\@currenttitle\@undefined \let\@currenttarget\@undefined \let\@kernel@currentdata\@undefined \def\label#1{\@bsphack \protected@write\@auxout{}% {\string\newlabel{#1}{{\@currentlabel}{\thepage}}}% \@esphack} \EndIncludeInRelease \IncludeInRelease{2020/10/01}% {\Ref}{Add starred version}% \def\@currentcounter{} \def\refstepcounter#1{\stepcounter{#1}% \edef\@currentcounter{#1}% \protected@edef\@currentlabel {\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} \EndIncludeInRelease \IncludeInRelease{2019/10/01}% {\refstepcounter}{Add \labelformat and \Ref}% \let\@currentcounter\@undefined \def\refstepcounter#1{\stepcounter{#1}% \protected@edef\@currentlabel {\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} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\refstepcounter}{Add \labelformat and \Ref}% \def\refstepcounter#1{\stepcounter{#1}% \protected@edef\@currentlabel {\csname p@#1\endcsname\csname the#1\endcsname}% } \let\labelformat\@undefined \let\Ref\@undefined \EndIncludeInRelease %%% From File: ltproperties.dtx \ExplSyntaxOn \NewModuleRelease{2023/11/01}{ltproperties} {Cross-referencing~properties} \cs_new_protected:Npn \property_new:nnnn #1#2#3#4 { \cs_if_free:cTF { __property_code_ #1 : } { \exp_args:Nx \__property_gset:nnnn { \tl_to_str:n {#1} } {#2} {#3} {#4} } { \msg_error:nn { property }{ exists }{#1} } } \cs_new_protected:Npn \property_gset:nnnn #1#2#3#4 { \__property_gset:ennn { \tl_to_str:n {#1} } {#2} {#3} {#4} } \cs_new_protected:Npn \__property_gset:nnnn #1#2#3#4 { \cs_gset:cpn { __property_code_ #1 : } {#4} \tl_gclear_new:c { g__property_default_ #1 _tl } \tl_gset:cn { g__property_default_ #1 _tl } {#3} \bool_if_exist:cF { g__property_shipout_ #1 _tl } { \bool_new:c { g__property_shipout_ #1 _tl } } \str_case:nnF {#2} { { now } { { \bool_gset_false:c { g__property_shipout_ #1 _tl } } } { shipout } { \bool_gset_true:c { g__property_shipout_ #1 _tl } } } { \msg_error:nnnn { property } { unknown-setpoint } {#1} {#2} } } \cs_generate_variant:Nn \__property_gset:nnnn {ennn} \cs_new_protected:Npn \NewProperty #1#2#3#4 { \protected@edef\reserved@a{#1} \exp_args:No \property_new:nnnn {\reserved@a} {#2}{#3}{#4} } \cs_new_protected:Npn \SetProperty #1#2#3#4 { \protected@edef\reserved@a{#1} \exp_args:No \property_gset:nnnn {\reserved@a} {#2}{#3}{#4} } \cs_new_protected:Npn \property_record:nN #1#2 { \property_record:nV {#1} #2 } \cs_new_protected:Npn \property_record:nn #1#2 { \__property_record:en { \tl_to_str:n {#1} } {#2} } \cs_generate_variant:Nn \property_record:nn { nV , ee, oo } \cs_new_protected:Npn \__property_record:nn #1#2 { \protected@write \@auxout {} { \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 } \cs_new:Npn \__property_record_value:n #1 { \__property_record_value_aux:e { \tl_to_str:n {#1} } } \cs_new:Npn \__property_record_value_aux:n #1 { \cs_if_exist:cTF { __property_code_ #1 : } { {#1} { \bool_if:cTF { g__property_shipout_ #1 _tl } { \exp_not:c } { \use:c } { __property_code_ #1 : } } } { \msg_expandable_error:nnn { property } { not-declared } {#1} } } \cs_generate_variant:Nn \__property_record_value_aux:n { e } \NewDocumentCommand\RecordProperties { m m } { \@bsphack \protected@edef\reserved@a{#1} \protected@edef\reserved@b{#2} \property_record:oo {\reserved@a}{\reserved@b} \@esphack } \flag_new:n { l__property_ref_flag } \cs_new:Npn \property_ref:nn #1#2 { \__property_ref:een { \tl_to_str:n {#1} } { \tl_to_str:n {#2} } { \tl_use:c { g__property_default_ #2 _tl } } } \cs_generate_variant:Nn \property_ref:nn {ee} \cs_new:Npn \property_ref:nnn #1#2#3 { \__property_ref:een { \tl_to_str:n {#1} } { \tl_to_str:n {#2} } {#3} } \cs_new:Npn \__property_ref:nnn #1#2#3 { \tl_if_exist:cTF { g__property_label_ #1 _ #2 _tl } { \tl_use:c { g__property_label_ #1 _ #2 _tl } } { \flag_if_raised:nF { l__property_ref_flag } { \flag_raise:n { l__property_ref_flag } } \tl_if_exist:cTF { g__property_default_ #2 _tl } { #3 } { \msg_expandable_error:nnn { property } { not-declared } {#2} } } } \cs_generate_variant:Nn \__property_ref:nnn { ee } \cs_generate_variant:Nn \property_ref:nnn {een} \NewExpandableDocumentCommand \RefProperty { o m m } { \IfNoValueTF {#1} { \property_ref:ee {#2}{#3} } { \property_ref:een {#2}{#3}{#1} } } \cs_new_protected:Npn \new@label@record #1#2 { \tl_if_exist:cTF { r@#1 } { \gdef \@multiplelabels { \@latex@warning@no@line { There~were~multiply-defined~labels } } \@latex@warning@no@line { Label~`#1'~multiply~defined } } { \tl_new:c { r@#1 } \tl_gset:cn { r@#1 }{#2} } \__property_data:nnn {#1} #2 { \q_recursion_tail } { ? } \q_recursion_stop } \cs_new_protected:Npn \__property_data:nnn #1#2#3 { \quark_if_recursion_tail_stop:n {#2} \tl_gclear_new:c { g__property_label_ \tl_to_str:n {#1} _ \tl_to_str:n {#2} _tl } \tl_gset:cn { g__property_label_ \tl_to_str:n {#1} _ \tl_to_str:n {#2} _tl } {#3} \__property_data:nnn {#1} } \cs_new_protected:Npn \@kernel@new@label@record@testdef #1 #2 { \tl_if_eq:cnF { r@#1 } {#2} { \@tempswatrue } } \prg_new_conditional:Npnn \property_if_exist:n #1 { p , T , F, TF } % #1 property { \cs_if_exist:cTF { __property_code_ #1 : } { \prg_return_true: } { \prg_return_false: } } \prg_generate_conditional_variant:Nnn \property_if_exist:n {e} {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}{} } \prg_new_conditional:Npnn \property_if_recorded:n #1 { p , T , F, TF } % #1 label { \tl_if_exist:cTF { r@#1 } { \prg_return_true: } { \prg_return_false: } } \prg_generate_conditional_variant:Nnn \property_if_recorded:n {e} {TF} \cs_new_eq:NN \IfLabelExistsTF \property_if_recorded:eTF \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 { \tl_if_exist:cTF { g__property_label_ \tl_to_str:n {#1} _ \tl_to_str:n {#2} _tl } { \prg_return_true: } { \prg_return_false: } } \prg_generate_conditional_variant:Nnn \property_if_recorded:nn {ee} {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 } { \G@refundefinedtrue } } \cs_new_protected:Npn \property_ref_undefined_warn:n #1 %#1 label { \property_if_recorded:nF {#1} { \G@refundefinedtrue \@latex@warning{Reference~`#1'~on~page~\thepage\space undefined}% } } \cs_new_protected:Npn \property_ref_undefined_warn:nn #1#2 %#1 label, #2 property { \property_if_recorded:nTF {#1} { \property_if_recorded:nnF {#1}{#2} { \G@refundefinedtrue \@latex@warning { Property~`#2'~undefined~for~reference~`#1'~on~page~\thepage } } } { \G@refundefinedtrue \@latex@warning { Reference~`#1'~on~page~\thepage\space undefined }% } } \cs_generate_variant:Nn \property_ref_undefined_warn:nn {ee} \cs_set_eq:NN \RefUndefinedWarn \property_ref_undefined_warn:ee \property_new:nnnn { abspage } { shipout } { 0 } { \int_use:N \g_shipout_readonly_int } \property_new:nnnn { page } { shipout } { 0 } { \thepage } \property_new:nnnn { pagenum } { shipout } { 0 } { \the \value { page } } \property_new:nnnn { label } { now } { ?? } { \@currentlabel } \property_new:nnnn { title } { now } { \exp_not:n { \textbf { ?? } } } { \@currentlabelname } \property_new:nnnn { target } { now } { } { \@currentHref } \newcommand\@currentHpage{} \property_new:nnnn { pagetarget } { shipout } { } { \@currentHpage } \property_new:nnnn { counter } { now } { } { \@currentcounter } \property_new:nnnn { xpos } { shipout } { 0} { \int_use:N \tex_lastxpos:D } \property_new:nnnn { ypos } { shipout } { 0} { \int_use:N \tex_lastypos:D } \msg_new:nnnn { property } { exists } { Property~'#1'~ has~ already~ been~ declared. } { There~ already~ exists~ a~ property~ declaration~ with~ this~ name.\\ Please~ use~ a~ different~ name~ for~ your~ property.} \msg_new:nnnn { property } { not-declared } { Property~'#1'~not~declared. } { LaTeX~has~been~asked~to~use~property~'#1',~but~this~ name~has~not~been~declared. } \msg_new:nnnn { property } { unknown-setpoint } { Unknown~keyword~'#2'~for~setting~property~'#1'. } { LaTeX~has~been~asked~to~set~the~property~'#1',~but~the~keyword~ '#2'~is~not~one~of~the~two~known~values:~'now'~or~'shipout'. } \IncludeInRelease{0000/00/00}{ltproperties} {cross-referencing~properties~(undo)}% \let \NewProperty \@undefined \let \SetProperty \@undefined \let \RecordProperties \@undefined \let \RefProperty \@undefined \let \RefUndefinedWarn \@undefined \let \IfPropertyExistsTF \@undefined \let \IfLabelExistsTF \@undefined \let \IfPropertyRecordedTF \@undefined \let\new@label@record \@undefined \let\@kernel@new@label@record@testdef\@undefined \EndModuleRelease \ExplSyntaxOff %%% From File: ltmiscen.dtx \IncludeInRelease{2023/11/01}% {\enddocument}{check property labels}% \def\enddocument{% \@kernel@before@enddocument \UseOneTimeHook{enddocument}% \@kernel@after@enddocument \@checkend{document}% \clearpage \UseOneTimeHook{enddocument/afterlastpage}% \@kernel@after@enddocument@afterlastpage \begingroup \if@filesw \immediate\closeout\@mainaux \let\@setckpt\@gobbletwo \let\@newl@bel\@testdef \let\new@label@record\@kernel@new@label@record@testdef \@tempswafalse \makeatletter \@@input\jobname.aux \fi \UseOneTimeHook{enddocument/afteraux}% \UseOneTimeHook{enddocument/info}% \endgroup \UseOneTimeHook{enddocument/end}% \deadcycles\z@\@@end} \NewHook{enddocument} \NewHook{enddocument/afterlastpage} \NewHook{enddocument/afteraux} \NewHook{enddocument/info} \NewHook{enddocument/end} \RemoveFromHook{enddocument/info}[kernel/filelist] \RemoveFromHook{enddocument/info}[kernel/warnings] \RemoveFromHook{enddocument/info}[kernel/release] \AddToHook{enddocument/info}[kernel/filelist]{\@dofilelist} \AddToHook{enddocument/info}[kernel/warnings]{\@enddocument@kernel@warnings} \AddToHook{enddocument/info}[kernel/release]{% \let\show@release@info\wlog \show@release@info{ ***********}% \the\LaTeXReleaseInfo \show@release@info{ ***********}} \DeclareHookRule{enddocument/info}{kernel/release}{before}{kernel/filelist} \DeclareHookRule{enddocument/info}{kernel/filelist}{before}{kernel/warnings} \def\@enddocument@kernel@warnings{% \ifdim \font@submax >\fontsubfuzz\relax \@font@warning{Size substitutions with differences\MessageBreak up to \font@submax\space have occurred.\@gobbletwo}% \fi \@defaultsubs \@refundefined \if@filesw \ifx \@multiplelabels \relax \if@tempswa \@latex@warning@no@line{Label(s) may have changed. Rerun to get cross-references right}% \fi \else \@multiplelabels \fi \ifx \@extra@page@added \relax \@latex@warning@no@line{Temporary extra page added at the end. Rerun to get it removed}% \fi \fi } \EndIncludeInRelease \IncludeInRelease{2020/10/01}% {\enddocument}{Use Hooks}% \def\enddocument{% \@kernel@before@enddocument \UseOneTimeHook{enddocument}% \@kernel@after@enddocument \@checkend{document}% \clearpage \UseOneTimeHook{enddocument/afterlastpage}% \@kernel@after@enddocument@afterlastpage \begingroup \if@filesw \immediate\closeout\@mainaux \let\@setckpt\@gobbletwo \let\@newl@bel\@testdef \@tempswafalse \makeatletter \@@input\jobname.aux \fi \UseOneTimeHook{enddocument/afteraux}% \UseOneTimeHook{enddocument/info}% \endgroup \UseOneTimeHook{enddocument/end}% \deadcycles\z@\@@end} \NewHook{enddocument} \NewHook{enddocument/afterlastpage} \NewHook{enddocument/afteraux} \NewHook{enddocument/info} \NewHook{enddocument/end} \RemoveFromHook{enddocument/info}[kernel/filelist] \RemoveFromHook{enddocument/info}[kernel/warnings] \RemoveFromHook{enddocument/info}[kernel/release] \AddToHook{enddocument/info}[kernel/filelist]{\@dofilelist} \AddToHook{enddocument/info}[kernel/warnings]{\@enddocument@kernel@warnings} \AddToHook{enddocument/info}[kernel/release]{% \let\show@release@info\wlog \show@release@info{ ***********}% \the\LaTeXReleaseInfo \show@release@info{ ***********}} \DeclareHookRule{enddocument/info}{kernel/release}{before}{kernel/filelist} \DeclareHookRule{enddocument/info}{kernel/filelist}{before}{kernel/warnings} \def\@enddocument@kernel@warnings{% \ifdim \font@submax >\fontsubfuzz\relax \@font@warning{Size substitutions with differences\MessageBreak up to \font@submax\space have occurred.\@gobbletwo}% \fi \@defaultsubs \@refundefined \if@filesw \ifx \@multiplelabels \relax \if@tempswa \@latex@warning@no@line{Label(s) may have changed. Rerun to get cross-references right}% \fi \else \@multiplelabels \fi \ifx \@extra@page@added \relax \@latex@warning@no@line{Temporary extra page added at the end. Rerun to get it removed}% \fi \fi } \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\enddocument}{Use Hooks}% \def\enddocument{% \let\AtEndDocument\@firstofone \@enddocumenthook \@checkend{document}% \clearpage \begingroup \if@filesw \immediate\closeout\@mainaux \let\@setckpt\@gobbletwo \let\@newl@bel\@testdef \@tempswafalse \makeatletter \@@input\jobname.aux \fi \@dofilelist \ifdim \font@submax >\fontsubfuzz\relax \@font@warning{Size substitutions with differences\MessageBreak up to \font@submax\space have occurred.\@gobbletwo}% \fi \@defaultsubs \@refundefined \if@filesw \ifx \@multiplelabels \relax \if@tempswa \@latex@warning@no@line{Label(s) may have changed. Rerun to get cross-references right}% \fi \else \@multiplelabels \fi \fi \endgroup \deadcycles\z@\@@end} \let\@enddocument@kernel@warnings\@undefined \EndIncludeInRelease \IncludeInRelease{2021/06/01}% {\@kernel@before@enddocument}{kernel before hook}% \def\@kernel@before@enddocument{\par} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@kernel@before@enddocument}{kernel before hook}% \let\@kernel@before@enddocument\@empty \EndIncludeInRelease \IncludeInRelease{2018/12/01}% {\protected@file@percent}{Mask line endings}% \protected\def\protected@file@percent{} \catcode`\^^A=9 \long\gdef\add@percent@to@temptokena #1\protected@file@percent#2\add@percent@to@temptokena {\expandafter\ifx\expandafter X\detokenize{#2}X\expandafter\dont@add@percent@to@temptokena\else \expandafter\do@add@percent@to@temptokena\fi{#1}} \long\def\dont@add@percent@to@temptokena#1{% \@temptokena\expandafter{#1}} \begingroup \catcode`\%=12 \catcode`\^^A=14 \long\gdef\do@add@percent@to@temptokena#1{\@temptokena\expandafter{#1%^^A }} \endgroup \long\def\@writefile#1#2{% \@ifundefined{tf@#1}\relax {% \add@percent@to@temptokena \@empty#2\protected@file@percent \add@percent@to@temptokena \immediate\write\csname tf@#1\endcsname{\the\@temptokena}% }% } \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\protected@file@percent}{Mask line endings}% \let\protected@file@percent\@undefined \let\add@percent@to@temptokena\@undefined \let\do@add@percent@to@temptokena\@undefined \let\dont@add@percent@to@temptokena\@undefined \long\def\@writefile#1#2{% \@ifundefined{tf@#1}\relax {\@temptokena{#2}% \immediate\write\csname tf@#1\endcsname{\the\@temptokena}% }% } \EndIncludeInRelease \IncludeInRelease{2020/10/01}% {\begin}{Use hook system}% \protected\def\begin#1{% \UseHook{env/#1/before}% \@ifundefined{#1}% {\def\reserved@a{\@latex@error{Environment #1 undefined}\@eha}}% {\def\reserved@a{\def\@currenvir{#1}% \edef\@currenvline{\on@line}% \@execute@begin@hook{#1}% \csname #1\endcsname}}% \@ignorefalse \begingroup\@endpefalse\reserved@a} \def\@execute@begin@hook #1{% \expandafter\ifx\csname #1\endcsname\document \endgroup \gdef\@execute@begin@hook##1{\UseHook{env/##1/begin}}% \@expl@@@initialize@all@@ \fi \UseHook{env/#1/begin}% } \EndIncludeInRelease \IncludeInRelease{2019/10/01}% {\begin}{Making \begin/\end robust}% \DeclareRobustCommand\begin[1]{% \@ifundefined{#1}% {\def\reserved@a{\@latex@error{Environment #1 undefined}\@eha}}% {\def\reserved@a{\def\@currenvir{#1}% \edef\@currenvline{\on@line}% \csname #1\endcsname}}% \@ignorefalse \begingroup\@endpefalse\reserved@a} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\begin}{Making \begin/\end robust}% \def\begin#1{% \@ifundefined{#1}% {\def\reserved@a{\@latex@error{Environment #1 undefined}\@eha}}% {\def\reserved@a{\def\@currenvir{#1}% \edef\@currenvline{\on@line}% \csname #1\endcsname}}% \@ignorefalse \begingroup\@endpefalse\reserved@a} \expandafter\let\csname begin \endcsname\@undefined \EndIncludeInRelease \IncludeInRelease{2019/10/01}% {\end}{Making \begin/\end robust}% \edef\end {\unexpanded{% \romannumeral \ifx\protect\@typeset@protect \expandafter %1 \expandafter %2 \expandafter %1 \expandafter %3 expands the \csname inside \end \expandafter %1 \expandafter %2 expands \end \expandafter %1 expands the \else \z@ \else \expandafter\z@\expandafter\protect \fi }% \expandafter\noexpand\csname end \endcsname } \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\end}{Making \begin/\end robust}% \def\end#1{% \csname end#1\endcsname\@checkend{#1}% \expandafter\endgroup\if@endpe\@doendpe\fi \if@ignore\@ignorefalse\ignorespaces\fi} \EndIncludeInRelease \IncludeInRelease{2024/11/01}% {\end!space}{New @endpe handling}% \@namedef{end }#1{% \romannumeral \IfHookEmptyTF{env/#1/end}% {\expandafter\z@}% {\z@\UseHook{env/#1/end}}% \csname end#1\endcsname\@checkend{#1}% \endgroup \UseHook{env/#1/after}% \if@ignore\@ignorefalse\ignorespaces\fi } \EndIncludeInRelease \IncludeInRelease{2020/10/01}% {\end!space}{Use hook system}% \@namedef{end }#1{% \romannumeral \IfHookEmptyTF{env/#1/end}% {\expandafter\z@}% {\z@\UseHook{env/#1/end}}% \csname end#1\endcsname\@checkend{#1}% \expandafter\endgroup\if@endpe\@doendpe\fi \UseHook{env/#1/after}% \if@ignore\@ignorefalse\ignorespaces\fi } \EndIncludeInRelease \IncludeInRelease{2019/10/01}% {\end!space}{Making \begin/\end robust}% \@namedef{end }#1{% \csname end#1\endcsname\@checkend{#1}% \expandafter\endgroup\if@endpe\@doendpe\fi \if@ignore\@ignorefalse\ignorespaces\fi} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\end!space}{Making \begin/\end robust}% \expandafter\let\csname end \endcsname\@undefined \EndIncludeInRelease \IncludeInRelease{2020/10/01}% {\AtBeginEnvironment}{Hooks for environments}% \newcommand\AtBeginEnvironment[2][.] {\AddToHook{env/#2/begin}[#1]} \newcommand\AtEndEnvironment[2][.] {\AddToHook{env/#2/end}[#1]} \newcommand\BeforeBeginEnvironment[2][.]{\AddToHook{env/#2/before}[#1]} \newcommand\AfterEndEnvironment[2][.] {\AddToHook{env/#2/after}[#1]} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\AtBeginEnvironment}{Hooks for environments}% \let\AtBeginEnvironment\@undefined \let\AtEndEnvironment\@undefined \let\BeforeBeginEnvironment\@undefined \let\AfterEndEnvironment\@undefined \EndIncludeInRelease \IncludeInRelease{2020/02/02}% {\@centercr}{Make robust}% \protected\def\@centercr{\ifhmode \unskip\else \@nolnerr\fi \par\@ifstar{\nobreak\@xcentercr}\@xcentercr} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@centercr}{Make robust}% \def\@centercr{\ifhmode \unskip\else \@nolnerr\fi \par\@ifstar{\nobreak\@xcentercr}\@xcentercr} \EndIncludeInRelease \IncludeInRelease{2020/10/01}% {\@icentercr}{centering, etc support calc}% \def\@icentercr[#1]{\@vspace@calcify{#1}\ignorespaces} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@icentercr}{centering, etc support calc}% \def\@icentercr[#1]{\vskip #1\ignorespaces} \EndIncludeInRelease \IncludeInRelease{2020/10/01}% {\centering}{Set finaldhypendemerits}% \DeclareRobustCommand\centering{% \let\\\@centercr \rightskip\@flushglue\leftskip\@flushglue \finalhyphendemerits=\z@ \parindent\z@\parfillskip\z@skip} \DeclareRobustCommand\raggedright{% \let\\\@centercr\@rightskip\@flushglue \rightskip\@rightskip \finalhyphendemerits=\z@ \leftskip\z@skip \parindent\z@} \DeclareRobustCommand\raggedleft{% \let\\\@centercr \rightskip\z@skip\leftskip\@flushglue \finalhyphendemerits=\z@ \parindent\z@\parfillskip\z@skip} \EndIncludeInRelease \IncludeInRelease{2019/10/01}% {\centering}{Make commands robust}% \DeclareRobustCommand\centering{% \let\\\@centercr \rightskip\@flushglue\leftskip\@flushglue \parindent\z@\parfillskip\z@skip} \DeclareRobustCommand\raggedright{% \let\\\@centercr\@rightskip\@flushglue \rightskip\@rightskip \leftskip\z@skip \parindent\z@} \DeclareRobustCommand\raggedleft{% \let\\\@centercr \rightskip\z@skip\leftskip\@flushglue \parindent\z@\parfillskip\z@skip} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\centering}{Make commands robust}% \kernel@make@fragile\centering \kernel@make@fragile\raggedright \kernel@make@fragile\raggedleft \EndIncludeInRelease \IncludeInRelease{2023/11/01}% {\@vobeytabs}{Obeyed tabs}% {\catcode`\ =\active% \gdef\@vobeyspaces{\catcode`\ \active\let \@xobeysp\@vobeytabs}} {\catcode`\^^I=\active \gdef\@vobeytabs{\catcode`\^^I\active\let^^I\@xobeytab}% \global\let^^I=\space } \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@vobeytabs}{Obeyed tabs}% {\catcode`\ =\active% \gdef\@vobeyspaces{\catcode`\ \active\let \@xobeysp}} \let\@vobeytabs\@undefined \EndIncludeInRelease \IncludeInRelease{2017-04-15}{\@verbatim}% {Disable hyphenation in verbatim}% \def\@verbatim{\trivlist \item\relax \if@minipage\else\vskip\parskip\fi \leftskip\@totalleftmargin\rightskip\z@skip \parindent\z@\parfillskip\@flushglue\parskip\z@skip \@@par \language\l@nohyphenation \@tempswafalse \def\par{% \if@tempswa \leavevmode \null \@@par\penalty\interlinepenalty \else \@tempswatrue \ifhmode\@@par\penalty\interlinepenalty\fi \fi}% \let\do\@makeother \dospecials \obeylines \verbatim@font \@noligs \everypar \expandafter{\the\everypar \unpenalty}% } \EndIncludeInRelease \IncludeInRelease{0000-00-00}{\@verbatim}% {Disable hyphenation in verbatim}% \def\@verbatim{\trivlist \item\relax \if@minipage\else\vskip\parskip\fi \leftskip\@totalleftmargin\rightskip\z@skip \parindent\z@\parfillskip\@flushglue\parskip\z@skip \@@par \@tempswafalse \def\par{% \if@tempswa \leavevmode \null \@@par\penalty\interlinepenalty \else \@tempswatrue \ifhmode\@@par\penalty\interlinepenalty\fi \fi}% \let\do\@makeother \dospecials \obeylines \verbatim@font \@noligs \hyphenchar\font\m@ne \everypar \expandafter{\the\everypar \unpenalty}% } \EndIncludeInRelease \IncludeInRelease{2018/12/01}% {\verbvisiblespace}{Setup visible space for \verb}% \DeclareRobustCommand\asciispace{\char 32 } \ifx\Umathcode\@undefined \let\verbvisiblespace\asciispace % Pdftex version \else \DeclareRobustCommand\verbvisiblespace {\leavevmode{\usefont{OT1}{cmtt}{m}{n}\asciispace}} % xetex/luatex version \fi \newbox\@verbvisiblespacebox \@namedef{verbatim*}{\@verbatim \@setupverbvisiblespace \frenchspacing\@vobeyspaces\@sxverbatim} \expandafter\let\csname endverbatim*\endcsname =\endverbatim \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\verbvisiblespace}{Setup visible space for \verb}% \@namedef{verbatim*}{\@verbatim\@sxverbatim} \let\asciispace \@undefined \let\verbvisiblespace \@undefined \let\@setupverbvisiblespace\@undefined \let\@verbvisiblespacebox \@undefined \EndIncludeInRelease \IncludeInRelease{2023/11/01}% {\@setupverbvisiblespace}{Setup visible tab for \verb}% \def\@setupverbvisiblespace{% \ifx\verbvisiblespace\asciispace \let\@xobeysp\asciispace \else \setbox\z@\hbox{x}% \setbox\@verbvisiblespacebox\hbox to\wd\z@{\hss\verbvisiblespace\hss}% \def\@xobeysp{\leavevmode\copy\@verbvisiblespacebox}% \fi \@setupverbvisibletab } \EndIncludeInRelease \IncludeInRelease{2018/12/01}% {\@setupverbvisiblespace}{Setup visible space for \verb}% \def\@setupverbvisiblespace{% \ifx\verbvisiblespace\asciispace \let\@xobeysp\asciispace \else \setbox\z@\hbox{x}% \setbox\@verbvisiblespacebox\hbox to\wd\z@{\hss\verbvisiblespace\hss}% \def\@xobeysp{\leavevmode\copy\@verbvisiblespacebox}% \fi } \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@setupverbvisiblespace}{Setup visible space for \verb}% \let\@setupverbvisiblespace\@undefined \EndIncludeInRelease \IncludeInRelease{2023/11/01}% {\@setupverbvisibletab}{Setup visible tab for \verb}% \def\@setupverbvisibletab{\let\@xobeytab\@xobeysp} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@setupverbvisibletab}{Setup visible tab for \verb}% \let\@setupverbvisibletab\@undefined \EndIncludeInRelease \IncludeInRelease{2023/11/01}% {\@sverb}{Support visible tabs}% \def\@sverb#1{\if\noexpand#1 \expandafter\@sverb\else\@@sverb{#1}\fi} \def\@@sverb#1{% \catcode`#1\active \lccode`\~`#1% \gdef\verb@balance@group{\verb@egroup \@latex@error{\noexpand\verb illegal in argument}\@ehc}% \aftergroup\verb@balance@group \lowercase{\let~\verb@egroup}% \ifnum0% \ifnum\catcode`\ =\active\else 1\fi \ifnum\catcode`\^^I=\active\else 1\fi =0 % \else \@setupverbvisiblespace \@vobeyspaces \fi } \EndIncludeInRelease \IncludeInRelease{2020/10/01}% {\@sverb}{Drop spaces before \verb delimiter}% \def\@@sverb#1{% \catcode`#1\active \lccode`\~`#1% \gdef\verb@balance@group{\verb@egroup \@latex@error{\noexpand\verb illegal in argument}\@ehc}% \aftergroup\verb@balance@group \lowercase{\let~\verb@egroup}% \ifnum\catcode`\ =\active \else \@setupverbvisiblespace \@vobeyspaces \fi } \EndIncludeInRelease \IncludeInRelease{2018/12/01}% {\@sverb}{Setup visible space for \verb}% \def\@sverb#1{% \catcode`#1\active \lccode`\~`#1% \gdef\verb@balance@group{\verb@egroup \@latex@error{\noexpand\verb illegal in command argument}\@ehc}% \aftergroup\verb@balance@group \lowercase{\let~\verb@egroup}% \ifnum\catcode`\ =\active \else \@setupverbvisiblespace \@vobeyspaces \fi } \let\@@sverb\@undefined \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@sverb}{Setup visible space for \verb}% \def\@sverb#1{% \catcode`#1\active \lccode`\~`#1% \gdef\verb@balance@group{\verb@egroup \@latex@error{\noexpand\verb illegal in command argument}\@ehc}% \aftergroup\verb@balance@group \lowercase{\let~\verb@egroup}}% \EndIncludeInRelease \IncludeInRelease{2017-04-15}{\verb}% {Disable hyphenation in verb}% \def\verb{\relax\ifmmode\hbox\else\leavevmode\null\fi \bgroup \verb@eol@error \let\do\@makeother \dospecials \verbatim@font\@noligs \language\l@nohyphenation \@ifstar\@sverb\@verb} \EndIncludeInRelease \IncludeInRelease{0000-00-00}{\verb}% {Disable hyphenation in verb}% \def\verb{\relax\ifmmode\hbox\else\leavevmode\null\fi \bgroup \verb@eol@error \let\do\@makeother \dospecials \verbatim@font\@noligs \@ifstar\@sverb\@verb} \EndIncludeInRelease %%% From File: ltmath.dtx \IncludeInRelease{2019/10/01}% {\vphantom}{Make commands robust}% \DeclareRobustCommand\vphantom{\v@true\h@false\ph@nt} \DeclareRobustCommand\hphantom{\v@false\h@true\ph@nt} \DeclareRobustCommand\phantom{\v@true\h@true\ph@nt} \DeclareRobustCommand\mathstrut{\vphantom(} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\vphantom}{Make commands robust}% \kernel@make@fragile\vphantom \kernel@make@fragile\hphantom \kernel@make@fragile\phantom \kernel@make@fragile\mathstrut \EndIncludeInRelease \IncludeInRelease{2018/12/01}% {\finph@nt}{Start LR-mode}% \def\finph@nt{% \setbox\tw@\null \ifv@ \ht\tw@\ht\z@ \dp\tw@\dp\z@\fi \ifh@ \wd\tw@\wd\z@\fi \leavevmode@ifvmode\box\tw@} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\finph@nt}{Start LR-mode}% \def\finph@nt{% \setbox\tw@\null \ifv@ \ht\tw@\ht\z@ \dp\tw@\dp\z@\fi \ifh@ \wd\tw@\wd\z@\fi \box\tw@} \EndIncludeInRelease \IncludeInRelease{2022/11/01}% {\mathsm@sh}{Guard against reboxing}% \def\mathsm@sh#1#2{% \setbox\z@\hbox{$\m@th#1{#2}$}% {}\finsm@sh} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\mathsm@sh}{Guard against reboxing}% \def\mathsm@sh#1#2{% \setbox\z@\hbox{$\m@th#1{#2}$}\finsm@sh} \EndIncludeInRelease \IncludeInRelease{2018/12/01}% {\finsm@sh}{Start LR-mode}% \def\finsm@sh{\ht\z@\z@ \dp\z@\z@ \leavevmode@ifvmode\box\z@} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\finsm@sh}{Start LR-mode}% \def\finsm@sh{\ht\z@\z@ \dp\z@\z@ \box\z@} \EndIncludeInRelease \IncludeInRelease{2019/10/01}% {\cases}{Make commands robust}% \DeclareRobustCommand*\cases[1]{\left\{\,\vcenter{\normalbaselines\m@th \ialign{$##\hfil$&\quad{##}\hfil\crcr#1\crcr}}\right.} \DeclareRobustCommand*\matrix[1]{\null\,\vcenter{\normalbaselines\m@th \ialign{\hfil$##$\hfil&&\quad\hfil$##$\hfil\crcr \mathstrut\crcr\noalign{\kern-\baselineskip} #1\crcr\mathstrut\crcr\noalign{\kern-\baselineskip}}}\,} \DeclareRobustCommand*\pmatrix[1]{\left(\matrix{#1}\right)} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\cases}{Make commands robust}% \kernel@make@fragile\cases \kernel@make@fragile\matrix \kernel@make@fragile\pmatrix \EndIncludeInRelease \IncludeInRelease{2020/10/01}% {\tmspace}{amsmath spacing commands}% \DeclareRobustCommand\tmspace[3]{% \ifmmode\mskip#1#2\else\leavevmode@ifvmode\kern#1#3\fi\relax} \DeclareRobustCommand\,{\tmspace+\thinmuskip{.16667em}} \let\thinspace\, \DeclareRobustCommand\!{\tmspace-\thinmuskip{.16667em}} \let\negthinspace\! \DeclareRobustCommand\:{\tmspace+\medmuskip{.2222em}} \let\medspace\: \let\>=\: \DeclareRobustCommand\negmedspace{\tmspace-\medmuskip{.2222em}} \DeclareRobustCommand\;{\tmspace+\thickmuskip{.2777em}} \let\thickspace\; \DeclareRobustCommand\negthickspace{\tmspace-\thickmuskip{.2777em}} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\tmspace}{amsmath spacing commands}% \let\tmspace\@undefined \DeclareRobustCommand{\,}{% \relax\ifmmode\mskip\thinmuskip\else\thinspace\fi} \DeclareRobustCommand\thinspace{\leavevmode@ifvmode\kern .16667em } \DeclareRobustCommand\negthinspace{\leavevmode@ifvmode\kern-.16667em } \def\>{\mskip\medmuskip} \let\:=\> \def\;{\mskip\thickmuskip} \def\!{\mskip-\thinmuskip} \let\negmedspace\@undefined \let\negthickspace\@undefined \EndIncludeInRelease \IncludeInRelease{2015/01/01}{\(}{Make \( robust}% \DeclareRobustCommand\({% \relax\ifmmode\@badmath\else$\fi}% \DeclareRobustCommand\){% \relax\ifmmode\ifinner$\else\@badmath\fi\else \@badmath\fi}% \EndIncludeInRelease \IncludeInRelease{0000/00/00}{\(}{Make \( robust}% \def\({% \relax\ifmmode\@badmath\else$\fi}% \expandafter\let\csname\string( \endcsname\@undefined \def\){% \relax\ifmmode\ifinner$\else\@badmath\fi\else \@badmath\fi}% \expandafter\let\csname\string) \endcsname\@undefined \EndIncludeInRelease \IncludeInRelease{2015/01/01}{\[}{Make \[ robust}% \DeclareRobustCommand\[{% \relax\ifmmode \@badmath \else \ifvmode \nointerlineskip \makebox[.6\linewidth]{}% \fi $$%%$$ BRACE MATCH HACK \fi }% \DeclareRobustCommand\]{% \relax\ifmmode \ifinner \@badmath \else $$%%$$ BRACE MATCH HACK \fi \else \@badmath \fi \ignorespaces }% \EndIncludeInRelease \IncludeInRelease{0000/00/00}{\[}{Make \[ robust}% \def\[{% \relax\ifmmode \@badmath \else \ifvmode \nointerlineskip \makebox[.6\linewidth]{}% \fi $$%%$$ BRACE MATCH HACK \fi }% \expandafter\let\csname\string[ \endcsname\@undefined \def\]{% \relax\ifmmode \ifinner \@badmath \else $$%%$$ BRACE MATCH HACK \fi \else \@badmath \fi \ignorespaces }% \expandafter\let\csname\string] \endcsname\@undefined \EndIncludeInRelease \IncludeInRelease{2020/10/01}% {\@xeqncr}{eqnarray support calc syntax}% \def\@xeqncr[#1]{% \ifnum0=`{\fi}% \@@eqncr \noalign{\penalty\@eqpen\vskip\jot\@vspace@calcify{#1}}% } \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@xeqncr}{eqnarray support calc syntax}% \def\@xeqncr[#1]{% \ifnum0=`{\fi}% \@@eqncr \noalign{\penalty\@eqpen\vskip\jot\vskip #1\relax}% } \EndIncludeInRelease \IncludeInRelease{2023/06/01}% {\eqno}{add ignorespaces to eqno}% \let\@kernel@eqno\eqno \let\@kernel@leqno\leqno \protected\def\eqno{\@kernel@eqno\aftergroup\ignorespaces} \protected\def\leqno{\@kernel@leqno\aftergroup\ignorespaces} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\eqno}{add ignorespaces to eqno}% \let\eqno\@kernel@eqno \let\leqno\@kernel@leqno \EndIncludeInRelease %%% From File: ltlists.dtx \IncludeInRelease{2024/11/01}% {\@endpetrue}{New @endpe handling}% \def\@endpefalse{\global\let\if@endpe\iffalse} \def\@endpetrue {% \global\let\if@endpe\iftrue \ifnum\currentgrouplevel>\z@ \aftergroup\propagate@doendpe \fi } \def\propagate@doendpe{\if@endpe \@doendpe \fi} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@endpetrue}{New @endpe handling}% \def\@endpefalse{\let\if@endpe\iffalse} \def\@endpetrue{\let\if@endpe\iftrue} \EndIncludeInRelease %%% From File: ltboxes.dtx \IncludeInRelease{2015/01/01}% {\makebox}{Make \makebox robust}% \DeclareRobustCommand\makebox{% \leavevmode \@ifnextchar(%) \@makepicbox {\@ifnextchar[\@makebox\mbox}}% \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\makebox}{Make \makebox robust}% \def\makebox{% \leavevmode \@ifnextchar(%) \@makepicbox {\@ifnextchar[\@makebox\mbox}}% \expandafter\let\csname makebox \endcsname\@undefined \EndIncludeInRelease \IncludeInRelease{2023/11/01}% {\@imakebox}{Unknown alignment warning}% \long\def\@imakebox[#1][#2]#3{% \@begin@tempboxa\hbox{#3}% \setlength\@tempdima{#1}% support calc \hb@xt@\@tempdima{% \expandafter\ifx\csname bm@#2\endcsname\relax \bm@c \@latex@warning{Unexpected alignment #2}% \else \csname bm@#2\endcsname \fi}% \@end@tempboxa} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@imakebox}{Unknown alignment warning}% \long\def\@imakebox[#1][#2]#3{% \@begin@tempboxa\hbox{#3}% \setlength\@tempdima{#1}% support calc \hb@xt@\@tempdima{\csname bm@#2\endcsname}% \@end@tempboxa} \EndIncludeInRelease \IncludeInRelease{2020/10/01}% {\@imakepicbox}{default units}% \long\def\@imakepicbox(#1,#2)[#3]#4{% \@defaultunitsset\@tempdimc{#2}\unitlength \vbox to\@tempdimc {\let\mb@b\vss \let\mb@l\hss\let\mb@r\hss \let\mb@t\vss \@tfor\reserved@a :=#3\do{% \if s\reserved@a \let\mb@l\relax\let\mb@r\relax \else \expandafter\let\csname mb@\reserved@a\endcsname\relax \fi}% \mb@t \@defaultunitsset\@tempdimc{#1}\unitlength \hb@xt@\@tempdimc{\mb@l #4\mb@r}% \mb@b \kern\z@}} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@imakepicbox}{default units}% \long\def\@imakepicbox(#1,#2)[#3]#4{% \vbox to#2\unitlength {\let\mb@b\vss \let\mb@l\hss\let\mb@r\hss \let\mb@t\vss \@tfor\reserved@a :=#3\do{% \if s\reserved@a \let\mb@l\relax\let\mb@r\relax \else \expandafter\let\csname mb@\reserved@a\endcsname\relax \fi}% \mb@t \hb@xt@ #1\unitlength{\mb@l #4\mb@r}% \mb@b \kern\z@}} \EndIncludeInRelease \IncludeInRelease{2021/06/01}% {\color@begingroup}{color group settings}% \let\color@begingroup\begingroup \def\color@setgroup{\color@begingroup} % changed further in color package \let\normalcolor\relax % remains untouched; only changed in a color package \def\color@hbox{\hbox\bgroup\color@begingroup} \def\color@vbox{\vbox\bgroup\color@begingroup} \def\color@endbox{\color@endgroup\egroup} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\color@begingroup}{color group settings}% \let\color@begingroup\relax \let\color@setgroup\relax \let\normalcolor\relax \let\color@hbox\relax \let\color@vbox\relax \let\color@endbox\relax \EndIncludeInRelease \IncludeInRelease{2024/11/01}% {\color@endgroup}{color group settings}% \def\color@endgroup{\endgraf\@endpefalse\endgroup} \EndIncludeInRelease \IncludeInRelease{2021/06/01}% {\color@endgroup}{color group settings}% \def\color@endgroup{\endgraf\endgroup} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\color@endgroup}{color group settings}% \let\color@endgroup\relax \EndIncludeInRelease \IncludeInRelease{2015/01/01}% {\savebox}{Make \savebox robust}% \DeclareRobustCommand\savebox[1]{% \@ifnextchar(%) {\@savepicbox#1}{\@ifnextchar[{\@savebox#1}{\sbox#1}}}% \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\savebox}{Make \savebox robust}% \def\savebox#1{% \@ifnextchar(%) {\@savepicbox#1}{\@ifnextchar[{\@savebox#1}{\sbox#1}}}% \expandafter\let\csname savebox \endcsname\@undefined \EndIncludeInRelease \IncludeInRelease{2015/01/01}% {\framebox}{Make \framebox robust}% \DeclareRobustCommand\framebox{% \@ifnextchar(%) \@framepicbox{\@ifnextchar[\@framebox\fbox}}% \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\framebox}{Make \framebox robust}% \def\framebox{% \@ifnextchar(%) \@framepicbox{\@ifnextchar[\@framebox\fbox}}% \expandafter\let\csname framebox \endcsname\@undefined \EndIncludeInRelease \IncludeInRelease{2023/11/01}% {\@iframebox}{Unknown alignment warning}% \long\def\@iframebox[#1][#2]#3{% \leavevmode \@begin@tempboxa\hbox{#3}% \setlength\@tempdima{#1}% \setbox\@tempboxa\hb@xt@\@tempdima {\kern\fboxsep \expandafter\ifx\csname bm@#2\endcsname\relax \bm@c \@latex@warning{Unexpected alignment #2}% \else \csname bm@#2\endcsname \fi \kern\fboxsep}% \@frameb@x{\kern-\fboxrule}% \@end@tempboxa} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@iframebox}{Unknown alignment warning}% \long\def\@iframebox[#1][#2]#3{% \leavevmode \@begin@tempboxa\hbox{#3}% \setlength\@tempdima{#1}% \setbox\@tempboxa\hb@xt@\@tempdima {\kern\fboxsep\csname bm@#2\endcsname\kern\fboxsep}% \@frameb@x{\kern-\fboxrule}% \@end@tempboxa} \EndIncludeInRelease \IncludeInRelease{2015/01/01}% {\parbox}{Make \parbox robust}% \DeclareRobustCommand\parbox{% \@ifnextchar[%] \@iparbox {\@iiiparbox c\relax[s]}}% \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\parbox}{Make \parbox robust}% \def\parbox{% \@ifnextchar[%] \@iparbox {\@iiiparbox c\relax[s]}}% \expandafter\let\csname parbox \endcsname\@undefined \EndIncludeInRelease \IncludeInRelease{2023/11/01}% {\@iiiparbox}{Unknown alignment warning}% \long\def\@iiiparbox#1#2[#3]#4#5{% \leavevmode \@pboxswfalse \setlength\@tempdima{#4}% \@begin@tempboxa\vbox{\hsize\@tempdima\@parboxrestore#5\@@par}% \ifx\relax#2\else \setlength\@tempdimb{#2}% \edef\@parboxto{to\the\@tempdimb}% \fi \if#1b\vbox \else\if #1t\vtop \else\ifmmode\vcenter \else\@pboxswtrue $\vcenter \fi\fi\fi \@parboxto{\let\hss\vss\let\unhbox\unvbox \expandafter\ifx\csname bm@#3\endcsname\relax \bm@c \@latex@warning{Unexpected alignment #3}% \else \csname bm@#3\endcsname \fi}% \if@pboxsw \m@th$\fi \@end@tempboxa} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@iiiparbox}{Unknown alignment warning}% \long\def\@iiiparbox#1#2[#3]#4#5{% \leavevmode \@pboxswfalse \setlength\@tempdima{#4}% \@begin@tempboxa\vbox{\hsize\@tempdima\@parboxrestore#5\@@par}% \ifx\relax#2\else \setlength\@tempdimb{#2}% \edef\@parboxto{to\the\@tempdimb}% \fi \if#1b\vbox \else\if #1t\vtop \else\ifmmode\vcenter \else\@pboxswtrue $\vcenter \fi\fi\fi \@parboxto{\let\hss\vss\let\unhbox\unvbox \csname bm@#3\endcsname}% \if@pboxsw \m@th$\fi \@end@tempboxa} \EndIncludeInRelease \IncludeInRelease{2017-04-15}% {\normallineskiplimit} {reset \lineskiplimit}% \def\@arrayparboxrestore{% \let\if@nobreak\iffalse \let\if@noskipsec\iffalse \let\par\@@par \let\-\@dischyph \let\'\@acci\let\`\@accii\let\=\@acciii \parindent\z@ \parskip\z@skip \everypar{}% \linewidth\hsize \@totalleftmargin\z@ \leftskip\z@skip \rightskip\z@skip \@rightskip\z@skip \parfillskip\@flushglue \lineskip\normallineskip \lineskiplimit\normallineskiplimit \baselineskip\normalbaselineskip \sloppy} \EndIncludeInRelease \IncludeInRelease{0000-00-00}% {\normallineskiplimit} {reset \lineskiplimit}% \def\@arrayparboxrestore{% \let\if@nobreak\iffalse \let\if@noskipsec\iffalse \let\par\@@par \let\-\@dischyph \let\'\@acci\let\`\@accii\let\=\@acciii \parindent\z@ \parskip\z@skip \everypar{}% \linewidth\hsize \@totalleftmargin\z@ \leftskip\z@skip \rightskip\z@skip \@rightskip\z@skip \parfillskip\@flushglue \lineskip\normallineskip \baselineskip\normalbaselineskip \sloppy} \EndIncludeInRelease \IncludeInRelease{2021/11/15}% {\@mpfootnotetext}{footnotetext tagging}% \long\def\@mpfootnotetext#1{% \global\setbox\@mpfootins\vbox{% \unvbox\@mpfootins \reset@font\footnotesize \hsize\columnwidth \@parboxrestore \def\@currentcounter{mpfootnote}% \protected@edef\@currentlabel {\csname p@mpfootnote\endcsname\@thefnmark}% \color@begingroup \@makefntext{% \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}% \par \color@endgroup}} \EndIncludeInRelease \IncludeInRelease{2021/06/01}% {\@mpfootnotetext}{footnotetext tagging}% \long\def\@mpfootnotetext#1{% \global\setbox\@mpfootins\vbox{% \unvbox\@mpfootins \reset@font\footnotesize \hsize\columnwidth \@parboxrestore \protected@edef\@currentlabel {\csname p@mpfootnote\endcsname\@thefnmark}% \color@begingroup \@makefntext{% \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}% \par \color@endgroup}} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@mpfootnotetext}{footnotetext tagging}% \long\def\@mpfootnotetext#1{% \global\setbox\@mpfootins\vbox{% \unvbox\@mpfootins \reset@font\footnotesize \hsize\columnwidth \@parboxrestore \protected@edef\@currentlabel {\csname p@mpfootnote\endcsname\@thefnmark}% \color@begingroup \@makefntext{% \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}% \color@endgroup}} \EndIncludeInRelease \IncludeInRelease{2015/01/01}% {\rule}{Make \rule robust}% \DeclareRobustCommand\rule{\@ifnextchar[\@rule{\@rule[\z@]}}% \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\rule}{Make \rule robust}% \def\rule{\@ifnextchar[\@rule{\@rule[\z@]}}% \expandafter\let\csname rule \endcsname\@undefined \EndIncludeInRelease \IncludeInRelease{2015/01/01}% {\raisebox}{Make \raisebox robust}% \DeclareRobustCommand\raisebox[1]{% \leavevmode \@ifnextchar[{\@rsbox{#1}}{\@irsbox{#1}[]}} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\raisebox}{Make \raisebox robust}% \def\raisebox#1{% \leavevmode \@ifnextchar[{\@rsbox{#1}}{\@irsbox{#1}[]}} \expandafter\let\csname raisebox \endcsname\@undefined \EndIncludeInRelease \IncludeInRelease{2024/06/01}% {\@finalstrut}{final strut correction}% \def\@finalstrut#1{% \unskip \ifhmode \nobreak \else \vskip-\baselineskip \fi \vrule\@width\z@\@height\z@\@depth\dp#1} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@finalstrut}{final strut correction}% \def\@finalstrut#1{% \unskip\ifhmode\nobreak\fi \vrule\@width\z@\@height\z@\@depth\dp#1} \EndIncludeInRelease %%% From File: lttab.dtx \IncludeInRelease{2020/10/01}% {\@itabcr}{Tabbing calc syntax}% \def\@itabcr[#1]{\@vspace@calcify{#1}\@startline\ignorespaces} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@itabcr}{Tabbing calc syntax}% \def\@itabcr[#1]{\vskip #1\@startline\ignorespaces} \EndIncludeInRelease \IncludeInRelease{2019/10/01}% {\pushtabs}{Make commands robust}% \DeclareRobustCommand\pushtabs{% \@stopfield\@addfield\global\advance\@tabpush \@ne \begingroup \@contfield} \DeclareRobustCommand\poptabs{\@stopfield\@addfield \ifnum \@tabpush >\z@ \endgroup \global\advance\@tabpush \m@ne \ifnum \@curtab >\@hightab \global \@curtab \@hightab \@badtab \fi \else \@badpoptabs \fi \@contfield} \DeclareRobustCommand\kill{\@stopfield\@startline\ignorespaces} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\pushtabs}{Make commands robust}% \kernel@make@fragile\pushtabs \kernel@make@fragile\poptabs \kernel@make@fragile\kill \EndIncludeInRelease \IncludeInRelease{2020/10/01}% {\@yargarraycr}{tabular support calc syntax}% \def\@yargarraycr#1{\cr\noalign{\@vspace@calcify{#1}}} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@yargarraycr}{tabular support calc syntax}% \def\@yargarraycr#1{\cr\noalign{\vskip #1}} \EndIncludeInRelease %%% From File: ltpictur.dtx \IncludeInRelease{2020/10/01}% {\@defaultunitsset}{default units}% \def\@defaultunitsset#1#2#3{% \@defaultunits#1\dimexpr#2#3\relax\relax\@nnil} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@defaultunitsset}{default units}% \let\@defaultunitsset\@undefined \EndIncludeInRelease \IncludeInRelease{2020/10/01}% {\@picture}{default units}% \def\@picture(#1,#2)(#3,#4){% \@defaultunitsset\@picht{#2}\unitlength \@defaultunitsset\@tempdimc{#1}\unitlength \setbox\@picbox\hb@xt@\@tempdimc\bgroup \@defaultunitsset\@tempdimc{#3}\unitlength \hskip -\@tempdimc \@defaultunitsset\@tempdimc{#4}\unitlength \lower\@tempdimc\hbox\bgroup \ignorespaces} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@picture}{default units}% \def\@picture(#1,#2)(#3,#4){% \@picht#2\unitlength \setbox\@picbox\hb@xt@#1\unitlength\bgroup \hskip -#3\unitlength \lower #4\unitlength\hbox\bgroup \ignorespaces} \EndIncludeInRelease \IncludeInRelease{2020/10/01}% {\put}{default units}% \expandafter\let\csname put \endcsname\@undefind \long\def\put(#1,#2)#3{% \@killglue \@defaultunitsset\@tempdimc{#2}\unitlength \raise\@tempdimc \hb@xt@\z@{% \@defaultunitsset\@tempdimc{#1}\unitlength \kern\@tempdimc #3\hss}% \ignorespaces} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\put}{default units}% \expandafter\let\csname put \endcsname\@undefind \long\def\put(#1,#2)#3{% \@killglue\raise#2\unitlength \hb@xt@\z@{\kern#1\unitlength #3\hss}% \ignorespaces} \EndIncludeInRelease \IncludeInRelease{2020/10/01}% {\multiput}{default units}% \expandafter\let\csname multiput \endcsname\@undefind \def\multiput(#1,#2)#3{% \@defaultunitsset\@xdim{#1}\unitlength \@defaultunitsset\@ydim{#2}\unitlength \@multiput(} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\multiput}{default units}% \expandafter\let\csname multiput \endcsname\@undefind \def\multiput(#1,#2)#3{% \@xdim #1\unitlength \@ydim #2\unitlength \@multiput(} \EndIncludeInRelease \IncludeInRelease{2020/10/01}% {\@multiput}{default units}% \long\def\@multiput(#1,#2)#3#4{% \@killglue\@multicnt #3\relax \@whilenum \@multicnt >\z@\do {\raise\@ydim\hb@xt@\z@{\kern\@xdim #4\hss}% \advance\@multicnt\m@ne \@defaultunitsset{\advance\@xdim}{#1}\unitlength \@defaultunitsset{\advance\@ydim}{#2}\unitlength}% \ignorespaces} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@multiput}{default units}% \long\def\@multiput(#1,#2)#3#4{% \@killglue\@multicnt #3\relax \@whilenum \@multicnt >\z@\do {\raise\@ydim\hb@xt@\z@{\kern\@xdim #4\hss}% \advance\@multicnt\m@ne \advance\@xdim#1\unitlength\advance\@ydim#2\unitlength}% \ignorespaces} \EndIncludeInRelease \IncludeInRelease{2020/10/01}% {\@istackcr}{\shortstack calc support}% \def\@istackcr[#1]{\cr\noalign{\@vspace@calcify{#1}}\ignorespaces} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@istackcr}{\shortstack calc support}% \def\@istackcr[#1]{\cr\noalign{\vskip #1}\ignorespaces} \EndIncludeInRelease \IncludeInRelease{2020/10/01}% {\line}{default units}% \expandafter\let\csname line \endcsname\@undefind \def\line(#1,#2)#3{\@xarg #1\relax \@yarg #2\relax \@defaultunitsset\@linelen{#3}\unitlength \ifdim\@linelen<\z@\@badlinearg\else \ifnum\@xarg =\z@ \@vline \else \ifnum\@yarg =\z@ \@hline \else \@sline\fi \fi \fi} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\line}{default units}% \expandafter\let\csname line \endcsname\@undefind \def\line(#1,#2)#3{\@xarg #1\relax \@yarg #2\relax \@linelen #3\unitlength \ifdim\@linelen<\z@\@badlinearg\else \ifnum\@xarg =\z@ \@vline \else \ifnum\@yarg =\z@ \@hline \else \@sline\fi \fi \fi} \EndIncludeInRelease \IncludeInRelease{2020/10/01}% {\vector}{default units}% \expandafter\let\csname vector \endcsname\@undefind \def\vector(#1,#2)#3{\@xarg #1\relax \@yarg #2\relax \@tempcnta \ifnum\@xarg<\z@ -\@xarg\else\@xarg\fi \ifnum\@tempcnta<5\relax \@defaultunitsset\@linelen{#3}\unitlength \ifdim\@linelen<\z@\@badlinearg\else \ifnum\@xarg =\z@ \@vvector \else \ifnum\@yarg =\z@ \@hvector \else \@svector\fi \fi \fi \else\@badlinearg\fi} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\vector}{default units}% \expandafter\let\csname vector \endcsname\@undefind \def\vector(#1,#2)#3{\@xarg #1\relax \@yarg #2\relax \@tempcnta \ifnum\@xarg<\z@ -\@xarg\else\@xarg\fi \ifnum\@tempcnta<5\relax \@linelen #3\unitlength \ifdim\@linelen<\z@\@badlinearg\else \ifnum\@xarg =\z@ \@vvector \else \ifnum\@yarg =\z@ \@hvector \else \@svector\fi \fi \fi \else\@badlinearg\fi} \EndIncludeInRelease \IncludeInRelease{2020/10/01}% {\dashbox}{default units}% \expandafter\let\csname dashbox \endcsname\@undefind \def\dashbox#1(#2,#3){\leavevmode\hb@xt@\z@{\baselineskip \z@skip \lineskip \z@skip \@defaultunitsset\@dashdim{#2}\unitlength \@dashcnt \@dashdim \advance\@dashcnt 200 \@defaultunitsset\@dashdim{#1}\unitlength \divide\@dashcnt \@dashdim \ifodd\@dashcnt\@dashdim \z@ \advance\@dashcnt \@ne \divide\@dashcnt \tw@ \else \divide\@dashdim \tw@ \divide\@dashcnt \tw@ \advance\@dashcnt \m@ne \setbox\@dashbox \hbox{\vrule \@height \@halfwidth \@depth \@halfwidth \@width \@dashdim}\put(0,0){\copy\@dashbox}% \put(0,#3){\copy\@dashbox}% \put(#2,0){\hskip-\@dashdim\copy\@dashbox}% \put(#2,#3){\hskip-\@dashdim\box\@dashbox}% \multiply\@dashdim \thr@@ \fi \setbox\@dashbox \hbox{% \@defaultunitsset\@tempdimc{#1}\unitlength \vrule \@height \@halfwidth \@depth \@halfwidth \@width \@tempdimc \hskip\@tempdimc}% \@tempcnta\z@ \put(0,0){\hskip\@dashdim \@whilenum \@tempcnta <\@dashcnt \do{\copy\@dashbox\advance\@tempcnta \@ne }}\@tempcnta\z@ \put(0,#3){\hskip\@dashdim \@whilenum \@tempcnta <\@dashcnt \do{\copy\@dashbox\advance\@tempcnta \@ne }}% \@defaultunitsset\@dashdim{#3}\unitlength \@dashcnt \@dashdim \advance\@dashcnt 200 \@defaultunitsset\@dashdim{#1}\unitlength \divide\@dashcnt \@dashdim \ifodd\@dashcnt \@dashdim \z@ \advance\@dashcnt \@ne \divide\@dashcnt \tw@ \else \divide\@dashdim \tw@ \divide\@dashcnt \tw@ \advance\@dashcnt \m@ne \setbox\@dashbox\hbox{\hskip -\@halfwidth \vrule \@width \@wholewidth \@height \@dashdim}\put(0,0){\copy\@dashbox}% \put(#2,0){\copy\@dashbox}% \put(0,#3){\lower\@dashdim\copy\@dashbox}% \put(#2,#3){\lower\@dashdim\copy\@dashbox}% \multiply\@dashdim \thr@@ \fi \@defaultunitsset\@tempdimb{#1}\unitlength \setbox\@dashbox\hbox{% \vrule \@width \@wholewidth \@height\@tempdimb}% \@tempcnta\z@ \put(0,0){\hskip -\@halfwidth \vbox{\@whilenum \@tempcnta <\@dashcnt \do{\vskip\@tempdimb\copy\@dashbox\advance\@tempcnta \@ne }% \vskip\@dashdim}}\@tempcnta\z@ \put(#2,0){\hskip -\@halfwidth \vbox{\@whilenum \@tempcnta<\@dashcnt \do{\vskip\@tempdimb\copy\@dashbox\advance\@tempcnta \@ne }% \vskip\@dashdim}}}\@makepicbox(#2,#3)} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\dashbox}{default units}% \expandafter\let\csname dashbox \endcsname\@undefind \def\dashbox#1(#2,#3){% \leavevmode\hb@xt@\z@{\baselineskip \z@skip \lineskip \z@skip \@dashdim #2\unitlength \@dashcnt \@dashdim \advance\@dashcnt 200 \@dashdim #1\unitlength\divide\@dashcnt \@dashdim \ifodd\@dashcnt\@dashdim \z@ \advance\@dashcnt \@ne \divide\@dashcnt \tw@ \else \divide\@dashdim \tw@ \divide\@dashcnt \tw@ \advance\@dashcnt \m@ne \setbox\@dashbox \hbox{% \vrule \@height \@halfwidth \@depth \@halfwidth \@width \@dashdim}\put(0,0){\copy\@dashbox}% \put(0,#3){\copy\@dashbox}% \put(#2,0){\hskip-\@dashdim\copy\@dashbox}% \put(#2,#3){\hskip-\@dashdim\box\@dashbox}% \multiply\@dashdim \thr@@ \fi \setbox\@dashbox \hbox{% \vrule \@height \@halfwidth \@depth \@halfwidth \@width #1\unitlength\hskip #1\unitlength}\@tempcnta\z@ \put(0,0){\hskip\@dashdim \@whilenum \@tempcnta <\@dashcnt \do{\copy\@dashbox\advance\@tempcnta \@ne }}\@tempcnta\z@ \put(0,#3){\hskip\@dashdim \@whilenum \@tempcnta <\@dashcnt \do{\copy\@dashbox\advance\@tempcnta \@ne }}% \@dashdim #3\unitlength \@dashcnt \@dashdim \advance\@dashcnt 200 \@dashdim #1\unitlength\divide\@dashcnt \@dashdim \ifodd\@dashcnt \@dashdim \z@ \advance\@dashcnt \@ne \divide\@dashcnt \tw@ \else \divide\@dashdim \tw@ \divide\@dashcnt \tw@ \advance\@dashcnt \m@ne \setbox\@dashbox\hbox{\hskip -\@halfwidth \vrule \@width \@wholewidth \@height \@dashdim}\put(0,0){\copy\@dashbox}% \put(#2,0){\copy\@dashbox}% \put(0,#3){\lower\@dashdim\copy\@dashbox}% \put(#2,#3){\lower\@dashdim\copy\@dashbox}% \multiply\@dashdim \thr@@ \fi \setbox\@dashbox\hbox{\vrule \@width \@wholewidth \@height #1\unitlength}\@tempcnta\z@ \put(0,0){% \hskip -\@halfwidth \vbox{\@whilenum \@tempcnta <\@dashcnt \do{\vskip #1\unitlength\copy\@dashbox \advance\@tempcnta\@ne }% \vskip\@dashdim}}\@tempcnta\z@ \put(#2,0){% \hskip -\@halfwidth \vbox{\@whilenum \@tempcnta<\@dashcnt \do{\vskip #1\unitlength\copy\@dashbox \advance\@tempcnta \@ne }% \vskip\@dashdim}}}\@makepicbox(#2,#3)} \EndIncludeInRelease \IncludeInRelease{2016/03/31}% {\@ovhlinetrue}% {Avoid almost zero length leaders}% \newif\if@ovvline \@ovvlinetrue \newif\if@ovhline \@ovhlinetrue \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@ovhlinetrue}% {Avoid almost zero length leaders}% \let\if@ovvline\@undefined \let\if@ovhline\@undefined \EndIncludeInRelease \IncludeInRelease{2020/10/01}% {\@oval}{default units}% \def\@oval(#1,#2)[#3]{\begingroup\boxmaxdepth \maxdimen \@ovttrue \@ovbtrue \@ovltrue \@ovrtrue \@ovvlinefalse \@ovhlinefalse \@tfor\reserved@a :=#3\do{% \csname @ov\reserved@a false\endcsname}% \@defaultunitsset\@ovxx{#1}\unitlength \@defaultunitsset\@ovyy{#2}\unitlength \@tempdimb \ifdim \@ovyy >\@ovxx \@ovxx \@ovvlinetrue \else \@ovyy \ifdim \@ovyy =\@ovxx \else \@ovhlinetrue \fi\fi \advance \@tempdimb -2\p@ \@getcirc \@tempdimb \@ovro \ht\@tempboxa \@ovri \dp\@tempboxa \@ovdx\@ovxx \advance\@ovdx -\@tempdima \divide\@ovdx \tw@ \@ovdy\@ovyy \advance\@ovdy -\@tempdima \divide\@ovdy \tw@ \ifdim \@ovdx >\z@ \@ovhlinetrue \fi \ifdim \@ovdy >\z@ \@ovvlinetrue \fi \@circlefnt \setbox\@tempboxa \hbox{\if@ovr \@ovvert32\kern -\@tempdima \fi \if@ovl \kern \@ovxx \@ovvert01\kern -\@tempdima \kern -\@ovxx \fi \if@ovt \@ovhorz \kern -\@ovxx \fi \if@ovb \raise \@ovyy \@ovhorz \fi}\advance\@ovdx\@ovro \advance\@ovdy\@ovro \ht\@tempboxa\z@ \dp\@tempboxa\z@ \@put{-\@ovdx}{-\@ovdy}{\box\@tempboxa}% \endgroup} \EndIncludeInRelease \IncludeInRelease{2016/03/31}% {\@oval}{default units}% \def\@oval(#1,#2)[#3]{\begingroup\boxmaxdepth \maxdimen \@ovttrue \@ovbtrue \@ovltrue \@ovrtrue \@ovvlinefalse \@ovhlinefalse \@tfor\reserved@a :=#3\do{% \csname @ov\reserved@a false\endcsname}% \@ovxx #1\unitlength \@ovyy #2\unitlength \@tempdimb \ifdim \@ovyy >\@ovxx \@ovxx \@ovvlinetrue \else \@ovyy \ifdim \@ovyy =\@ovxx \else \@ovhlinetrue \fi\fi \advance \@tempdimb -2\p@ \@getcirc \@tempdimb \@ovro \ht\@tempboxa \@ovri \dp\@tempboxa \@ovdx\@ovxx \advance\@ovdx -\@tempdima \divide\@ovdx \tw@ \@ovdy\@ovyy \advance\@ovdy -\@tempdima \divide\@ovdy \tw@ \ifdim \@ovdx >\z@ \@ovhlinetrue \fi \ifdim \@ovdy >\z@ \@ovvlinetrue \fi \@circlefnt \setbox\@tempboxa \hbox{\if@ovr \@ovvert32\kern -\@tempdima \fi \if@ovl \kern \@ovxx \@ovvert01\kern -\@tempdima \kern -\@ovxx \fi \if@ovt \@ovhorz \kern -\@ovxx \fi \if@ovb \raise \@ovyy \@ovhorz \fi}\advance\@ovdx\@ovro \advance\@ovdy\@ovro \ht\@tempboxa\z@ \dp\@tempboxa\z@ \@put{-\@ovdx}{-\@ovdy}{\box\@tempboxa}% \endgroup} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@oval}{default units}% \def\@oval(#1,#2)[#3]{\begingroup\boxmaxdepth \maxdimen \@ovttrue \@ovbtrue \@ovltrue \@ovrtrue \@tfor\reserved@a :=#3\do {\csname @ov\reserved@a false\endcsname}% \@ovxx #1\unitlength \@ovyy #2\unitlength \@tempdimb \ifdim \@ovyy >\@ovxx \@ovxx\else \@ovyy \fi \advance \@tempdimb -2\p@ \@getcirc \@tempdimb \@ovro \ht\@tempboxa \@ovri \dp\@tempboxa \@ovdx\@ovxx \advance\@ovdx -\@tempdima \divide\@ovdx \tw@ \@ovdy\@ovyy \advance\@ovdy -\@tempdima \divide\@ovdy \tw@ \@circlefnt \setbox\@tempboxa \hbox{\if@ovr \@ovvert32\kern -\@tempdima \fi \if@ovl \kern \@ovxx \@ovvert01\kern -\@tempdima \kern -\@ovxx \fi \if@ovt \@ovhorz \kern -\@ovxx \fi \if@ovb \raise \@ovyy \@ovhorz \fi}\advance\@ovdx\@ovro \advance\@ovdy\@ovro \ht\@tempboxa\z@ \dp\@tempboxa\z@ \@put{-\@ovdx}{-\@ovdy}{\box\@tempboxa}% \endgroup} \EndIncludeInRelease \IncludeInRelease{2016/03/31}% {\@ovvert}{Avoid almost zero length leaders}% \def\@ovvert#1#2{\vbox to\@ovyy{% \if@ovb \@tempcntb \@tempcnta \advance \@tempcntb #1\relax \kern -\@ovro \hbox{\char \@tempcntb}\nointerlineskip \else \kern \@ovri \kern \@ovdy \fi \if@ovvline \leaders\vrule \@width \@wholewidth \fi \vfil \nointerlineskip \if@ovt \@tempcntb \@tempcnta \advance \@tempcntb #2\relax \hbox{\char \@tempcntb}% \else \kern \@ovdy \kern \@ovro \fi}} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@ovvert}{Avoid almost zero length leaders}% \def\@ovvert#1#2{\vbox to\@ovyy{% \if@ovb \@tempcntb \@tempcnta \advance \@tempcntb #1\relax \kern -\@ovro \hbox{\char \@tempcntb}\nointerlineskip \else \kern \@ovri \kern \@ovdy \fi \leaders\vrule \@width \@wholewidth\vfil \nointerlineskip \if@ovt \@tempcntb \@tempcnta \advance \@tempcntb #2\relax \hbox{\char \@tempcntb}% \else \kern \@ovdy \kern \@ovro \fi}} \EndIncludeInRelease \IncludeInRelease{2016/03/31}% {\@ovhorz}{Avoid almost zero length leaders}% \def\@ovhorz{\hb@xt@\@ovxx{\kern \@ovro \if@ovr \else \kern \@ovdx \fi \if@ovhline \leaders \hrule \@height \@wholewidth \fi \hfil \if@ovl \else \kern \@ovdx \fi \kern \@ovri}} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@ovhorz}{Avoid almost zero length leaders}% \def\@ovhorz{\hb@xt@\@ovxx{\kern \@ovro \if@ovr \else \kern \@ovdx \fi \leaders \hrule \@height \@wholewidth \hfil \if@ovl \else \kern \@ovdx \fi \kern \@ovri}} \EndIncludeInRelease \IncludeInRelease{2020/10/01}% {\@circle}{default units}% \def\@circle#1{% \begingroup \boxmaxdepth \maxdimen \@defaultunitsset\@tempdimb{#1}\unitlength \ifdim \@tempdimb >15.5\p@ \@getcirc\@tempdimb \@ovro\ht\@tempboxa \setbox\@tempboxa\hbox{\@circlefnt \advance\@tempcnta\tw@ \char \@tempcnta \advance\@tempcnta\m@ne \char \@tempcnta \kern -2\@tempdima \advance\@tempcnta\tw@ \raise \@tempdima \hbox{\char\@tempcnta}\raise \@tempdima \box\@tempboxa}\ht\@tempboxa\z@ \dp\@tempboxa\z@ \@put{-\@ovro}{-\@ovro}{\box\@tempboxa}% \else \@circ\@tempdimb{96}\fi\endgroup} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@circle}{default units}% \def\@circle#1{% \begingroup \boxmaxdepth \maxdimen \@tempdimb #1\unitlength \ifdim \@tempdimb >15.5\p@ \@getcirc\@tempdimb \@ovro\ht\@tempboxa \setbox\@tempboxa\hbox{\@circlefnt \advance\@tempcnta\tw@ \char \@tempcnta \advance\@tempcnta\m@ne \char \@tempcnta \kern -2\@tempdima \advance\@tempcnta\tw@ \raise \@tempdima \hbox{\char\@tempcnta}% \raise \@tempdima \box\@tempboxa}\ht\@tempboxa\z@ \dp\@tempboxa\z@ \@put{-\@ovro}{-\@ovro}{\box\@tempboxa}% \else \@circ\@tempdimb{96}\fi\endgroup} \EndIncludeInRelease \IncludeInRelease{2020/10/01}% {\@dot}{default units}% \def\@dot#1{% \@defaultunitsset\@tempdimb{#1}\unitlength \@circ\@tempdimb{112}} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@dot}{default units}% \def\@dot#1{\@tempdimb #1\unitlength \@circ\@tempdimb{112}} \EndIncludeInRelease \IncludeInRelease{2020/10/01}% {\@bezier}{default units}% \def\@bezier#1(#2,#3)(#4,#5)(#6,#7){% \ifnum #1=\z@ \@defaultunitsset\@ovxx{#4}\unitlength \@defaultunitsset{\advance\@ovxx}{-#2}\unitlength \ifdim \@ovxx<\z@ \@ovxx -\@ovxx \fi \@defaultunitsset\@ovdx{#6}\unitlength \@defaultunitsset{\advance\@ovdx}{-#4}\unitlength \ifdim \@ovdx<\z@ \@ovdx -\@ovdx \fi \ifdim \@ovxx<\@ovdx \@ovxx \@ovdx \fi \@defaultunitsset\@ovyy{#5}\unitlength \@defaultunitsset{\advance\@ovyy}{-#3}\unitlength \ifdim \@ovyy<\z@ \@ovyy -\@ovyy \fi \@defaultunitsset\@ovdy{#7}\unitlength \@defaultunitsset{\advance\@ovdy}{-#5}\unitlength \ifdim \@ovdy<\z@ \@ovdy -\@ovdy \fi \ifdim \@ovyy<\@ovdy \@ovyy \@ovdy \fi \@multicnt \ifdim \@ovxx>\@ovyy \@ovxx \else \@ovyy \fi \@ovxx .5\@halfwidth \divide\@multicnt\@ovxx \ifnum \qbeziermax<\@multicnt \@multicnt\qbeziermax\relax \fi \else \@multicnt#1\relax \fi \@tempcnta\@multicnt \advance\@tempcnta\@ne \@defaultunitsset\@ovdx{#4}\unitlength \@defaultunitsset{\advance\@ovdx}{-#2}\unitlength \multiply\@ovdx \tw@ \@defaultunitsset\@ovxx{#6}\unitlength \@defaultunitsset{\advance\@ovxx}{-#2}\unitlength \advance\@ovxx -\@ovdx \divide\@ovxx\@multicnt \@defaultunitsset\@ovdy{#5}\unitlength \@defaultunitsset{\advance\@ovdy}{-#3}\unitlength \multiply\@ovdy \tw@ \@defaultunitsset\@ovyy{#7}\unitlength \@defaultunitsset{\advance\@ovyy}{-#3}\unitlength \advance\@ovyy -\@ovdy \divide\@ovyy\@multicnt \setbox\@tempboxa\hbox{% \hskip -\@halfwidth \vrule \@height\@halfwidth \@depth \@halfwidth \@width \@wholewidth}% \put(#2,#3){% \count@\z@ \@whilenum{\count@<\@tempcnta}\do {\@xdim\count@\@ovxx \advance\@xdim\@ovdx \divide\@xdim\@multicnt \multiply\@xdim\count@ \@ydim\count@\@ovyy \advance\@ydim\@ovdy \divide\@ydim\@multicnt \multiply\@ydim\count@ \raise \@ydim \hb@xt@\z@{\kern\@xdim \unhcopy\@tempboxa\hss}% \advance\count@\@ne}}} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@bezier}{default units}% \def\@bezier#1(#2,#3)(#4,#5)(#6,#7){% \ifnum #1=\z@ \@ovxx #4\unitlength \advance\@ovxx -#2\unitlength \ifdim \@ovxx<\z@ \@ovxx -\@ovxx \fi \@ovdx #6\unitlength \advance\@ovdx -#4\unitlength \ifdim \@ovdx<\z@ \@ovdx -\@ovdx \fi \ifdim \@ovxx<\@ovdx \@ovxx \@ovdx \fi \@ovyy #5\unitlength \advance\@ovyy -#3\unitlength \ifdim \@ovyy<\z@ \@ovyy -\@ovyy \fi \@ovdy #7\unitlength \advance\@ovdy -#5\unitlength \ifdim \@ovdy<\z@ \@ovdy -\@ovdy \fi \ifdim \@ovyy<\@ovdy \@ovyy \@ovdy \fi \@multicnt \ifdim \@ovxx>\@ovyy \@ovxx \else \@ovyy \fi \@ovxx .5\@halfwidth \divide\@multicnt\@ovxx \ifnum \qbeziermax<\@multicnt \@multicnt\qbeziermax\relax \fi \else \@multicnt#1\relax \fi \@tempcnta\@multicnt \advance\@tempcnta\@ne \@ovdx #4\unitlength \advance\@ovdx -#2\unitlength \multiply\@ovdx \tw@ \@ovxx #6\unitlength \advance\@ovxx -#2\unitlength \advance\@ovxx -\@ovdx \divide\@ovxx\@multicnt \@ovdy #5\unitlength \advance\@ovdy -#3\unitlength \multiply\@ovdy \tw@ \@ovyy #7\unitlength \advance\@ovyy -#3\unitlength \advance\@ovyy -\@ovdy \divide\@ovyy\@multicnt \setbox\@tempboxa\hbox{% \hskip -\@halfwidth \vrule \@height\@halfwidth \@depth \@halfwidth \@width \@wholewidth}% \put(#2,#3){% \count@\z@ \@whilenum{\count@<\@tempcnta}\do {\@xdim\count@\@ovxx \advance\@xdim\@ovdx \divide\@xdim\@multicnt \multiply\@xdim\count@ \@ydim\count@\@ovyy \advance\@ydim\@ovdy \divide\@ydim\@multicnt \multiply\@ydim\count@ \raise \@ydim \hb@xt@\z@{\kern\@xdim \unhcopy\@tempboxa\hss}% \advance\count@\@ne}}} \EndIncludeInRelease \IncludeInRelease{2019/10/01}% {\bezier}{Make commands robust}% \MakeRobust\bezier \MakeRobust\circle \MakeRobust\dashbox \MakeRobust\line \MakeRobust\linethickness \MakeRobust\multiput \MakeRobust\oval \MakeRobust\put \MakeRobust\qbezier \MakeRobust\shortstack \MakeRobust\thinlines \MakeRobust\vector \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\bezier}{Make commands robust}% \kernel@make@fragile\bezier \kernel@make@fragile\circle \kernel@make@fragile\dashbox \kernel@make@fragile\line \kernel@make@fragile\linethickness \kernel@make@fragile\multiput \kernel@make@fragile\oval \kernel@make@fragile\put \kernel@make@fragile\qbezier \kernel@make@fragile\shortstack \kernel@make@fragile\thinlines \kernel@make@fragile\vector \EndIncludeInRelease %%% From File: ltthm.dtx \IncludeInRelease{2024/03/18}% {\@thm}{no link target}% \def\@thm#1#2{% \@kernel@refstepcounter{#1}% \@ifnextchar[{\@ythm{#1}{#2}}{\@xthm{#1}{#2}}} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@thm}{no link target}% \def\@thm#1#2{% \refstepcounter{#1}% \@ifnextchar[{\@ythm{#1}{#2}}{\@xthm{#1}{#2}}} \EndIncludeInRelease \IncludeInRelease{2024/03/18}% {\@begintheorem}{add link targets}% \def\@begintheorem#1#2{\trivlist \item[\MakeLinkTarget{\@currentcounter}\hskip \labelsep{\bfseries #1\ #2}]\itshape} \def\@opargbegintheorem#1#2#3{\trivlist \item[\MakeLinkTarget{\@currentcounter}\hskip \labelsep{\bfseries #1\ #2\ (#3)}]\itshape} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@begintheorem}{add link targets}% \def\@begintheorem#1#2{\trivlist \item[\hskip \labelsep{\bfseries #1\ #2}]\itshape} \def\@opargbegintheorem#1#2#3{\trivlist \item[\hskip \labelsep{\bfseries #1\ #2\ (#3)}]\itshape} \EndIncludeInRelease %%% From File: ltsect.dtx \IncludeInRelease{2019/10/01}% {\title}{Make commands robust}% \DeclareRobustCommand\title[1]{\gdef\@title{#1}} \DeclareRobustCommand*\author[1]{\gdef\@author{#1}} \DeclareRobustCommand*\date[1]{\gdef\@date{#1}} \DeclareRobustCommand\thanks[1]{\footnotemark \protected@xdef\@thanks{\@thanks \protect\footnotetext[\the\c@footnote]{#1}}% } \DeclareRobustCommand\and{% % \begin{tabular} \end{tabular}% \hskip 1em \@plus.17fil% \begin{tabular}[t]{c}}% % \end{tabular} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\title}{Make commands robust}% \kernel@make@fragile\title \kernel@make@fragile\author \kernel@make@fragile\date \kernel@make@fragile\thanks \kernel@make@fragile\and \EndIncludeInRelease \IncludeInRelease{2020/10/01}% {\addcontentsline}{fourth argument}% \def\addcontentsline#1#2#3{% \addtocontents{#1}{\protect\contentsline{#2}{#3}{\thepage}{}% \protected@file@percent}} \EndIncludeInRelease \IncludeInRelease{2018/12/01}% {\addcontentsline}{Mask line endings}% \def\addcontentsline#1#2#3{% \addtocontents{#1}{\protect\contentsline{#2}{#3}{\thepage}% \protected@file@percent}} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\addcontentsline}{Mask line endings}% \def\addcontentsline#1#2#3{% \addtocontents{#1}{\protect\contentsline{#2}{#3}{\thepage}}} \EndIncludeInRelease \IncludeInRelease{2021/11/15}% {\contentsline}{Four arguments}% \def\contentsline#1#2#3#4{\gdef\@contentsline@destination{#4}% \csname l@#1\endcsname{#2}{#3}} \let\@contentsline@destination\@empty \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\contentsline}{Four arguments}% \def\contentsline#1{\csname l@#1\endcsname} \let\@contentsline@destination\@undefined \EndIncludeInRelease \IncludeInRelease{2018/12/01}% {\@dottedtocline}{Prevent protrusion}% \def\@dottedtocline#1#2#3#4#5{% \ifnum #1>\c@tocdepth \else \vskip \z@ \@plus.2\p@ {\leftskip #2\relax \rightskip \@tocrmarg \parfillskip -\rightskip \parindent #2\relax\@afterindenttrue \interlinepenalty\@M \leavevmode \@tempdima #3\relax \advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip {#4}\nobreak \leaders\hbox{$\m@th \mkern \@dotsep mu\hbox{.}\mkern \@dotsep mu$}\hfill \nobreak \hb@xt@\@pnumwidth{\hfil\normalfont \normalcolor #5% \kern-\p@\kern\p@}% \par}% \fi} \DeclareRobustCommand\noprotrusion{\leavevmode\kern-\p@\kern\p@} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@dottedtocline}{Prevent protrusion}% \def\@dottedtocline#1#2#3#4#5{% \ifnum #1>\c@tocdepth \else \vskip \z@ \@plus.2\p@ {\leftskip #2\relax \rightskip \@tocrmarg \parfillskip -\rightskip \parindent #2\relax\@afterindenttrue \interlinepenalty\@M \leavevmode \@tempdima #3\relax \advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip {#4}\nobreak \leaders\hbox{$\m@th \mkern \@dotsep mu\hbox{.}\mkern \@dotsep mu$}\hfill \nobreak \hb@xt@\@pnumwidth{\hfil\normalfont \normalcolor #5}% \par}% \fi} \let\noprotrusion\@undefined \EndIncludeInRelease %%% From File: ltfloat.dtx \IncludeInRelease{2015/01/01}% {\@xfloat}{Check float options}% \def\@xfloat #1[#2]{% \@nodocument \def \@captype {#1}% \def \@fps {#2}% \@onelevel@sanitize \@fps \def \reserved@b {!}% \ifx \reserved@b \@fps \@fpsadddefault \else \ifx \@fps \@empty \@fpsadddefault \fi \fi \ifhmode \@bsphack \@floatpenalty -\@Mii \else \@floatpenalty-\@Miii \fi \ifinner \@parmoderr\@floatpenalty\z@ \else \@next\@currbox\@freelist {% \@tempcnta \sixt@@n \expandafter \@tfor \expandafter \reserved@a \expandafter :\expandafter =\@fps \do {% \if \reserved@a h% \ifodd \@tempcnta \else \advance \@tempcnta \@ne \fi \else\if \reserved@a t% \@setfpsbit \tw@ \else\if \reserved@a b% \@setfpsbit 4% \else\if \reserved@a p% \@setfpsbit 8% \else\if \reserved@a !% \ifnum \@tempcnta>15 \advance\@tempcnta -\sixt@@n\relax \fi \else \@latex@error{Unknown float option `\reserved@a'}% {Option `\reserved@a' ignored and `p' used.}% \@setfpsbit 8% \fi\fi\fi\fi\fi }% \@tempcntb \csname ftype@\@captype \endcsname \multiply \@tempcntb \@xxxii \advance \@tempcnta \@tempcntb \global \count\@currbox \@tempcnta }% \@fltovf \fi \global \setbox\@currbox \color@vbox \normalcolor \vbox \bgroup \hsize\columnwidth \@parboxrestore \@floatboxreset }% \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@xfloat}{Check float options}% \def\@xfloat #1[#2]{% \@nodocument \def \@captype {#1}% \def \@fps {#2}% \@onelevel@sanitize \@fps \def \reserved@b {!}% \ifx \reserved@b \@fps \@fpsadddefault \else \ifx \@fps \@empty \@fpsadddefault \fi \fi \ifhmode \@bsphack \@floatpenalty -\@Mii \else \@floatpenalty-\@Miii \fi \ifinner \@parmoderr\@floatpenalty\z@ \else \@next\@currbox\@freelist {% \@tempcnta \sixt@@n \expandafter \@tfor \expandafter \reserved@a \expandafter :\expandafter =\@fps \do {% \if \reserved@a h% \ifodd \@tempcnta \else \advance \@tempcnta \@ne \fi \fi \if \reserved@a t% \@setfpsbit \tw@ \fi \if \reserved@a b% \@setfpsbit 4% \fi \if \reserved@a p% \@setfpsbit 8% \fi \if \reserved@a !% \ifnum \@tempcnta>15 \advance\@tempcnta -\sixt@@n\relax \fi \fi }% \@tempcntb \csname ftype@\@captype \endcsname \multiply \@tempcntb \@xxxii \advance \@tempcnta \@tempcntb \global \count\@currbox \@tempcnta }% \@fltovf \fi \global \setbox\@currbox \color@vbox \normalcolor \vbox \bgroup \hsize\columnwidth \@parboxrestore \@floatboxreset }% \EndIncludeInRelease \IncludeInRelease{2015/01/01}% {\end@dblfloat}{float order in 2-column}% \def\end@dblfloat{% \if@twocolumn \@endfloatbox \ifnum\@floatpenalty <\z@ \@largefloatcheck \global\dp\@currbox1sp % \@cons\@currlist\@currbox \ifnum\@floatpenalty <-\@Mii \penalty -\@Miv \@tempdima\prevdepth \vbox{}% \prevdepth\@tempdima \penalty\@floatpenalty \else \vadjust{\penalty -\@Miv \vbox{}\penalty\@floatpenalty}\@Esphack \fi \fi \else \end@float \fi }% \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\end@dblfloat}{float order in 2-column}% \def\end@dblfloat{% \if@twocolumn \@endfloatbox \ifnum\@floatpenalty <\z@ \@largefloatcheck \@cons\@dbldeferlist\@currbox \fi \ifnum \@floatpenalty =-\@Mii \@Esphack\fi \else \end@float \fi }% \EndIncludeInRelease \IncludeInRelease{2015/01/01}% {\@dblfloatplacement}{float order in 2-column}% \def\@dblfloatplacement{\global\@dbltopnum\c@dbltopnumber \global\@dbltoproom \dbltopfraction\@colht \@textmin \@colht \advance \@textmin -\@dbltoproom \@fpmin \dblfloatpagefraction\textheight \@fptop \@dblfptop \@fpsep \@dblfpsep \@fpbot \@dblfpbot \def\f@depth{1sp}}% \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@dblfloatplacement}{float order in 2-column}% \def \@dblfloatplacement {% \global \@dbltopnum \c@dbltopnumber \global \@dbltoproom \dbltopfraction\@colht \@textmin \@colht \advance \@textmin -\@dbltoproom \@fpmin \dblfloatpagefraction\textheight \@fptop \@dblfptop \@fpsep \@dblfpsep \@fpbot \@dblfpbot }% \EndIncludeInRelease \IncludeInRelease{2021/06/01}% {\@savemarbox}{Explicit par for marginpar}% \long\def \@savemarbox #1#2{% \global\setbox #1% \color@vbox \vtop{% \hsize\marginparwidth \@parboxrestore \@marginparreset #2\par \@minipagefalse \outer@nobreak }% \color@endbox } \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@savemarbox}{Explicit par for marginpar}% \long\def \@savemarbox #1#2{% \global\setbox #1% \color@vbox \vtop{% \hsize\marginparwidth \@parboxrestore \@marginparreset #2% \@minipagefalse \outer@nobreak }% \color@endbox } \EndIncludeInRelease \IncludeInRelease{2020/10/01}% {\@textsuperscript}{superscript baseline}% \def\@textsuperscript#1{% {\m@th\ensuremath{^{\mbox{\fontsize\sf@size\sf@size#1}}}}} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@textsuperscript}{superscript baseline}% \def\@textsuperscript#1{% {\m@th\ensuremath{^{\mbox{\fontsize\sf@size\z@#1}}}}} \EndIncludeInRelease \IncludeInRelease{2015/01/01}% {\textsubscript}{\textsubscript}% \DeclareRobustCommand*\textsubscript[1]{% \@textsubscript{\selectfont#1}}% \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\textsubscript}{\textsubscript}% \let\textsubscript\@undefined \EndIncludeInRelease \IncludeInRelease{2020/10/01}% {\@textsubscript}{subscript baseline}% \def\@textsubscript#1{% {\m@th\ensuremath{_{\mbox{\fontsize\sf@size\sf@size#1}}}}} \EndIncludeInRelease \IncludeInRelease{2015/01/01}% {\@textsubscript}{subscript baseline}% \def\@textsubscript#1{% {\m@th\ensuremath{_{\mbox{\fontsize\sf@size\z@#1}}}}} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@textsubscript}{subscript baseline}% \let\@textsubscript\@undefined \EndIncludeInRelease \IncludeInRelease{2021/11/15}% {\@footnotetext}{footnotetext tagging}% \long\def\@footnotetext#1{\insert\footins{% \reset@font\footnotesize \interlinepenalty\interfootnotelinepenalty \splittopskip\footnotesep \splitmaxdepth \dp\strutbox \floatingpenalty \@MM \hsize\columnwidth \@parboxrestore \def\@currentcounter{footnote}% \protected@edef\@currentlabel{% \csname p@footnote\endcsname\@thefnmark }% \color@begingroup \@makefntext{% \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}% \par \color@endgroup}}% \EndIncludeInRelease \IncludeInRelease{2021/06/01}% {\@footnotetext}{footnotetext tagging}% \long\def\@footnotetext#1{\insert\footins{% \reset@font\footnotesize \interlinepenalty\interfootnotelinepenalty \splittopskip\footnotesep \splitmaxdepth \dp\strutbox \floatingpenalty \@MM \hsize\columnwidth \@parboxrestore \protected@edef\@currentlabel{% \csname p@footnote\endcsname\@thefnmark }% \color@begingroup \@makefntext{% \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}% \par \color@endgroup}}% \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@footnotetext}{footnotetext tagging}% \long\def\@footnotetext#1{\insert\footins{% \reset@font\footnotesize \interlinepenalty\interfootnotelinepenalty \splittopskip\footnotesep \splitmaxdepth \dp\strutbox \floatingpenalty \@MM \hsize\columnwidth \@parboxrestore \protected@edef\@currentlabel{% \csname p@footnote\endcsname\@thefnmark }% \color@begingroup \@makefntext{% \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}% \color@endgroup}}% \EndIncludeInRelease \IncludeInRelease{2021/06/01}% {\footref}{Add footref}% \def\footref#1{% \begingroup \unrestored@protected@xdef\@thefnmark{\ref{#1}}% \endgroup \@footnotemark } \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\footref}{Add footref}% % \let\footref\@undefined \EndIncludeInRelease %%% From File: ltidxglo.dtx %%% From File: ltbibl.dtx \IncludeInRelease{2022/06/01}% {\cite}{check for blank}% \DeclareRobustCommand\cite{% \@ifnextchar [{\@tempswatrue\@citex@checkblank}{\@tempswafalse\@citex@checkblank[]}} \def\@citex@checkblank[#1]#2{% \IfBlankTF {#2}% {\@citex[#1]{\space}}% {\@citex[#1]{#2}}% } \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\cite}{check for blank}% \DeclareRobustCommand\cite{% \@ifnextchar [{\@tempswatrue\@citex}{\@tempswafalse\@citex[]}} \let\@citex@checkblank\@undefined \EndIncludeInRelease \IncludeInRelease{2021/06/01}% {\nocite}{Allow nocite in preamble}% \def\nocite#1{\@bsphack \ifx\@onlypreamble\document \@for\@citeb:=#1\do{% \edef\@citeb{\expandafter\@firstofone\@citeb}% \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi \@ifundefined{b@\@citeb}{\G@refundefinedtrue \@latex@warning{Citation `\@citeb' undefined}}{}}% \else \AddToHook{begindocument/end}[kernel]{\nocite{#1}}% \fi \@esphack} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\nocite}{Allow nocite in preamble}% \def\nocite#1{\@bsphack \ifx\@onlypreamble\document \@for\@citeb:=#1\do{% \edef\@citeb{\expandafter\@firstofone\@citeb}% \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi \@ifundefined{b@\@citeb}{\G@refundefinedtrue \@latex@warning{Citation `\@citeb' undefined}}{}}% \else \@latex@error{Cannot be used in preamble}\@eha \fi \@esphack} \EndIncludeInRelease %% File: ltmarks.dtx %% Copyright (C) 2022-2024 %% Frank Mittelbach, The LaTeX Project %%% From File: ltmarks.dtx \ExplSyntaxOn \NewModuleRelease{2022/06/01}{ltmarks} {Marks~handling} \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 { \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} } } \box_new:N \l__mark_box \box_new:N \l__mark_ii_box \tl_new:N \g__mark_tmp_tl \tl_new:N \g__mark_new_top_tl \cs_new_protected:Npn \__mark_extract_and_handle_marks:nn #1#2 { \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 \__mark_prepare_and_extract:nn {#1} {#2} \group_end: } \cs_new_protected:Npn \__mark_prepare_and_extract:nn #1#2 { \vbox_set:Nn \l__mark_box { #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_unpack:N \l__mark_box } } } \__mark_vbox_set_split_to_maxdimen:NN \l__mark_ii_box \l__mark_box \box_if_empty:NTF \l__mark_box { #1 } { \__mark_prepare_and_extract:nn {#1} { \vbox_unpack:N \l__mark_ii_box \vbox_unpack:N \l__mark_box } } } \cs_set_eq:cN {Infinite~shrink~error~above~ignored~!}\c_max_dim \cs_new_protected:Npx \__mark_vbox_set_split_to_maxdimen:NN #1#2 { \tl_set:Ne \exp_not:N \l__mark_saved_parameters_tl { \tex_interactionmode:D \exp_not:N \int_use:N \tex_interactionmode:D \scan_stop: \tex_escapechar:D \exp_not:N \int_use:N \tex_escapechar:D \scan_stop: } \tex_escapechar:D -1 \scan_stop: \tex_interactionmode:D 0 \scan_stop: \tex_setbox:D #1 \tex_vsplit:D #2 to \exp_not:N \use:n { \use:c{Infinite~shrink~error~above~ignored~!} } \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 { \__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} \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 } } } } } \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 \__mark_extract_and_handle_marks:nn \__mark_get_from_splitmarks: { #1 } \tl_set_eq:NN #2 \g__mark_first_marks_tl \tl_set_eq:NN #3 \g__mark_last_marks_tl } \cs_new_protected:Npn \__mark_get_from_splitmarks: { \seq_map_inline:Nn \g__mark_classes_seq { \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_gput_right:Ne \g__mark_last_marks_tl { \mark_insert:nn {##1} { \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 } } } } } } \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 { \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 { \__mark_id:n{ \int_use:N\g__mark_int } #2 } \tex_marks:D \use:c { c__mark_class_ #1 _mark } { \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_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 { \__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 } { 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 } \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 \ShowMarksAt #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} } \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} { \vbox_unpack:N \@outputbox } } { \__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} } \cs_new_protected:Npn \__mark_update_dblcol_structures: { \box_if_vertical:NTF \@outputbox { \__mark_update_structure_from_material:nn {column} { \vbox_unpack:N \@outputbox } } { \__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_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_if_eq:ccTF { g__mark_first-column_top_ ##1 _tl } { g__mark_first-column_first_ ##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 } } } } \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: \IncludeInRelease{0000/00/00}{ltmarks}% {Undo~Marks~handling} \DeclareRobustCommand \NewMarkClass[1]{} \DeclareRobustCommand \InsertMark[2]{} \RenewExpandableDocumentCommand \FirstMark { O{} m } { } \RenewExpandableDocumentCommand \LastMark { O{} m } { } \RenewExpandableDocumentCommand \TopMark { O{} m } { } \RenewExpandableDocumentCommand \IfMarksEqualTF { O{} mmm }{ } \let \@expl@@@mark@update@singlecol@structures@@ \relax \let \@expl@@@mark@update@dblcol@structures@@ \relax \EndModuleRelease \ExplSyntaxOff %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% From File: ltpage.dtx \IncludeInRelease{2022/06/01}% {\markboth}{New mark support}% \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} \DeclareRobustCommand*\markright[1]{% \begingroup \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 \EndIncludeInRelease \IncludeInRelease{2019/10/01}% {\markboth}{Make commands robust}% \DeclareRobustCommand*\markboth[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} \DeclareRobustCommand*\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{0000/00/00}% {\markboth}{Make commands robust}% \kernel@make@fragile\markboth \kernel@make@fragile\markright \EndIncludeInRelease %%% From File: ltclass.dtx \IncludeInRelease{2020/10/01}{\@currpath}% {Add \@currpath}% \let\@currpath\@empty \EndIncludeInRelease \IncludeInRelease{0000/00/00}{\@currpath}% {Add \@currpath}% \let\@currpath\@undefined \EndIncludeInRelease \IncludeInRelease{2020/10/01}{\@pushfilename}% {Add \@expl@push@filename@@ and \@expl@push@filename@aux@@}% \def\@pushfilename{% \@expl@push@filename@@ \xdef\@currnamestack{% {\@currname}% {\@currext}% {\the\catcode`\@}% \@currnamestack}% \xdef\@kernel@currpathstack{% {\@currpath}% \@kernel@currpathstack}% \@expl@push@filename@aux@@} \EndIncludeInRelease \IncludeInRelease{2020/02/02}{\@pushfilename}% {Add \@expl@push@filename@@}% \def\@pushfilename{% \@expl@push@filename@@ \xdef\@currnamestack{% {\@currname}% {\@currext}% {\the\catcode`\@}% \@currnamestack}% \@expl@push@filename@aux@@} \EndIncludeInRelease \IncludeInRelease{0000/00/00}{\@pushfilename}% {Add \@expl@push@filename@@ and \@expl@push@filename@aux@@}% \ifnum\sourceLaTeXdate<20200202\relax \GenericInfo{}{Defining 00-00-00\string\@pushfilename.} \def\@pushfilename{% \xdef\@currnamestack{% {\@currname}% {\@currext}% {\the\catcode`\@}% \@currnamestack}} \else \GenericInfo{}{Defining 2020-02-02\string\@pushfilename.} \def\@pushfilename{% \@expl@push@filename@@ \xdef\@currnamestack{% {\@currname}% {\@currext}% {\the\catcode`\@}% \@currnamestack}% \@expl@push@filename@aux@@} \fi \EndIncludeInRelease \@onlypreamble\@pushfilename \IncludeInRelease{2020/10/01}{\@popfilename}% {Add \@expl@pop@filename@@}% \def\@popfilename{\@expl@@@hook@curr@name@pop@@ \expandafter\@p@pfilename\@currnamestack\@nil \expandafter\@p@pfilepath\@kernel@currpathstack\@nil \@expl@pop@filename@@} \EndIncludeInRelease \IncludeInRelease{2020/02/02}{\@popfilename}% {Add \@expl@push@filename@@}% \def\@popfilename{\expandafter\@p@pfilename\@currnamestack\@nil \@expl@pop@filename@@} \EndIncludeInRelease \IncludeInRelease{0000/00/00}{\@popfilename}% {Add \@expl@push@filename@@ and \@expl@push@filename@aux@@}% \ifnum\sourceLaTeXdate<20200202\relax \GenericInfo{}{Defining 00-00-00\string\@popfilename.} \def\@popfilename{\expandafter\@p@pfilename\@currnamestack\@nil} \else \GenericInfo{}{Defining 2020-02-02\string\@popfilename.} \def\@popfilename{\expandafter\@p@pfilename\@currnamestack\@nil \@expl@pop@filename@@} \fi \EndIncludeInRelease \@onlypreamble\@popfilename \IncludeInRelease{2020/10/01}{\@kernel@currpathstack}% {Add \@kernel@currpathstack}% \@ifundefined{@kernel@currpathstack}{}{\@gobblethree} \gdef\@kernel@currpathstack{}% \ifx\@kernel@currpathstack\@empty \def\reserved@a#1#2#3{% \ifx\relax#3\else \g@addto@macro\@kernel@currpathstack{{}}% \expandafter\reserved@a \fi}% \expandafter\reserved@a\@currnamestack{}{}{\relax}% \fi \def\@p@pfilepath#1{% \gdef\@currpath{#1}\@p@pfilepath@aux\@empty} \def\@p@pfilepath@aux#1\@nil{% \xdef\@kernel@currpathstack{#1}} \EndIncludeInRelease \IncludeInRelease{0000/00/00}{\@kernel@currpathstack}% {Add \@kernel@currpathstack}% \let\@kernel@currpathstack\@undefined \let\@p@pfilepath\@undefined \let\@p@pfilepath@aux\@undefined \EndIncludeInRelease \IncludeInRelease{2020/10/01}% {\IfFormatAtLeastTF}{Test format date}% \def\IfFormatAtLeastTF{\@ifl@t@r\fmtversion} \let\IfPackageAtLeastTF\@ifpackagelater \let\IfClassAtLeastTF\@ifclasslater \def\IfFileAtLeastTF#1{\expandafter\@ifl@t@r\csname ver@#1\endcsname} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\IfFormatAtLeastTF}{Test format date}% \def\IfFormatAtLeastTF{\@ifl@t@r\fmtversion} \let\IfPackageAtLeastTF\@ifpackagelater \let\IfClassAtLeastTF\@ifclasslater \def\IfFileAtLeastTF#1{\expandafter\@ifl@t@r\csname ver@#1\endcsname} \EndIncludeInRelease \IncludeInRelease{2018/04/01}% {\@ifl@t@r}{Guard against bad input}% \def\@ifl@t@r#1#2{% \ifnum\expandafter\@parse@version@#1//00\@nil<% \expandafter\@parse@version@#2//00\@nil \expandafter\@secondoftwo \else \expandafter\@firstoftwo \fi} \def\@parse@version@#1{\@parse@version0#1} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@ifl@t@r}{Guard against bad input}% \def\@ifl@t@r#1#2{% \ifnum\expandafter\@parse@version#1//00\@nil<% \expandafter\@parse@version#2//00\@nil \expandafter\@secondoftwo \else \expandafter\@firstoftwo \fi} \let\@parse@version@\@undefined \EndIncludeInRelease \IncludeInRelease{2017/01/01}% {\@if@pti@ns}{Spaces in option clash check}% \def\@if@pti@ns#1#2{% \let\reserved@a\@firstoftwo \edef\reserved@b{\zap@space#2 \@empty}% \@for\reserved@b:=\reserved@b\do{% \ifx\reserved@b\@empty \else \expandafter\in@\expandafter{\expandafter,\reserved@b,}{,#1,}% \ifin@ \else \let\reserved@a\@secondoftwo \fi \fi }% \reserved@a} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@if@pti@ns}{Spaces in option clash check}% \def\@if@pti@ns#1#2{% \let\reserved@a\@firstoftwo \@for\reserved@b:=#2\do{% \ifx\reserved@b\@empty \else \expandafter\in@\expandafter {\expandafter,\reserved@b,}{,#1,}% \ifin@ \else \let\reserved@a\@secondoftwo \fi \fi }% \reserved@a} \EndIncludeInRelease \IncludeInRelease{2024/06/01}% {\IfPackageLoadedTF}{Test package loading}% \let \IfPackageLoadedTF \@ifpackageloaded \let \IfClassLoadedTF \@ifclassloaded \let \IfPackageLoadedWithOptionsTF \@ifpackagewith \let \IfClassLoadedWithOptionsTF \@ifclasswith \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\IfPackageLoadedTF}{Test package loading}% \let \IfPackageLoadedTF \@ifpackageloaded \let \IfClassLoadedTF \@ifclassloaded \let \IfPackageLoadedWithOptionsTF \@ifpackagewith \let \IfClassLoadedWithOptionsTF \@ifclasswith \EndIncludeInRelease \IncludeInRelease{2024/06/01}% {\IfPackageLoadedT}{More conditionals}% \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}{}} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\IfPackageLoadedT}{More conditionals}% \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}{}} \EndIncludeInRelease \IncludeInRelease{2020/10/01}% {\ProvidesPackage}{Check name with \strcmp}% \def\ProvidesPackage#1{% \xdef\@gtempa{#1}% \@expandtwoargs\@expl@str@if@eq@@nnTF {\@gtempa}{\@currpath\@currname}{}{% \@latex@warning@no@line{You have requested \@cls@pkg\space`\@currpath\@currname',\MessageBreak but the \@cls@pkg\space provides `#1'}% }% \@ifnextchar[\@pr@videpackage{\@pr@videpackage[]}}%] \@onlypreamble\ProvidesPackage \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\ProvidesPackage}{Undo: check name with \strcmp}% \def\ProvidesPackage#1{% \xdef\@gtempa{#1}% \ifx\@gtempa\@currname\else \@latex@warning@no@line{You have requested \@cls@pkg\space`\@currname',\MessageBreak but the \@cls@pkg\space provides `#1'}% \fi \@ifnextchar[\@pr@videpackage{\@pr@videpackage[]}}%] \EndIncludeInRelease \IncludeInRelease{2020/10/01}% {\@pr@videpackage}{Allow for package substitution}% \def\@pr@videpackage[#1]{% \expandafter\protected@xdef % <-- protected... \csname ver@\@currname.\@currext\endcsname{#1}% Loaded package \expandafter\let \csname ver@\@currpkg@reqd\expandafter\endcsname % Requested package \csname ver@\@currname.\@currext\endcsname \ifx\@currext\@clsextension \typeout{Document Class: \@gtempa\space#1}% \else \protected@wlog{Package: \@gtempa\space#1}% <--- protected \fi} \long\def\protected@wlog#1{\begingroup \set@display@protect \immediate \write \m@ne {#1}\endgroup } \EndIncludeInRelease \IncludeInRelease{2020/02/02}% {\@pr@videpackage}{Protection for package info}% \def\@pr@videpackage[#1]{% \expandafter\protected@xdef % <-- protected... \csname ver@\@currname.\@currext\endcsname{#1}% \ifx\@currext\@clsextension \typeout{Document Class: \@gtempa\space#1}% \else \protected@wlog{Package: \@gtempa\space#1}% <--- protected \fi} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@pr@videpackage}{Protection for package info}% \def\@pr@videpackage[#1]{% \expandafter\xdef\csname ver@\@currname.\@currext\endcsname{#1}% \ifx\@currext\@clsextension \typeout{Document Class: \@gtempa\space#1}% \else \wlog{Package: \@gtempa\space#1}% \fi} \let\protected@wlog\@undefined \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\ProvidesClass}{Track \ProvidesPackage}% \let\ProvidesClass\ProvidesPackage \@onlypreamble\ProvidesClass \EndIncludeInRelease \IncludeInRelease{2021/06/01}% {\@pass@ptions}{Raw option lists}% \def\@pass@ptions#1#2#3{% \@expl@@@filehook@set@curr@file@@nNN {\@expl@@@filehook@resolve@file@subst@@w #3.#1\@nil}% \reserved@a\reserved@b \@expl@@@filehook@clear@replacement@flag@@ \expandafter\protected@xdef\csname opt@\reserved@a\endcsname{% \@ifundefined{opt@\reserved@a}\@empty {\csname opt@\reserved@a\endcsname,}% \zap@space#2 \@empty}% \expandafter\let \csname opt@#3.#1\expandafter\endcsname \csname opt@\reserved@a\endcsname \@ifundefined{@raw@opt@#3.#1}% {\expandafter\gdef\csname @raw@opt@#3.#1\expandafter\endcsname \expandafter{#2}}% {\expandafter\g@addto@macro\csname @raw@opt@#3.#1\expandafter\endcsname \expandafter{\expandafter,#2}}% } \EndIncludeInRelease \IncludeInRelease{2020/10/01}{\@pass@ptions} {Add file replacement in \@pass@ptions}% \def\@pass@ptions#1#2#3{% \@expl@@@filehook@set@curr@file@@nNN {\@expl@@@filehook@resolve@file@subst@@w #3.#1\@nil}% \reserved@a\reserved@b \@expl@@@filehook@clear@replacement@flag@@ \expandafter\xdef\csname opt@\reserved@a\endcsname{% \@ifundefined{opt@\reserved@a}\@empty {\csname opt@\reserved@a\endcsname,}% \zap@space#2 \@empty}% \expandafter\let \csname opt@#3.#1\expandafter\endcsname \csname opt@\reserved@a\endcsname} \EndIncludeInRelease \IncludeInRelease{0000/00/00}{\@pass@ptions} {\@pass@ptions}% \def\@pass@ptions#1#2#3{% \expandafter\xdef\csname opt@#3.#1\endcsname{% \@ifundefined{opt@#3.#1}\@empty {\csname opt@#3.#1\endcsname,}% \zap@space#2 \@empty}} \EndIncludeInRelease \IncludeInRelease{2021/06/01}% {\OptionNotUsed}{filter unused option list}% \ExplSyntaxOn \def\@remove@eq@value#1=#2\@nil{\tl_trim_spaces:n{#1}} \ExplSyntaxOff \def\OptionNotUsed{% \ifx\@currext\@clsextension \xdef\@unusedoptionlist{% \ifx\@unusedoptionlist\@empty\else\@unusedoptionlist,\fi \expandafter\@remove@eq@value\CurrentOption=\@nil}% \fi} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\OptionNotUsed}{filter unused option list}% \let\@remove@eq@value\@undefined \def\OptionNotUsed{% \ifx\@currext\@clsextension \xdef\@unusedoptionlist{% \ifx\@unusedoptionlist\@empty\else\@unusedoptionlist,\fi \CurrentOption}% \fi} \EndIncludeInRelease \IncludeInRelease{2021/06/01}% {\@xprocess@ptions}{safer @xprocess@ptions}% \def\@xprocess@ptions{% \ifx\@currext\@clsextension\else \ifx\@classoptionslist\relax\else \@for\CurrentOption:=\@classoptionslist\do{% \ifx\CurrentOption\@empty\else \@ifundefined{ds@\detokenize\expandafter{\CurrentOption}}{}{% \@use@ption \expandafter\let\csname ds@\CurrentOption\endcsname\@empty }% \fi}% \fi \fi \@process@pti@ns} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@xprocess@ptions}{safer @xprocess@ptions}% \let\@remove@eq@value\@undefined \def\@xprocess@ptions{% \ifx\@currext\@clsextension\else \@for\CurrentOption:=\@classoptionslist\do{% \ifx\CurrentOption\@empty\else \@expandtwoargs\in@{,\CurrentOption,}{,\@declaredoptions,}% \ifin@ \@use@ption \expandafter\let\csname ds@\CurrentOption\endcsname\@empty \fi \fi}% \fi \@process@pti@ns} \EndIncludeInRelease \IncludeInRelease{2020/10/01}% {\@process@pti@ns}{Unused options issue}% \def\@process@pti@ns{% \@for\CurrentOption:=\@curroptions\do{% \@ifundefined{ds@\detokenize\expandafter{\CurrentOption}}% {\@use@ption \default@ds}% \@use@ption}% \@for\CurrentOption:=\@declaredoptions\do{% \expandafter\let\csname ds@\CurrentOption\endcsname\relax}% \let\CurrentOption\@empty \let\@fileswith@pti@ns\@@fileswith@pti@ns \AtEndOfPackage{\expandafter\let \csname unprocessedoptions-\@currname.\@currext\endcsname \relax}} \@onlypreamble\@process@pti@ns \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@process@pti@ns}{Unused options issue}% \def\@process@pti@ns{% \@for\CurrentOption:=\@curroptions\do{% \@ifundefined{ds@\CurrentOption}% {\@use@ption \default@ds}% \@use@ption}% \@for\CurrentOption:=\@declaredoptions\do{% \expandafter\let\csname ds@\CurrentOption\endcsname\relax}% \let\CurrentOption\@empty \let\@fileswith@pti@ns\@@fileswith@pti@ns \AtEndOfPackage{\let\@unprocessedoptions\relax}} \EndIncludeInRelease \IncludeInRelease{2021/06/01}% {\@use@ption}{filter unused option list}% \def\@use@ption{% \@expandtwoargs\@removeelement {\expandafter\@remove@eq@value\CurrentOption=\@nil}% \@unusedoptionlist\@unusedoptionlist \csname ds@\detokenize\expandafter{\CurrentOption}\endcsname} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@use@ption}{filter unused option list}% \def\@use@ption{% \@expandtwoargs\@removeelement\CurrentOption \@unusedoptionlist\@unusedoptionlist \csname ds@\CurrentOption\endcsname} \EndIncludeInRelease \IncludeInRelease{2017/01/01}% {\ExecuteOptions}{Spaces in \ExecuteOptions}% \def\ExecuteOptions#1{% \edef\@fortmp{\zap@space#1 \@empty}% \def\reserved@a##1\@nil{% \@for\CurrentOption:=\@fortmp\do {\csname ds@\CurrentOption\endcsname}% \edef\CurrentOption{##1}}% \expandafter\reserved@a\CurrentOption\@nil} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\ExecuteOptions}{Spaces in \ExecuteOptions}% \def\ExecuteOptions#1{% \def\reserved@a##1\@nil{% \@for\CurrentOption:=#1\do {\csname ds@\CurrentOption\endcsname}% \edef\CurrentOption{##1}}% \expandafter\reserved@a\CurrentOption\@nil} \EndIncludeInRelease \IncludeInRelease{2021/06/01}% {\@loadwithoptions}{Raw option lists load with options}% \def\@loadwithoptions#1#2#3{% \expandafter\let\csname opt@#3.#1\expandafter\endcsname \csname opt@\@currname.\@currext\endcsname \expandafter\let\csname @raw@opt@#3.#1\expandafter\endcsname \csname @raw@opt@\@currname.\@currext\endcsname #2{#3}} \EndIncludeInRelease \IncludeInRelease{0000/00/00} {\@loadwithoptions}{Raw option lists load with options}% \def\@loadwithoptions#1#2#3{% \expandafter\let\csname opt@#3.#1\expandafter\endcsname \csname opt@\@currname.\@currext\endcsname #2{#3}} \EndIncludeInRelease \IncludeInRelease{2020/10/01}% {\RequirePackageWithOptions}{Unused options issue}% \def\RequirePackageWithOptions{% \AtEndOfPackage{\expandafter\let \csname unprocessedoptions-\@currname.\@currext\endcsname \relax}% \@loadwithoptions\@pkgextension\RequirePackage} \@onlypreamble\RequirePackageWithOptions \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\RequirePackageWithOptions}{Unused options issue}% \def\RequirePackageWithOptions{% \AtEndOfPackage{\let\@unprocessedoptions\relax}% \@loadwithoptions\@pkgextension\RequirePackage} \EndIncludeInRelease \IncludeInRelease{2024/06/01}% {\@fileswithoptions}{Check Group}% \def\@fileswithoptions#1{% \ifnum\currentgrouplevel>\z@ \@latex@error {Loading a class or package in a group}% {Classes and packages should only be loaded at the top level}% \fi \@ifnextchar[%] {\@fileswith@ptions#1}% {\@fileswith@ptions#1[]}} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@fileswithoptions}{Check Group}% \def\@fileswithoptions#1{% \@ifnextchar[%] {\@fileswith@ptions#1}% {\@fileswith@ptions#1[]}} \EndIncludeInRelease \IncludeInRelease{2020/10/01}% {\@fileswith@pti@ns}{ifx tests in \@fileswith@pti@ns}% \def\@fileswith@pti@ns#1[#2]#3[#4]{% \ifx#1\@clsextension \ifx\@classoptionslist\relax \protected@xdef\@classoptionslist{\zap@space#2 \@empty}% \gdef\@raw@classoptionslist{#2}% \def\reserved@a{% \@onefilewithoptions#3[{#2}][{#4}]#1% \@documentclasshook}% \else \def\reserved@a{% \@onefilewithoptions#3[{#2}][{#4}]#1}% \fi \else \def\reserved@b##1,{% \ifx\@nnil##1\relax\else \ifx\@nnil##1\@nnil\else \noexpand\@onefilewithoptions##1[{\unexpanded{#2}}][{#4}]% \noexpand\@pkgextension \fi \expandafter\reserved@b \fi}% \edef\reserved@a{\zap@space#3 \@empty}% \edef\reserved@a{\expandafter\reserved@b\reserved@a,\@nnil,}% \fi \reserved@a} \EndIncludeInRelease \IncludeInRelease{2017/01/01}% {\@fileswith@pti@ns}{ifx tests in \@fileswith@pti@ns}% \def\@fileswith@pti@ns#1[#2]#3[#4]{% \ifx#1\@clsextension \ifx\@classoptionslist\relax \xdef\@classoptionslist{\zap@space#2 \@empty}% \def\reserved@a{% \@onefilewithoptions#3[{#2}][{#4}]#1% \@documentclasshook}% \else \def\reserved@a{% \@onefilewithoptions#3[{#2}][{#4}]#1}% \fi \else \def\reserved@b##1,{% \ifx\@nnil##1\relax\else \ifx\@nnil##1\@nnil\else \noexpand\@onefilewithoptions##1[{#2}][{#4}]% \noexpand\@pkgextension \fi \expandafter\reserved@b \fi}% \edef\reserved@a{\zap@space#3 \@empty}% \edef\reserved@a{\expandafter\reserved@b\reserved@a,\@nnil,}% \fi \reserved@a} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@fileswith@pti@ns}{ifx tests in \@fileswith@pti@ns}% \def\@fileswith@pti@ns#1[#2]#3[#4]{% \ifx#1\@clsextension \ifx\@classoptionslist\relax \xdef\@classoptionslist{\zap@space#2 \@empty}% \def\reserved@a{% \@onefilewithoptions#3[{#2}][{#4}]#1% \@documentclasshook}% \else \def\reserved@a{% \@onefilewithoptions#3[{#2}][{#4}]#1}% \fi \else \def\reserved@b##1,{% \ifx\@nil##1\relax\else \ifx\relax##1\relax\else \noexpand\@onefilewithoptions##1[{#2}][{#4}]% \noexpand\@pkgextension \fi \expandafter\reserved@b \fi}% \edef\reserved@a{\zap@space#3 \@empty}% \edef\reserved@a{% \expandafter\reserved@b\reserved@a,\@nil,}% \fi \reserved@a} \EndIncludeInRelease \IncludeInRelease{2020/10/01}% {\@onefilewithoptions}{Hooks and unused options issue}% \def\load@onefilewithoptions#1[#2][#3]#4{% \@expl@@@filehook@set@curr@file@@nNN{#1.#4}\reserved@a\reserved@b \edef\reserved@c{\def\noexpand\reserved@c####1% \detokenize\expandafter{\expanded{.#4}}% \noexpand\@nil{\def\noexpand\reserved@a{####1}}}\reserved@c \expandafter\reserved@c\reserved@a\@nil \@pushfilename \xdef\@currname{\string@makeletter\reserved@a}% \xdef\@currpath{\ifx\reserved@b\@empty\else\reserved@b/\fi}% \global\let\@currext#4% \@ifl@aded\@currext\@currname {% \@ifundefined{opt@handler@\@currname.\@currext} {\@onefilewithoptions@clashchk{#2}} {% \expandafter\protected@edef \csname opt@\@currname.\@currext\endcsname {\zap@space#2 \@empty}% \expandafter\def \csname @raw@opt@\@currname.\@currext\expandafter\endcsname \expandafter{#2}% \@nameuse{opt@handler@\@currname.\@currext}% }% }% {\makeatletter \@reset@ptions \IfFileExists{\@currpath\@currname.\@currext}{}% {\@missing@onefilewithoptions{#2}}% \ifx\@currname\@empty \expandafter\@gobble \else \@disable@packageload@do{\@currname.\@currext}% {\@expl@@@filehook@file@push@@ \set@curr@file{\@currpath\@currname.\@currext}% \@filehook@set@CurrentFile \expandafter\@swaptwoargs\expandafter {\expandafter{\@currpkg@reqd}}% {% < \edef\@currpkg@reqd{\@currname.\@currext}% \ifx\CurrentFile\CurrentFileUsed \else \filename@parse\@curr@file \edef\@currpath{\string@makeletter\filename@area}% \edef\@currname{\string@makeletter\filename@base}% \edef\@currext{\string@makeletter\filename@ext}% \fi \load@onefile@withoptions{#2}% \def\@currpkg@reqd%{\@currpkg@reqd} }% > \@expl@@@filehook@file@pop@@}% \expandafter\@firstofone \fi}% {\@ifl@ter\@currext{\@currname}{#3}{}% {\@latex@warning@no@line {You have requested,\on@line, version\MessageBreak `#3' of \@cls@pkg\space \@currname,\MessageBreak but only version\MessageBreak `\csname ver@\@currname.\@currext\endcsname'\MessageBreak is available}}% \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 \space to proceed.}}% \@firstofone} \let\@currpkg@reqd\@empty \@onlypreamble\@onefilewithoptions \let\@unprocessedoptions\@undefined \def\@missing@onefilewithoptions#1{% \@missingfileerror{\@currpath\@currname}\@currext \global\let\@currpath\@missingfile@area \global\let\@currname\@missingfile@base \global\let\@currext\@missingfile@ext} \def\load@onefile@withoptions#1{% \let\CurrentOption\@empty \@reset@ptions \def\reserved@a{% \@pass@ptions\@currext{#1}{\@currname}% \expandafter\let \csname opt@\@currpkg@reqd\expandafter\endcsname \csname opt@\@currname.\@currext\endcsname \expandafter\let \csname @raw@opt@\@currpkg@reqd\expandafter\endcsname \csname @raw@opt@\@currname.\@currext\endcsname \global\expandafter \let\csname ver@\@currname.\@currext\endcsname\@empty \expandafter\let\csname\@currname.\@currext-h@@k\endcsname\@empty \ifx\@currext\@pkgextension \UseHook{package/before}% \UseOneTimeHook{package/\@currname/before}% \else \ifx\@currext\@clsextension \UseHook{class/before}% \UseOneTimeHook{class/\@currname/before}% \fi \fi \InputIfFileExists{\@currpath\@currpkg@reqd}{}% {\@latex@error {The \@cls@pkg\space\@currpkg@reqd\space failed to load}\@ehd}% \expandafter\let\csname unprocessedoptions-\@currname.\@currext\endcsname \@@unprocessedoptions \csname\@currname.\@currext-h@@k\endcsname \expandafter\let\csname\@currname.\@currext-h@@k\endcsname \@undefined \ifx\@unprocessedoptions\relax \let\@unprocessedoptions\@undefined \else \csname unprocessedoptions-\@currname.\@currext\endcsname \fi \expandafter\let \csname unprocessedoptions-\@currname.\@currext\endcsname \@undefined \ifx\@currext\@pkgextension \UseOneTimeHook{package/\@currname/after}% \UseHook{package/after}% \else \ifx\@currext\@clsextension \UseOneTimeHook{class/\@currname/after}% \UseHook{class/after}% \fi \fi}% \@ifl@aded\@currext\@currname{}{\reserved@a}} \NewHook{package/before} \NewHook{class/before} \NewReversedHook{package/after} \NewReversedHook{class/after} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@onefilewithoptions}{Hooks and unused options issue}% \def\load@onefilewithoptions#1[#2][#3]#4{% \@pushfilename \xdef\@currname{#1}% \global\let\@currext#4% \let\CurrentOption\@empty \@reset@ptions \makeatletter \def\reserved@a{% \@ifl@aded\@currext{#1}% {\@if@ptions\@currext{#1}{#2}{}% {\@latex@error {Option clash for \@cls@pkg\space #1}% {The package #1 has already been loaded with options:\MessageBreak \space\space[\@ptionlist{#1.\@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{#1.\@currext},#2\MessageBreak to your \noexpand\documentclass declaration may fix this.% \MessageBreak Try typing \space \space to proceed.}}}% {\@pass@ptions\@currext{#2}{#1}% \global\expandafter \let\csname ver@\@currname.\@currext\endcsname\@empty \expandafter\let\csname\@currname.\@currext-h@@k\endcsname\@empty \InputIfFileExists {\@currname.\@currext}% {}% {\@missingfileerror\@currname\@currext}% \let\@unprocessedoptions\@@unprocessedoptions \csname\@currname.\@currext-h@@k\endcsname \expandafter\let\csname\@currname.\@currext-h@@k\endcsname \@undefined \@unprocessedoptions}% \@ifl@ter\@currext{#1}{#3}{}% {\@latex@warning@no@line {You have requested,\on@line, version\MessageBreak `#3' of \@cls@pkg\space #1,\MessageBreak but only version\MessageBreak `\csname ver@#1.\@currext\endcsname'\MessageBreak is available}}% \ifx\@currext\@clsextension\let\LoadClass\@twoloadclasserror\fi \@popfilename \@reset@ptions}% \reserved@a} \let \load@onefile@withoptions \@undefined \let \@missing@onefilewithoptions \@undefined \EndIncludeInRelease \IncludeInRelease{2020/10/01}% {\AtBeginDocument}{Use hook system}% \DeclareRobustCommand\AtBeginDocument{\AddToHook{begindocument}} \DeclareRobustCommand\AtEndDocument {\AddToHook{enddocument}} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\AtBeginDocument}{Use hook system}% \DeclareRobustCommand\AtBeginDocument{\g@addto@macro\@begindocumenthook} \DeclareRobustCommand\AtEndDocument{\g@addto@macro\@enddocumenthook} \EndIncludeInRelease \IncludeInRelease{2024/11/01}% {\@cls@pkg}{Allow for more extensions}% \def\@cls@pkg{% \ifx\@currext\@clsextension document class% \else \ifx\@currext\@pkgextension package% \else file% \fi \fi} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@cls@pkg}{Allow for more extensions}% \def\@cls@pkg{% \ifx\@currext\@clsextension document class% \else package% \fi} \EndIncludeInRelease \IncludeInRelease{2020/10/01}% {\filec@ntents}{Define \q@curr@file directly (gh/220)}% \def\filecontents{\@tempswatrue\@fileswtrue \@ifnextchar[\filec@ntents@opt\filec@ntents } \@namedef{filecontents*}{\@tempswafalse\@fileswtrue \@ifnextchar[\filec@ntents@opt\filec@ntents } \def\filec@ntents@opt[#1]{% \edef\@fortmp{\zap@space#1 \@empty}% \@for\reserved@a:=\@fortmp\do{% \ifcsname filec@ntents@\reserved@a\endcsname \csname filec@ntents@\reserved@a\endcsname \else \@latex@error{Unknown filecontents option \reserved@a}% {Valid options are force (or overwrite), nosearch, noheader, nowarn}% \fi}% \filec@ntents } \let\filec@ntents@force\@fileswfalse \let\filec@ntents@overwrite\@fileswfalse % alternative name \let\filec@ntents@noheader\@tempswafalse \def\filec@ntents@nosearch{% \let\filec@ntents@checkdir\@currdir \def\filec@ntents@where{in current directory}} \let\filec@ntents@checkdir\@empty \def\filec@ntents@where{exists on the system} \def\filec@ntents@nowarn{% \let\filec@ntents@warning\@latex@note@no@line } \let\filec@ntents@warning\@latex@warning@no@line \begingroup% \@tempcnta=1 \loop \catcode\@tempcnta=12 % \advance\@tempcnta\@ne % \ifnum\@tempcnta<32 % \repeat % \catcode`\*=11 % \catcode`\^^M\active% \catcode`\^^L\active\let^^L\relax% \catcode`\^^I\active% \gdef\filec@ntents#1{% \set@curr@file{\filec@ntents@checkdir#1}% \edef\q@curr@file{"\@curr@file"}% \chardef\reserved@c\ifx\directlua\@undefined 15 \else 127 \fi% \openin\@inputcheck\q@curr@file \space % \ifeof\@inputcheck% \@latex@note@no@line% {Writing file `\@currdir\@curr@file'}% \ch@ck7\reserved@c\write\relax% \immediate\openout\reserved@c\q@curr@file\relax% \else% \if@filesw% \@latex@note@no@line% {File `\@curr@file' already \filec@ntents@where.\MessageBreak% Not generating it from this source}% \let\write\@gobbletwo% \let\closeout\@gobble% \else% \edef\reserved@b{\detokenize\expandafter{\jobname}}% \ifx\@curr@file\reserved@b% \@fileswtrue% \else% \edef\reserved@b{\reserved@b\detokenize{.tex}}% \ifx\@curr@file\reserved@b \@fileswtrue% \fi% \fi% \ch@ck7\reserved@c\write\relax% \if@filesw% % Foul ... trying to overwrite \jobname! \@latex@error{Trying to overwrite `\jobname.tex'}{You can't % write to the file you are reading from!\MessageBreak% Data is written to screen instead.}% \else% \filec@ntents@warning% {Writing or overwriting file `\@curr@file'}% \immediate\openout\reserved@c\q@curr@file\relax% \fi% \fi% \fi% \closein\@inputcheck% \if@tempswa% \immediate\write\reserved@c{% \@percentchar\@percentchar\space% \expandafter\@gobble\string\LaTeX2e file `\@curr@file'^^J% \@percentchar\@percentchar\space generated by the % `\@currenvir' \expandafter\@gobblefour\string\newenvironment^^J% \@percentchar\@percentchar\space from source `\jobname' on % \number\year/\two@digits\month/\two@digits\day.^^J% \@percentchar\@percentchar}% \fi% \let\do\@makeother\dospecials% \count@ 128\relax% \loop% \catcode\count@ 11\relax% \advance\count@ \@ne% \ifnum\count@<\@cclvi% \repeat% \edef\E{\@backslashchar end\string{\@currenvir\string}}% \edef\reserved@b{% \def\noexpand\reserved@b% ####1\E####2\E####3\relax}% \reserved@b{% \ifx\relax##3\relax% \immediate\write\reserved@c{##1}% \else% \edef^^M{\noexpand\end{\@currenvir}}% \ifx\relax##1\relax% \else% \@latex@warning{Writing text `##1' before % \string\end{\@currenvir}\MessageBreak as last line of \@curr@file}% \immediate\write\reserved@c{##1}% \fi% \ifx\relax##2\relax% \else% \@latex@warning{% Ignoring text `##2' after \string\end{\@currenvir}}% \fi% \fi% ^^M}% \catcode`\^^L\active% \let\L\@undefined% \def^^L{\expandafter\ifx\csname L\endcsname\relax\fi ^^J^^J}% \catcode`\^^I\active% \let\I\@undefined% \def^^I{\expandafter\ifx\csname I\endcsname\relax\fi\space}% \catcode`\^^M\active% \edef^^M##1^^M{% \noexpand\reserved@b##1\E\E\relax}}% \endgroup% \EndIncludeInRelease \IncludeInRelease{2019/10/01}% {\filec@ntents}{Spaces in file names + optional arg}% \def\filecontents{\@tempswatrue\@fileswtrue \@ifnextchar[\filec@ntents@opt\filec@ntents } \@namedef{filecontents*}{\@tempswafalse\@fileswtrue \@ifnextchar[\filec@ntents@opt\filec@ntents } \def\filec@ntents@opt[#1]{% \edef\@fortmp{\zap@space#1 \@empty}% \@for\reserved@a:=\@fortmp\do{% \ifcsname filec@ntents@\reserved@a\endcsname \csname filec@ntents@\reserved@a\endcsname \else \@latex@error{Unknown filecontents option \reserved@a}% {Valid options are force (or overwrite), nosearch, noheader}% \fi}% \filec@ntents } \let\filec@ntents@force\@fileswfalse \let\filec@ntents@overwrite\@fileswfalse % alternative name \let\filec@ntents@noheader\@tempswafalse \def\filec@ntents@nosearch{% \let\filec@ntents@checkdir\@currdir \def\filec@ntents@where{in current directory}} \let\filec@ntents@checkdir\@empty \def\filec@ntents@where{exists on the system} \begingroup% \@tempcnta=1 \loop \catcode\@tempcnta=12 % \advance\@tempcnta\@ne % \ifnum\@tempcnta<32 % \repeat % \catcode`\*=11 % \catcode`\^^M\active% \catcode`\^^L\active\let^^L\relax% \catcode`\^^I\active% \gdef\filec@ntents#1{% \set@curr@file{\filec@ntents@checkdir#1}% \edef\q@curr@file{\expandafter\quote@name\expandafter{\@curr@file}}% \chardef\reserved@c\ifx\directlua\@undefined 15 \else 127 \fi% \openin\@inputcheck\q@curr@file \space % \ifeof\@inputcheck% \@latex@warning@no@line% {Writing file `\@currdir\@curr@file'}% \ch@ck7\reserved@c\write\relax% \immediate\openout\reserved@c\q@curr@file\relax% \else% \if@filesw% \@latex@warning@no@line% {File `\@curr@file' already \filec@ntents@where.\MessageBreak% Not generating it from this source}% \let\write\@gobbletwo% \let\closeout\@gobble% \else% \edef\reserved@a{#1}% \edef\reserved@a{\detokenize\expandafter{\reserved@a}}% \edef\reserved@b{\detokenize\expandafter{\jobname}}% \ifx\reserved@a\reserved@b% \@fileswtrue% \else% \edef\reserved@b{\reserved@b\detokenize{.tex}}% \ifx\reserved@a\reserved@b \@fileswtrue% \fi% \fi% \ch@ck7\reserved@c\write\relax% \if@filesw% % Foul ... trying to overwrite \jobname! \@latex@error{Trying to overwrite `\jobname.tex'}{You can't % write to the file you are reading from!\MessageBreak% Data is written to screen instead.}% \else% \@latex@warning@no@line% {Writing or overwriting file `\@currdir\@curr@file'}% \immediate\openout\reserved@c\q@curr@file\relax% \fi% \fi% \fi% \closein\@inputcheck% \if@tempswa% \immediate\write\reserved@c{% \@percentchar\@percentchar\space% \expandafter\@gobble\string\LaTeX2e file `\@curr@file'^^J% \@percentchar\@percentchar\space generated by the % `\@currenvir' \expandafter\@gobblefour\string\newenvironment^^J% \@percentchar\@percentchar\space from source `\jobname' on % \number\year/\two@digits\month/\two@digits\day.^^J% \@percentchar\@percentchar}% \fi% \let\do\@makeother\dospecials% \count@ 128\relax% \loop% \catcode\count@ 11\relax% \advance\count@ \@ne% \ifnum\count@<\@cclvi% \repeat% \edef\E{\@backslashchar end\string{\@currenvir\string}}% \edef\reserved@b{% \def\noexpand\reserved@b% ####1\E####2\E####3\relax}% \reserved@b{% \ifx\relax##3\relax% \immediate\write\reserved@c{##1}% \else% \edef^^M{\noexpand\end{\@currenvir}}% \ifx\relax##1\relax% \else% \@latex@warning{Writing text `##1' before % \string\end{\@currenvir}\MessageBreak as last line of \@curr@file}% \immediate\write\reserved@c{##1}% \fi% \ifx\relax##2\relax% \else% \@latex@warning{% Ignoring text `##2' after \string\end{\@currenvir}}% \fi% \fi% ^^M}% \catcode`\^^L\active% \let\L\@undefined% \def^^L{\expandafter\ifx\csname L\endcsname\relax\fi ^^J^^J}% \catcode`\^^I\active% \let\I\@undefined% \def^^I{\expandafter\ifx\csname I\endcsname\relax\fi\space}% \catcode`\^^M\active% \edef^^M##1^^M{% \noexpand\reserved@b##1\E\E\relax}}% \endgroup% \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\filec@ntents}{Spaces in file names + optional arg}% \let\filec@ntents@opt \@undefined \let\filec@ntents@force \@undefined \let\filec@ntents@overwrite \@undefined \let\filec@ntents@noheader \@undefined \let\filec@ntents@nosearch \@undefined \let\filec@ntents@checkdir \@undefined \let\filec@ntents@where \@undefined \begingroup% \@tempcnta=1 \loop \catcode\@tempcnta=12 % \advance\@tempcnta\@ne % \ifnum\@tempcnta<32 % \repeat % \catcode`\*=11 % \catcode`\^^M\active% \catcode`\^^L\active\let^^L\relax% \catcode`\^^I\active% \gdef\filec@ntents#1{% \openin\@inputcheck#1 % \ifeof\@inputcheck% \@latex@warning@no@line% {Writing file `\@currdir#1'}% \chardef\reserved@c15 % \ch@ck7\reserved@c\write% \immediate\openout\reserved@c#1\relax% \else% \closein\@inputcheck% \@latex@warning@no@line% {File `#1' already exists on the system.\MessageBreak% Not generating it from this source}% \let\write\@gobbletwo% \let\closeout\@gobble% \fi% \if@tempswa% \immediate\write\reserved@c{% \@percentchar\@percentchar\space% \expandafter\@gobble\string\LaTeX2e file `#1'^^J% \@percentchar\@percentchar\space generated by the % `\@currenvir' \expandafter\@gobblefour\string\newenvironment^^J% \@percentchar\@percentchar\space from source `\jobname' on % \number\year/\two@digits\month/\two@digits\day.^^J% \@percentchar\@percentchar}% \fi% \let\do\@makeother\dospecials% \count@ 128\relax% \loop% \catcode\count@ 11\relax% \advance\count@ \@ne% \ifnum\count@<\@cclvi% \repeat% \edef\E{\@backslashchar end\string{\@currenvir\string}}% \edef\reserved@b{% \def\noexpand\reserved@b% ####1\E####2\E####3\relax}% \reserved@b{% \ifx\relax##3\relax% \immediate\write\reserved@c{##1}% \else% \edef^^M{\noexpand\end{\@currenvir}}% \ifx\relax##1\relax% \else% \@latex@warning{Writing text `##1' before % \string\end{\@currenvir}\MessageBreak as last line of #1}% \immediate\write\reserved@c{##1}% \fi% \ifx\relax##2\relax% \else% \@latex@warning{% Ignoring text `##2' after \string\end{\@currenvir}}% \fi% \fi% ^^M}% \catcode`\^^L\active% \let\L\@undefined% \def^^L{\expandafter\ifx\csname L\endcsname\relax\fi ^^J^^J}% \catcode`\^^I\active% \let\I\@undefined% \def^^I{\expandafter\ifx\csname I\endcsname\relax\fi\space}% \catcode`\^^M\active% \edef^^M##1^^M{% \noexpand\reserved@b##1\E\E\relax}}% \endgroup% \EndIncludeInRelease %%% From File: ltfilehook.dtx \IncludeInRelease{2020/10/01}% {\CurrentFile}{Hook management file}% \ExplSyntaxOn \tl_new:N \CurrentFile \tl_new:N \CurrentFilePath \tl_new:N \CurrentFileUsed \tl_new:N \CurrentFilePathUsed \ExplSyntaxOff \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\CurrentFile}{Hook management file}% \let \CurrentFile \@undefined \let \CurrentFilePath \@undefined \let \CurrentFileUsed \@undefined \let \CurrentFilePathUsed \@undefined \EndIncludeInRelease \IncludeInRelease{2020/10/01}% {\__filehook_file_parse_full_name:nN}{File helpers}% \ExplSyntaxOn \cs_new:Npn \__filehook_file_parse_full_name:nN #1 { \exp_args:Nf \file_parse_full_name_apply:nN { \exp_args:Nf \__filehook_full_name:nn { \file_full_name:n {#1} } {#1} } } \cs_new:Npn \__filehook_full_name:nn #1 #2 { \tl_if_empty:nTF {#1} { \tl_trim_spaces:n {#2} } { \tl_trim_spaces:n {#1} } } \cs_new:Npn \__filehook_if_no_extension:nTF #1 { \exp_args:Ne \tl_if_empty:nTF { \file_parse_full_name_apply:nN {#1} \use_iii:nnn } } \cs_new_protected:Npn \__filehook_drop_extension:N #1 { \tl_gset:Nx #1 { \exp_args:NV \__filehook_file_parse_full_name:nN #1 \__filehook_drop_extension_aux:nnn } } \cs_new:Npn \__filehook_drop_extension_aux:nnn #1 #2 #3 { \tl_if_empty:nF {#1} { #1 / } #2 } \tl_new:N \l__filehook_internal_tl \seq_if_exist:NF \g__filehook_input_file_seq { \seq_new:N \g__filehook_input_file_seq } \cs_new_protected:Npn \__filehook_file_push: { \seq_gpush:Nx \g__filehook_input_file_seq { { \CurrentFilePathUsed } { \CurrentFileUsed } { \CurrentFilePath } { \CurrentFile } } } \cs_new_protected:Npn \__filehook_file_pop: { \seq_gpop:NNTF \g__filehook_input_file_seq \l__filehook_internal_tl { \exp_after:wN \__filehook_file_pop_assign:nnnn \l__filehook_internal_tl } { \msg_error:nnn { latex2e } { should-not-happen } { Tried~to~pop~from~an~empty~file~name~stack. } } } \cs_new_protected:Npn \__filehook_file_pop_assign:nnnn #1 #2 #3 #4 { \tl_set:Nn \CurrentFilePathUsed {#1} \tl_set:Nn \CurrentFileUsed {#2} \tl_set:Nn \CurrentFilePath {#3} \tl_set:Nn \CurrentFile {#4} } \ExplSyntaxOff \EndIncludeInRelease \IncludeInRelease{2020/10/01}% {\file_parse_full_name_apply:nN}{Roll forward help}% \ExplSyntaxOn \cs_if_exist:NF\file_parse_full_name_apply:nN { \cs_new:Npn \file_parse_full_name_apply:nN #1 { \exp_args:Ne \__file_parse_full_name_auxi:nN { \__kernel_file_name_sanitize:n {#1} } } \cs_new:Npn \__file_parse_full_name_auxi:nN #1 { \__file_parse_full_name_area:nw { } #1 / \s__file_stop } \cs_new:Npn \__file_parse_full_name_area:nw #1 #2 / #3 \s__file_stop { \tl_if_empty:nTF {#3} { \__file_parse_full_name_base:nw { } #2 . \s__file_stop {#1} } { \__file_parse_full_name_area:nw { #1 / #2 } #3 \s__file_stop } } \cs_new:Npn \__file_parse_full_name_base:nw #1 #2 . #3 \s__file_stop { \tl_if_empty:nTF {#3} { \tl_if_empty:nTF {#1} { \tl_if_empty:nTF {#2} { \__file_parse_full_name_tidy:nnnN { } { } } { \__file_parse_full_name_tidy:nnnN { .#2 } { } } } { \__file_parse_full_name_tidy:nnnN {#1} { .#2 } } } { \__file_parse_full_name_base:nw { #1 . #2 } #3 \s__file_stop } } \cs_new:Npn \__file_parse_full_name_tidy:nnnN #1 #2 #3 #4 { \exp_args:Nee #4 { \str_if_eq:nnF {#3} { / } { \use_none:n } #3 \prg_do_nothing: } { \use_none:n #1 \prg_do_nothing: } {#2} } } \ExplSyntaxOff \EndIncludeInRelease \IncludeInRelease{2020/10/01}% {\InputIfFileExists}{Hook management (files)}% \let\InputIfFileExists\@undefined \DeclareRobustCommand \InputIfFileExists[2]{% \IfFileExists{#1}% {% \@expl@@@filehook@file@push@@ \@filehook@set@CurrentFile \expandafter\@swaptwoargs\expandafter {\expandafter\@input@file@exists@with@hooks \expandafter{\@filef@und}}% {#2}% \@expl@@@filehook@file@pop@@ }% } \def\@input@file@exists@with@hooks#1{% \edef\reserved@a{% \@expl@@@filehook@file@pop@assign@@nnnn {\CurrentFilePathUsed}% {\CurrentFileUsed}% {\CurrentFilePath}% {\CurrentFile}}% \expandafter\@swaptwoargs\expandafter{\reserved@a}% {\edef\reserved@a{\unqu@tefilef@und#1\@nil}% \@addtofilelist{\string@makeletter\reserved@a}% \UseHook{file/before}% \UseHook{file/\CurrentFile/before}% \@@input #1% <- trailing space comes from \@filef@und }% \UseHook{file/\CurrentFile/after}% \UseHook{file/after}} \def\unqu@tefilef@und"#1" \@nil{#1} \NewHook{file/before} \NewReversedHook{file/after} \EndIncludeInRelease \IncludeInRelease{2019/10/01}% {\InputIfFileExists}{Hook management (files)}% \DeclareRobustCommand \InputIfFileExists[2]{% \IfFileExists{#1}% {% \expandafter\@swaptwoargs\expandafter {\@filef@und}{#2\@addtofilelist{#1}\@@input}}} \let\@input@file@exists@with@hooks\@undefined \let\unqu@tefilef@und\@undefined \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\InputIfFileExists}{Hook management (files)}% \long\def \InputIfFileExists#1#2{% \IfFileExists{#1}% {#2\@addtofilelist{#1}\@@input \@filef@und}} \expandafter\let\csname InputIfFileExists \endcsname\@undefined \let\@input@file@exists@with@hooks\@undefined \let\unqu@tefilef@und\@undefined \EndIncludeInRelease \IncludeInRelease{2020/10/01}% {\__filehook_subst_add:nn}{Declaring file substitution}% \ExplSyntaxOn \cs_new_protected:Npn \__filehook_subst_add:nn #1 #2 { \group_begin: \cs_set:cpx { } { \exp_not:o { \cs:w\cs_end: } } \int_set:Nn \tex_escapechar:D { -1 } \cs_gset:cpx { @file-subst@ \__filehook_subst_file_normalize:Nn \use_ii_iii:nnn {#1} } { \__filehook_subst_file_normalize:Nn \__filehook_file_name_compose:nnn {#2} } \group_end: } \cs_new_protected:Npn \__filehook_subst_remove:n #1 { \group_begin: \cs_set:cpx { } { \exp_not:o { \cs:w\cs_end: } } \int_set:Nn \tex_escapechar:D { -1 } \cs_undefine:c { @file-subst@ \__filehook_subst_file_normalize:Nn \use_ii_iii:nnn {#1} } \group_end: } \cs_new:Npn \__filehook_subst_file_normalize:Nn #1 #2 { \exp_after:wN \__filehook_subst_empty_name_chk:NN \cs:w \exp_after:wN \cs_end: \cs:w \__filehook_file_parse_full_name:nN {#2} #1 \cs_end: } \cs_new:Npn \__filehook_subst_empty_name_chk:NN #1 #2 { \if_meaning:w #1 #2 .tex \else: \token_to_str:N #2 \fi: } \cs_gset:Npn \use_ii_iii:nnn #1 #2 #3 {#2 #3} \ExplSyntaxOff \EndIncludeInRelease \IncludeInRelease{2020/10/01}% {\declare@file@substitution}{File substitution}% \ExplSyntaxOn \cs_new_eq:NN \declare@file@substitution \__filehook_subst_add:nn \cs_new_eq:NN \undeclare@file@substitution \__filehook_subst_remove:n \ExplSyntaxOff \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\declare@file@substitution}{File substitution}% \let \declare@file@substitution \@gobbletwo \let \undeclare@file@substitution \@gobble \EndIncludeInRelease \IncludeInRelease{2022/06/01}% {\set@curr@file}{Setting current file name}% \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~}% \expandafter\def\csname\expandafter\endcsname \expandafter{\csname\endcsname}% \@expl@@@filehook@if@no@extension@@nTF{#1}% {\@tempswatrue}{\@tempswafalse}% \@kernel@make@file@csname\@curr@file \@expl@@@filehook@resolve@file@subst@@w {#1}% \@expl@@@filehook@if@file@replaced@@TF {\@kernel@make@file@csname\@curr@file@reqd \@expl@@@filehook@normalize@file@name@@w{#1}% \if@tempswa \@expl@@@filehook@drop@extension@@N\@curr@file@reqd \fi}% {\if@tempswa \@expl@@@filehook@drop@extension@@N\@curr@file \fi \global\let\@curr@file@reqd\@curr@file}% \@expl@@@filehook@clear@replacement@flag@@ \endgroup} \EndIncludeInRelease \IncludeInRelease{2021/06/01}% {\set@curr@file}{Setting current file name}% \def\set@curr@file#1{% \begingroup \escapechar\m@ne \let\protect\string \edef~{\string~}% \expandafter\def\csname\expandafter\endcsname \expandafter{\csname\endcsname}% \@expl@@@filehook@if@no@extension@@nTF{#1}% {\@tempswatrue}{\@tempswafalse}% \@kernel@make@file@csname\@curr@file \@expl@@@filehook@resolve@file@subst@@w {#1}% \@expl@@@filehook@if@file@replaced@@TF {\@kernel@make@file@csname\@curr@file@reqd \@expl@@@filehook@normalize@file@name@@w{#1}% \if@tempswa \@expl@@@filehook@drop@extension@@N\@curr@file@reqd \fi}% {\if@tempswa \@expl@@@filehook@drop@extension@@N\@curr@file \fi \global\let\@curr@file@reqd\@curr@file}% \@expl@@@filehook@clear@replacement@flag@@ \endgroup} \let\set@curr@file@nosearch\@undefined \EndIncludeInRelease \IncludeInRelease{2020/10/01}% {\set@curr@file}{Setting current file name}% \def\set@curr@file#1{% \begingroup \escapechar\m@ne \expandafter\def\csname\expandafter\endcsname \expandafter{\csname\endcsname}% \@expl@@@filehook@if@no@extension@@nTF{#1}% {\@tempswatrue}{\@tempswafalse}% \@kernel@make@file@csname\@curr@file \@expl@@@filehook@resolve@file@subst@@w {#1}% \@expl@@@filehook@if@file@replaced@@TF {\@kernel@make@file@csname\@curr@file@reqd \@expl@@@filehook@normalize@file@name@@w{#1}% \if@tempswa \@expl@@@filehook@drop@extension@@N\@curr@file@reqd \fi}% {\if@tempswa \@expl@@@filehook@drop@extension@@N\@curr@file \fi \global\let\@curr@file@reqd\@curr@file}% \@expl@@@filehook@clear@replacement@flag@@ \endgroup} \let\set@curr@file@nosearch\@undefined \EndIncludeInRelease \IncludeInRelease{2019/10/01}% {\set@curr@file}{Setting current file name}% \def\set@curr@file#1{% \begingroup \escapechar\m@ne \xdef\@curr@file{% \expandafter\expandafter\expandafter\unquote@name \expandafter\expandafter\expandafter{% \expandafter\string \csname\@firstofone#1\@empty\endcsname}}% \endgroup } \let\set@curr@file@nosearch\@undefined \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\set@curr@file}{Setting current file name}% \let\set@curr@file\@undefined \let\set@curr@file@nosearch\@undefined \EndIncludeInRelease \IncludeInRelease{2020/10/01}% {\@kernel@make@file@csname}{Make file csname}% \def\@kernel@make@file@csname#1#2#3{% \xdef#1{\expandafter\@set@curr@file@aux \csname\expandafter#2\@firstofone#3\@nil\endcsname}} \long\def\@set@curr@file@aux#1{% \expandafter\ifx\csname\endcsname#1% .tex\else\string#1\fi} \def\@filehook@set@CurrentFile{% \@expl@@@filehook@set@curr@file@@nNN{\@curr@file}% \CurrentFileUsed\CurrentFilePathUsed \ifx\@curr@file@reqd\@curr@file \let\CurrentFile\CurrentFileUsed \let\CurrentFilePath\CurrentFilePathUsed \else \@expl@@@filehook@set@curr@file@@nNN{\@curr@file@reqd}% \CurrentFile\CurrentFilePath \fi} \EndIncludeInRelease \IncludeInRelease{2020/10/01}% {@@_set_curr_file:nNN}{Set curr file}% \ExplSyntaxOn \cs_new_protected:Npn \__filehook_set_curr_file:nNN #1 { \exp_args:Nf \__filehook_file_parse_full_name:nN {#1} \__filehook_set_curr_file_assign:nnnNN } \cs_new_protected:Npn \__filehook_set_curr_file_assign:nnnNN #1 #2 #3 #4 #5 { \str_set:Nn #5 {#1} \str_set:Nn #4 {#2#3} } \ExplSyntaxOff \EndIncludeInRelease \IncludeInRelease{2020/10/01}% {\__filehook_resolve_file_subst:w}{Replace files detect loops}% \ExplSyntaxOn \cs_new:Npn \__filehook_resolve_file_subst:w #1 \@nil { \__filehook_file_parse_full_name:nN {#1} \__filehook_file_subst_begin:nnn } \cs_new:Npn \__filehook_normalize_file_name:w #1 \@nil { \__filehook_file_parse_full_name:nN {#1} \__filehook_file_name_compose:nnn } \cs_new:Npn \__filehook_file_name_compose:nnn #1 #2 #3 { \tl_if_empty:nF {#1} { #1 / } #2#3 } \flag_new:n { __filehook_file_replaced } \cs_new:Npn \__filehook_if_file_replaced:TF #1 #2 { \flag_if_raised:nTF { __filehook_file_replaced } {#1} {#2} } \cs_new_protected:Npn \__filehook_clear_replacement_flag: { \flag_clear:n { __filehook_file_replaced } } \cs_new:Npn \__filehook_file_subst_begin:nnn #1 #2 #3 { \__filehook_file_subst_tortoise_hare:nn { #2#3 } { #2#3 } { \__filehook_file_name_compose:nnn {#1} {#2} {#3} } } \ExplSyntaxOff \EndIncludeInRelease \IncludeInRelease{2020/10/01}% {\__filehook_file_subst_tortoise_hare:nn}{Tortoise and Hare}% \ExplSyntaxOn \cs_new:Npn \__filehook_file_subst_tortoise_hare:nn #1 #2 #3 { \cs_if_exist:cTF { @file-subst@ #2 } { \flag_if_raised:nF { __filehook_file_replaced } { \flag_raise:n { __filehook_file_replaced } } \cs_if_exist:cTF { @file-subst@ \use:c { @file-subst@ #2 } } { \__filehook_file_subst_loop:cc { @file-subst@ #1 } { @file-subst@ \use:c { @file-subst@ #2 } } } { \use:c { @file-subst@ #2 } } } { #3 } } \cs_new:Npn \__filehook_file_subst_loop:NN #1 #2 { \token_if_eq_meaning:NNTF #1 #2 { .tex \__filehook_file_subst_cycle_error:cN { @file-subst@ #1 } #1 } { \__filehook_file_subst_tortoise_hare:nn {#1} {#2} {#2} } } \cs_generate_variant:Nn \__filehook_file_subst_loop:NN { cc } \cs_new:Npn \__filehook_file_subst_cycle_error:NN #1 #2 { \msg_expandable_error:nnff { latex2e } { file-cycle } {#1} { \use:c { @file-subst@ #1 } } \token_if_eq_meaning:NNF #1 #2 { \__filehook_file_subst_cycle_error:cN { @file-subst@ #1 } #2 } } \cs_generate_variant:Nn \__filehook_file_subst_cycle_error:NN { c } \msg_new:nnn { latex2e } { file-cycle } { File~loop!~#1~replaced~by~#2... } \ExplSyntaxOff \EndIncludeInRelease \IncludeInRelease{2020/10/01}% {\disable@package@load}{Disable packages}% \def\disable@package@load#1#2{% \global\@namedef{@pkg-disable@#1.\@pkgextension}{#2}} \def\@disable@packageload@do#1#2{% \@ifundefined{@pkg-disable@#1}% {#2}% {\@nameuse{@pkg-disable@#1}% \@latex@info{Package '#1' has been disabled.% \MessageBreak Load request ignored}% \expandafter\@gobbletwo}} \def\reenable@package@load#1{% \global\expandafter\let \csname @pkg-disable@#1.\@pkgextension \endcsname \@undefined} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\disable@package@load}{Disable packages}% \let\disable@package@load \@undefined \let\@disable@packageload@do\@undefined \let\reenable@package@load \@undefined \EndIncludeInRelease \IncludeInRelease{2020/10/01}% {\@expl@@@filehook@if@no@extension@@nTF}{2e tmp interfaces}% \ExplSyntaxOn \cs_new_eq:NN \@expl@@@filehook@if@no@extension@@nTF \__filehook_if_no_extension:nTF \cs_new_eq:NN \@expl@@@filehook@set@curr@file@@nNN \__filehook_set_curr_file:nNN \cs_new_eq:NN \@expl@@@filehook@resolve@file@subst@@w \__filehook_resolve_file_subst:w \cs_new_eq:NN \@expl@@@filehook@normalize@file@name@@w \__filehook_normalize_file_name:w \cs_new_eq:NN \@expl@@@filehook@if@file@replaced@@TF \__filehook_if_file_replaced:TF \cs_new_eq:NN \@expl@@@filehook@clear@replacement@flag@@ \__filehook_clear_replacement_flag: \cs_new_eq:NN \@expl@@@filehook@drop@extension@@N \__filehook_drop_extension:N \cs_new_eq:NN \@expl@@@filehook@file@push@@ \__filehook_file_push: \cs_new_eq:NN \@expl@@@filehook@file@pop@@ \__filehook_file_pop: \cs_new_eq:NN \@expl@@@filehook@file@pop@assign@@nnnn \__filehook_file_pop_assign:nnnn \ExplSyntaxOff \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@expl@@@filehook@if@no@extension@@nTF}{2e tmp interfaces}% \let\@expl@@@filehook@file@pop@@\relax \EndIncludeInRelease %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% Copyright (C) 2020-2024 %% Frank Mittelbach, The LaTeX Project %% %%% From File: ltshipout.dtx \IncludeInRelease{2020/10/01}% {\shipout}{Hook management (shipout)}% \ExplSyntaxOn \bool_new:N \g__shipout_debug_bool \cs_new_eq:NN \__shipout_debug:n \use_none:n \cs_new_protected:Npn \shipout_debug_on: { \bool_gset_true:N \g__shipout_debug_bool \__shipout_debug_gset: } \cs_new_protected:Npn \shipout_debug_off: { \bool_gset_false:N \g__shipout_debug_bool \__shipout_debug_gset: } \cs_new_protected:Npn \__shipout_debug_gset: { \cs_gset_protected:Npx \__shipout_debug:n ##1 { \bool_if:NT \g__shipout_debug_bool {##1} } } \box_new:N \l_shipout_box \cs_set_eq:NN \ShipoutBox \l_shipout_box \box_new:N \l__shipout_raw_box \sys_if_engine_luatex:TF { \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 \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 } } } { \cs_set_eq:NN \__shipout_finalize_box: \scan_stop: } \cs_set_protected:Npn \__shipout_execute: { \tl_set:Nx \l__shipout_group_level_tl { \int_value:w \tex_currentgrouplevel:D } \tex_afterassignment:D \__shipout_execute_test_level: \tex_setbox:D \l_shipout_box } \cs_gset_eq:NN \shipout \__shipout_execute: \tl_new:N \l__shipout_group_level_tl \cs_new:Npn \__shipout_execute_test_level: { \int_compare:nNnT \l__shipout_group_level_tl < \tex_currentgrouplevel:D \tex_aftergroup:D \__shipout_execute_cont: } \cs_new:Npn \__shipout_execute_cont: { \__shipout_execute_main_cont:Nnnn \l_shipout_box { \hook_use:n {shipout/before} } { \hook_if_empty:nF {shipout/foreground} { \__shipout_add_foreground_picture:n { \hook_use:n {shipout/foreground} } } \bool_lazy_and:nnF { \hook_if_empty_p:n {shipout/background} } { \tl_if_empty_p:N \@kernel@before@shipout@background } { \__shipout_add_background_picture:n { \@kernel@before@shipout@background \hook_use:n {shipout/background} \@kernel@after@shipout@background } } } { \hook_use:n {shipout/after} } } \cs_new:Npn \__shipout_execute_main_cont:Nnnn #1#2#3#4 { \box_if_empty:NTF #1 { \@latex@warning@no@line{ Ignoring~ void~ shipout~ box } } { % \DiscardShipoutBox on doc-level \cs_set_eq:NN \__shipout_saved_protect: \protect \set@typeset@protect \__shipout_get_box_size:N #1 #2 \int_gincr:N \g_shipout_totalpages_int \bool_if:NTF \g__shipout_discard_bool { \@latex@info@no@line{Completed~ page~ discarded} \bool_gset_false:N \g__shipout_discard_bool \tex_deadcycles:D \c_zero_int } { \box_if_empty:NTF #1 { \@latex@warning@no@line { Ignoring~ void~ shipout~ box. \MessageBreak The~ shipout~ box~ was~ voided~ by~ hook~ code } } { \int_gincr:N \g_shipout_readonly_int \__shipout_debug:n { \typeout{Absolute~ page~ =~ \int_use:N \g_shipout_readonly_int \space (target:~ \@abspage@last)} } \__shipout_get_box_size:N #1 \__shipout_run_firstpage_hook: #3 \__shipout_add_firstpage_specials: \int_compare:nNnT \@abspage@last = \g_shipout_readonly_int { \bool_lazy_and:nnF { \hook_if_empty_p:n {shipout/lastpage} } { \tl_if_empty_p:N \@kernel@after@shipout@lastpage } { \__shipout_debug:n { \typeout{Executing~ lastpage~ hook~ on~ page~ \int_use:N \g_shipout_readonly_int } } \__shipout_add_foreground_box:n { \UseHook{shipout/lastpage} \@kernel@after@shipout@lastpage } \bool_gset_true:N \g__shipout_lastpage_handled_bool } } \hook_use:n {shipout} \__shipout_finalize_box: \cs_set_eq:NN \protect \exp_not:N \tex_shipout:D \box_use:N \l_shipout_box \__shipout_drop_firstpage_specials: \set@typeset@protect #4 } } \cs_set_eq:NN \protect \__shipout_saved_protect: } } \cs_set_protected:Npn \__shipout_execute_raw: { \tl_set:Nx \l__shipout_group_level_tl { \int_value:w \tex_currentgrouplevel:D } \tex_afterassignment:D \__shipout_execute_test_level_raw: \tex_setbox:D \l__shipout_raw_box } \cs_new:Npn \__shipout_execute_test_level_raw: { \int_compare:nNnT \l__shipout_group_level_tl < \tex_currentgrouplevel:D \tex_aftergroup:D \__shipout_execute_nohooks_cont: } \cs_new:Npn \__shipout_execute_nohooks_cont: { \__shipout_execute_main_cont:Nnnn \l__shipout_raw_box {} { \__shipout_debug:n{ \typeout{Doing~ raw~ shipout~ ...} } \box_set_eq:NN \l_shipout_box \l__shipout_raw_box } {} } \cs_gset_eq:NN \RawShipout \__shipout_execute_raw: \cs_new_eq:NN \__shipout_saved_protect: \protect \hook_new:n{shipout/before} \hook_new:n{shipout} \hook_new:n{shipout/after} \hook_new:n{shipout/foreground} \hook_new:n{shipout/background} \hook_new:n{shipout/firstpage} \hook_new:n{shipout/lastpage} \let\@kernel@after@shipout@lastpage\@empty \let\@kernel@before@shipout@background\@empty \let\@kernel@after@shipout@background\@empty \cs_new:Npn \__shipout_run_firstpage_hook: { \hook_if_empty:nTF {shipout/firstpage} { \cs_gset_eq:NN \__shipout_add_firstpage_specials: \prg_do_nothing: \cs_gset_eq:NN \__shipout_drop_firstpage_specials: \prg_do_nothing: } { \hbox_set:Nn \l__shipout_firstpage_box { \UseHook{shipout/firstpage} } } \cs_gset_eq:NN \__shipout_run_firstpage_hook: \prg_do_nothing: \cs_gset:Npn \__shipout_add_firstpage_material:Nn ##1 ##2 { \@latex@warning{ First~ page~ is~ already~ shipped~ out,~ ignoring \MessageBreak \string##1 } } } \cs_new:Npn \__shipout_add_firstpage_specials: { \box_set_eq:NN \l__shipout_raw_box \l_shipout_box \__shipout_add_background_box:n { \hbox_unpack_drop:N \l__shipout_firstpage_box } \cs_gset_eq:NN \__shipout_add_firstpage_specials: \prg_do_nothing: } \cs_new:Npn \__shipout_drop_firstpage_specials: { \box_set_eq:NN \l_shipout_box \l__shipout_raw_box \cs_gset_eq:NN \__shipout_drop_firstpage_specials: \prg_do_nothing: } \box_new:N \l__shipout_firstpage_box \bool_new:N \g__shipout_lastpage_handled_bool \cs_new:Npn \__shipout_add_firstpage_material:Nn #1#2 { \AddToHook{shipout/firstpage}{#2} } \cs_new:Npn \__shipout_get_box_size:N #1 { \dim_set:Nn \l_shipout_box_ht_dim { \box_ht:N #1 } \dim_set:Nn \l_shipout_box_dp_dim { \box_dp:N #1 } \dim_set:Nn \l_shipout_box_wd_dim { \box_wd:N #1 } \dim_set:Nn \l_shipout_box_ht_plus_dp_dim { \l_shipout_box_ht_dim + \l_shipout_box_dp_dim } } \dim_new:N \l_shipout_box_ht_dim \dim_new:N \l_shipout_box_dp_dim \dim_new:N \l_shipout_box_wd_dim \dim_new:N \l_shipout_box_ht_plus_dp_dim \bool_new:N \g__shipout_discard_bool \box_new:N \l__shipout_tmp_box \tl_new:N \l__shipout_saved_badness_tl \cs_new:Npn \__shipout_add_background_box:n #1 { \__shipout_get_box_size:N \l_shipout_box \box_if_vertical:NTF \l_shipout_box { \tl_set:Nx \l__shipout_saved_badness_tl { \vfuzz=\the\vfuzz\relax \vbadness=\the\vbadness\relax } \vfuzz=\c_max_dim \vbadness=\c_max_int \vbox_set_to_ht:Nnn \l_shipout_box \l_shipout_box_ht_plus_dp_dim { \hbox_set:Nn \l__shipout_tmp_box { \l__shipout_saved_badness_tl #1 } \box_set_wd:Nn \l__shipout_tmp_box \c_zero_dim \box_set_ht:Nn \l__shipout_tmp_box \c_zero_dim \box_set_dp:Nn \l__shipout_tmp_box \c_zero_dim \skip_zero:N \baselineskip \skip_zero:N \lineskip \skip_zero:N \lineskiplimit \box_use:N \l__shipout_tmp_box \vbox_unpack:N \l_shipout_box \kern \c_zero_dim } \box_set_ht:Nn \l_shipout_box \l_shipout_box_ht_dim \box_set_dp:Nn \l_shipout_box \l_shipout_box_dp_dim \l__shipout_saved_badness_tl } { \box_if_horizontal:NT \l_shipout_box { \tl_set:Nx \l__shipout_saved_badness_tl { \hfuzz=\the\hfuzz\relax \hbadness=\the\hbadness\relax } \hfuzz=\c_max_dim \hbadness=\c_max_int \hbox_set_to_wd:Nnn \l_shipout_box \l_shipout_box_wd_dim { \hbox_set:Nn \l__shipout_tmp_box { \l__shipout_saved_badness_tl #1 } \box_set_wd:Nn \l__shipout_tmp_box \c_zero_dim \box_set_ht:Nn \l__shipout_tmp_box \c_zero_dim \box_set_dp:Nn \l__shipout_tmp_box \c_zero_dim \box_move_up:nn \l_shipout_box_ht_dim { \box_use:N \l__shipout_tmp_box } \hbox_unpack:N \l_shipout_box } \l__shipout_saved_badness_tl } } } \cs_new:Npn \__shipout_add_foreground_box:n #1 { \box_if_vertical:NTF \l_shipout_box { \tl_set:Nx \l__shipout_saved_badness_tl { \vfuzz=\the\vfuzz\relax \vbadness=\the\vbadness\relax } \vfuzz=\c_max_dim \vbadness=\c_max_int \vbox_set_to_ht:Nnn \l_shipout_box \l_shipout_box_ht_plus_dp_dim { \hbox_set:Nn \l__shipout_tmp_box { \l__shipout_saved_badness_tl #1 } \box_set_wd:Nn \l__shipout_tmp_box \c_zero_dim \box_set_ht:Nn \l__shipout_tmp_box \c_zero_dim \box_set_dp:Nn \l__shipout_tmp_box \c_zero_dim \skip_zero:N \baselineskip \skip_zero:N \lineskip \skip_zero:N \lineskiplimit \vbox_unpack:N \l_shipout_box \kern -\l_shipout_box_ht_plus_dp_dim \box_use:N \l__shipout_tmp_box \kern \l_shipout_box_ht_plus_dp_dim } \l__shipout_saved_badness_tl \box_set_ht:Nn \l_shipout_box \l_shipout_box_ht_dim \box_set_dp:Nn \l_shipout_box \l_shipout_box_dp_dim } { \box_if_horizontal:NT \l_shipout_box { \tl_set:Nx \l__shipout_saved_badness_tl { \hfuzz=\the\hfuzz\relax \hbadness=\the\hbadness\relax } \hfuzz=\c_max_dim \hbadness=\c_max_int \hbox_set_to_wd:Nnn \l_shipout_box \l_shipout_box_wd_dim { \hbox_unpack:N \l_shipout_box \kern -\box_wd:N \l_shipout_box \hbox_set:Nn \l__shipout_tmp_box { \l__shipout_saved_badness_tl #1 } \box_set_wd:Nn \l__shipout_tmp_box \c_zero_dim \box_set_ht:Nn \l__shipout_tmp_box \c_zero_dim \box_set_dp:Nn \l__shipout_tmp_box \c_zero_dim \box_move_up:nn { \box_ht:N \l_shipout_box } { \box_use:N \l__shipout_tmp_box } \kern \box_wd:N \l_shipout_box }% \l__shipout_saved_badness_tl } } } \cs_new:Npn \__shipout_init_page_origins: { \tl_const:Nx \c__shipout_horigin_tl { \cs_if_exist_use:NTF \pdfvariable { horigin } { \cs_if_exist_use:NF \pdfhorigin { 1in } } } \tl_const:Nx \c__shipout_vorigin_tl { \cs_if_exist_use:NTF \pdfvariable { vorigin } { \cs_if_exist_use:NF \pdfvorigin { 1in } } } \cs_gset_eq:NN \__shipout_init_page_origins: \prg_do_nothing: } \cs_new:Npn \__shipout_picture_overlay:n #1 { \__shipout_init_page_origins: \kern -\c__shipout_horigin_tl \scan_stop: \vbox_to_zero:n { \kern -\c__shipout_vorigin_tl \scan_stop: \unitlength 1pt \scan_stop: \hbox_set_to_wd:Nnn \l__shipout_tmp_box \c_zero_dim { \ignorespaces #1 \hss } \box_set_ht:Nn \l__shipout_tmp_box \c_zero_dim \box_set_dp:Nn \l__shipout_tmp_box \c_zero_dim \box_use:N \l__shipout_tmp_box \tex_vss:D } } \cs_new:Npn \__shipout_add_background_picture:n #1 { \__shipout_add_background_box:n { \__shipout_picture_overlay:n {#1} } } \cs_new:Npn \__shipout_add_foreground_picture:n #1 { \__shipout_add_foreground_box:n { \__shipout_picture_overlay:n {#1} } } \cs_new_protected:Npn \shipout_discard: { \bool_gset_true:N \g__shipout_discard_bool } \int_new:N \g_shipout_readonly_int \cs_new_eq:NN \ReadonlyShipoutCounter \g_shipout_readonly_int \int_new:N \g_shipout_totalpages_int \cs_new_eq:NN \c@totalpages \g_shipout_totalpages_int \cs_new:Npn \thetotalpages { \arabic{totalpages} } \xdef\@abspage@last{\number\maxdimen} \g@addto@macro \@kernel@after@enddocument { \int_compare:nNnT \@abspage@last = \maxdimen { \xdef\@abspage@last{ \int_eval:n {\g_shipout_readonly_int + 1} } } } \g@addto@macro \@kernel@after@enddocument@afterlastpage { \int_compare:nNnF \g_shipout_readonly_int = 0 { \if@filesw \iow_now:Nx \@auxout { \gdef\string\@abspage@last {\int_use:N \g_shipout_readonly_int}} \fi \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} } { \tl_if_empty_p:N \@kernel@after@shipout@lastpage } { \tex_shipout:D\vbox to\textheight { \hbox:n { \UseHook{shipout/lastpage} \@kernel@after@shipout@lastpage } \__shipout_excuse_extra_page: \null } \cs_gset_eq:NN \@extra@page@added \relax } } } } \cs_new:Npn \__shipout_excuse_extra_page: { \vfil \begin{center} \bfseries Temporary~ page! \end{center} \LaTeX{}~ was~ unable~ to~ guess~ the~ total~ number~ of~ pages~ correctly.~ ~ As~ there~ was~ some~ unprocessed~ data~ that~ should~ have~ been~ added~ to~ the~ final~ page~ this~ extra~ page~ has~ been~ added~ to~ receive~ it. \par If~ you~ rerun~ the~ document~ (without~ altering~ it)~ this~ surplus~ page~ will~ go~ away,~ because~ \LaTeX{}~ now~ knows~ how~ many~ pages~ to~ expect~ for~ this~ document. \vfil } \def\PreviousTotalPages{0} \g@addto@macro\@kernel@before@begindocument {\ifnum\@abspage@last<\maxdimen \xdef\PreviousTotalPages{\@abspage@last}\fi} \cs_new_eq:NN \DiscardShipoutBox \shipout_discard: \cs_set_protected:Npn \AtBeginDvi {\__shipout_add_firstpage_material:Nn \AtBeginDvi} \cs_new_eq:NN \DebugShipoutsOn \shipout_debug_on: \cs_new_eq:NN \DebugShipoutsOff \shipout_debug_off: \cs_set_eq:NN \@expl@@@shipout@add@firstpage@material@@Nn \__shipout_add_firstpage_material:Nn \cs_set_eq:NN \@expl@@@shipout@add@background@box@@n \__shipout_add_background_box:n \cs_set_eq:NN \@expl@@@shipout@add@foreground@box@@n \__shipout_add_foreground_box:n \cs_set_eq:NN \@expl@@@shipout@add@background@picture@@n \__shipout_add_background_picture:n \cs_set_eq:NN \@expl@@@shipout@add@foreground@picture@@n \__shipout_add_foreground_picture:n \ExplSyntaxOff \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\shipout}{Hook management (shipout)}% \ifcsname tex_shipout:D\endcsname \expandafter\let\expandafter\shipout \csname tex_shipout:D\endcsname \fi \let \RawShipout\@undefined \let \ShipoutBox\@undefined \let \ReadonlyShipoutCounter \@undefined \let \c@totalpages \@undefined \let \thetotalpages \@undefined \let \DiscardShipoutBox \@undefined \let \DebugShipoutsOn \@undefined \let \DebugShipoutsOff \@undefined \DeclareRobustCommand \AtBeginDvi [1]{% \global \setbox \@begindvibox \vbox{\unvbox \@begindvibox #1}% } \let \AtBeginShipout \@undefined \let \AtBeginShipoutNext \@undefined \let \AtBeginShipoutFirst \@undefined \let \ShipoutBoxHeight \@undefined \let \ShipoutBoxDepth \@undefined \let \ShipoutBoxWidth \@undefined \let \AtEndDvi \@undefined \EndIncludeInRelease \IncludeInRelease{2020/10/01}% {\AtEndDvi}{atenddvi emulation}% \ExplSyntaxOn \cs_new_protected:Npn \AtEndDvi #1 {\AddToHook{shipout/lastpage}{#1}} \ExplSyntaxOff \disable@package@load{atenddvi} {\PackageWarning{atenddvi} {Functionality of this package is already\MessageBreak provided by LaTeX.\MessageBreak\MessageBreak It is there no longer necessary to load it\MessageBreak and you can safely remove it.\MessageBreak Found on}} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\AtEndDvi}{atenddvi emulation}% \let \AtEndDvi \@undefined \EndIncludeInRelease %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% From File: ltoutput.dtx \IncludeInRelease{2015/10/01}% {\bx@ZZ}{Extended float list}% \let\@elt\newinsert \ifx\numexpr\@undefined\else \def\reserved@a{% \@elt\bx@S\@elt\bx@T\@elt\bx@U\@elt\bx@V \@elt\bx@W\@elt\bx@X\@elt\bx@Y\@elt\bx@Z \@elt\bx@AA\@elt\bx@BB\@elt\bx@CC\@elt\bx@DD\@elt\bx@EE \@elt\bx@FF\@elt\bx@GG\@elt\bx@HH\@elt\bx@II\@elt\bx@JJ \@elt\bx@KK\@elt\bx@LL\@elt\bx@MM\@elt\bx@NN \@elt\bx@OO\@elt\bx@PP\@elt\bx@QQ\@elt\bx@RR \@elt\bx@SS\@elt\bx@TT\@elt\bx@UU\@elt\bx@VV \@elt\bx@WW\@elt\bx@XX\@elt\bx@YY\@elt\bx@ZZ} \reserved@a \def\@elt{\noexpand\@elt\noexpand} \edef\@freelist{\@freelist\reserved@a} \fi \let\reserved@a\relax \let\@elt\relax \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\bx@ZZ}{Extended float list}% \def\@freelist{% \@elt\bx@A\@elt\bx@B\@elt\bx@C\@elt\bx@D\@elt\bx@E \@elt\bx@F\@elt\bx@G\@elt\bx@H\@elt\bx@I\@elt\bx@J \@elt\bx@K\@elt\bx@L\@elt\bx@M\@elt\bx@N \@elt\bx@O\@elt\bx@P\@elt\bx@Q\@elt\bx@R} \insc@unt=234 \EndIncludeInRelease \IncludeInRelease{2017/04/15}% {\newpage}{Check depth of page}% \def \newpage {% \if@noskipsec \ifx \@nodocument\relax \leavevmode \global \@noskipsecfalse \fi \fi \if@inlabel \leavevmode \global \@inlabelfalse \fi \if@nobreak \@nobreakfalse \everypar{}\fi \par \ifdim\prevdepth>\z@ \vskip -% \ifdim\prevdepth>\maxdepth \maxdepth \else \prevdepth \fi \fi \vfil \penalty -\@M} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\newpage}{Check depth of page}% \def \newpage {% \if@noskipsec \ifx \@nodocument\relax \leavevmode \global \@noskipsecfalse \fi \fi \if@inlabel \leavevmode \global \@inlabelfalse \fi \if@nobreak \@nobreakfalse \everypar{}\fi \par \vfil \penalty -\@M} \EndIncludeInRelease \IncludeInRelease{2015/01/01}% {\@testwrongwidth}{float order in 2-column}% \def\@testwrongwidth #1{% \ifdim\dp#1=\f@depth \else \global\@testtrue \fi}% \let\f@depth\z@ \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@testwrongwidth}{float order in 2-column}% \let\@testwrongwidth\@undefined \let\f@depth\@undefined \EndIncludeInRelease \IncludeInRelease{2015/01/01}{\@doclearpage}% {float order in 2-column}% \def \@doclearpage {% \ifvoid\footins \ifvbox\@kludgeins {\setbox \@tempboxa \box \@kludgeins}% \fi \setbox\@tempboxa\vsplit\@cclv to\z@ \unvbox\@tempboxa \setbox\@tempboxa\box\@cclv \xdef\@deferlist{\@toplist\@botlist\@deferlist}% \global \let \@toplist \@empty \global \let \@botlist \@empty \global \@colroom \@colht \ifx \@currlist\@empty \else \@latex@error{Float(s) lost}\@ehb \global \let \@currlist \@empty \fi \@makefcolumn\@deferlist \@whilesw\if@fcolmade \fi{\@opcol\@makefcolumn\@deferlist}% \if@twocolumn \if@firstcolumn \xdef\@deferlist{\@dbltoplist\@deferlist}% \global \let \@dbltoplist \@empty \global \@colht \textheight \begingroup \@dblfloatplacement \@makefcolumn\@deferlist \@whilesw\if@fcolmade \fi{\@outputpage \@makefcolumn\@deferlist}% \endgroup \else \vbox{}\clearpage \fi \fi \ifx\@deferlist\@empty \else\clearpage \fi \else \setbox\@cclv\vbox{\box\@cclv\vfil}% \@makecol\@opcol \clearpage \fi }% \EndIncludeInRelease \IncludeInRelease{0000/00/00}{\@doclearpage}% {float order in 2-column}% \def \@doclearpage {% \ifvoid\footins \ifvbox\@kludgeins {\setbox \@tempboxa \box \@kludgeins}% \fi \setbox\@tempboxa\vsplit\@cclv to\z@ \unvbox\@tempboxa \setbox\@tempboxa\box\@cclv \xdef\@deferlist{\@toplist\@botlist\@deferlist}% \global \let \@toplist \@empty \global \let \@botlist \@empty \global \@colroom \@colht \ifx \@currlist\@empty \else \@latexerr{Float(s) lost}\@ehb \global \let \@currlist \@empty \fi \@makefcolumn\@deferlist \@whilesw\if@fcolmade \fi {\@opcol\@makefcolumn\@deferlist}% \if@twocolumn \if@firstcolumn \xdef\@dbldeferlist{\@dbltoplist\@dbldeferlist}% \global \let \@dbltoplist \@empty \global \@colht \textheight \begingroup \@dblfloatplacement \@makefcolumn\@dbldeferlist \@whilesw\if@fcolmade \fi {\@outputpage\@makefcolumn\@dbldeferlist}% \endgroup \else \vbox{}\clearpage \fi \fi \else \setbox\@cclv\vbox{\box\@cclv\vfil}% \@makecol\@opcol \clearpage \fi }% \EndIncludeInRelease \IncludeInRelease{2017/04/15}% {\@outputpage}{Reset language for hyphenation}% \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}% \let\firstmark\botmark } \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@outputpage}{Reset language for hyphenation}% \def\@outputpage{% \begingroup \let \protect \noexpand \@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}% \let\firstmark\botmark } \EndIncludeInRelease \IncludeInRelease{2015/01/01}% {\@startdblcolumn}{float order in 2-column}% \def \@startdblcolumn {% \@tryfcolumn \@deferlist \if@fcolmade \else \begingroup \let \reserved@b \@deferlist \global \let \@deferlist \@empty \let \@elt \@sdblcolelt \reserved@b \endgroup \fi }% \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@startdblcolumn}{float order in 2-column}% \def \@startdblcolumn {% % \global \@colht \textheight \@tryfcolumn \@dbldeferlist \if@fcolmade \else \begingroup \let \reserved@b \@dbldeferlist \global \let \@dbldeferlist \@empty \let \@elt \@sdblcolelt \reserved@b \endgroup \fi }% \EndIncludeInRelease \IncludeInRelease{2015/01/01}{\@xtryfc}% {float order in 2-column}% \def\@xtryfc #1{% \@next\reserved@a\@trylist{}{}% \@currtype \count #1% \divide\@currtype\@xxxii \multiply\@currtype\@xxxii \@bitor \@currtype \@failedlist \@testfp #1% \@testwrongwidth #1% \ifdim \ht #1>\@colht \@testtrue \fi \if@test \@cons\@failedlist #1% \else \@ytryfc #1% \fi}% \EndIncludeInRelease \IncludeInRelease{0000/00/00}{\@xtryfc}% {float order in 2-column}% \def\@xtryfc #1{% \@next\reserved@a\@trylist{}{}% \@currtype \count #1% \divide\@currtype\@xxxii \multiply\@currtype\@xxxii \@bitor \@currtype \@failedlist \@testfp #1% \ifdim \ht #1>\@colht \@testtrue \fi \if@test \@cons\@failedlist #1% \else \@ytryfc #1% \fi}% \EndIncludeInRelease \IncludeInRelease{2015/01/01}{@ztryfc}% {float order in 2-column}% \def\@ztryfc #1{% \@tempcnta\count #1% \divide\@tempcnta\@xxxii \multiply\@tempcnta\@xxxii \@bitor \@tempcnta {\@failedlist \@flfail}% \@testfp #1% \@testwrongwidth #1% \@tempdimb\@tempdima \advance\@tempdimb\ht #1% \advance\@tempdimb\@fpsep \ifdim \@tempdimb >\@colht \@testtrue \fi \if@test \@cons\@flfail #1% \else \@cons\@flsucceed #1% \@tempdima\@tempdimb \fi}% \EndIncludeInRelease \IncludeInRelease{0000/00/00}{@ztryfc}% {float order in 2-column}% \def\@ztryfc #1{% \@tempcnta \count#1% \divide\@tempcnta\@xxxii \multiply\@tempcnta\@xxxii \@bitor \@tempcnta {\@failedlist \@flfail}% \@testfp #1% \@tempdimb\@tempdima \advance\@tempdimb \ht#1% \advance\@tempdimb\@fpsep \ifdim \@tempdimb >\@colht \@testtrue \fi \if@test \@cons\@flfail #1% \else \@cons\@flsucceed #1% \@tempdima\@tempdimb \fi}% \EndIncludeInRelease \IncludeInRelease{2015/01/01}% {\@addtocurcol}{float order in 2-column}% \def \@addtocurcol {% \@insertfalse \@setfloattypecounts \ifnum \@fpstype=8 \else \ifnum \@fpstype=24 \else \@flsettextmin \advance \@textmin \@textfloatsheight \@reqcolroom \@pageht \ifdim \@textmin>\@reqcolroom \@reqcolroom \@textmin \fi \advance \@reqcolroom \ht\@currbox \ifdim \@colroom>\@reqcolroom \@flsetnum \@colnum \ifnum \@colnum>\z@ \@bitor\@currtype\@deferlist \@testwrongwidth\@currbox \if@test \else \@bitor\@currtype\@botlist \if@test \@addtobot \else \ifodd \count\@currbox \advance \@reqcolroom \intextsep \ifdim \@colroom>\@reqcolroom \global \advance \@colnum \m@ne \global \advance \@textfloatsheight \ht\@currbox \global \advance \@textfloatsheight 2\intextsep \@cons \@midlist \@currbox \if@nobreak \nobreak \@nobreakfalse \everypar{}% \else \addpenalty \interlinepenalty \fi \vskip \intextsep \box\@currbox \penalty\interlinepenalty \vskip\intextsep \ifnum\outputpenalty <-\@Mii \vskip -\parskip\fi \outputpenalty \z@ \@inserttrue \fi \fi \if@insert \else \@addtotoporbot \fi \fi \fi \fi \fi \fi \fi \if@insert \else \@resethfps \@cons\@deferlist\@currbox \fi }% \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@addtocurcol}{float order in 2-column}% \def \@addtocurcol {% \@insertfalse \@setfloattypecounts \ifnum \@fpstype=8 \else \ifnum \@fpstype=24 \else \@flsettextmin \advance \@textmin \@textfloatsheight \@reqcolroom \@pageht \ifdim \@textmin>\@reqcolroom \@reqcolroom \@textmin \fi \advance \@reqcolroom \ht\@currbox \ifdim \@colroom>\@reqcolroom \@flsetnum \@colnum \ifnum \@colnum>\z@ \@bitor\@currtype\@deferlist \if@test \else \@bitor\@currtype\@botlist \if@test \@addtobot \else \ifodd \count\@currbox \advance \@reqcolroom \intextsep \ifdim \@colroom>\@reqcolroom \global \advance \@colnum \m@ne \global \advance \@textfloatsheight\ht\@currbox \global \advance \@textfloatsheight 2\intextsep \@cons \@midlist \@currbox \if@nobreak \nobreak \@nobreakfalse \everypar{}% \else \addpenalty\interlinepenalty \fi \vskip \intextsep \box\@currbox \penalty\interlinepenalty \vskip\intextsep \ifnum\outputpenalty <-\@Mii \vskip -\parskip\fi \outputpenalty \z@ \@inserttrue \fi \fi \if@insert \else \@addtobot \fi \fi \fi \fi \fi \fi \fi \if@insert \else \@resethfps \@cons\@deferlist\@currbox \fi }% \EndIncludeInRelease \IncludeInRelease{2015/01/01} {\@addtonextcol}{float order in 2-column}% \def\@addtonextcol{% \begingroup \@insertfalse \@setfloattypecounts \ifnum \@fpstype=8 \else \ifnum \@fpstype=24 \else \@flsettextmin \@reqcolroom \ht\@currbox \advance \@reqcolroom \@textmin \ifdim \@colroom>\@reqcolroom \@flsetnum \@colnum \ifnum\@colnum>\z@ \@bitor\@currtype\@deferlist \@testwrongwidth\@currbox \if@test \else \@addtotoporbot \fi \fi \fi \fi \fi \if@insert \else \@cons\@deferlist\@currbox \fi \endgroup }% \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@addtonextcol}{float order in 2-column}% \def\@addtonextcol{% \begingroup \@insertfalse \@setfloattypecounts \ifnum \@fpstype=8 \else \ifnum \@fpstype=24 \else \@flsettextmin \@reqcolroom \ht\@currbox \advance \@reqcolroom \@textmin \ifdim \@colroom>\@reqcolroom \@flsetnum \@colnum \ifnum\@colnum>\z@ \@bitor\@currtype\@deferlist \if@test \else \@addtotoporbot \fi \fi \fi \fi \fi \if@insert \else \@cons\@deferlist\@currbox \fi \endgroup }% \EndIncludeInRelease \IncludeInRelease{2015/01/01}% {\@addtodblcol}{float order in 2-column}% \def\@addtodblcol{% \begingroup \@insertfalse \@setfloattypecounts \@getfpsbit \tw@ \ifodd\@tempcnta \@flsetnum \@dbltopnum \ifnum \@dbltopnum>\z@ \@tempswafalse \ifdim \@dbltoproom>\ht\@currbox \@tempswatrue \else \ifnum \@fpstype<\sixt@@n \advance \@dbltoproom \@textmin \ifdim \@dbltoproom>\ht\@currbox \@tempswatrue \fi \advance \@dbltoproom -\@textmin \fi \fi \if@tempswa \@bitor \@currtype \@deferlist \@testwrongwidth\@currbox \if@test \else \@tempdima -\ht\@currbox \advance\@tempdima -\ifx \@dbltoplist\@empty \dbltextfloatsep \else \dblfloatsep \fi \global \advance \@dbltoproom \@tempdima \global \advance \@colht \@tempdima \global \advance \@dbltopnum \m@ne \@cons \@dbltoplist \@currbox \@inserttrue \fi \fi \fi \fi \if@insert \else \@cons\@deferlist\@currbox \fi \endgroup }% \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@addtodblcol}{float order in 2-column}% \def\@addtodblcol{% \begingroup \@insertfalse \@setfloattypecounts \@getfpsbit \tw@ \ifodd\@tempcnta \@flsetnum \@dbltopnum \ifnum \@dbltopnum>\z@ \@tempswafalse \ifdim \@dbltoproom>\ht\@currbox \@tempswatrue \else \ifnum \@fpstype<\sixt@@n \advance \@dbltoproom \@textmin \ifdim \@dbltoproom>\ht\@currbox \@tempswatrue \fi \advance \@dbltoproom -\@textmin \fi \fi \if@tempswa \@bitor \@currtype \@dbldeferlist \if@test \else \@tempdima -\ht\@currbox \advance\@tempdima -\ifx \@dbltoplist\@empty \dbltextfloatsep \else \dblfloatsep \fi \global \advance \@dbltoproom \@tempdima \global \advance \@colht \@tempdima \global \advance \@dbltopnum \m@ne \@cons \@dbltoplist \@currbox \@inserttrue \fi \fi \fi \fi \if@insert \else \@cons\@dbldeferlist\@currbox \fi \endgroup }% \EndIncludeInRelease \IncludeInRelease{2021/11/15}% {\ShowFloat}{Show float register contents}% \def\ShowFloat#1{\begingroup \let \fl@trace \fl@tracemessage \fl@trace{***Float #1 details:}% \ifcsname bx@#1\endcsname \expandafter\fl@ShowFloat\csname bx@#1\endcsname \else \fl@trace{Not a float!}% \fi \endgroup } \def\fl@ShowFloat#1{% \fl@traceval{\count#1}% % this here should be interpreted on day \fl@traceval{\ht#1}% \fl@traceval{\dp#1}% \fl@traceval{\wd#1}% {\tracingonline1\showboxbreadth10\showboxdepth3\showbox#1}% } \def \fl@traceval #1{\fl@trace{\string #1 = \the #1}} \def \fl@tracemessage #1{{\let\@elt\@empty\typeout{LaTeX2e: #1}}} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\ShowFloat}{Show float register contents}% \let\ShowFloat\@undefined \let\fl@ShowFloat\@undefined \let\fl@traceval\@undefined \let\fl@tracemessage\@undefined \EndIncludeInRelease \IncludeInRelease{2017/01/01}% {\@makefcolumn}{negative height floats}% \def\@makefcolumn #1{% \begingroup \@fpmin -\maxdimen \let \@testfp \@gobble \@tryfcolumn #1% \endgroup } \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@makefcolumn}{negative height floats}% \def\@makefcolumn #1{% \begingroup \@fpmin \z@ \let \@testfp \@gobble \@tryfcolumn #1% \endgroup } \EndIncludeInRelease \IncludeInRelease{2015/01/01}% {\@outputdblcol}{2 column marks}% \def\@outputdblcol{% \if@firstcolumn \global\@firstcolumnfalse \global\setbox\@leftcolumn\copy\@outputbox \splitmaxdepth\maxdimen \vbadness\maxdimen \setbox\@outputbox\vbox{\unvbox\@outputbox\unskip}% \setbox\@outputbox\vsplit\@outputbox to\maxdimen \toks@\expandafter{\topmark}% \xdef\@firstcoltopmark{\the\toks@}% \toks@\expandafter{\splitfirstmark}% \xdef\@firstcolfirstmark{\the\toks@}% \ifx\@firstcolfirstmark\@empty \global\let\@setmarks\relax \else \gdef\@setmarks{% \let\firstmark\@firstcolfirstmark \let\topmark\@firstcoltopmark}% \fi \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 \@setmarks \@outputpage \begingroup \@dblfloatplacement \@startdblcolumn \@whilesw\if@fcolmade \fi{\@outputpage \@startdblcolumn}% \endgroup \fi}% \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\@outputdblcol}{2 column marks}% \def\@outputdblcol{% \if@firstcolumn \global \@firstcolumnfalse \global \setbox\@leftcolumn \box\@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 %%% From File: ltfsscmp.dtx %% Copyright (C) 1989-1995 Frank Mittelbach and Rainer Sch\"opf, %% all rights reserved. \IncludeInRelease{2015/01/01}{\new@fontshape}% {NFSS version1 commands}% \let\new@fontshape\@undefined \let\warn@rel@i\@undefined \let\scan@fontshape\@undefined \let\scan@@fontshape\@undefined \let\subst@fontshape\@undefined \let\extra@def\@undefined \let\default@mextra\@undefined \let\preload@sizes\@undefined \let\err@rel@i\@undefined \let\newmathalphabet\@undefined \let\newmathalphabet@\@undefined \let\newmathalphabet@@@\@undefined \let\if@no@font@opt\@undefined \let\@no@font@optfalse\@undefined \let\define@mathalphabet\@undefined \let\define@mathgroup\@undefined \let\addtoversion\@undefined \EndIncludeInRelease \IncludeInRelease{0000/00/00}{\new@fontshape}% {NFSS version1 commands}% \gdef\new@fontshape#1#2#3#4{% \warn@rel@i\new@fontshape\DeclareFontShape \expandafter\scan@fontshape\@gobble#4<\@nil><<% \DeclareFontShape U{#1}{#2}{#3}\reserved@f}% \@onlypreamble\new@fontshape \gdef\warn@rel@i#1#2{% \@font@warning{*** NFSS release 1 command \noexpand#1found\MessageBreak *** Update by using release 2 command \string#2.\MessageBreak *** Recovery is probably possible}% }% \@onlypreamble\warn@rel@i \gdef\scan@fontshape{% \let\reserved@f\@empty \let\reserved@e\@empty % holds last info \scan@@fontshape }% \@onlypreamble\scan@fontshape \gdef\scan@@fontshape#1>#2#3<{% \ifx\@nil#1% \edef\reserved@f{\reserved@f\reserved@e}% \else \def\reserved@b{#1}% nick names \def\reserved@c{#3}% \in@{ at}{#3}% \ifin@ \in@{pt}{#3}% not a proof but a good chance \ifin@ \def\reserved@a##1 at##2pt##3\@nil{% \def\reserved@b{##2}% \def\reserved@c{##1}% }% \reserved@a#3\@nil \fi \fi \ifnum 0<0#2 \edef\reserved@d{subf*\reserved@c}% \ifcase #2\or \or \else \errmessage{*** What's this? NFSS release 0? ***}% \fi \else \edef\reserved@d{#2\reserved@c}% \fi \ifx\reserved@d\reserved@e \edef\reserved@f{\reserved@f<\reserved@b>}% \else \edef\reserved@f{\reserved@f\reserved@e<\reserved@b>}%add old info \let\reserved@e\reserved@d \fi \expandafter\scan@@fontshape \fi }% \@onlypreamble\scan@@fontshape \gdef\subst@fontshape#1#2#3#4#5#6{% \warn@rel@i\subst@fontshape\DeclareFontShape \DeclareFontShape{U}{#1}{#2}{#3}{<->sub*#4/#5/#6}{}}% \@onlypreamble\subst@fontshape \gdef\extra@def#1#2#3{% \warn@rel@i\extra@def\DeclareFontFamily \DeclareFontFamily{U}{#1}{}% }% \@onlypreamble\extra@def \gdef\default@mextra{% \warn@rel@i\default@mextra\DeclareFontEncodingDefaults \DeclareFontEncodingDefaults\relax }% \@onlypreamble\default@mextra \gdef\preload@sizes{% \warn@rel@i\preload@sizes\DeclarePreloadSizes \DeclarePreloadSizes U% }% \@onlypreamble\preload@sizes \gdef\err@rel@i#1#2{% \@latex@error{*** NFSS release 1 command \noexpand#1found% ^^J*** Recovery not possible. Use \string#2}% {The new release of NFSS doesn't support the \noexpand#1command^^Jany longer. Please upgrade your file to the syntax of NFSS release 2^^Jusing the \noexpand#2command.}% \batchmode\input.\relax }% \@onlypreamble\err@rel@i \gdef\newmathalphabet{% \if@no@font@opt \@latex@error{*** NFSS release 1 command \noexpand\newmathalphabet found% ^^J \space*** Automatic recovery not possible.% ^^J \space*** TYPE H for Help% }% {Please look at the file usrguide.tex for hints on how to resolve this problem.}% \else \warn@rel@i\newmathalphabet\DeclareMathAlphabet \fi \@ifstar\newmathalphabet@@@ \newmathalphabet@@}% \gdef\newmathalphabet@@#1{\DeclareMathAlphabet#1{U}{}{}{}}% \gdef\newmathalphabet@@@#1#2#3#4{% \DeclareMathAlphabet{#1}{U}{#2}{#3}{#4}}% \@onlypreamble\newmathalphabet \@onlypreamble\newmathalphabet@@ \@onlypreamble\newmathalphabet@@@ \global\let\if@no@font@opt\iftrue \gdef\@no@font@optfalse{\let\if@no@font@opt\iffalse}% \gdef\define@mathalphabet{% \err@rel@i\define@mathalphabet\DeclareMathAlphabet }% \@onlypreamble\define@mathalphabet \gdef\define@mathgroup{% \err@rel@i\define@mathgroup\DeclareSymbolFont }% \@onlypreamble\define@mathgroup \def\addtoversion#1#2{% \warn@rel@i\addtoversion\SetMathAlphabet \SetMathAlphabet#2{#1}{U}}% \@onlypreamble\addtoversion \EndIncludeInRelease %%% From File: ltfinal.dtx \IncludeInRelease{2015/01/01}% {\newmarks}{Extended Allocation}% \ifx\marks\@undefined\else \def\newmarks{% \e@alloc\marks \e@alloc@chardef{\count256}\m@ne\e@alloc@top} \fi \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\newmarks}{Extended Allocation}% \let\newmarks\@undefined \EndIncludeInRelease \IncludeInRelease{2022/06/01}% {2e-left}{Delayed legacy marks}% \NewMarkClass {2e-left} \NewMarkClass {2e-right} \NewMarkClass {2e-right-nonempty} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {2e-left}{Delayed legacy marks}% \EndIncludeInRelease \IncludeInRelease{2015/01/01}% {\newXeTeXintercharclass}{Extended Allocation}% \ifx\XeTeXcharclass\@undefined \else \ifdim\the\XeTeXversion\XeTeXrevision\p@>0.99993\p@ \chardef\e@alloc@intercharclass@top=4095 \else \chardef\e@alloc@intercharclass@top=255 \fi \def\newXeTeXintercharclass{% \e@alloc\XeTeXcharclass \chardef\xe@alloc@intercharclass\m@ne\e@alloc@intercharclass@top} \fi \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\newXeTeXintercharclass}{Extended Allocation}% \ifx\XeTeXcharclass\@undefined \else \def\xe@alloc@#1#2#3#4#5{\global\advance#1\@ne \xe@ch@ck#1#4#2% \allocationnumber#1% \global#3#5\allocationnumber \wlog{\string#5=\string#2\the\allocationnumber}} \def\xe@ch@ck#1#2#3{% \ifnum#1<#2\else \errmessage{No room for a new #3}% \fi} \def\newXeTeXintercharclass{% \xe@alloc@\xe@alloc@intercharclass \XeTeXcharclass\chardef\@cclv} \fi \EndIncludeInRelease \IncludeInRelease{2016/02/01}% {\xe@alloc@intercharclass}{Start of XeTeX class allocator}% \ifx\XeTeXcharclass\@undefined \else \countdef\xe@alloc@intercharclass=257 \xe@alloc@intercharclass=\z@ \fi \EndIncludeInRelease \IncludeInRelease{2015/01/01}% {\xe@alloc@intercharclass}{Start of XeTeX class allocator}% \ifx\XeTeXcharclass\@undefined \else \xe@alloc@intercharclass=\thr@@ \fi \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\xe@alloc@intercharclass}{Start of XeTeX class allocator}% \ifx\XeTeXcharclass\@undefined \else \newcount\xe@alloc@intercharclass \xe@alloc@intercharclass=\thr@@ \fi \EndIncludeInRelease \ifx\directlua\@undefined \else \directlua{% if luatexbase.callbacktypes['input_level_string'] and % luatexbase.in_callback('input_level_string','tracingstacklevels') then luatexbase.remove_from_callback('input_level_string','tracingstacklevels') end}% \fi \IncludeInRelease{2021/06/01}{trace_stack_levels}% {Lua trace_stack_levels function}% \ifx\directlua\@undefined \else \directlua{% local function trace_stack_levels (input_ptr) local tracingstacklevels = tex.count.tracingstacklevels if tex.tracingmacros > 0 or input_ptr < tracingstacklevels then if tracingstacklevels > 0 then if input_ptr < tracingstacklevels then return "\string\n\string~" .. string.rep(".",input_ptr) else return "\string~\string~" end else return "\string\n" end else return "" end end if luatexbase.callbacktypes['input_level_string'] then luatexbase.add_to_callback('input_level_string', trace_stack_levels,'tracingstacklevels') end }% \fi \EndIncludeInRelease \IncludeInRelease{0000/00/00}{trace_stack_levels}% {Lua trace_stack_levels function}% % Nothing here \EndIncludeInRelease \IncludeInRelease{2016/02/01}% {\XeTeXintercharclasses}{XeTeX character classes}% \ifx\XeTeXinterchartoks\undefined \else \begingroup \chardef\XeTeXcharclassID = 0 % \chardef\XeTeXcharclassOP = 0 % \chardef\XeTeXcharclassCL = 0 % \chardef\XeTeXcharclassEX = 0 % \chardef\XeTeXcharclassIS = 0 % \chardef\XeTeXcharclassNS = 0 % \chardef\XeTeXcharclassCM = 0 % \input{load-unicode-xetex-classes} \endgroup \global\let\xtxHanGlue\undefined \global\let\xtxHanSpace\undefined \global\XeTeXinterchartoks 0 1 = {} \global\XeTeXinterchartoks 0 2 = {} \global\XeTeXinterchartoks 0 3 = {} \global\XeTeXinterchartoks 1 0 = {} \global\XeTeXinterchartoks 2 0 = {} \global\XeTeXinterchartoks 3 0 = {} \global\XeTeXinterchartoks 1 1 = {} \global\XeTeXinterchartoks 1 2 = {} \global\XeTeXinterchartoks 1 3 = {} \global\XeTeXinterchartoks 2 1 = {} \global\XeTeXinterchartoks 2 2 = {} \global\XeTeXinterchartoks 2 3 = {} \global\XeTeXinterchartoks 3 1 = {} \global\XeTeXinterchartoks 3 2 = {} \global\XeTeXinterchartoks 3 3 = {} \fi \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\XeTeXintercharclasses}{XeTeX character classes}% \ifx\XeTeXinterchartoks\undefined \else \input{load-unicode-xetex-classes} \gdef\xtxHanGlue{\hskip0pt plus 0.1em\relax} \gdef\xtxHanSpace{\hskip0.2em plus 0.2em minus 0.1em\relax} \global\XeTeXinterchartoks 0 1 = {\xtxHanSpace} \global\XeTeXinterchartoks 0 2 = {\xtxHanSpace} \global\XeTeXinterchartoks 0 3 = {\nobreak\xtxHanSpace} \global\XeTeXinterchartoks 1 0 = {\xtxHanSpace} \global\XeTeXinterchartoks 2 0 = {\nobreak\xtxHanSpace} \global\XeTeXinterchartoks 3 0 = {\xtxHanSpace} \global\XeTeXinterchartoks 1 1 = {\xtxHanGlue} \global\XeTeXinterchartoks 1 2 = {\xtxHanGlue} \global\XeTeXinterchartoks 1 3 = {\nobreak\xtxHanGlue} \global\XeTeXinterchartoks 2 1 = {\nobreak\xtxHanGlue} \global\XeTeXinterchartoks 2 2 = {\nobreak\xtxHanGlue} \global\XeTeXinterchartoks 2 3 = {\xtxHanGlue} \global\XeTeXinterchartoks 3 1 = {\xtxHanGlue} \global\XeTeXinterchartoks 3 2 = {\xtxHanGlue} \global\XeTeXinterchartoks 3 3 = {\nobreak\xtxHanGlue} \fi \EndIncludeInRelease \IncludeInRelease{2017/04/15}% {\document@default@language}{Save language for hyphenation}% \let\document@default@language\m@ne \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\document@default@language}{Save language for hyphenation}% \let\document@default@language\@undefined \EndIncludeInRelease \IncludeInRelease{2021/06/01}% {\pdfgentounicode}{Preload glyphtounicode}% \ifx \pdfgentounicode \@undefined \else \input glyphtounicode \pdfgentounicode=1 \fi \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\pdfgentounicode}{Preload glyphtounicode}% \ifx \pdfgentounicode \@undefined \else \pdfgentounicode=0 \fi \EndIncludeInRelease \IncludeInRelease{2018/04/01}% {\UTFviii@invalid}{UTF-8 default}% \ifnum0% \ifx\Umathcode\@undefined\else 1\fi \ifx\mubyte\@undefined\else 1\fi \ifx\charsubdef\@undefined\else 1\fi =\z@ \def\saved@space@catcode{10} \let\@inpenc@test\relax \def\IeC{% \ifx\protect\@typeset@protect \expandafter\@firstofone \else \noexpand\IeC \fi } \@tempcnta=1 \loop \catcode\@tempcnta=13 % \advance\@tempcnta\@ne % \ifnum\@tempcnta<32 % \repeat % \catcode0=15 % null \catcode9=10 % tab \catcode10=12 % ctrl J \catcode12=13 % ctrl L \catcode13=5 % newline \@tempcnta=128 \loop \catcode\@tempcnta=13 \advance\@tempcnta\@ne \ifnum\@tempcnta<256 \repeat \def\UseRawInputEncoding{% \let\inputencodingname\@undefined % revert \let\DeclareFontEncoding@\DeclareFontEncoding@saved % revert \let\DeclareUnicodeCharacter\@undefined % revert \@tempcnta=1 \loop \catcode\@tempcnta=15 % \advance\@tempcnta\@ne % \ifnum\@tempcnta<32 % \repeat % \catcode0=15 % null \catcode9=10 % tab \catcode10=12 % ctrl J \catcode12=13 % ctrl L \catcode13=5 % newline \@tempcnta=128 \loop \catcode\@tempcnta=12 \advance\@tempcnta\@ne \ifnum\@tempcnta<256 \repeat } \let\DeclareFontEncoding@saved\DeclareFontEncoding@ \edef\inputencodingname{utf8}% \input{utf8.def} \let\UTFviii@undefined@err@@\UTFviii@undefined@err \let\UTFviii@invalid@err@@\UTFviii@invalid@err \let\UTFviii@two@octets@@\UTFviii@two@octets \let\UTFviii@three@octets@@\UTFviii@three@octets \let\UTFviii@four@octets@@\UTFviii@four@octets \let\@inpenc@test\@undefined \let\saved@space@catcode\@undefined \else \@tempcnta=0 \loop \catcode\@tempcnta=15 % \advance\@tempcnta\@ne % \ifnum\@tempcnta<32 % \repeat % \catcode0=15 % null \catcode9=10 % tab \catcode10=12 % ctrl J \catcode12=13 % ctrl L \catcode13=5 % newline \let\UseRawInputEncoding\relax \fi \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\UTFviii@invalid}{UTF-8 default}% \let\UTFviii@two@octets@combine\@undefined \let\UTFviii@three@octets@combine\@undefined \let\UTFviii@four@octets@combine\@undefined \let\UTFviii@two@octets@string\@undefined \let\UTFviii@three@octets@string\@undefined \let\UTFviii@four@octets@string\@undefined \let\UTFviii@two@octets@noexpand\@undefined \let\UTFviii@three@octets@noexpand\@undefined \let\UTFviii@four@octets@noexpand\@undefined \@tempcnta=0 \loop \catcode\@tempcnta=15 \advance\@tempcnta\@ne \ifnum\@tempcnta<32 \repeat % \catcode9=10 % tab \catcode10=12 % ctrl J \catcode12=13 % ctrl L \catcode13=5 % newline \@tempcnta=128 \loop \catcode\@tempcnta=12 \advance\@tempcnta\@ne \ifnum\@tempcnta<256 \repeat \let\IeC\@undefined \def\DeclareFontEncoding@#1#2#3{% \expandafter \ifx\csname T@#1\endcsname\relax \def\cdp@elt{\noexpand\cdp@elt}% \xdef\cdp@list{\cdp@list\cdp@elt{#1}% {\default@family}{\default@series}% {\default@shape}}% \expandafter\let\csname#1-cmd\endcsname\@changed@cmd \else \@font@info{Redeclaring font encoding #1}% \fi \global\@namedef{T@#1}{#2}% \global\@namedef{M@#1}{\default@M#3}% \xdef\LastDeclaredEncoding{#1}% } \let\UseRawInputEncoding\@undefined \let\DeclareFontEncoding@saved\@undefined \let\inputencodingname\@undefined \EndIncludeInRelease \@ifundefined{ExplSyntaxOn}% {\let\ExplSyntaxOn\@undefined \let\ExplSyntaxOff\@undefined \@gobble}% {\ExplSyntaxOn \@firstofone}% {% \tl_map_inline:Nn \l__latexrelease_restores_tl { \cs_set_eq:Nc #1 { __latexrelease_ \cs_to_str:N #1 } \cs_undefine:c { __latexrelease_ \cs_to_str:N #1 } } \tl_clear:N \l__latexrelease_restores_tl \msg_redirect_name:nnn { hooks } { exists } { } \msg_redirect_name:nnn { mark } { class-already-defined } { } \ExplSyntaxOff}% \endinput %% %% End of file `latexrelease.sty'.