summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-06-15 20:07:47 +0000
committerKarl Berry <karl@freefriends.org>2021-06-15 20:07:47 +0000
commit82d0ca2dd271cc83f881e604772b3e026c8358f1 (patch)
treea921cc5f6e22b4ede6a0364e31e823df2275fb90 /Master/texmf-dist
parentc40247fcc454d674ad1e7a34fef7cd532ca4ce80 (diff)
firstaid (15jun21)
git-svn-id: svn://tug.org/texlive/trunk@59601 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/latex/firstaid/changes.txt6
-rw-r--r--Master/texmf-dist/doc/latex/firstaid/latex2e-first-aid-for-external-files.pdfbin228448 -> 237479 bytes
-rw-r--r--Master/texmf-dist/source/latex/firstaid/latex2e-first-aid-for-external-files.dtx73
-rw-r--r--Master/texmf-dist/tex/latex/firstaid/latex2e-first-aid-for-external-files.ltx43
4 files changed, 116 insertions, 6 deletions
diff --git a/Master/texmf-dist/doc/latex/firstaid/changes.txt b/Master/texmf-dist/doc/latex/firstaid/changes.txt
index d7823c21a13..634e3e5c9b1 100644
--- a/Master/texmf-dist/doc/latex/firstaid/changes.txt
+++ b/Master/texmf-dist/doc/latex/firstaid/changes.txt
@@ -1,3 +1,9 @@
+2021-06-08 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * latex2e-first-aid-for-external-files.dtx:
+ ulem doesn't handle \hspace gracefully now that it is calc aware.
+ varwidth needs an additional \unskip when unraveling a vertical list.
+
2021-03-15 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
* latex2e-first-aid-for-external-files.dtx:
diff --git a/Master/texmf-dist/doc/latex/firstaid/latex2e-first-aid-for-external-files.pdf b/Master/texmf-dist/doc/latex/firstaid/latex2e-first-aid-for-external-files.pdf
index 2e9c812fd0c..35836f16f83 100644
--- a/Master/texmf-dist/doc/latex/firstaid/latex2e-first-aid-for-external-files.pdf
+++ b/Master/texmf-dist/doc/latex/firstaid/latex2e-first-aid-for-external-files.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/firstaid/latex2e-first-aid-for-external-files.dtx b/Master/texmf-dist/source/latex/firstaid/latex2e-first-aid-for-external-files.dtx
index 7eb108418c1..84ddacb269c 100644
--- a/Master/texmf-dist/source/latex/firstaid/latex2e-first-aid-for-external-files.dtx
+++ b/Master/texmf-dist/source/latex/firstaid/latex2e-first-aid-for-external-files.dtx
@@ -111,8 +111,8 @@
% \end{macrocode}
%
% \begin{macrocode}
-\def\LaTeXFirstAidDate{2021/03/15}
-\def\LaTeXFirstAidVersion{v1.0l}
+\def\LaTeXFirstAidDate{2021/06/08}
+\def\LaTeXFirstAidVersion{v1.0m}
% \end{macrocode}
%
% \begin{macrocode}
@@ -134,7 +134,9 @@
% \begin{macrocode}
\ExplSyntaxOn
\cs_new:Npn\FirstAidNeededT#1#2#3{
- \exp_args:Nc\str_if_eq:onT{ver@#1.#2}{#3}
+ \exp_args:Ncx\str_if_eq:onF{ver@#1.#2}{#3}
+ { \typeout{==>~ First~ Aid~ for~ #1.#2~ no~ longer~ applied!} }
+ \exp_args:Ncx\str_if_eq:onT{ver@#1.#2}{#3}
}
\ExplSyntaxOff
% \end{macrocode}
@@ -546,6 +548,71 @@
%
%
%
+% \subsection{\cs{ulem} first aid}
+%
+% In 2020 we fixed various kernel commands to accept \pkg{calc}
+% syntax. The \pkg{ulem} package redefines some internals and that
+% now conflicts with the new definitions as they involve an extra
+% group. So we alter the definition of \cs{@hspace} if \pkg{ulem}
+% was loaded. This is not perfect, obviously, so it will go out the
+% moment \pkg{ulem} gets adjusted.
+%
+% \begin{macrocode}
+\AddToHook{file/after/ulem.sty}[firstaid]{%
+ \def\@hspace#1{\begingroup\setlength\skip@{#1}%
+ \edef\x{\endgroup\hskip\the\skip@\relax}\x}%
+ }
+% \end{macrocode}
+%
+%
+% \subsection{\cs{varwidth} first aid}
+%
+% The \pkg{varwidth} package does a lot of low-level paragraph
+% manipulation assuming traditional \TeX{} paragraphs. However, with
+% the paragraph hooks we end up with one extra glue 0pt item on the
+% vertical list and if that isn't removed then the package doesn't
+% find its penalties.
+%
+% So this needs to be removed as well by adding an additional
+% \cs{unskip}.
+%
+% \begin{macrocode}
+\AddToHook{file/after/varwidth.sty}[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
+ \dimen@\lastkern\unkern
+ \count@\lastpenalty\unpenalty
+ \setbox\z@\lastbox
+ \ifvoid\z@ \advance\sift@deathcycles\@ne \else \sift@deathcycles\z@ \fi
+ \ifnum\sift@deathcycles>33
+ \let\@vwid@sift\relax
+ \PackageWarning{varwidth}{Failed to reprocess entire contents}%
+ \fi
+ \ifnum\count@=\@vwid@preeqp \@vwid@eqmodefalse\fi
+ \ifnum\count@=\@vwid@posteqp \@vwid@eqmodetrue\fi
+ \ifnum\count@=\@vwid@toppen % finished
+ \let\@vwid@sift\relax
+ \else\ifnum\count@=\@vwid@offsets
+ \@vwid@setoffsets
+ \else
+ \ifnum\count@=\@vwid@postw
+ \else
+ \@vwid@resetb % reset box \z@ or measure it
+ \fi
+ \@vwid@append
+ \fi\fi
+ \@vwid@sift}%
+ }%
+ }
+% \end{macrocode}
+%
+%
+%
+%
% \subsection[Temporary fixes for the kernel (until the next
% patch-level release)]
% {Temporary fixes for the kernel \\
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 101edc715d0..e3d58b7a8ca 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,8 +34,8 @@
%%
%% The LaTeX Project and any individual authors listed elsewhere
%% in this file.
-\def\LaTeXFirstAidDate{2021/03/15}
-\def\LaTeXFirstAidVersion{v1.0l}
+\def\LaTeXFirstAidDate{2021/06/08}
+\def\LaTeXFirstAidVersion{v1.0m}
\ProvidesFile{latex2e-first-aid-for-external-files.ltx}
[\LaTeXFirstAidDate\space \LaTeXFirstAidVersion\space
LaTeX kernel fixes to external files and packages]
@@ -43,7 +43,9 @@
\ExplSyntaxOn
\cs_new:Npn\FirstAidNeededT#1#2#3{
- \exp_args:Nc\str_if_eq:onT{ver@#1.#2}{#3}
+ \exp_args:Ncx\str_if_eq:onF{ver@#1.#2}{#3}
+ { \typeout{==>~ First~ Aid~ for~ #1.#2~ no~ longer~ applied!} }
+ \exp_args:Ncx\str_if_eq:onT{ver@#1.#2}{#3}
}
\ExplSyntaxOff
\AddToHook{file/after/biditools.sty}[firstaid]{%
@@ -112,6 +114,41 @@
\expandafter\FN@allmarks\expandafter{\number\numexpr#1+\@ne}%
\fi}%
}
+\AddToHook{file/after/ulem.sty}[firstaid]{%
+ \def\@hspace#1{\begingroup\setlength\skip@{#1}%
+ \edef\x{\endgroup\hskip\the\skip@\relax}\x}%
+ }
+\AddToHook{file/after/varwidth.sty}[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
+ \dimen@\lastkern\unkern
+ \count@\lastpenalty\unpenalty
+ \setbox\z@\lastbox
+ \ifvoid\z@ \advance\sift@deathcycles\@ne \else \sift@deathcycles\z@ \fi
+ \ifnum\sift@deathcycles>33
+ \let\@vwid@sift\relax
+ \PackageWarning{varwidth}{Failed to reprocess entire contents}%
+ \fi
+ \ifnum\count@=\@vwid@preeqp \@vwid@eqmodefalse\fi
+ \ifnum\count@=\@vwid@posteqp \@vwid@eqmodetrue\fi
+ \ifnum\count@=\@vwid@toppen % finished
+ \let\@vwid@sift\relax
+ \else\ifnum\count@=\@vwid@offsets
+ \@vwid@setoffsets
+ \else
+ \ifnum\count@=\@vwid@postw
+ \else
+ \@vwid@resetb % reset box \z@ or measure it
+ \fi
+ \@vwid@append
+ \fi\fi
+ \@vwid@sift}%
+ }%
+ }
\endinput
%%
%% End of file `latex2e-first-aid-for-external-files.ltx'.