From f3ad5f0dd67ddcfd0429ec0f28325f638e1670f8 Mon Sep 17 00:00:00 2001 From: Frank Mittelbach Date: Wed, 23 Jun 2021 01:02:24 +0200 Subject: [PATCH] fix for #586; expecting #591 to change the version number --- required/firstaid/changes.txt | 3 ++- .../latex2e-first-aid-for-external-files.dtx | 2 +- .../testfiles/firstaid-ulem-varwidth.lvt | 19 ++++++++++++++++++- .../testfiles/firstaid-ulem-varwidth.tlg | 3 ++- 4 files changed, 23 insertions(+), 4 deletions(-) diff --git a/required/firstaid/changes.txt b/required/firstaid/changes.txt index 634e3e5c9..28988e9a3 100644 --- a/required/firstaid/changes.txt +++ b/required/firstaid/changes.txt @@ -2,7 +2,8 @@ * 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. + varwidth needs an additional \unskip when unraveling a vertical list + (but only if that skip is 0pt) 2021-03-15 Frank Mittelbach diff --git a/required/firstaid/latex2e-first-aid-for-external-files.dtx b/required/firstaid/latex2e-first-aid-for-external-files.dtx index 84ddacb26..03c6ce360 100644 --- a/required/firstaid/latex2e-first-aid-for-external-files.dtx +++ b/required/firstaid/latex2e-first-aid-for-external-files.dtx @@ -583,7 +583,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 diff --git a/required/firstaid/testfiles/firstaid-ulem-varwidth.lvt b/required/firstaid/testfiles/firstaid-ulem-varwidth.lvt index 35bd7cb64..b8aab5a86 100644 --- a/required/firstaid/testfiles/firstaid-ulem-varwidth.lvt +++ b/required/firstaid/testfiles/firstaid-ulem-varwidth.lvt @@ -16,6 +16,9 @@ \uline{{\hspace{1cm}}} +\bigskip + + \setbox0\hbox{% x \begin{varwidth}[t]{10cm} @@ -24,7 +27,21 @@ x } -\typeout{same baseline please: \the\ht0 + \the\dp0} +\typeout{same baseline please: \the\ht0 \space + \the\dp0} + +\unhbox0 % visual check only + +\bigskip + +\setbox0\hbox{% +\fbox{\begin{varwidth}[t]{3cm} +some text +\par +\vskip-\baselineskip\vbox{\hbox{\strut}}% +\end{varwidth}}% +} + +\typeout{shoule not contain extra empty line: \the\ht0 \space + \the\dp0} \unhbox0 % visual check only diff --git a/required/firstaid/testfiles/firstaid-ulem-varwidth.tlg b/required/firstaid/testfiles/firstaid-ulem-varwidth.tlg index aaa7e95b5..d7433021a 100644 --- a/required/firstaid/testfiles/firstaid-ulem-varwidth.tlg +++ b/required/firstaid/testfiles/firstaid-ulem-varwidth.tlg @@ -1,6 +1,7 @@ This is a generated file for the l3build validation system. Don't change this file in any respect. no error please: -same baseline please: 6.94444pt+ 0.0pt +same baseline please: 6.94444pt + 0.0pt +shoule not contain extra empty line: 9.55078pt + 7.00003pt [1 ] (firstaid-ulem-varwidth.aux)