[latex3-commits] [git/LaTeX3-latex3-latex2e] develop: added rollback to v1.8 for multicol (8b29d22e)

Frank Mittelbach frank.mittelbach at latex-project.org
Tue Nov 30 11:24:28 CET 2021


Repository : https://github.com/latex3/latex2e
On branch  : develop
Link       : https://github.com/latex3/latex2e/commit/8b29d22e1763fc0099405a8217f62f1b6090cb86

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

commit 8b29d22e1763fc0099405a8217f62f1b6090cb86
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date:   Tue Nov 30 11:24:28 2021 +0100

    added rollback to v1.8 for multicol


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

8b29d22e1763fc0099405a8217f62f1b6090cb86
 required/tools/changes.txt                         |   4 +
 ...icol-2017-04-11.sty => multicol-2019-10-01.sty} | 139 +++++++++++++++------
 required/tools/multicol.dtx                        |   6 +-
 required/tools/testfiles/tlb-multicol-006.lvt      |  14 +++
 required/tools/testfiles/tlb-multicol-006.tlg      |  84 +++++++++++++
 5 files changed, 207 insertions(+), 40 deletions(-)

diff --git a/required/tools/changes.txt b/required/tools/changes.txt
index 43464f8b..80fb8d76 100644
--- a/required/tools/changes.txt
+++ b/required/tools/changes.txt
@@ -5,6 +5,10 @@ completeness or accuracy and it contains some references to files that
 are not part of the distribution.
 =======================================================================
 
+2021-11-30  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
+
+	* multicol.dtx: Added rollback to v1.8 (2019-10-01 release)
+
 ================================================================================
 All changes above are only part of the development branch for the next release.
 ================================================================================
diff --git a/required/tools/multicol-2017-04-11.sty b/required/tools/multicol-2019-10-01.sty
similarity index 90%
copy from required/tools/multicol-2017-04-11.sty
copy to required/tools/multicol-2019-10-01.sty
index 9e346656..221f62f6 100644
--- a/required/tools/multicol-2017-04-11.sty
+++ b/required/tools/multicol-2019-10-01.sty
@@ -1,11 +1,21 @@
+%% This is a rollback file for multicol to the last version within release 2019-10-01
+%% =======================
 %%
-%% This is an old release of `multicol.sty',
+%%
+%% This is file `multicol.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% multicol.dtx  (with options: `package,badness,check,marktrace,nobalance')
+%% 
+%% This is a generated file.
 %% 
 %% The source is maintained by the LaTeX Project team and bug
-%% reports for it can be opened at http://latex-project.org/bugs.html
+%% reports for it can be opened at https://latex-project.org/bugs/
 %% (but please observe conditions on bug reports sent to that address!)
 %% 
-%% Copyright 1993-2016
+%% Copyright (C) 1993-2021
 %% The LaTeX Project and any individual authors listed elsewhere
 %% in this file.
 %% 
@@ -16,13 +26,19 @@
 %% conditions of the LaTeX Project Public License, either version 1.3c
 %% of this license or (at your option) any later version.
 %% The latest version of this license is in
-%%    http://www.latex-project.org/lppl.txt
+%%    https://www.latex-project.org/lppl.txt
 %% and version 1.3c or later is part of all distributions of LaTeX
 %% version 2005/12/01 or later.
 %% 
+%% This file may only be distributed together with a copy of the LaTeX
+%% `Tools Bundle'. You may however distribute the LaTeX `Tools Bundle'
+%% without such generated files.
+%% 
+%% The list of all files belonging to the LaTeX `Tools Bundle' is
+%% given in the file `manifest.txt'.
 %% 
 %% Package `multicol' to use with LaTeX2e
-%% Copyright 1989-2016 Frank Mittelbach
+%% Copyright 1989-2019 Frank Mittelbach
 %%
 %%  In addition to the terms of LPPL any distributed version
 %%  (unchanged or modified) of multicol has to keep the statement
@@ -85,9 +101,16 @@
 %%
 %%     Frank.Mittelbach at latex-project.org
 %%
-\NeedsTeXFormat{LaTeX2e}[1997/12/01]
+\NeedsTeXFormat{LaTeX2e}[2018-04-01]
+
+\providecommand\DeclareRelease[3]{}
+\providecommand\DeclareCurrentRelease[2]{}
+
+\DeclareRelease{}{2017-04-11}{multicol-2017-04-11.sty}
+\DeclareCurrentRelease{}{2018-04-01}
+
 \ProvidesPackage{multicol}
-          [2017/04/11 v1.8q  multicolumn formatting (FMi)]
+          [2019/12/09 v1.8y  multicolumn formatting (FMi)]
 %%
 \DeclareOption{twocolumn}
    {\PackageWarning{multicol}{May not work
@@ -104,7 +127,7 @@
 \DeclareOption{debugshow}
     {\c at tracingmulticols5\relax}
 \let\mc at gridwarn\maxdimen
-\DeclareOption{grid}{\def\mc at gridwarn{\maxdepth}}
+\DeclareOption{grid}{\def\mc at gridwarn{\@maxdepth}}
 \DeclareOption{colaction}{%
   \def\mc at col@status at write{%
          \protected at write\@auxout{}%
@@ -125,14 +148,14 @@
        columns doesn't seem a good idea.^^J
        I therefore use two columns instead}%
      \col at number\tw@ \fi
-  \ifnum\col at number>10
+  \ifnum\col at number>20
      \PackageError{multicol}%
       {Too many columns}%
       {Current implementation doesn't
-       support more than 10 columns.%
+       support more than 20 columns.%
        \MessageBreak
-       I therefore use 10 columns instead}%
-     \col at number10 \fi
+       I therefore use 20 columns instead}%
+     \col at number20 \fi
      \ifx\@footnotetext\mult at footnotetext\else
        \let\orig at footnotetext\@footnotetext
        \let\@footnotetext\mult at footnotetext
@@ -282,6 +305,7 @@
     #1\advance\vsize
         \c at collectmore\baselineskip}
 \newdimen\multicol at leftmargin
+\mathchardef\@Mvi=10006  % 10005 is \columnbreak
 \def\endmulticols{\par
   \if at boxedmulticols
     \remove at discardable@items\color at endgroup\egroup
@@ -307,9 +331,8 @@
                  break(s) for splitting}%
         \unvbox\colbreak at box\fi
     \fi
-   \penalty\z@
-   \output{\balance at columns@out}%
-   \eject
+    \penalty\z@
+    \penalty-\@Mvi
     \ifvbox\partial at page
          \unvbox\partial at page\fi
      \global\let\kept at firstmark\@empty
@@ -320,7 +343,9 @@
   \@checkend{multicols}%
   \endgroup
   \global\c at unbalance\z@
-  \if at boxedmulticols\else
+  \if at boxedmulticols
+    \mc at col@status at write
+  \else
     \reinsert at footnotes
     \ifdim \pagegoal=\maxdimen
       \global\vsize\@colroom
@@ -399,7 +424,7 @@
 \def\reinsert at footnotes{\ifvoid\footins\else
          \insert\footins{}\fi}
 \def\vfilmaxdepth{\vskip \z@ \@plus .0001fil
-                           \@minus \maxdepth}
+                           \@minus \@maxdepth}
 \def\multi at column@out{%
    \ifnum\outputpenalty <-\@M
     \speci at ls \else
@@ -412,14 +437,14 @@
        \unvbox\@cclv}%
     \fi
    \splittopskip\topskip
-   \splitmaxdepth\maxdepth
-   \boxmaxdepth\maxdepth
+   \splitmaxdepth\@maxdepth
+   \boxmaxdepth\@maxdepth
    \dimen@\@colroom
    \divide\skip\footins\col at number
    \ifvoid\footins \else
       \leave at mult@footins
    \fi
-   \let\ifshr at kingsaved\ifshr at king
+
    \ifvbox \@kludgeins
      \advance \dimen@ -\ht\@kludgeins
      \ifdim \wd\@kludgeins>\z@
@@ -441,7 +466,6 @@
    \setbox\mult at rightbox\vbox to\dimen@
           {\unvbox\mult at rightbox
            \ifshr at nking\vfilmaxdepth\fi}%
-   \let\ifshr at king\ifshr at kingsaved
    \ifvoid\@cclv \else
        \unvbox\@cclv
        \ifnum\outputpenalty=\@M
@@ -529,7 +553,7 @@
                 \unvbox\colbreak at box
                 \penalty-\@Mv
               \fi
-              \boxmaxdepth\maxdepth
+              \boxmaxdepth\@maxdepth
               \setbox\@cclv\vbox{%
                  \unvbox\@cclv
                  \remove at discardable@items}%
@@ -539,14 +563,20 @@
          }%
          \reinsert at footnotes
      \else
+       \ifnum\outputpenalty = -\@Mvi
+         \mult at info\@ne{End penalty of multicols seen}%
+         \outputpenalty\@M   % pretend we had a natural forced break
+         \balance at columns@out
+       \else
         \PackageWarningNoLine{multicol}%
            {Floats and marginpars not
             allowed inside `multicols'
             environment!}%
         \unvbox\@cclv\reinsert at footnotes
-       \xdef\@freelist{\@freelist\@currlist}%
-       \gdef\@currlist{}%
-     \fi
+        \xdef\@freelist{\@freelist\@currlist}%
+        \gdef\@currlist{}%
+      \fi
+    \fi
   \fi
  \else \@doclearpage \fi
 }
@@ -584,7 +614,9 @@
      \setbox\@cclv\vbox
          {\vskip\topskip
           \vskip-\splittopskip
-          \unvbox\mult at box}%
+          \unvbox\mult at box
+          \penalty-\@Mvi
+         }%
      \multi at column@out
    \else
      \global\vsize\@colroom
@@ -608,8 +640,8 @@
    \splittopskip\@tempdima
        \@plus\multicolundershoot
        \@minus\multicolovershoot
-   \splitmaxdepth\maxdepth
-   \boxmaxdepth\maxdepth
+   \splitmaxdepth\@maxdepth
+   \boxmaxdepth\@maxdepth
    \setbox\@tempboxa\vsplit\mult at box to\z@
    \@tempdima\ht\mult at box
    \advance\@tempdima\dp\mult at box
@@ -621,6 +653,15 @@
    \ifdim \dimen@ >\@tempdima
      \advance\dimen at -\baselineskip
    \fi
+   \@tempdima\dimexpr
+       \topskip +\c at minrows\baselineskip-\baselineskip\relax
+   \ifnum\dimen@<\@tempdima
+     \mult at info\@ne
+       {Start value
+          \the\dimen@  \space ->
+          \the\@tempdima \space (corrected for minrows)}%
+     \dimen@\@tempdima
+   \fi
    \advance\dimen@\c at unbalance\baselineskip
    \mult at info\@ne
       {Balance columns\on at line:
@@ -783,6 +824,9 @@
 \newdimen\maxbalancingoverflow
 \maxbalancingoverflow=12pt
 
+\ifnum\numexpr \count20-\count14-1<41   % = 2 * 20 + 1
+  \count14=\@cclv
+\fi
 \newbox\mult at rightbox
 \newbox\mult at grightbox
 \newbox\mult at gfirstbox
@@ -795,6 +839,16 @@
 \newbox\@tempa\newbox\@tempa
 \newbox\@tempa\newbox\@tempa
 \newbox\@tempa\newbox\@tempa
+\newbox\@tempa\newbox\@tempa
+\newbox\@tempa\newbox\@tempa
+\newbox\@tempa\newbox\@tempa
+\newbox\@tempa\newbox\@tempa
+\newbox\@tempa\newbox\@tempa
+\newbox\@tempa\newbox\@tempa
+\newbox\@tempa\newbox\@tempa
+\newbox\@tempa\newbox\@tempa
+\newbox\@tempa\newbox\@tempa
+\newbox\@tempa\newbox\@tempa
 \newbox\@tempa
 \let\@tempa\relax
 \@ifundefined{emergencystretch}
@@ -885,6 +939,8 @@
 \def\too at badtrue{\global\let\iftoo at bad\iftrue}
 \def\too at badfalse{\global\let\iftoo at bad\iffalse}
 \newif\ifforcedbreak at leftover
+\newcount\c at minrows
+\c at minrows=1
 \newcount\c at columnbadness
 \c at columnbadness=10000
 \newcount\c at finalcolumnbadness
@@ -911,8 +967,8 @@
         not make sense.\MessageBreak
         Going to balance anyway}%
    \else
-     \let\balance at columns@out
-         \multi at column@out
+     \def\balance at columns@out
+         {\multi at column@out \penalty-\@Mvi }%
    \fi
    \begin{multicols}
 }
@@ -992,7 +1048,7 @@
 \LRmulticolcolumns
 \newcount\mc at col@check at num
 
-\newcommand\docolaction[4][1]{%
+\newcommand\docolaction{%
  \ifx\mc at col@status at write\relax
      \PackageError{multicol}%
       {Option 'colaction' not selected}%
@@ -1007,7 +1063,17 @@
                    0\else
    \csname mc at col-\the\mc at col@check at num
    \endcsname
-                    \fi}%
+   \fi}%
+ \@ifstar
+   {\@docolactionstartrue \@docolaction}%
+   {\@docolactionstarfalse\@docolaction}%
+}
+\newcommand\@docolaction[4][1]{%
+ \edef\@docolactioncheck{\write\@auxout
+   {\string\mc at set@col at status
+     {mc at col-\the\mc at col@check at num}%
+     {\mc at col@type}}}%
+ \if at docolactionstar \@docolactioncheck \fi
  \ifcase \mc at col@type\relax
      \ifcase #1\or #2\or#3\or#4\fi
   \or
@@ -1017,14 +1083,11 @@
   \or
      #4%  % 3 last col
   \else
-    \ERROR
+    \ERRORwrongdefaultgiven
   \fi
-  \edef\next{\write\@auxout
-     {\string\mc at set@col at status
-      {mc at col-\the\mc at col@check at num}%
-      {\mc at col@type}}}%
-  \next
+ \if at docolactionstar \else \@docolactioncheck \fi
 }
+\newif\if at docolactionstar
 \def\mc at col@status#1{%
     \gdef\mc at curr@col at status{#1}}
 \def\mc at set@col at status#1#2{%
diff --git a/required/tools/multicol.dtx b/required/tools/multicol.dtx
index 8d868357..c83b6c8e 100644
--- a/required/tools/multicol.dtx
+++ b/required/tools/multicol.dtx
@@ -92,17 +92,19 @@
 %<package>\providecommand\DeclareCurrentRelease[2]{}
 %<package>
 %<package>\DeclareRelease{}{2017-04-11}{multicol-2017-04-11.sty}
-%<package>\DeclareCurrentRelease{}{2018-04-01}
+%<package>\DeclareRelease{v1.8}{2019-10-01}{multicol-2019-10-01.sty}
+%<package>\DeclareCurrentRelease{}{2021-11-15}
 %<package>
 %<package>\ProvidesPackage{multicol}
 %<driver> \ProvidesFile{multicol.drv}
 % \fi
 %         \ProvidesFile{multicol.dtx}
-          [2021/10/28 v1.9b  multicolumn formatting (FMi)]
+          [2021/11/30 v1.9c  multicolumn formatting (FMi)]
 %
 %
 %%
 %
+% \changes{v1.9c}{2021/11/30}{Added rollback to v1.8}
 % \changes{v1.5n}{1997/06/05}{Applied improvement of documentation,
 %          kindly done by Robin Fairbairns.}
 % \changes{v1.4h}{1992/06/04}{Added mark tracing with
diff --git a/required/tools/testfiles/tlb-multicol-006.lvt b/required/tools/testfiles/tlb-multicol-006.lvt
new file mode 100644
index 00000000..9f60eb23
--- /dev/null
+++ b/required/tools/testfiles/tlb-multicol-006.lvt
@@ -0,0 +1,14 @@
+% testing rolback a bit
+
+\input{test2e}
+
+\documentclass{article}
+
+\START
+
+\usepackage[balancingshow]{multicol}[=v1.8]
+
+\ShowCommand\columnbreak      % old definition
+\ShowCommand\newcolumn        % undefined
+
+\END
diff --git a/required/tools/testfiles/tlb-multicol-006.tlg b/required/tools/testfiles/tlb-multicol-006.tlg
new file mode 100644
index 00000000..f62a19af
--- /dev/null
+++ b/required/tools/testfiles/tlb-multicol-006.tlg
@@ -0,0 +1,84 @@
+This is a generated file for the LaTeX2e validation system.
+Don't change this file in any respect.
+(multicol.sty
+Rollback for package 'multicol' requested -> version 'v1.8'.
+         This corresponds to the release introduced on ....-..-...
+(multicol-....-..-...sty
+Package: multicol ....-..-.. v... multicolumn formatting (FMi)
+\c at tracingmulticols=\count...
+\mult at box=\box...
+\multicol at leftmargin=\dimen...
+\c at unbalance=\count...
+\c at collectmore=\count...
+\doublecol at number=\count...
+\multicoltolerance=\count...
+\multicolpretolerance=\count...
+\full at width=\dimen...
+\page at free=\dimen...
+\premulticols=\dimen...
+\postmulticols=\dimen...
+\multicolsep=\skip...
+\multicolbaselineskip=\skip...
+\partial at page=\box...
+\last at line=\box...
+\maxbalancingoverflow=\dimen...
+\mult at rightbox=\box...
+\mult at grightbox=\box...
+\mult at gfirstbox=\box...
+\mult at firstbox=\box...
+\@tempa=\box...
+\@tempa=\box...
+\@tempa=\box...
+\@tempa=\box...
+\@tempa=\box...
+\@tempa=\box...
+\@tempa=\box...
+\@tempa=\box...
+\@tempa=\box...
+\@tempa=\box...
+\@tempa=\box...
+\@tempa=\box...
+\@tempa=\box...
+\@tempa=\box...
+\@tempa=\box...
+\@tempa=\box...
+\@tempa=\box...
+\@tempa=\box...
+\@tempa=\box...
+\@tempa=\box...
+\@tempa=\box...
+\@tempa=\box...
+\@tempa=\box...
+\@tempa=\box...
+\@tempa=\box...
+\@tempa=\box...
+\@tempa=\box...
+\@tempa=\box...
+\@tempa=\box...
+\@tempa=\box...
+\@tempa=\box...
+\@tempa=\box...
+\@tempa=\box...
+\@tempa=\box...
+\@tempa=\box...
+\@tempa=\box...
+\@tempa=\box...
+\c at minrows=\count...
+\c at columnbadness=\count...
+\c at finalcolumnbadness=\count...
+\last at try=\dimen...
+\multicolovershoot=\dimen...
+\multicolundershoot=\dimen...
+\mult at nat@firstbox=\box...
+\colbreak at box=\box...
+\mc at col@check at num=\count...
+))
+> \columnbreak=macro:
+->\ifnum \col at number <\tw@ \PackageError {multicol}{\noexpand \columnbreak outside multicols}{This command can only be used within a multicols or multicols* environment.}\else \ifvmode \penalty -\@Mv \relax \else \@bsphack \vadjust {\penalty -\@Mv \relax }\@esphack \fi \fi .
+<argument> \columnbreak 
+l. ...\ShowCommand\columnbreak
+                                   % old definition
+> \newcolumn=undefined.
+<argument> \newcolumn 
+l. ...\ShowCommand\newcolumn
+                                   % undefined





More information about the latex3-commits mailing list.