[latex3-commits] [git/LaTeX3-latex3-latex2e] gh701: fix from #701 - thanks to Ruixi Zhang (c9d36e70)
Frank Mittelbach
frank.mittelbach at latex-project.org
Fri Oct 22 18:23:02 CEST 2021
Repository : https://github.com/latex3/latex2e
On branch : gh701
Link : https://github.com/latex3/latex2e/commit/c9d36e70eb3e292c1a72f2d3cf094a713db694d5
>---------------------------------------------------------------
commit c9d36e70eb3e292c1a72f2d3cf094a713db694d5
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date: Fri Oct 22 18:23:02 2021 +0200
fix from #701 - thanks to Ruixi Zhang
>---------------------------------------------------------------
c9d36e70eb3e292c1a72f2d3cf094a713db694d5
required/tools/changes.txt | 6 ++++++
required/tools/multicol.dtx | 38 ++++++++++++++++++++------------------
2 files changed, 26 insertions(+), 18 deletions(-)
diff --git a/required/tools/changes.txt b/required/tools/changes.txt
index b781bba6..d8de8ce6 100644
--- a/required/tools/changes.txt
+++ b/required/tools/changes.txt
@@ -5,6 +5,12 @@ completeness or accuracy and it contains some references to files that
are not part of the distribution.
=======================================================================
+2021-10-22 Frank Mittelbach <Frank.Mittelbach at latex-project.org>
+
+ * multicol.dtx:
+ swap names of \mult at gfirstbox and \mult at firstbox because wrong (gh/701)
+ drop one unnecessary box allocation (gh701)
+
2021-10-08 Frank Mittelbach <Frank.Mittelbach at latex-project.org>
* multicol.dtx:
diff --git a/required/tools/multicol.dtx b/required/tools/multicol.dtx
index 2b74d85a..9e0e4133 100644
--- a/required/tools/multicol.dtx
+++ b/required/tools/multicol.dtx
@@ -98,7 +98,7 @@
%<driver> \ProvidesFile{multicol.drv}
% \fi
% \ProvidesFile{multicol.dtx}
- [2021/10/08 v1.9a multicolumn formatting (FMi)]
+ [2021/10/22 v1.9b multicolumn formatting (FMi)]
%
%
%%
@@ -115,6 +115,8 @@
% \changes{v1.0f}{1989/07/11}{Changed \cs{z@} to 0pt in redefinition of
% description.}
% \changes{v1.1a}{1989/09/20}{\cs{multicolssep} changed to \cs{multicolsep}.}
+% \changes{v1.9b}{2021/10/22}{Swap names \cs{mult at gfirstbox}
+% and \cs{mult at firstbox} (gh/701)}
%
% \def\description{\list{}{\labelwidth 0pt \leftmargin\descriptionmargin
% \itemindent-\leftmargin \let\makelabel\descriptionlabel}}
@@ -734,7 +736,7 @@
% When it finishes it must return the individual columns in boxes
% suitable for further processing with |\page at sofar|. This means
% that the left column should be stored in box register
-% |\mult at gfirstbox|, the next
+% |\mult at firstbox|, the next
% in register |\mult at firstbox|${}+2$, \ldots,
% only the last one as an exception in
% register |\mult at grightbox|. Furthermore it has to set up
@@ -2322,7 +2324,7 @@
% 4,\ldots\ (plus offset).
% \changes{v1.5a}{1992/11/04}{New box mechanism}
% \begin{macrocode}
- \process at cols\mult at gfirstbox{%
+ \process at cols\mult at firstbox{%
\setbox\count@
\vsplit\@cclv to\dimen@
% \end{macrocode}
@@ -3080,7 +3082,7 @@
% untouched so that we can start over again if this trial was
% unsuccessful.
% \begin{macrocode}
- {\process at cols\mult at firstbox{%
+ {\process at cols\mult at gfirstbox{%
\global\setbox\count@
\vsplit\mult at grightbox to\dimen@
% \end{macrocode}
@@ -3134,19 +3136,19 @@
\global\setbox\mult at grightbox
\vbox{\unvbox\mult at grightbox}%
% \end{macrocode}
-% We also save a copy |\mult at firstbox| at its ``natural'' size
+% We also save a copy |\mult at gfirstbox| at its ``natural'' size
% for later use.
% \begin{macrocode}
\setbox\mult at nat@firstbox
- \vbox{\unvcopy\mult at firstbox}%
+ \vbox{\unvcopy\mult at gfirstbox}%
% \end{macrocode}
% After |\process at cols| has done its job we have the following
% situation:
% \begin{center}
% \begin{tabular}{r@{$\:\:\longleftarrow\:\:$}l}
% box |\mult at rightbox| & all material \\
-% box |\mult at gfirstbox| & first column \\
-% box |\mult at gfirstbox|${}+2$ & second column \\
+% box |\mult at firstbox| & first column \\
+% box |\mult at firstbox|${}+2$ & second column \\
% \multicolumn{1}{c}{$\vdots$} &
% \multicolumn{1}{c}{$\vdots$} \\
% box |\mult at grightbox| & last column
@@ -3167,10 +3169,10 @@
% to later columns but it is actually producing incorrect results
% (overprinting of text) in boundary cases, so since version v1.5q
% |\raggedcolumns| means allows for all columns to run slightly short.
-% \changes{v1.5q}{1998/01/19}{Do not reset \cs{mult at firstbox} (pr2739)}
+% \changes{v1.5q}{1998/01/19}{Do not reset \cs{mult at gfirstbox} (pr2739)}
% \begin{macrocode}
% \ifshr at nking
-% \global\setbox\mult at firstbox
+% \global\setbox\mult at gfirstbox
% \copy\mult at nat@firstbox
% \fi
% \end{macrocode}
@@ -3488,10 +3490,11 @@
% allocating after 255. This is all done quite low-level by looking
% directly at the values of the allocation counters.
% \changes{v1.8y}{2019/12/09}{Allow for 20 columns (gh/237)}
+% \changes{v1.9b}{2021/10/22}{Drop one unnecessary box allocation (gh/701)}
% \begin{macrocode}
\ifnum\numexpr
- \count20-\count14-1<41
- % this is = 2 * 20 + 1
+ \count20-\count14-1<40
+ % this is = 2 * 20
\count14=\@cclv
\fi
% \end{macrocode}
@@ -3499,8 +3502,8 @@
% \begin{macrocode}
\newbox\mult at rightbox
\newbox\mult at grightbox
-\newbox\mult at gfirstbox
\newbox\mult at firstbox
+\newbox\mult at gfirstbox
\newbox\@tempa\newbox\@tempa
\newbox\@tempa\newbox\@tempa
\newbox\@tempa\newbox\@tempa
@@ -3519,7 +3522,6 @@
\newbox\@tempa\newbox\@tempa
\newbox\@tempa\newbox\@tempa
\newbox\@tempa\newbox\@tempa
-\newbox\@tempa
\let\@tempa\relax
% \end{macrocode}
% \end{macro}
@@ -4184,7 +4186,7 @@
% \end{macrocode}
% We loop through the columns with |\process at cols|
% \begin{macrocode}
- \process at cols\mult at gfirstbox{%
+ \process at cols\mult at firstbox{%
% \end{macrocode}
% If the depth of the current box is larger than the maximum found
% so far in |\dimen2| we update that register for later use.
@@ -4207,7 +4209,7 @@
\@width\columnseprule}\hss}%
% \end{macrocode}
% As you will have noticed, we started with box register
-% |\mult at gfirstbox| (i.e.\
+% |\mult at firstbox| (i.e.\
% the left column). So this time |\count@| looped through 2,
% 4,\ldots\ (plus the appropriate offset).
% Finally we add box |\mult at rightbox| and we are done.
@@ -4249,7 +4251,7 @@
% First step is to put all rules in the right place (without adding
% the comes which are instead represented by a space of |\hsize|.
% \begin{macrocode}
- \process at cols\mult at gfirstbox{%
+ \process at cols\mult at firstbox{%
\hskip\hsize
\hss{\columnseprulecolor\vrule
\@width\columnseprule}\hss
@@ -4267,7 +4269,7 @@
% column using the same approach until we are done with all but the
% final column.
% \begin{macrocode}
- \process at cols\mult at gfirstbox{%
+ \process at cols\mult at firstbox{%
\ifdim\dp\count@>\dimen\tw@
\global\dimen\tw@\dp\count@ \fi
\hskip-\hsize
More information about the latex3-commits
mailing list.