[latex3-commits] [git/LaTeX3-latex3-latex2e] gh190: fix for issue #190 (1b101879)

Frank Mittelbach frank.mittelbach at latex-project.org
Tue Oct 15 19:35:25 CEST 2019


Repository : https://github.com/latex3/latex2e
On branch  : gh190
Link       : https://github.com/latex3/latex2e/commit/1b10187980e72c278227d21462a0e9e6bbb7d266

>---------------------------------------------------------------

commit 1b10187980e72c278227d21462a0e9e6bbb7d266
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date:   Tue Oct 15 19:35:25 2019 +0200

    fix for issue #190


>---------------------------------------------------------------

1b10187980e72c278227d21462a0e9e6bbb7d266
 base/doc/ltnews31.tex                              |  3 +
 required/tools/changes.txt                         |  7 +++
 required/tools/multicol.dtx                        | 29 ++++++----
 required/tools/testfiles/github-0190.lvt           | 65 ++++++++++++++++++++++
 .../tools/testfiles/github-0190.tlg                |  9 +--
 5 files changed, 95 insertions(+), 18 deletions(-)

diff --git a/base/doc/ltnews31.tex b/base/doc/ltnews31.tex
index 5a65c454..30015edf 100644
--- a/base/doc/ltnews31.tex
+++ b/base/doc/ltnews31.tex
@@ -195,6 +195,9 @@ the \LaTeX{} kernel after [INSERT DATE HERE]:
         
 \section{Changes to packages in the \pkg{tools} category}
 
+\emph{fixed gh190}
+
+
 
 \section{Changes to packages in the \pkg{amsmath} category}
 
diff --git a/required/tools/changes.txt b/required/tools/changes.txt
index 64b7e470..b30f3c96 100644
--- a/required/tools/changes.txt
+++ b/required/tools/changes.txt
@@ -1,3 +1,4 @@
+
 =======================================================================
 This file lists changes to the LaTeX2e files in reverse chronological order.
 It is provided for convenience only.  It therefore makes no claims to
@@ -5,6 +6,12 @@ completeness or accuracy and it contains some references to files that
 are not part of the distribution.
 =======================================================================
 
+2019-10-15  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
+
+	* multicol.dtx:
+	\@maxdepth not \maxdepth in case multicol is used in a bottom
+	figure (gh/190)}
+
 2019-10-13  David Carlisle  <David.Carlisle at latex-project.org>
 
 	* shellesc.dtx: add logging in luatex and \ShellEscapeStatus
diff --git a/required/tools/multicol.dtx b/required/tools/multicol.dtx
index d68f471f..3a9f1492 100644
--- a/required/tools/multicol.dtx
+++ b/required/tools/multicol.dtx
@@ -98,7 +98,7 @@
 %<driver> \ProvidesFile{multicol.drv}
 % \fi
 %         \ProvidesFile{multicol.dtx}
-          [2019/03/01 v1.8w  multicolumn formatting (FMi)]
+          [2019/10/15 v1.8x  multicolumn formatting (FMi)]
 %
 %
 %%
@@ -134,7 +134,7 @@
 % \DoNotIndex{\hbox,\hfil,\hrule,\ht,\hss}
 % \DoNotIndex{\ifdim,\ifnum,\ifvoid,\ignorespaces,\insert,\immediate}
 % \DoNotIndex{\let,\loop}
-% \DoNotIndex{\maxdepth,\message,\multiply}
+% \DoNotIndex{\@maxdepth,\message,\multiply}
 % \DoNotIndex{\newbox,\newcount,\newdimen,\newskip,\number,\newpage}
 % \DoNotIndex{\outputpenalty,\p@,\penalty}
 % \DoNotIndex{\relax,\repeat,\setbox,\skip,\space,\splitmaxdepth}
@@ -978,9 +978,10 @@
 %    grid. Right now it doesn't do anything other than warning if it
 %    thinks that the grid got lost.
 % \changes{v1.6a}{2003/03/15}{New option grid}
+% \changes{v1.8x}{2019/10/15}{Use \cs{@maxdepth} not \cs{maxdepth} (gh/190)}
 %    \begin{macrocode}
 \let\mc at gridwarn\maxdimen
-\DeclareOption{grid}{\def\mc at gridwarn{\maxdepth}}
+\DeclareOption{grid}{\def\mc at gridwarn{\@maxdepth}}
 %    \end{macrocode}
 %
 % \changes{v1.8e}{2014/04/23}{Support \cs{docolaction}}
@@ -2143,7 +2144,7 @@
 %    However, in case one of the columns was unusually deep \TeX{} may
 %    have tried some corrective actions in which case backing up by
 %    the saved value will not bring us back to the baseline. A good
-%    indication for this is a depth of |\maxdepth| though it is not an
+%    indication for this is a depth of |\@maxdepth| though it is not an
 %    absolute proof. If the option \texttt{grid} is used
 %    |\mc at gridwarn| will expand to this, otherwise to |\maxdimen| in
 %    which case this warning will not show up.
@@ -2192,15 +2193,16 @@
 %   |\vfill| in that case but this is actually wrong for columns that
 %   are more or less full: by adding a glue at the bottom such a
 %   column doesn't have any depth any more but without it the material
-%   would be allowed a depth of |\maxdepth|. So we allow shrinking by
+%   would be allowed a depth of |\@maxdepth|. So we allow shrinking by
 %   that amount. This only makes a difference if the box would
 %   otherwise become overfull and shrinking never exceeds the
 %   specified value, so we should be fine. 
 % \changes{v1.8h}{2014/09/12}{Macro added  (pr/4395)}
 % \changes{v1.8j}{2015/03/07}{Use only `0.0001fil' for stretching}
+% \changes{v1.8x}{2019/10/15}{Use \cs{@maxdepth} not \cs{maxdepth} (gh/190)}
 %    \begin{macrocode}
 \def\vfilmaxdepth{\vskip \z@ \@plus .0001fil 
-                           \@minus \maxdepth}
+                           \@minus \@maxdepth}
 %    \end{macrocode}
 % \end{macro}
 %
@@ -2246,13 +2248,13 @@
 %    appropriate values to |\splittopskip| and |\splitmaxdepth|.
 %    \begin{macrocode}
    \splittopskip\topskip
-   \splitmaxdepth\maxdepth
+   \splitmaxdepth\@maxdepth
 %    \end{macrocode}
 %    We also need to restrict |\boxmaxdepth| so that re-boxing is not
 %    generating boxes with arbitrary depth.   
 % \changes{v1.8j}{2015/03/07}{Set \cs{boxmaxdepth}}
 %    \begin{macrocode}
-   \boxmaxdepth\maxdepth
+   \boxmaxdepth\@maxdepth
 %    \end{macrocode}
 %    Then we calculate the current column height (in |\dimen@|).
 %    Note that the height of |\partial at page| is already
@@ -2585,7 +2587,7 @@
 %   e.g., after a display environment (if LaTeX would break here by
 %   its own it would break before the space following the display).
 %
-%   Thus we rebox box 255 once (using |\maxdepth| and calling
+%   Thus we rebox box 255 once (using |\@maxdepth| and calling
 %   |\remove at discardable@items| inside). The depth of 255 will then
 %   give us the depth the box would have had if it would have been a
 %   natural break. We then unbox 255 to get it into the
@@ -2594,8 +2596,9 @@
 %   balancing later on.
 % \changes{v1.8k}{2015/03/21}{Remove discardable items just before a
 %   forced break}
+% \changes{v1.8x}{2019/10/15}{Use \cs{@maxdepth} not \cs{maxdepth} (gh/190)}
 %    \begin{macrocode}
-              \boxmaxdepth\maxdepth
+              \boxmaxdepth\@maxdepth
               \setbox\@cclv\vbox{%
                  \unvbox\@cclv
                  \remove at discardable@items}%
@@ -2879,12 +2882,13 @@
 %    |\splittopskip| and allow for a bit of undershoot and overshoot
 %    by adding some stretch and shrink.
 % \changes{v1.5?}{1994/?/?}{Allow columns to come out a bit long or short}
+% \changes{v1.8x}{2019/10/15}{Use \cs{@maxdepth} not \cs{maxdepth} (gh/190)}
 %    \begin{macrocode}
    \@tempdima\topskip
    \splittopskip\@tempdima
        \@plus\multicolundershoot
        \@minus\multicolovershoot
-   \splitmaxdepth\maxdepth
+   \splitmaxdepth\@maxdepth
 %    \end{macrocode}
 %   We also have to set |\boxmaxdepth| which normally allows to
 %   build boxes with arbitrary depth, but as we are building text
@@ -2893,8 +2897,9 @@
 %   restriction posed by |\splitmaxdepth|  gets lost.
 % \changes{v1.8h}{2014/09/12}{All column boxes should obey
 %   \cs{maxdepth}  (pr/4395)}
+% \changes{v1.8x}{2019/10/15}{Use \cs{@maxdepth} not \cs{maxdepth} (gh/190)}
 %    \begin{macrocode}
-   \boxmaxdepth\maxdepth
+   \boxmaxdepth\@maxdepth
 %    \end{macrocode}
 %    The next step is a bit tricky: when \TeX{} assembles material in
 %    a box, the first line isn't preceded by interline glue, i.e.
diff --git a/required/tools/testfiles/github-0190.lvt b/required/tools/testfiles/github-0190.lvt
new file mode 100644
index 00000000..bc282635
--- /dev/null
+++ b/required/tools/testfiles/github-0190.lvt
@@ -0,0 +1,65 @@
+% https://github.com/latex3/latex2e/issues/190
+
+\documentclass{article}
+
+\usepackage{multicol}
+
+\input{test2e}
+
+\setlength\textheight{12\baselineskip}
+\addtolength\textheight{\topskip}
+
+\def\xx{Test 1 \\ 2 \\ 3 \\ 4 \\ 5 \par}
+
+\newcommand\blockitem[1]{\par#1\strut}
+
+\newsavebox{\demobox}
+
+\newenvironment{blocklist}{%
+  \begin{lrbox}{\demobox}
+    \begin{minipage}[b]{\textwidth}
+      \begin{multicols}{3}}{%
+      \end{multicols}
+    \end{minipage}
+  \end{lrbox}%
+  \begin{figure*}[!b]
+    \fbox{\usebox{\demobox}}\kern-10pt
+    \par Box Height=\the\ht\demobox
+    \typeout{Box Height=\the\ht\demobox}
+  \end{figure*}
+  }
+
+
+\begin{document}
+
+\START
+
+\begin{multicols}{2}
+  \xx
+
+ \begin{blocklist}
+    \blockitem{Alfa} \blockitem{Bravo} \blockitem{Charlie} \blockitem{Delta}
+    \blockitem{Echo} \blockitem{Foxtrot} \blockitem{Golf} \blockitem{Hotel} \blockitem{India}
+  \end{blocklist}
+
+\xx \xx
+\xx \xx
+\xx \xx
+
+ \begin{blocklist}
+    \blockitem{Alfa} \blockitem{Bravo} \blockitem{Charlie} \blockitem{Delta}
+    \blockitem{Echo} \blockitem{Foxtrot} \blockitem{Golf} \blockitem{Hotel} \blockitem{India}
+ \end{blocklist}
+
+\xx \xx
+\xx \xx
+\xx \xx
+
+\xx \xx
+\xx \xx
+\xx \xx
+
+\end{multicols}
+
+\end{document}
+
diff --git a/base/testfiles/tlb1783b.tlg b/required/tools/testfiles/github-0190.tlg
similarity index 59%
copy from base/testfiles/tlb1783b.tlg
copy to required/tools/testfiles/github-0190.tlg
index f651b428..5ace5977 100644
--- a/base/testfiles/tlb1783b.tlg
+++ b/required/tools/testfiles/github-0190.tlg
@@ -1,10 +1,7 @@
 This is a generated file for the LaTeX2e validation system.
 Don't change this file in any respect.
+Box Height=34.0pt
 [1
-] (tlb1783b.toc)
-\tf at toc=\write...
-[2
 ]
-Chapter 1.
-[3
-] (tlb1783b.aux)
+Box Height=34.0pt
+[2] [3] [4] [5] (github-0190.aux)





More information about the latex3-commits mailing list