summaryrefslogtreecommitdiff
path: root/macros/latex-dev/required/tools/multicol.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex-dev/required/tools/multicol.dtx')
-rw-r--r--macros/latex-dev/required/tools/multicol.dtx46
1 files changed, 25 insertions, 21 deletions
diff --git a/macros/latex-dev/required/tools/multicol.dtx b/macros/latex-dev/required/tools/multicol.dtx
index 2b74d85af9..8d868357da 100644
--- a/macros/latex-dev/required/tools/multicol.dtx
+++ b/macros/latex-dev/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/28 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@gfirstbox}
+% and \cs{mult@firstbox} (gh/701)}
%
% \def\description{\list{}{\labelwidth 0pt \leftmargin\descriptionmargin
% \itemindent-\leftmargin \let\makelabel\descriptionlabel}}
@@ -567,8 +569,9 @@
% From version 1.9 onwards \cs{columnbreak} accepts an optional
% argument (just like \cs{pagebreak}) in which you can specify the
% desirability to break the column at that point: supported values are
-% \texttt{1} to \texttt{4}. This version also adds \cs{newcolumn}
-% which forces a column break but runs the column short (comparible to
+% \texttt{0} (slightly desirable) to \texttt{4} (forced).
+% This version also adds \cs{newcolumn}
+% which forces a column break but runs the column short (comparable to
% \cs{newpage}).
%
% \subsection{Floats inside a \mc{} environment}
@@ -734,7 +737,7 @@
% When it finishes it must return the individual columns in boxes
% suitable for further processing with |\page@sofar|. This means
% that the left column should be stored in box register
-% |\mult@gfirstbox|, the next
+% |\mult@firstbox|, the next
% in register |\mult@firstbox|${}+2$, \ldots,
% only the last one as an exception in
% register |\mult@grightbox|. Furthermore it has to set up
@@ -2322,7 +2325,7 @@
% 4,\ldots\ (plus offset).
% \changes{v1.5a}{1992/11/04}{New box mechanism}
% \begin{macrocode}
- \process@cols\mult@gfirstbox{%
+ \process@cols\mult@firstbox{%
\setbox\count@
\vsplit\@cclv to\dimen@
% \end{macrocode}
@@ -3080,7 +3083,7 @@
% untouched so that we can start over again if this trial was
% unsuccessful.
% \begin{macrocode}
- {\process@cols\mult@firstbox{%
+ {\process@cols\mult@gfirstbox{%
\global\setbox\count@
\vsplit\mult@grightbox to\dimen@
% \end{macrocode}
@@ -3134,19 +3137,19 @@
\global\setbox\mult@grightbox
\vbox{\unvbox\mult@grightbox}%
% \end{macrocode}
-% We also save a copy |\mult@firstbox| at its ``natural'' size
+% We also save a copy |\mult@gfirstbox| at its ``natural'' size
% for later use.
% \begin{macrocode}
\setbox\mult@nat@firstbox
- \vbox{\unvcopy\mult@firstbox}%
+ \vbox{\unvcopy\mult@gfirstbox}%
% \end{macrocode}
% After |\process@cols| has done its job we have the following
% situation:
% \begin{center}
% \begin{tabular}{r@{$\:\:\longleftarrow\:\:$}l}
% box |\mult@rightbox| & all material \\
-% box |\mult@gfirstbox| & first column \\
-% box |\mult@gfirstbox|${}+2$ & second column \\
+% box |\mult@firstbox| & first column \\
+% box |\mult@firstbox|${}+2$ & second column \\
% \multicolumn{1}{c}{$\vdots$} &
% \multicolumn{1}{c}{$\vdots$} \\
% box |\mult@grightbox| & last column
@@ -3167,10 +3170,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@firstbox} (pr2739)}
+% \changes{v1.5q}{1998/01/19}{Do not reset \cs{mult@gfirstbox} (pr2739)}
% \begin{macrocode}
% \ifshr@nking
-% \global\setbox\mult@firstbox
+% \global\setbox\mult@gfirstbox
% \copy\mult@nat@firstbox
% \fi
% \end{macrocode}
@@ -3488,10 +3491,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 +3503,8 @@
% \begin{macrocode}
\newbox\mult@rightbox
\newbox\mult@grightbox
-\newbox\mult@gfirstbox
\newbox\mult@firstbox
+\newbox\mult@gfirstbox
\newbox\@tempa\newbox\@tempa
\newbox\@tempa\newbox\@tempa
\newbox\@tempa\newbox\@tempa
@@ -3519,7 +3523,6 @@
\newbox\@tempa\newbox\@tempa
\newbox\@tempa\newbox\@tempa
\newbox\@tempa\newbox\@tempa
-\newbox\@tempa
\let\@tempa\relax
% \end{macrocode}
% \end{macro}
@@ -4097,6 +4100,7 @@
% \begin{macro}{\columnbreak}
% \changes{v1.5u}{1999/05/25}{Macro added}
% \changes{v1.9a}{2021/10/08}{Added optional argument for conditional break}
+% \changes{v1.9b}{2021/10/28}{Corrected error message text (gh/703)}
% |\columnbreak| is modeled after |\pagebreak| except that we
% generate a penalty -10005.
% \begin{macrocode}
@@ -4109,7 +4113,7 @@
% \begin{macrocode}
\ifnum\col@number<\tw@
\PackageError{multicol}%
- {\noexpand\newcolumn outside multicols}%
+ {\noexpand\columnbreak outside multicols}%
{This command can only be used within
a multicols or multicols* environment.}%
\else
@@ -4184,7 +4188,7 @@
% \end{macrocode}
% We loop through the columns with |\process@cols|
% \begin{macrocode}
- \process@cols\mult@gfirstbox{%
+ \process@cols\mult@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 +4211,7 @@
\@width\columnseprule}\hss}%
% \end{macrocode}
% As you will have noticed, we started with box register
-% |\mult@gfirstbox| (i.e.\
+% |\mult@firstbox| (i.e.\
% the left column). So this time |\count@| looped through 2,
% 4,\ldots\ (plus the appropriate offset).
% Finally we add box |\mult@rightbox| and we are done.
@@ -4249,7 +4253,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@cols\mult@gfirstbox{%
+ \process@cols\mult@firstbox{%
\hskip\hsize
\hss{\columnseprulecolor\vrule
\@width\columnseprule}\hss
@@ -4267,7 +4271,7 @@
% column using the same approach until we are done with all but the
% final column.
% \begin{macrocode}
- \process@cols\mult@gfirstbox{%
+ \process@cols\mult@firstbox{%
\ifdim\dp\count@>\dimen\tw@
\global\dimen\tw@\dp\count@ \fi
\hskip-\hsize