[latex3-commits] [git/LaTeX3-latex3-latex2e] master: Use rollback feature on multicol (largely as a test) (921f5fb)
Frank Mittelbach
frank.mittelbach at latex-project.org
Fri Mar 23 18:43:10 CET 2018
Repository : https://github.com/latex3/latex2e
On branch : master
Link : https://github.com/latex3/latex2e/commit/921f5fb086325f3e1ff2a36efd7c10e4c7ccdee5
>---------------------------------------------------------------
commit 921f5fb086325f3e1ff2a36efd7c10e4c7ccdee5
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date: Fri Mar 23 18:43:10 2018 +0100
Use rollback feature on multicol (largely as a test)
>---------------------------------------------------------------
921f5fb086325f3e1ff2a36efd7c10e4c7ccdee5
.gitignore | 1 +
required/tools/build.lua | 2 +
required/tools/multicol-2017-04-11.sty | 1055 ++++++++++++++++++++++++++++++++
required/tools/multicol.dtx | 13 +-
required/tools/multicol.ins | 2 +-
5 files changed, 1069 insertions(+), 4 deletions(-)
diff --git a/.gitignore b/.gitignore
index f931219..ead9701 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,3 +5,4 @@ build/
*.*#
*.aux
base/*.pdf
+required/tools/*.pdf
diff --git a/required/tools/build.lua b/required/tools/build.lua
index 674f7ed..360a28d 100644
--- a/required/tools/build.lua
+++ b/required/tools/build.lua
@@ -17,6 +17,8 @@ installfiles = {"*.def", "*.sty", "*.tex"}
typesetfiles = {"*.dtx", "tools-overview.tex"}
unpackfiles = {"tools.ins"}
+sourcefiles = {"*.dtx", "*.ins", "*.sty"}
+
checkdeps = {maindir .. "/base", maindir .. "/required/graphics"}
-- Load the common settings for the LaTeX2e repo
diff --git a/required/tools/multicol-2017-04-11.sty b/required/tools/multicol-2017-04-11.sty
new file mode 100644
index 0000000..10ebd6a
--- /dev/null
+++ b/required/tools/multicol-2017-04-11.sty
@@ -0,0 +1,1055 @@
+%%
+%% 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
+%% (but please observe conditions on bug reports sent to that address!)
+%%
+%% Copyright 1993-2016
+%% The LaTeX3 Project and any individual authors listed elsewhere
+%% in this file.
+%%
+%% This file was generated from file(s) of the Standard LaTeX `Tools Bundle'.
+%% --------------------------------------------------------------------------
+%%
+%% It may be distributed and/or modified under the
+%% 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
+%% 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
+%%
+%% In addition to the terms of LPPL any distributed version
+%% (unchanged or modified) of multicol has to keep the statement
+%% about the moral obligation for using multicol. In case of major
+%% changes where this would not be appropriate the author of the
+%% changed version should contact the copyright holder.
+%%
+%%
+%% Moral obligation for using multicol:
+%% ------------------------------------
+%%
+%% Users of multicol who wish to include or use multicol or a modified
+%% version in a proprietary and commercially market product are asked
+%% under certain conditions (see below) for the payment of a license
+%% fee. The size of this fee is to be determined, in each instance,
+%% by the commercial user, depending on his/her judgment of the value of
+%% multicol for his/her product.
+%%
+%%
+%% The conditions for this are as follows:
+%%
+%% The producer of a proprietary and commercially market product
+%% that involves typesetting using multicol is asked to determine
+%% the value of a license fee for using multicol if
+%%
+%% - the product is a document and the producer has decided to
+%% include multicol to typeset (parts of) the document or has
+%% directed the author of the document to include multicol (for
+%% example, by providing a class file to be used by the author)
+%%
+%% - the product is a LaTeX class or package that includes multicol
+%%
+%%
+%% There is no moral obligation in case
+%%
+%% - the product is a document but producer has not directed
+%% the author to include multicol (in that case the moral obligation
+%% lies with the author of the document)
+%%
+%% - the product does not involve typesetting, e.g., consists, for
+%% example, of distributing multicol and its documentation.
+%%
+%% - the product is not proprietary, i.e., is made available as free
+%% software itself (which doesn't prohibit its commercial marketing)
+%%
+%% - multicol is used for non-commercial purposes
+%%
+%%
+%% Determining a license fee might result in a license fee of zero
+%% (i.e., no payment) in case a producer has determined that the use
+%% of multicol has no enhancing effect on the product. This is a
+%% plausible scenario, i.e., in the above two cases the producer is
+%% only asked to evaluate the value of multicol for the product
+%% not for the payment of a license fee per se (which might or might
+%% not follow from this evaluation).
+%%
+%% The license fee, if any, can be payed either to the LaTeX3 fund
+%% (see ltx3info.txt in the base LaTeX distribution) or to the author of
+%% the program who can be contacted at
+%%
+%% Frank.Mittelbach at latex-project.org
+%%
+\NeedsTeXFormat{LaTeX2e}[1997/12/01]
+\ProvidesPackage{multicol}
+ [2017/04/11 v1.8q multicolumn formatting (FMi)]
+%%
+\DeclareOption{twocolumn}
+ {\PackageWarning{multicol}{May not work
+ with the twocolumn option}}
+\newcount\c at tracingmulticols
+\DeclareOption{errorshow}
+ {\c at tracingmulticols\z@}
+\DeclareOption{infoshow}
+ {\c at tracingmulticols\@ne}
+\DeclareOption{balancingshow}
+ {\c at tracingmulticols\tw@}
+\DeclareOption{markshow}
+ {\c at tracingmulticols\thr@@}
+\DeclareOption{debugshow}
+ {\c at tracingmulticols5\relax}
+\let\mc at gridwarn\maxdimen
+\DeclareOption{grid}{\def\mc at gridwarn{\maxdepth}}
+\DeclareOption{colaction}{%
+ \def\mc at col@status at write{%
+ \protected at write\@auxout{}%
+ {\string\mc at col@status
+ {\ifmc at firstcol 1\else 2\fi}}%
+ \mc at firstcolfalse}%
+ \def\mc at lastcol@status at write{%
+ \protected at write\@auxout{}%
+ {\string\mc at col@status{3}}}%
+}
+\let\mc at col@status at write\relax
+\let\mc at lastcol@status at write\relax
+\ProcessOptions
+\def\multicols#1{\col at number#1\relax
+ \ifnum\col at number<\tw@
+ \PackageWarning{multicol}%
+ {Using `\number\col at number'
+ columns doesn't seem a good idea.^^J
+ I therefore use two columns instead}%
+ \col at number\tw@ \fi
+ \ifnum\col at number>10
+ \PackageError{multicol}%
+ {Too many columns}%
+ {Current implementation doesn't
+ support more than 10 columns.%
+ \MessageBreak
+ I therefore use 10 columns instead}%
+ \col at number10 \fi
+ \ifx\@footnotetext\mult at footnotetext\else
+ \let\orig at footnotetext\@footnotetext
+ \let\@footnotetext\mult at footnotetext
+ \fi
+ \@ifnextchar[\mult at cols{\mult at cols[]}}
+\long\def\mult at footnotetext#1{\begingroup
+ \columnwidth\textwidth
+ \orig at footnotetext{#1}\endgroup}
+\def\mult at cols[#1]{\@ifnextchar[%
+ {\mult@@cols{#1}}%
+ {\mult@@cols{#1}[\premulticols]}}
+\def\mult@@cols#1[#2]{%
+ \par
+ \ifinner \@boxedmulticolstrue
+ \else
+ \ifnum \doublecol at number>\z@
+ \@boxedmulticolstrue
+ \fi
+ \fi
+ \mult at info\z@
+ {Starting environment with
+ \the\col at number\space columns%
+ \if at boxedmulticols\MessageBreak
+ (boxed mode)\fi
+ }%
+ \enough at room{#2}%
+ #1\par\addvspace\multicolsep
+ \ifdim \prevdepth = -\@m\p@
+ \else
+ \@tempcnta\prevdepth
+ \@tempcntb\baselineskip
+ \divide\@tempcnta\@tempcntb
+ \advance\@tempcnta\@ne
+ \dimen@\prevdepth
+ \advance\dimen@ -\@tempcnta\baselineskip
+ \advance\dimen@ \topskip
+ \kern-\dimen@
+ \fi
+ \begingroup
+ \prepare at multicols
+ \if at boxedmulticols
+ \setbox\mult at box\vbox\bgroup
+ \color at setgroup
+ \fi
+ \ignorespaces}
+\newif\if at boxedmulticols
+\@boxedmulticolsfalse
+\newbox\mult at box
+\def\enough at room#1{%
+ \if at boxedmulticols\else
+ \par
+ \bgroup\@nobreakfalse\addpenalty\z@\egroup
+ \page at free \pagegoal
+ \advance \page at free -\pagetotal
+ \@tempskipa#1\relax
+ \mult at info\z@
+ {Current page:\MessageBreak
+ height=%
+ \the\pagegoal: used \the\pagetotal
+ \space -> free=\the\page at free
+ \MessageBreak
+ needed \the\@tempskipa
+ \space(for #1)}%
+ \ifdim \page at free <#1\newpage \fi
+ \fi}
+\def\prepare at multicols{%
+ \multicol at leftmargin\@totalleftmargin
+ \@totalleftmargin\z@
+ \parshape\z@
+ \doublecol at number\col at number
+ \multiply\doublecol at number\tw@
+ \advance\doublecol at number\mult at rightbox
+ \if at boxedmulticols
+ \let\l at kept@firstmark\kept at firstmark
+ \let\l at kept@botmark\kept at botmark
+ \global\let\kept at firstmark\@empty
+ \global\let\kept at botmark\@empty
+ \else
+ \nointerlineskip {\topskip\z@\null}%
+ \output{%
+ \global\setbox\partial at page\vbox
+ {%
+ \ifvoid\partial at page\else
+ \PackageError{multicol}%
+ {Error saving partial page}%
+ {The part of the page before
+ the multicols environment was
+ nearly full with^^Jthe result
+ that starting the environment
+ will produce an overfull
+ page. Some^^Jtext may be lost!
+ Please increase \premulticols
+ either generally or for this%
+ ^^Jenvironment by specifying a
+ suitable value in the second
+ optional argument to^^Jthe
+ multicols environment.}
+ \unvbox\partial at page
+ \box\last at line
+ \fi
+ \unvbox\@cclv
+ \global\setbox\last at line\lastbox
+ }%
+ \prep at keptmarks
+ \global\let\kept at topmark\firstmark
+ }\eject
+ \advance\@colroom-\ht\partial at page
+ \set at mult@vsize\relax
+ \output{\multi at column@out}%
+ \init at mult@footins
+ \reinsert at footnotes
+ \def\clearpage{%
+ \ifx\@deferlist\@empty\else
+ \PackageError{multicol}%
+ {Deferred floats not cleared}%
+ {A \string\clearpage\space inside multicols acts like
+ \string\newpage\space and doesn't clear floats.\MessageBreak
+ Move it before the multicols environment if you need it.}%
+ \fi
+ \newpage}%
+ \fi
+ \vbadness\@Mi \hbadness5000
+ \tolerance\multicoltolerance
+ \pretolerance\multicolpretolerance
+ \setemergencystretch\col at number\hsize
+ \set at floatcmds
+ \advance\baselineskip\multicolbaselineskip
+ \hsize\linewidth \advance\hsize\columnsep
+ \advance\hsize-\col at number\columnsep
+ \divide\hsize\col at number
+ \full at width\linewidth
+ \linewidth\hsize
+ \columnwidth\hsize
+}
+\def\init at mult@footins{%
+ \multiply\count\footins\col at number
+ \multiply\skip \footins\col at number
+}
+\def\set at mult@vsize#1{%
+ \vsize\@colroom
+ \@tempdima\baselineskip
+ \advance\@tempdima-\topskip
+ \advance\vsize\@tempdima
+ \vsize\col at number\vsize
+ \advance\vsize-\@tempdima
+ \advance\vsize\col at number\baselineskip
+ #1\advance\vsize
+ \c at collectmore\baselineskip}
+\newdimen\multicol at leftmargin
+\def\endmulticols{\par
+ \if at boxedmulticols
+ \remove at discardable@items\color at endgroup\egroup
+ \balance at columns
+ \return at nonemptymark{first}%
+ \kept at firstmark
+ \return at nonemptymark{bot}%
+ \kept at botmark
+ \page at sofar
+ \global\let\kept at firstmark
+ \l at kept@firstmark
+ \global\let\kept at botmark
+ \l at kept@botmark
+ \mult at info\tw@
+ {Restore kept marks to\MessageBreak
+ first: \meaning\kept at firstmark
+ \MessageBreak bot\space\space:
+ \meaning\kept at botmark }%
+ \else
+ \ifdim\pagegoal=\maxdimen
+ \ifvoid\colbreak at box\else
+ \mult at info\@ne{Re-adding forced
+ break(s) for splitting}%
+ \unvbox\colbreak at box\fi
+ \fi
+ \penalty\z@
+ \output{\balance at columns@out}%
+ \eject
+ \ifvbox\partial at page
+ \unvbox\partial at page\fi
+ \global\let\kept at firstmark\@empty
+ \global\let\kept at botmark\@empty
+ \mult at info\tw@
+ {Make kept marks empty}%
+ \fi
+ \@checkend{multicols}%
+ \endgroup
+ \global\c at unbalance\z@
+ \if at boxedmulticols\else
+ \reinsert at footnotes
+ \ifdim \pagegoal=\maxdimen
+ \global\vsize\@colroom
+ \else
+ \enough at room\postmulticols
+ \fi
+ \fi
+ \addvspace\multicolsep
+ \prevdepth\z@
+ \mult at info\z@
+ {Ending environment
+ \if at boxedmulticols
+ \space(boxed mode)\fi
+ }}
+\newcount\c at unbalance
+\newcount\c at collectmore
+\newcount\doublecol at number
+\newcount\multicoltolerance
+\newcount\multicolpretolerance
+\newdimen\full at width
+\newdimen\page at free
+\newdimen\premulticols
+\newdimen\postmulticols
+\newskip\multicolsep
+\newskip\multicolbaselineskip
+\newbox\partial at page
+\newbox\last at line
+\c at unbalance = 0
+\c at collectmore = 0
+\multicoltolerance = 9999
+\multicolpretolerance = -1
+\premulticols = 50pt
+\postmulticols= 20pt
+\multicolsep = 12pt plus 4pt minus 3pt
+\multicolbaselineskip=0pt
+\def\process at cols#1#2{\count@#1\relax
+ \loop
+ #2%
+ \advance\count@\tw@
+ \ifnum\count@<\doublecol at number
+ \repeat}
+\def\page at sofar{%
+ \process at cols\mult at rightbox
+ {\ifvoid\count@
+ \setbox\count@\hbox to\hsize{}%
+ \else
+ \wd\count@\hsize
+ \fi}%
+ \count@\col at number \advance\count@\m at ne
+ \mult at info\z@
+ {Column spec: \the\full at width\space = indent
+ + columns + sep =\MessageBreak
+ \the\multicol at leftmargin\space
+ + \the\col at number\space
+ x \the\hsize\space
+ + \the\count@\space
+ x \the\columnsep
+ }%
+\ifvmode\else\errmessage{Multicol Error}\fi
+ \nointerlineskip
+ \setbox\z@\hbox{p}\global\dimen\tw@\dp\z@
+ \moveright\multicol at leftmargin
+ \hbox to\full at width{%
+ \mc at align@columns
+ \rlap{\phantom p}%
+ }%
+ \prevdepth\z@
+ \kern-\dimen\tw@
+ \ifdim\dimen\tw@ > \mc at gridwarn
+ \PackageWarning{multicol}%
+ {Very deep columns!\MessageBreak
+ Grid alignment might be broken}%
+ \fi
+}
+\def\columnseprulecolor{\normalcolor}
+\def\reinsert at footnotes{\ifvoid\footins\else
+ \insert\footins{}\fi}
+\def\vfilmaxdepth{\vskip \z@ \@plus .0001fil
+ \@minus \maxdepth}
+\def\multi at column@out{%
+ \ifnum\outputpenalty <-\@M
+ \speci at ls \else
+ \ifvoid\colbreak at box\else
+ \mult at info\@ne{Re-adding forced
+ break(s) for splitting}%
+ \setbox\@cclv\vbox{%
+ \unvbox\colbreak at box
+ \penalty-\@Mv
+ \unvbox\@cclv}%
+ \fi
+ \splittopskip\topskip
+ \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@
+ \shr at nkingtrue
+ \fi
+ \fi
+ \process at cols\mult at gfirstbox{%
+ \setbox\count@
+ \vsplit\@cclv to\dimen@
+ \set at keptmarks
+ \setbox\count@
+ \vbox to\dimen@
+ {\unvbox\count@
+ \ifshr at nking\vfilmaxdepth\fi}%
+ }%
+ \setbox\mult at rightbox
+ \vsplit\@cclv to\dimen@
+ \set at keptmarks
+ \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
+ \else
+ \penalty\outputpenalty
+ \fi
+ \ifvoid\footins\else
+ \PackageWarning{multicol}%
+ {I moved some lines to
+ the next page.\MessageBreak
+ Footnotes on page
+ \thepage\space might be wrong}%
+ \fi
+ \ifnum \c at tracingmulticols>\thr@@
+ \hrule\allowbreak \fi
+ \fi
+ \ifx\@empty\kept at firstmark
+ \let\firstmark\kept at topmark
+ \let\botmark\kept at topmark
+ \else
+ \let\firstmark\kept at firstmark
+ \let\botmark\kept at botmark
+ \fi
+ \let\topmark\kept at topmark
+ \mult at info\tw@
+ {Use kept top mark:\MessageBreak
+ \meaning\kept at topmark
+ \MessageBreak
+ Use kept first mark:\MessageBreak
+ \meaning\kept at firstmark
+ \MessageBreak
+ Use kept bot mark:\MessageBreak
+ \meaning\kept at botmark
+ \MessageBreak
+ Produce first mark:\MessageBreak
+ \meaning\firstmark
+ \MessageBreak
+ Produce bot mark:\MessageBreak
+ \meaning\botmark
+ \@gobbletwo}%
+ \boxmaxdepth\maxdimen
+ \setbox\@cclv\vbox{\unvbox\partial at page
+ \page at sofar}%
+ \@makecol\@outputpage
+ \global\let\kept at topmark\botmark
+ \global\let\kept at firstmark\@empty
+ \global\let\kept at botmark\@empty
+ \mult at info\tw@
+ {(Re)Init top mark:\MessageBreak
+ \meaning\kept at topmark
+ \@gobbletwo}%
+ \global\@colroom\@colht
+ \global \@mparbottom \z@
+ \global \@textfloatsheight \z@
+ \process at deferreds
+ \@whilesw\if at fcolmade\fi{\@outputpage
+ \global\@colroom\@colht
+ \process at deferreds}%
+ \mult at info\@ne
+ {Colroom:\MessageBreak
+ \the\@colht\space
+ after float space removed
+ = \the\@colroom \@gobble}%
+ \set at mult@vsize \global
+ \fi}
+\def\leave at mult@footins{%
+ \advance\dimen at -\skip\footins
+ \advance\dimen at -\ht\footins
+}
+\def\speci at ls{%
+ \ifnum\outputpenalty <-\@Mi
+ \ifnum \outputpenalty<-\@MM
+ \PackageError{multicol}{Document end
+ inside multicols environment}\@ehd
+ \@specialoutput
+ \else
+ \ifnum\outputpenalty = -\@Mv
+ \mult at info\@ne{Forced column
+ break seen}%
+ \global\advance\vsize-\pagetotal
+ \global\setbox\colbreak at box
+ \vbox{%
+ \ifvoid\colbreak at box
+ \else
+ \unvbox\colbreak at box
+ \penalty-\@Mv
+ \fi
+ \boxmaxdepth\maxdepth
+ \setbox\@cclv\vbox{%
+ \unvbox\@cclv
+ \remove at discardable@items}%
+ \dimen@\dp\@cclv
+ \unvbox\@cclv
+ \kern-\dimen@
+ }%
+ \reinsert at footnotes
+ \else
+ \PackageWarningNoLine{multicol}%
+ {Floats and marginpars not
+ allowed inside `multicols'
+ environment!}%
+ \unvbox\@cclv\reinsert at footnotes
+ \xdef\@freelist{\@freelist\@currlist}%
+ \gdef\@currlist{}%
+ \fi
+ \fi
+ \else \@doclearpage \fi
+}
+\def\process at deferreds{%
+ \@floatplacement
+ \@tryfcolumn\@deferlist
+ \if at fcolmade\else
+ \begingroup
+ \let\@tempb\@deferlist
+ \gdef\@deferlist{}%
+ \let\@elt\@scolelt
+ \@tempb \endgroup
+ \fi}
+\newif\ifshr at nking
+\def\raggedcolumns{%
+ \@bsphack\shr at nkingtrue\@esphack}
+\def\flushcolumns{%
+ \@bsphack\shr at nkingfalse\@esphack}
+\def\balance at columns@out{%
+ \setbox\mult at box\vbox{%
+ \ifvoid\colbreak at box\else
+ \unvbox\colbreak at box
+ \penalty-\@Mv
+ \mult at info\@ne{Re-adding
+ forced break(s) in balancing}%
+ \fi
+ \unvbox\@cclv
+ \remove at discardable@items
+ }%
+ \balance at columns
+ \iftoo at bad
+ \mult at info\@ne
+ {Balancing failed ...
+ cut a normal page}%
+ \setbox\@cclv\vbox
+ {\vskip\topskip
+ \vskip-\splittopskip
+ \unvbox\mult at box}%
+ \multi at column@out
+ \else
+ \global\vsize\@colroom
+ \global\advance\vsize\ht\partial at page
+ \ifvbox\@kludgeins\insert\@kludgeins
+ {\unvbox\@kludgeins}\fi
+ \unvbox\partial at page
+ \return at nonemptymark{first}\kept at firstmark
+ \return at nonemptymark{bot}\kept at botmark
+ \page at sofar
+ \penalty\z@
+ \fi
+}
+\def\balance at columns{%
+ \get at keptmarks\mult at box
+ \setbox\mult at box\vbox{%
+ \penalty-\@M
+ \unvbox\mult at box
+ }%
+ \@tempdima\topskip
+ \splittopskip\@tempdima
+ \@plus\multicolundershoot
+ \@minus\multicolovershoot
+ \splitmaxdepth\maxdepth
+ \boxmaxdepth\maxdepth
+ \setbox\@tempboxa\vsplit\mult at box to\z@
+ \@tempdima\ht\mult at box
+ \advance\@tempdima\dp\mult at box
+ \divide\@tempdima\col at number
+ \count@\@tempdima
+ \divide\count@\baselineskip
+ \dimen@\count@\baselineskip
+ \advance\dimen@\topskip
+ \ifdim \dimen@ >\@tempdima
+ \advance\dimen at -\baselineskip
+ \fi
+ \advance\dimen@\c at unbalance\baselineskip
+ \mult at info\@ne
+ {Balance columns\on at line:
+ \ifnum\c at unbalance=\z@\else
+ (off balance=\number\c at unbalance)\fi
+ \@gobbletwo}%
+ \ifnum\dimen@<\topskip
+ \mult at info\@ne
+ {Start value
+ \the\dimen@ \space ->
+ \the\topskip \space (corrected)}%
+ \dimen@\topskip
+ \fi
+ \vbadness\@M
+ \vfuzz \maxdimen
+ \last at try-\p@
+ \loop
+ {\process at cols\mult at grightbox
+ {\global\setbox\count@
+ \box\voidb at x}}%
+ \global\setbox\mult at grightbox
+ \copy\mult at box
+ \too at badfalse
+ \forcedbreak at leftoverfalse
+ {\process at cols\mult at firstbox{%
+ \global\setbox\count@
+ \vsplit\mult at grightbox to\dimen@
+ \global\setbox\count@
+ \vbox to\dimen@
+ {\unvbox\count@}%
+ \ifnum\c at tracingmulticols>\@ne
+ \@tempcnta\count@
+ \advance\@tempcnta-\mult at grightbox
+ \divide\@tempcnta \tw@
+ \message{^^JColumn
+ \number\@tempcnta\space
+ badness: \the\badness\space}%
+ \fi
+ \ifnum\badness>\c at columnbadness
+ \ifnum\c at tracingmulticols>\@ne
+ \message{too bad
+ (>\the\c at columnbadness)}%
+ \fi
+ \too at badtrue
+ \fi
+ }}%
+ \global\setbox\mult at grightbox
+ \vbox{\unvbox\mult at grightbox}%
+ \setbox\mult at nat@firstbox
+ \vbox{\unvcopy\mult at firstbox}%
+ \ifnum\c at tracingmulticols>\@ne
+ \message{^^JFirst column
+ = \the\dimen@\space
+ (\the\ht\mult at nat@firstbox)}\fi
+ \ifnum\c at tracingmulticols>\@ne
+ \message{<> last column =
+ \the\ht\mult at grightbox^^J}%
+ \fi
+ \ifdim\ht\mult at grightbox >\dimen@
+ \too at badtrue
+ \ifnum\c at tracingmulticols>\@ne
+ \typeout{Rejected: last
+ column too large!}%
+ \fi
+ \else
+ \setbox\@tempboxa
+ \copy\mult at grightbox
+ \setbox\z@\vsplit\@tempboxa to\maxdimen
+ \ifvoid\@tempboxa
+ \global\setbox\mult at grightbox
+ \vbox to\dimen@
+ {\unvbox\mult at grightbox}%
+ \ifnum\c at tracingmulticols>\@ne
+ \message{Final badness:
+ \the\badness}%
+ \fi
+ \ifnum\badness>\c at finalcolumnbadness
+ \global\setbox\mult at grightbox
+ \vbox to\dimen@
+ {\unvbox\mult at grightbox\vfil}%
+ \ifnum\c at tracingmulticols>\@ne
+ \message{ setting natural
+ (> \the\c at finalcolumnbadness)}%
+ \fi
+ \fi
+ \else
+ \@tempdima\@colroom
+ \advance\@tempdima \maxbalancingoverflow
+ \ifdim \dimen@ < \@tempdima
+ \too at badtrue
+ \ifnum\c at tracingmulticols>\@ne
+ \typeout{Rejected: unprocessed
+ forced break(s) in last column!}%
+ \fi
+ \else
+ \forcedbreak at leftovertrue
+ \ifnum\c at tracingmulticols>\@ne
+ \typeout{Failed: columns too large
+ with unprocessed forced break(s)!}%
+ \fi
+ \fi
+ \fi
+ \fi
+ \ifdim\ht\mult at nat@firstbox<\dimen@
+ \ifdim\ht\mult at nat@firstbox>\last at try
+ \too at badtrue
+ \ifnum\c at tracingmulticols>\@ne
+ \typeout{Retry: using natural
+ height of first column!}%
+ \fi
+ \dimen@\ht\mult at nat@firstbox
+ \last at try\dimen@
+ \advance\dimen at -\p@
+ \fi
+ \fi
+ \iftoo at bad
+ \advance\dimen@\p@
+ \repeat
+ \ifforcedbreak at leftover
+ \too at badtrue
+ \else
+ \if at boxedmulticols\else
+ \ifdim\dimen@>\@colroom
+ \dimen@\@colroom
+ \fi
+ \fi
+ \process at cols\mult at rightbox
+ {\@tempcnta\count@
+ \advance\@tempcnta\@ne
+ \vfuzz\z@
+ \setbox\count@\vbox to\dimen@
+ {%
+ \vskip \z@
+ \@plus-\multicolundershoot
+ \@minus-\multicolovershoot
+ \unvbox\@tempcnta
+ \ifshr at nking\vfilmaxdepth\fi
+ }%
+ \ifnum\badness>\@M
+ \vfuzz\maxdimen % no overfull warning
+ \setbox\@tempboxa \vbox to\dimen@
+ {\vskip-\maxbalancingoverflow
+ \unvcopy\count@}%
+ \ifnum\badness>\@M
+ \mult at info\@ne
+ {Balanced column more than
+ \the\maxbalancingoverflow\space
+ too large}%
+ \too at badtrue
+ \else
+ \mult at info\@ne
+ {Balanced column
+ too large, but less than
+ \the\maxbalancingoverflow}%
+ \fi
+ \fi
+ }%
+ \fi
+}
+\newdimen\maxbalancingoverflow
+\maxbalancingoverflow=12pt
+
+\newbox\mult at rightbox
+\newbox\mult at grightbox
+\newbox\mult at gfirstbox
+\newbox\mult at firstbox
+\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}
+ {\newdimen\emergencystretch}{}
+\def\setemergencystretch#1#2{%
+ \emergencystretch 4pt
+ \multiply\emergencystretch#1}
+
+\def\set at floatcmds{%
+ \let\@dblfloat\@dbflt
+ \def\end at dblfloat{\@endfloatbox
+ \@largefloatcheck
+ \outer at nobreak
+ \ifnum\@floatpenalty<\z@
+ \@cons\@deferlist\@currbox
+ \fi
+ \ifnum\@floatpenalty=-\@Mii
+ \@Esphack
+ \fi}}
+\def\kept at topmark{{}{}}
+\let\kept at firstmark\@empty
+\let\kept at botmark\@empty
+\def\return at nonemptymark#1#2{%
+ \ifx#2\@empty
+ \else
+ \mult at info\tw@
+ {Returned #1 mark:\MessageBreak
+ \meaning#2}%
+ \toks@\expandafter{#2}%
+ \mark{\the\toks@}%
+ \nobreak
+ \fi}
+\def\get at keptmarks#1{%
+ \begingroup
+ \vbadness\@M
+ \setbox#1\copy#1%
+ \setbox#1\vsplit#1to\maxdimen
+ \set at keptmarks
+ \endgroup
+}
+\def\set at keptmarks{%
+ \ifx\kept at firstmark\@empty
+ \expandafter\gdef\expandafter
+ \kept at firstmark
+ \expandafter{\splitfirstmark}%
+ \ifx\kept at firstmark\@empty\else
+ \mult at info\tw@
+ {Set kept first mark:\MessageBreak
+ \meaning\kept at firstmark%
+ \@gobbletwo}%
+ \fi
+ \fi
+ \expandafter\def\expandafter\@tempa
+ \expandafter{\splitbotmark}%
+ \ifx\@tempa\@empty\else
+ \global\let\kept at botmark\@tempa
+ \mult at info\tw@
+ {Set kept bot mark:\MessageBreak
+ \meaning\kept at botmark%
+ \@gobbletwo}%
+ \fi}%
+\def\prep at keptmarks{%
+ \if at boxedmulticols \else
+ \get at keptmarks\partial at page
+ \fi}
+\skip0=0pt
+\edef\the at zero@skip{\the\skip0}
+\def\remove at discardable@items{%
+ \unpenalty
+ \edef\@tempa{\the\lastskip}%
+ \unskip
+ \ifx\@tempa\the at zero@skip
+ \edef\@tempb{\the\lastskip}%
+ \ifx\@tempb\the at zero@skip
+ \else
+ \unskip
+ \ifnum \lastpenalty=\@M
+ \vskip\@tempb\vskip\@tempa\relax
+ \else
+ \remove at discardable@items
+ \fi
+ \fi
+ \else
+ \remove at discardable@items
+ \fi
+}
+\newif\iftoo at bad
+\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 columnbadness
+\c at columnbadness=10000
+\newcount\c at finalcolumnbadness
+\c at finalcolumnbadness=9999
+
+\newdimen\last at try
+
+\newdimen\multicolovershoot
+\newdimen\multicolundershoot
+\multicolovershoot=0pt
+\multicolundershoot=2pt
+\newbox\mult at nat@firstbox
+\def\mult at info#1#2{%
+ \ifnum\c at tracingmulticols>#1%
+ \GenericWarning
+ {(multicol)\@spaces\@spaces}%
+ {Package multicol: #2}%
+ \fi
+}
+ \@namedef{multicols*}{%
+ \ifinner
+ \PackageWarning{multicol}%
+ {multicols* inside a box does
+ not make sense.\MessageBreak
+ Going to balance anyway}%
+ \else
+ \let\balance at columns@out
+ \multi at column@out
+ \fi
+ \begin{multicols}
+}
+\@namedef{endmulticols*}{%
+ \par
+ \ifdim\lastskip>\z@ \vskip-\lastskip \fi
+ \ifdim \prevdepth>\z@
+ \vskip-\ifdim\prevdepth>\boxmaxdepth
+ \boxmaxdepth
+ \else \prevdepth \fi
+ \fi
+ \ifshr at nking\else
+ \vfil
+ \fi
+ \end{multicols}}
+\mathchardef\@Mv=10005
+\def\columnbreak{%
+ \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}
+\newbox\colbreak at box
+\def\LR at column@boxes{%
+ \process at cols\mult at gfirstbox{%
+ \ifdim\dp\count@>\dimen\tw@
+ \global\dimen\tw@\dp\count@ \fi
+ \mc at col@status at write
+ \box\count@
+ \hss{\columnseprulecolor\vrule
+ \@width\columnseprule}\hss}%
+ \ifdim\dp\mult at rightbox>\dimen\tw@
+ \global\dimen\tw@\dp\mult at rightbox \fi
+ \mc at lastcol@status at write
+ \box\mult at rightbox
+}
+
+\def\RL at column@boxes{%
+ \process at cols\mult at gfirstbox{%
+ \hskip\hsize
+ \hss{\columnseprulecolor\vrule
+ \@width\columnseprule}\hss
+ }%
+ \hskip\hsize
+ \process at cols\mult at gfirstbox{%
+ \ifdim\dp\count@>\dimen\tw@
+ \global\dimen\tw@\dp\count@ \fi
+ \hskip-\hsize
+ \mc at col@status at write
+ \box\count@
+ \hskip-\hsize
+ \hskip-\columnsep
+ }%
+ \ifdim\dp\mult at rightbox>\dimen\tw@
+ \global\dimen\tw@\dp\mult at rightbox \fi
+ \hskip-\hsize
+ \mc at lastcol@status at write
+ \box\mult at rightbox
+ \hskip-\hsize
+ \hskip\full at width
+ }
+\newcommand\RLmulticolcolumns
+ {\let\mc at align@columns
+ \RL at column@boxes}
+\newcommand\LRmulticolcolumns
+ {\let\mc at align@columns
+ \LR at column@boxes}
+\LRmulticolcolumns
+\newcount\mc at col@check at num
+
+\newcommand\docolaction[4][1]{%
+ \ifx\mc at col@status at write\relax
+ \PackageError{multicol}%
+ {Option 'colaction' not selected}%
+ {\string\docolaction\space
+ requires the use of the 'colaction'
+ option on the package}%
+ \fi
+ \global\advance\mc at col@check at num\@ne
+ \edef\mc at col@type{\expandafter\ifx
+ \csname mc at col-\the\mc at col@check at num
+ \endcsname\relax
+ 0\else
+ \csname mc at col-\the\mc at col@check at num
+ \endcsname
+ \fi}%
+ \ifcase \mc at col@type\relax
+ \ifcase #1\or #2\or#3\or#4\fi
+ \or
+ #2% % 1 First col
+ \or
+ #3% % 2 any middle col
+ \or
+ #4% % 3 last col
+ \else
+ \ERROR
+ \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
+}
+\def\mc at col@status#1{%
+ \gdef\mc at curr@col at status{#1}}
+\def\mc at set@col at status#1#2{%
+ \global\expandafter\let\csname #1\endcsname
+ \mc at curr@col at status}
+\AtEndDocument{\def\mc at set@col at status#1#2{%
+ \ifnum #2=\mc at curr@col at status\else
+ \@tempswatrue
+ \fi}%
+}
+\newif\ifmc at firstcol
+\mc at firstcoltrue
+\endinput
+%%
+%% End of file `multicol.sty'.
diff --git a/required/tools/multicol.dtx b/required/tools/multicol.dtx
index 71af767..f1d8b77 100644
--- a/required/tools/multicol.dtx
+++ b/required/tools/multicol.dtx
@@ -20,7 +20,7 @@
% \iffalse This is a METACOMMENT
%
%% Package `multicol' to use with LaTeX2e
-%% Copyright 1989-2016 Frank Mittelbach
+%% Copyright 1989-2018 Frank Mittelbach
%%
%% In addition to the terms of LPPL any distributed version
%% (unchanged or modified) of multicol has to keep the statement
@@ -86,12 +86,19 @@
%<*dtx>
\ProvidesFile{multicol.dtx}
%</dtx>
-%<package>\NeedsTeXFormat{LaTeX2e}[1997/12/01]
+%<package>\NeedsTeXFormat{LaTeX2e}[2018-04-01]
+%<package>
+%<package>\providecommand\DeclareRelease[3]{}
+%<package>\providecommand\DeclareCurrentRelease[2]{}
+%<package>
+%<package>\DeclareRelease{}{2017-04-11}{multicol-2017-04-11.sty}
+%<package>\DeclareCurrentRelease{}{2018-04-01}
+%<package>
%<package>\ProvidesPackage{multicol}
%<driver> \ProvidesFile{multicol.drv}
% \fi
% \ProvidesFile{multicol.dtx}
- [2018/01/28 v1.8r multicolumn formatting (FMi)]
+ [2018/04/01 v1.8r multicolumn formatting (FMi)]
%
%
%%
diff --git a/required/tools/multicol.ins b/required/tools/multicol.ins
index 51ccca8..ee295fe 100644
--- a/required/tools/multicol.ins
+++ b/required/tools/multicol.ins
@@ -3,7 +3,7 @@
%% driver files from the doc files in this package when run through
%% LaTeX or TeX.
%%
-%% Copyright 1993-2017
+%% Copyright 1993-2018
%% The LaTeX3 Project and any individual authors listed elsewhere
%% in this file.
%%
More information about the latex3-commits
mailing list