summaryrefslogtreecommitdiff
path: root/macros/latex/base/ltboxes.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/base/ltboxes.dtx')
-rw-r--r--macros/latex/base/ltboxes.dtx48
1 files changed, 43 insertions, 5 deletions
diff --git a/macros/latex/base/ltboxes.dtx b/macros/latex/base/ltboxes.dtx
index 7c5a7c0139..9852bc5940 100644
--- a/macros/latex/base/ltboxes.dtx
+++ b/macros/latex/base/ltboxes.dtx
@@ -33,7 +33,7 @@
%<*driver>
% \fi
\ProvidesFile{ltboxes.dtx}
- [2023/10/26 v1.4e LaTeX Kernel (Box Commands)]
+ [2024/06/10 v1.4g LaTeX Kernel (Box Commands)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltboxes.dtx}
@@ -87,7 +87,7 @@
% Note that in this picture mode version of |\makebox| a [b] aligns on
% the \emph{bottom} of the text as documented. If you want to align on
% the \emph{baseline} use
-% |\makebox( , )[b]{\raisebox{0pt}[\height][0pt]{xyz}}}|
+% |\makebox( , )[b]{\raisebox{0pt}[\height][0pt]{xyz}}|
% or |\makebox( , )[b]{\smash{xyz}}|
%
% \DescribeMacro\mbox
@@ -235,7 +235,8 @@
% \begin{macro}{\makebox}
% \changes{v0.1a}{1993/12/03}
% {modified}
-% |\makebox| User level command just looks for optional |[| or |(|.
+% |\makebox| User level command just looks for optional
+% |[| or |(|. \iffalse)]\fi
% \changes{v1.1h}{2015/01/08}{Make Robust (latexrelease)}
% \begin{macrocode}
%</2ekernel>
@@ -1010,7 +1011,7 @@
% set globally to false when they are definitely true.
%
% If anyone is unhappy with this argument then both flags should be
-% treated as in |\set@nobreak|; otherwise this command will be
+% treated as in |\@setnobreak|; otherwise this command will be
% redundant.
% \changes{v1.1a}{1996/10/24}{Added local settings of flags: dangerous!!}
% \begin{macrocode}
@@ -1486,9 +1487,46 @@
%
% The |\nobreak| was added (1995/10/31) to allow hyphenation of the
% final word of the paragraph.
+%
+% In 2024 we changed the macro to account for vertical mode. In
+% that case we use a strut produced with \cs{hrule} to avoid
+% starting a new paragraph (resulting in spurious extra line) and
+% also account for the \cs{prevdepth} of the previous line.
+% \changes{v1.4f}{2024/04/18}
+% {Use a \cs{hrule} strut not a \cs{vrule} if already in
+% vertical mode (bug seen first with footmisc/14)}
+% \changes{v1.4g}{2024/06/10}
+% {Always use a \cs{vrule} strut after all, but back up by a baseline
+% if already in vertical mode. Otherwise empty table p-cells will
+% not get the correct width (bug seen first with colortbl)}
% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2024/06/01}%
+%<latexrelease> {\@finalstrut}{final strut correction}%
\def\@finalstrut#1{%
- \unskip\ifhmode\nobreak\fi\vrule\@width\z@\@height\z@\@depth\dp#1}
+ \unskip
+ \ifhmode \nobreak
+ \else
+% \end{macrocode}
+% If we are in vmode we now back up by a baseline.
+% \begin{macrocode}
+ \vskip-\baselineskip
+ \fi
+% \end{macrocode}
+% Finally we unconditionally use \cs{vrule}.
+% \begin{macrocode}
+ \vrule\@width\z@\@height\z@\@depth\dp#1}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\@finalstrut}{final strut correction}%
+%<latexrelease>\def\@finalstrut#1{%
+%<latexrelease> \unskip\ifhmode\nobreak\fi
+%<latexrelease> \vrule\@width\z@\@height\z@\@depth\dp#1}
+%<latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
% \end{macrocode}
% \end{macro}
%