diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/firstaid/latex2e-first-aid-for-external-files.ltx')
-rw-r--r-- | Master/texmf-dist/tex/latex/firstaid/latex2e-first-aid-for-external-files.ltx | 72 |
1 files changed, 57 insertions, 15 deletions
diff --git a/Master/texmf-dist/tex/latex/firstaid/latex2e-first-aid-for-external-files.ltx b/Master/texmf-dist/tex/latex/firstaid/latex2e-first-aid-for-external-files.ltx index e3d58b7a8ca..cf884a7f316 100644 --- a/Master/texmf-dist/tex/latex/firstaid/latex2e-first-aid-for-external-files.ltx +++ b/Master/texmf-dist/tex/latex/firstaid/latex2e-first-aid-for-external-files.ltx @@ -34,17 +34,21 @@ %% %% 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/24} +\def\LaTeXFirstAidVersion{v1.0n} \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 @@ -96,15 +100,6 @@ }% }% } -\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}{% \ifnum\count10<\insc@unt \global\count10=\insc@unt @@ -124,7 +119,7 @@ {% \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,53 @@ \@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 \endinput %% %% End of file `latex2e-first-aid-for-external-files.ltx'. |