diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex-dev/firstaid')
-rw-r--r-- | Master/texmf-dist/tex/latex-dev/firstaid/filehook-ltx.sty | 26 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex-dev/firstaid/latex2e-first-aid-for-external-files.ltx | 113 |
2 files changed, 103 insertions, 36 deletions
diff --git a/Master/texmf-dist/tex/latex-dev/firstaid/filehook-ltx.sty b/Master/texmf-dist/tex/latex-dev/firstaid/filehook-ltx.sty index 2c80f60003b..8ae26decc4f 100644 --- a/Master/texmf-dist/tex/latex-dev/firstaid/filehook-ltx.sty +++ b/Master/texmf-dist/tex/latex-dev/firstaid/filehook-ltx.sty @@ -53,43 +53,43 @@ \newcommand\AtEndOfClasses [1] {\AddToHook{class/after}{#1}} \newcommand\AtBeginOfFile [2] - {\AddToHook{file/before/#1}{#2}} + {\AddToHook{file/#1/before}{#2}} \newcommand\AtEndOfFile [2] - {\AddToHook{file/after/#1}{#2}} + {\AddToHook{file/#1/after}{#2}} \DeclareDocumentCommand \AtBeginOfPackageFile {smm} {\IfBooleanTF{#1}% {\@ifpackageloaded{#2}% {#3}% - {\AddToHook{package/before/#2}{#3}}}% - {\AddToHook{package/before/#2}{#3}}% + {\AddToHook{package/#2/before}{#3}}}% + {\AddToHook{package/#2/before}{#3}}% } \DeclareDocumentCommand \AtEndOfPackageFile {smm} {\IfBooleanTF{#1}% {\@ifpackageloaded{#2}% {#3}% - {\AddToHook{package/after/#2}{#3}}}% - {\AddToHook{package/after/#2}{#3}}% + {\AddToHook{package/#2/after}{#3}}}% + {\AddToHook{package/#2/after}{#3}}% } \DeclareDocumentCommand \AtBeginOfClassFile {smm} {\IfBooleanTF{#1}% {\@ifclassloaded{#2}% {#3}% - {\AddToHook{class/before/#2}{#3}}}% - {\AddToHook{class/before/#2}{#3}}% + {\AddToHook{class/#2/before}{#3}}}% + {\AddToHook{class/#2/before}{#3}}% } \DeclareDocumentCommand \AtEndOfClassFile {smm} {\IfBooleanTF{#1}% {\@ifclassloaded{#2}% {#3}% - {\AddToHook{class/after/#2}{#3}}}% - {\AddToHook{class/after/#2}{#3}}% + {\AddToHook{class/#2/after}{#3}}}% + {\AddToHook{class/#2/after}{#3}}% } \newcommand\AtBeginOfIncludeFile [2] - {\AddToHook{include/before/#1}{#2}} + {\AddToHook{include/#1/before}{#2}} \newcommand\AtEndOfIncludeFile [2] - {\AddToHook{include/end/#1}{#2}} + {\AddToHook{include/#1/end}{#2}} \newcommand\AfterIncludeFile [2] - {\AddToHook{include/after/#1}{#2}} + {\AddToHook{include/#1/after}{#2}} \endinput %% %% End of file `filehook-ltx.sty'. diff --git a/Master/texmf-dist/tex/latex-dev/firstaid/latex2e-first-aid-for-external-files.ltx b/Master/texmf-dist/tex/latex-dev/firstaid/latex2e-first-aid-for-external-files.ltx index e3d58b7a8ca..f4799c0581e 100644 --- a/Master/texmf-dist/tex/latex-dev/firstaid/latex2e-first-aid-for-external-files.ltx +++ b/Master/texmf-dist/tex/latex-dev/firstaid/latex2e-first-aid-for-external-files.ltx @@ -34,21 +34,25 @@ %% %% The LaTeX Project and any individual authors listed elsewhere %% in this file. -\def\LaTeXFirstAidDate{2021/06/08} -\def\LaTeXFirstAidVersion{v1.0m} +\def\LaTeXFirstAidDate{2021/06/28} +\def\LaTeXFirstAidVersion{v1.0o} \ProvidesFile{latex2e-first-aid-for-external-files.ltx} [\LaTeXFirstAidDate\space \LaTeXFirstAidVersion\space LaTeX kernel fixes to external files and packages] - % - \ExplSyntaxOn \cs_new:Npn\FirstAidNeededT#1#2#3{ \exp_args:Ncx\str_if_eq:onF{ver@#1.#2}{#3} - { \typeout{==>~ First~ Aid~ for~ #1.#2~ no~ longer~ applied!} } + { \typeout{==>~ First~ Aid~ for~ #1.#2~ no~ longer~ applied!^^J + \@spaces Expected:^^J + \@spaces\@spaces #3^^J + \@spaces but~ found:^^J + \@spaces\@spaces \use:c{ver@#1.#2}^^J + \@spaces so~ I'm~ assuming~ it~ got~ fixed. + } } \exp_args:Ncx\str_if_eq:onT{ver@#1.#2}{#3} } \ExplSyntaxOff -\AddToHook{file/after/biditools.sty}[firstaid]{% +\AddToHook{file/biditools.sty/after}[firstaid]{% \FirstAidNeededT{biditools}{sty}% {2020/05/13 v2 Programming tools for bidi package}% {% @@ -62,19 +66,19 @@ \bidi@afterenddocumentchecklabelsrerunhook}% }% } -\AddToHook{file/after/dinbrief.cls}[firstaid]{% +\AddToHook{file/dinbrief.cls/after}[firstaid]{% \FirstAidNeededT{dinbrief}{cls}{2000/03/02 LaTeX2e class}% {\AddToHook{env/document/begin}{\begingroup}}% } \ExplSyntaxOn -\AddToHook{file/after/pgfpages.sty}[firstaid]{% +\AddToHook{file/pgfpages.sty/after}[firstaid]{% \cs_gset_eq:NN \shipout \pgfpages@originalshipout \cs_set_eq:NN \pgfpages@originalshipout \tex_shipout:D \cs_set_eq:NN \tex_shipout:D \pgfpages@interceptshipout } \ExplSyntaxOff \ExplSyntaxOn -\AddToHook{file/after/pgfmorepages.sty}[firstaid]{ +\AddToHook{file/pgfmorepages.sty/after}[firstaid]{ \cs_set_nopar:Npn \pgfhookintoshipout { \cs_set_eq:NN \pgfpages@originalshipout \tex_shipout:D \cs_set_eq:NN \tex_shipout:D \pgfpages@interceptshipout @@ -82,7 +86,7 @@ } \ExplSyntaxOff \DeclareCommandCopy\CJK@selectfont\selectfont -\AddToHook{file/after/CJK.sty}[firstaid]{% +\AddToHook{file/CJK.sty/after}[firstaid]{% \FirstAidNeededT{CJK}{sty}% {2015/04/18 4.8.4}% {% @@ -96,16 +100,7 @@ }% }% } -\AddToHook{file/after/scrkbase.sty}[firstaid]{% - \FirstAidNeededT{scrkbase}{sty}% - {2020/09/21 v3.32 KOMA-Script package (KOMA-Script-dependent basics and keyval usage)}% - {\let\footref\@undefined} - } -\AddToHook{class/before/memoir}[firstaid]{% - % for version {2020/10/04 v3.7n configurable book, report, article document class}% - \let\footref\@undefined -} -\AddToHook{file/after/bigfoot.sty}{% +\AddToHook{file/bigfoot.sty/after}{% \ifnum\count10<\insc@unt \global\count10=\insc@unt \fi @@ -114,17 +109,17 @@ \expandafter\FN@allmarks\expandafter{\number\numexpr#1+\@ne}% \fi}% } -\AddToHook{file/after/ulem.sty}[firstaid]{% +\AddToHook{file/ulem.sty/after}[firstaid]{% \def\@hspace#1{\begingroup\setlength\skip@{#1}% \edef\x{\endgroup\hskip\the\skip@\relax}\x}% } -\AddToHook{file/after/varwidth.sty}[firstaid]{% +\AddToHook{file/varwidth.sty/after}[firstaid]{% \FirstAidNeededT{varwidth}{sty}% {2009/03/30 ver 0.92; \space Variable-width minipages}% {% \def\@vwid@sift{% \skip@\lastskip\unskip - \unskip % <---- the first aid here + \ifdim\lastskip=\z@\unskip\fi % <---- the first aid here (not just unskip) \dimen@\lastkern\unkern \count@\lastpenalty\unpenalty \setbox\z@\lastbox @@ -149,6 +144,78 @@ \@vwid@sift}% }% } +\ExplSyntaxOn +\sys_if_engine_luatex:T + { + \newluafunction \g__para_end_empty_par_id_int + \exp_args:Nx \everyjob { + \exp_not:V \everyjob + \exp_not:N \lua_now:n { + local~texnest, flush_list, par_token = tex.nest, node.flush_list, token.create'tex_par:D'~ + lua.get_functions_table()[\int_use:N \g__para_end_empty_par_id_int] = function() + local~nest_level = texnest.top~ + local~cur_head = nest_level.head~ + flush_list(cur_head.next) + nest_level.tail, cur_head.next = cur_head, nil~ + token.put_next(par_token) + end + } + } + \protected \luadef \__para_end_empty_par: \g__para_end_empty_par_id_int + \group_begin: + \cs_set:Npn \__para_extract_everypar:w #1 \the \toks #2 \s_stop + { + \tl_gset:Nn \g__para_standard_everypar_tl { + \box_gset_to_last:N \g_para_indent_box + \group_begin: + \__para_end_empty_par: + \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}{vertical} \fi: + \__para_handle_indent: + \the \toks #2 + } + } + \exp_last_unbraced:No \__para_extract_everypar:w \g__para_standard_everypar_tl \s_stop + \group_end: + } +\ExplSyntaxOff +\ExplSyntaxOn +\cs_set_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 0 < \tex_lastnodetype:D + \tex_kern: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_set_eq:NN \par \para_end: +\cs_set_eq:NN \@@par \para_end: +\cs_set_eq:NN \endgraf \para_end: +\ExplSyntaxOff \endinput %% %% End of file `latex2e-first-aid-for-external-files.ltx'. |