%%
%% 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 https://latex-project.org/bugs/
%% (but please observe conditions on bug reports sent to that address!)
%% 
%% Copyright (C) 1993-2024
%% The LaTeX 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
%%    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-2023 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 LaTeX fund
%% (see ltx3info.txt in the base LaTeX distribution) or to the author of
%% the program who can be contacted at
%%
%%     Frank.Mittelbach@latex-project.org
%%

\DeclareRelease{}{1994-06-01}{multicol-2017-04-11.sty}
\DeclareRelease{}{2017-04-11}{multicol-2017-04-11.sty}
\DeclareRelease{v1.8}{2019-10-01}{multicol-2019-10-01.sty}
\DeclareCurrentRelease{}{2021-11-15}

\ProvidesPackage{multicol}
          [2024/05/23 v1.9h  multicolumn formatting (FMi)]
\DeclareOption{twocolumn}
   {\PackageWarning{multicol}{May not work
             with the twocolumn option}}
\newcount\c@tracingmulticols
\DeclareOption{errorshow}
    {\c@tracingmulticols\z@}
\DeclareOption{infoshow}
    {\c@tracingmulticols\@ne}
\DeclareOption{balancingshow}
    {\c@tracingmulticols\tw@}
\DeclareOption{markshow}
    {\c@tracingmulticols\thr@@}
\DeclareOption{debugshow}
    {\c@tracingmulticols5\relax}
\let\mc@gridwarn\maxdimen
\DeclareOption{grid}
    {\def\mc@gridwarn{\@maxdepth}}
\DeclareOption{colaction}{%
  \def\mc@col@status@write{%
         \protected@write\@auxout{}%
              {\string\mc@col@status
              {\ifmc@firstcol 1\else 2\fi}}%
         \mc@firstcolfalse}%
  \def\mc@lastcol@status@write{%
         \protected@write\@auxout{}%
              {\string\mc@col@status{3}}}%
}
\let\mc@col@status@write\relax
\let\mc@lastcol@status@write\relax
\ProcessOptions
\def\multicols#1{\col@number#1\relax
  \ifnum\col@number<\tw@
     \PackageWarning{multicol}%
      {Using `\number\col@number'
       columns doesn't seem a good idea.^^J
       I therefore use two columns instead}%
     \col@number\tw@ \fi
  \ifnum\col@number>20
     \PackageError{multicol}%
      {Too many columns}%
      {Current implementation doesn't
       support more than 20 columns.%
       \MessageBreak
       I therefore use 20 columns instead}%
     \col@number20 \fi
     \ifx\@footnotetext\mult@footnotetext
     \else
       \let\orig@footnotetext\@footnotetext
       \let\@footnotetext\mult@footnotetext
     \fi
  \@ifnextchar[\mult@cols{\mult@cols[]}}
\long\def\mult@footnotetext#1{\begingroup
         \columnwidth\textwidth
         \orig@footnotetext{#1}\endgroup}
\def\mult@cols[#1]{\@ifnextchar[%
  {\mult@@cols{#1}}%
  {\mult@@cols{#1}[\premulticols]}}
\def\mult@@cols#1[#2]{%
  \par
  \ifinner \@boxedmulticolstrue
  \else
    \ifnum \doublecol@number>\z@
       \@boxedmulticolstrue
    \fi
  \fi
  \mult@info\z@
      {Starting environment with
       \the\col@number\space columns%
        \if@boxedmulticols\MessageBreak
           (boxed mode)\fi
      }%
   \enough@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@multicols
     \if@boxedmulticols
       \setbox\mult@box\vbox\bgroup
                            \color@setgroup
     \fi
     \ignorespaces}
\newif\if@boxedmulticols
\@boxedmulticolsfalse
\newbox\mult@box
\def\enough@room#1{%
   \if@boxedmulticols\else
   \par
   \bgroup\@nobreakfalse\addpenalty\z@\egroup
   \page@free \pagegoal
   \advance \page@free -\pagetotal
     \@tempskipa#1\relax
   \mult@info\z@
       {Current page:\MessageBreak
        height=%
        \the\pagegoal: used \the\pagetotal
        \space -> free=\the\page@free
        \MessageBreak
        needed \the\@tempskipa
              \space(for #1)}%
   \ifdim \page@free <#1\newpage \fi
  \fi}
\def\prepare@multicols{%
  \multicol@leftmargin\@totalleftmargin
  \@totalleftmargin\z@
  \parshape\z@
  \doublecol@number\col@number
  \multiply\doublecol@number\tw@
  \advance\doublecol@number\mult@rightbox
  \if@boxedmulticols
    \let\l@kept@firstmark\kept@firstmark
    \let\l@kept@botmark\kept@botmark
    \global\let\kept@firstmark\@empty
    \global\let\kept@botmark\@empty
  \else
    \nointerlineskip {\topskip\z@\null}%
    \output{%
      \global\setbox\partial@page\vbox
        {%
         \ifvoid\partial@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@page
           \box\last@line
         \fi
         \unvbox\@cclv
         \global\setbox\last@line\lastbox
        }%
           \prep@keptmarks
           \global\let\kept@topmark\firstmark
          }\eject
    \advance\@colroom-\ht\partial@page
    \set@mult@vsize\relax
    \output{\multi@column@out}%
    \init@mult@footins
    \reinsert@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@number\hsize
  \set@floatcmds
  \advance\baselineskip\multicolbaselineskip
  \hsize\linewidth \advance\hsize\columnsep
  \advance\hsize-\col@number\columnsep
  \divide\hsize\col@number
  \full@width\linewidth
  \linewidth\hsize
  \columnwidth\hsize
}
\def\init@mult@footins{%
    \multiply\count\footins\col@number
    \multiply\skip \footins\col@number
}
\def\set@mult@vsize#1{%
    \vsize\@colroom
    \@tempdima\baselineskip
    \advance\@tempdima-\topskip
    \advance\vsize\@tempdima
    \vsize\col@number\vsize
    \advance\vsize-\@tempdima
    \advance\vsize\col@number\baselineskip
    #1\advance\vsize
        \c@collectmore\baselineskip}
\newdimen\multicol@leftmargin
\mathchardef\@Mvi=10006  % 10005 is
                         % \columnbreak
\def\endmulticols{\par
  \if@boxedmulticols
    \remove@discardable@items
    \color@endgroup\egroup
    \balance@columns
    \return@nonemptymark{first}%
                 \kept@firstmark
    \return@nonemptymark{bot}%
                  \kept@botmark
    \global\setbox\mc@boxedresult\vbox{%
      \page@sofar
      \global\let\kept@firstmark
                 \l@kept@firstmark
      \global\let\kept@botmark
                 \l@kept@botmark
    }%
    \mult@info\tw@
      {Restore kept marks to\MessageBreak
       first: \meaning\kept@firstmark
       \MessageBreak bot\space\space:
              \meaning\kept@botmark }%
  \else
    \ifdim\pagegoal=\maxdimen
      \ifvoid\colbreak@box\else
        \mult@info\@ne{Re-adding forced
                 break(s) for splitting}%
        \unvbox\colbreak@box\fi
    \fi
    \penalty\z@
    \penalty-\@Mvi
    \ifvbox\partial@page
         \unvbox\partial@page\fi
     \global\let\kept@firstmark\@empty
     \global\let\kept@botmark\@empty
     \mult@info\tw@
       {Make kept marks empty}%
  \fi
  \@checkend{multicols}%
  \endgroup
  \global\c@unbalance\z@
  \if@boxedmulticols
    \unvbox\mc@boxedresult
    \mc@col@status@write
  \else
    \reinsert@footnotes
    \ifdim \pagegoal=\maxdimen
      \global\vsize\@colroom
    \else
      \enough@room\postmulticols
    \fi
  \fi
  \addvspace\multicolsep
 \prevdepth\z@
  \mult@info\z@
     {Ending environment
             \if@boxedmulticols
                \space(boxed mode)\fi
              }}
\newcount\c@unbalance
\newcount\c@collectmore
\newcount\doublecol@number
\newcount\multicoltolerance
\newcount\multicolpretolerance
\newdimen\full@width
\newdimen\page@free
\newdimen\premulticols
\newdimen\postmulticols
\newskip\multicolsep
\newskip\multicolbaselineskip
\newbox\partial@page
\newbox\last@line
\newbox\mc@boxedresult
\c@unbalance   = 0
\c@collectmore = 0
\multicoltolerance = 9999
\multicolpretolerance = -1
\premulticols = 50pt
\postmulticols= 20pt
\multicolsep = 12pt plus 4pt minus 3pt
\multicolbaselineskip=0pt
\def\process@cols#1#2{\count@#1\relax
     \loop
      #2%
     \advance\count@\tw@
     \ifnum\count@<\doublecol@number
   \repeat}
\def\page@sofar{%
   \process@cols\mult@rightbox
       {\ifvoid\count@
          \setbox\count@\hbox to\hsize{}%
        \else
          \wd\count@\hsize
        \fi}%
   \count@\col@number \advance\count@\m@ne
   \mult@info\z@
    {Column spec: \the\full@width\space = indent
                  + columns + sep =\MessageBreak
        \the\multicol@leftmargin\space
        + \the\col@number\space
        x \the\hsize\space
        + \the\count@\space
        x \the\columnsep
     }%
\ifvmode\else\errmessage{Multicol Error}\fi
   \nointerlineskip
   \setbox\z@\hbox{\multicolmindepthstring}\global\dimen\tw@\dp\z@
   \moveright\multicol@leftmargin
    \hbox to\full@width{%
       \mc@align@columns
       \rlap{\phantom \multicolmindepthstring}%
    }%
   \prevdepth\z@
 \kern-\dimen\tw@
 \ifdim\dimen\tw@ > \mc@gridwarn
   \PackageWarning{multicol}%
     {Very deep columns!\MessageBreak
      Grid alignment might be broken}%
 \fi
}
\def\multicolmindepthstring{p}
\def\columnseprulecolor{\normalcolor}
\def\reinsert@footnotes{\ifvoid\footins\else
         \insert\footins{}\fi}
\def\vfilmaxdepth{\vskip \z@ \@plus .0001fil
                         \@minus \@maxdepth}
\def\multi@column@out{%
   \ifnum\outputpenalty <-\@M
    \speci@ls \else
    \ifvoid\colbreak@box\else
      \mult@info\@ne{Re-adding forced
                break(s) for splitting}%
      \setbox\@cclv\vbox{%
       \unvbox\colbreak@box
       \penalty-\@Mv
       \unvbox\@cclv}%
    \fi
   \splittopskip\topskip
   \splitmaxdepth\@maxdepth
   \boxmaxdepth\@maxdepth
   \dimen@\@colroom
   \divide\skip\footins\col@number
   \ifvoid\footins \else
      \leave@mult@footins
   \fi
   \ifvbox \@kludgeins
     \advance \dimen@ -\ht\@kludgeins
     \ifdim \wd\@kludgeins>\z@
        \shr@nkingtrue
     \fi
   \fi
   \process@cols\mult@firstbox{%
        \setbox\count@
            \vsplit\@cclv to\dimen@
            \set@keptmarks
            \setbox\count@
                 \vbox to\dimen@
                  {\unvbox\count@
                   \ifshr@nking
                    \vfilmaxdepth\fi}%
           }%
   \setbox\mult@rightbox
       \vsplit\@cclv to\dimen@
   \set@keptmarks
   \setbox\mult@rightbox\vbox to\dimen@
          {\unvbox\mult@rightbox
           \ifshr@nking\vfilmaxdepth\fi}%
   \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@tracingmulticols>\thr@@
                    \hrule\allowbreak \fi
   \fi
   \ifx\@empty\kept@firstmark
      \let\firstmark\kept@topmark
      \let\botmark\kept@topmark
   \else
      \let\firstmark\kept@firstmark
      \let\botmark\kept@botmark
   \fi
   \let\topmark\kept@topmark
   \mult@info\tw@
        {Use kept top mark:\MessageBreak
          \meaning\kept@topmark
         \MessageBreak
         Use kept first mark:\MessageBreak
          \meaning\kept@firstmark
        \MessageBreak
         Use kept bot mark:\MessageBreak
          \meaning\kept@botmark
        \MessageBreak
         Produce first mark:\MessageBreak
          \meaning\firstmark
        \MessageBreak
        Produce bot mark:\MessageBreak
          \meaning\botmark
         \@gobbletwo}%
   \boxmaxdepth\maxdimen
   \setbox\@cclv\vbox{\unvbox\partial@page
                      \page@sofar}%
   \@makecol\@outputpage
     \global\let\kept@topmark\botmark
     \global\let\kept@firstmark\@empty
     \global\let\kept@botmark\@empty
     \mult@info\tw@
        {(Re)Init top mark:\MessageBreak
         \meaning\kept@topmark
         \@gobbletwo}%
   \global\@colroom\@colht
   \global \@mparbottom \z@
   \global \@textfloatsheight \z@
   \process@deferreds
   \@whilesw\if@fcolmade\fi{\@outputpage
      \global\@colroom\@colht
      \process@deferreds}%
   \mult@info\@ne
     {Colroom:\MessageBreak
      \the\@colht\space
              after float space removed
              = \the\@colroom \@gobble}%
    \set@mult@vsize \global
  \fi}
\def\leave@mult@footins{%
   \advance\dimen@-\skip\footins
   \advance\dimen@-\ht\footins
}
\def\speci@ls{%
 \ifnum\outputpenalty <-\@Mi
  \ifnum \outputpenalty<-\@MM
   \PackageError{multicol}{Document end
           inside multicols environment}\@ehd
   \@specialoutput
  \else
     \ifnum\outputpenalty = -\@Mv
         \mult@info\@ne{Forced column
                        break seen}%
         \global\advance\vsize-\pagetotal
         \global\setbox\colbreak@box
           \vbox{%
              \ifvoid\colbreak@box
              \else
                \unvbox\colbreak@box
                \penalty-\@Mv
              \fi
              \boxmaxdepth\@maxdepth
              \setbox\@cclv\vbox{%
                 \unvbox\@cclv
                 \remove@discardable@items}%
              \dimen@\dp\@cclv
              \unvbox\@cclv
              \kern-\dimen@
         }%
         \reinsert@footnotes
     \else
       \ifnum\outputpenalty = -\@Mvi
         \mult@info\@ne{End penalty of
                        multicols seen}%
         \outputpenalty\@M % pretend we had
                           % a natural
                           % forced break
         \balance@columns@out
       \else
        \PackageWarningNoLine{multicol}%
           {Floats and marginpars not
            allowed inside `multicols'
            environment!}%
        \unvbox\@cclv\reinsert@footnotes
        \xdef\@freelist{\@freelist
                        \@currlist}%
        \gdef\@currlist{}%
      \fi
    \fi
  \fi
 \else \@doclearpage \fi
}
\def\process@deferreds{%
   \@floatplacement
   \@tryfcolumn\@deferlist
   \if@fcolmade\else
     \begingroup
    \let\@tempb\@deferlist
      \gdef\@deferlist{}%
      \let\@elt\@scolelt
        \@tempb \endgroup
   \fi}
\newif\ifshr@nking
\def\raggedcolumns{%
   \@bsphack\shr@nkingtrue\@esphack}
\def\flushcolumns{%
   \@bsphack\shr@nkingfalse\@esphack}
\def\balance@columns@out{%
   \setbox\mult@box\vbox{%
       \ifvoid\colbreak@box\else
         \unvbox\colbreak@box
         \penalty-\@Mv
         \mult@info\@ne{Re-adding
           forced break(s) in balancing}%
       \fi
       \unvbox\@cclv
       \remove@discardable@items
   }%
   \balance@columns
   \iftoo@bad
     \mult@info\@ne
        {Balancing failed ...
         cut a normal page}%
     \setbox\@cclv\vbox
         {\vskip\topskip
          \vskip-\splittopskip
          \unvbox\mult@box
          \penalty-\@Mvi
         }%
     \multi@column@out
   \else
     \global\vsize\@colroom
     \global\advance\vsize\ht\partial@page
     \ifvbox\@kludgeins
        \insert\@kludgeins
               {\unvbox\@kludgeins}\fi
     \unvbox\partial@page
     \return@nonemptymark{first}%
                         \kept@firstmark
     \return@nonemptymark{bot}\kept@botmark
     \page@sofar
     \penalty\z@
  \fi
}
\def\balance@columns{%
   \get@keptmarks\mult@box
   \setbox\mult@box\vbox{%
        \penalty-\@M
        \unvbox\mult@box
        }%
   \@tempdima\topskip
   \splittopskip\@tempdima
       \@plus\multicolundershoot
       \@minus\multicolovershoot
   \splitmaxdepth\@maxdepth
   \boxmaxdepth\@maxdepth
   \setbox\@tempboxa\vsplit\mult@box to\z@
   \@tempdima\ht\mult@box
   \advance\@tempdima\dp\mult@box
   \divide\@tempdima\col@number
   \count@\@tempdima
   \divide\count@\baselineskip
   \dimen@\count@\baselineskip
   \advance\dimen@\topskip
   \ifdim \dimen@ >\@tempdima
     \advance\dimen@-\baselineskip
   \fi
   \@tempdima\dimexpr
      \topskip +\c@minrows\baselineskip
               -\baselineskip\relax
   \ifnum\dimen@<\@tempdima
     \mult@info\@ne
       {Start value
          \the\dimen@  \space ->
          \the\@tempdima \space
          (corrected for minrows)}%
     \dimen@\@tempdima
   \fi
   \advance\dimen@\c@unbalance\baselineskip
   \mult@info\@ne
      {Balance columns\on@line:
        \ifnum\c@unbalance=\z@\else
       (off balance=\number\c@unbalance)\fi
      \@gobbletwo}%
   \ifnum\dimen@<\topskip
     \mult@info\@ne
       {Start value
          \the\dimen@  \space ->
          \the\topskip \space (corrected)}%
     \dimen@\topskip
   \fi
   \vbadness\@M
   \vfuzz \maxdimen
   \last@try-\p@
   \loop
    {\process@cols\mult@grightbox
           {\global\setbox\count@
                   \box\voidb@x}}%
    \global\setbox\mult@grightbox
           \copy\mult@box
   \too@badfalse
   \forcedbreak@leftoverfalse
   {\process@cols\mult@gfirstbox{%
         \global\setbox\count@
         \vsplit\mult@grightbox to\dimen@
         \global\setbox\count@
                 \vbox to\dimen@
                  {\unvbox\count@}%
         \ifnum\c@tracingmulticols>\@ne
           \@tempcnta\count@
           \advance\@tempcnta-\mult@grightbox
           \divide\@tempcnta \tw@
           \message{^^JColumn
              \number\@tempcnta\space
               badness: \the\badness\space}%
         \fi
         \ifnum\badness>\c@columnbadness
           \ifnum\c@tracingmulticols>\@ne
             \message{too bad
                  (>\the\c@columnbadness)}%
           \fi
           \too@badtrue
         \fi
                        }}%
   \global\setbox\mult@grightbox
      \vbox{\unvbox\mult@grightbox}%
   \setbox\mult@nat@firstbox
      \vbox{\unvcopy\mult@gfirstbox}%
    \ifnum\c@tracingmulticols>\@ne
       \message{^^JFirst column
           = \the\dimen@\space
           (\the\ht\mult@nat@firstbox)}\fi
    \ifnum\c@tracingmulticols>\@ne
      \message{<> last column =
               \the\ht\mult@grightbox^^J}%
     \fi
    \ifdim\ht\mult@grightbox >\dimen@
      \too@badtrue
      \ifnum\c@tracingmulticols>\@ne
         \typeout{Rejected: last
                 column too large!}%
      \fi
    \else
      \setbox\@tempboxa
           \copy\mult@grightbox
      \setbox\z@\vsplit\@tempboxa to\maxdimen
      \ifvoid\@tempboxa
        \global\setbox\mult@grightbox
           \vbox to\dimen@
              {\unvbox\mult@grightbox}%
        \ifnum\c@tracingmulticols>\@ne
          \message{Final badness:
                   \the\badness}%
        \fi
        \ifnum\badness>\c@finalcolumnbadness
          \global\setbox\mult@grightbox
           \vbox to\dimen@
              {\unvbox\mult@grightbox\vfil}%
           \ifnum\c@tracingmulticols>\@ne
             \message{ setting natural
              (> \the\c@finalcolumnbadness)}%
           \fi
        \fi
      \else
       \@tempdima\@colroom
       \advance\@tempdima \maxbalancingoverflow
       \ifdim \dimen@ < \@tempdima
        \too@badtrue
         \ifnum\c@tracingmulticols>\@ne
           \typeout{Rejected: unprocessed
             forced break(s) in last column!}%
         \fi
       \else
         \forcedbreak@leftovertrue
         \ifnum\c@tracingmulticols>\@ne
          \typeout{Failed: columns too large
            with unprocessed forced break(s)!}%
         \fi
       \fi
      \fi
    \fi
    \ifdim\ht\mult@nat@firstbox<\dimen@
      \ifdim\ht\mult@nat@firstbox>\last@try
        \too@badtrue
        \ifnum\c@tracingmulticols>\@ne
           \typeout{Retry: using natural
                    height of first column!}%
        \fi
        \dimen@\ht\mult@nat@firstbox
        \last@try\dimen@
        \advance\dimen@-\p@
      \fi
    \fi
    \iftoo@bad
      \advance\dimen@\p@
    \repeat
    \ifforcedbreak@leftover
       \too@badtrue
    \else
     \if@boxedmulticols\else
       \ifdim\dimen@>\@colroom
         \dimen@\@colroom
       \fi
     \fi
     \process@cols\mult@rightbox
         {\@tempcnta\count@
          \advance\@tempcnta\@ne
          \vfuzz\z@
          \setbox\count@\vbox to\dimen@
             {%
              \vskip \z@
                \@plus-\multicolundershoot
                \@minus-\multicolovershoot
              \unvbox\@tempcnta
              \ifshr@nking\vfilmaxdepth\fi
             }%
          \ifnum\badness>\@M
            \vfuzz\maxdimen % no overfull warning
            \setbox\@tempboxa \vbox to\dimen@
                 {\vskip-\maxbalancingoverflow
                  \unvcopy\count@}%
            \ifnum\badness>\@M
              \mult@info\@ne
                {Balanced column more than
                  \the\maxbalancingoverflow\space
                  too large}%
              \too@badtrue
            \else
              \mult@info\@ne
                {Balanced column
                 too large, but less than
                 \the\maxbalancingoverflow}%
            \fi
          \fi
         }%
   \fi
}
\newdimen\maxbalancingoverflow
\maxbalancingoverflow=12pt

\ifnum\numexpr
        \count20-\count14-1<40
        % this is = 2 * 20
  \count14=\@cclv
\fi
\newbox\mult@rightbox
\newbox\mult@grightbox
\newbox\mult@firstbox
\newbox\mult@gfirstbox
\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\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@floatcmds{%
 \let\@dblfloat\@dbflt
 \def\end@dblfloat{\@endfloatbox
   \@largefloatcheck
   \outer@nobreak
   \ifnum\@floatpenalty<\z@
     \@cons\@deferlist\@currbox
   \fi
   \ifnum\@floatpenalty=-\@Mii
     \@Esphack
   \fi}}
\def\kept@topmark{{}{}}
\let\kept@firstmark\@empty
\let\kept@botmark\@empty
\def\return@nonemptymark#1#2{%
  \ifx#2\@empty
  \else
    \mult@info\tw@
      {Returned #1 mark:\MessageBreak
       \meaning#2}%
    \toks@\expandafter{#2}%
    \mark{\the\toks@}%
    \nobreak
  \fi}
\def\get@keptmarks#1{%
  \begingroup
   \vbadness\@M
   \setbox#1\copy#1%
   \mc@get@all@box@marks #1%
   \set@keptmarks
 \endgroup
}
\def\mc@get@all@box@marks #1{%
  \setbox\@tempboxa\vsplit#1to\maxdimen
  \ifvoid#1\else
    \setbox#1\vbox{\unvbox\@tempboxa \unvbox#1}%
    \mc@get@all@box@marks #1%
  \fi
}
\def\set@keptmarks{%
   \ifx\kept@firstmark\@empty
     \expandafter\gdef\expandafter
        \kept@firstmark
        \expandafter{\splitfirstmark}%
     \ifx\kept@firstmark\@empty\else
       \mult@info\tw@
         {Set kept first mark:\MessageBreak
          \meaning\kept@firstmark%
          \@gobbletwo}%
     \fi
   \fi
   \expandafter\def\expandafter\@tempa
      \expandafter{\splitbotmark}%
   \ifx\@tempa\@empty\else
      \global\let\kept@botmark\@tempa
      \mult@info\tw@
        {Set kept bot mark:\MessageBreak
         \meaning\kept@botmark%
         \@gobbletwo}%
   \fi}%
\def\prep@keptmarks{%
   \if@boxedmulticols \else
     \get@keptmarks\partial@page
   \fi}
\skip0=0pt
\edef\the@zero@skip{\the\skip0}
\def\remove@discardable@items{%
     \unpenalty
     \edef\@tempa{\the\lastskip}%
     \unskip
     \ifx\@tempa\the@zero@skip
       \edef\@tempb{\the\lastskip}%
       \ifx\@tempb\the@zero@skip
       \else
         \unskip
         \ifnum \lastpenalty=\@M
           \vskip\@tempb\vskip\@tempa\relax
         \else
           \remove@discardable@items
         \fi
       \fi
     \else
       \remove@discardable@items
     \fi
}
\newif\iftoo@bad
\def\too@badtrue{\global\let\iftoo@bad\iftrue}
\def\too@badfalse{\global\let\iftoo@bad\iffalse}
\newif\ifforcedbreak@leftover
\newcount\c@minrows
\c@minrows=1
\newcount\c@columnbadness
\c@columnbadness=10000
\newcount\c@finalcolumnbadness
\c@finalcolumnbadness=9999

\newdimen\last@try

\newdimen\multicolovershoot
\newdimen\multicolundershoot
\multicolovershoot=0pt
\multicolundershoot=2pt
\newbox\mult@nat@firstbox
\def\mult@info#1#2{%
  \ifnum\c@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
     \def\balance@columns@out
         {\multi@column@out \penalty-\@Mvi }%
   \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@nking\else
     \vfil
   \fi
   \end{multicols}}
\mathchardef\@Mv=10005
\newcommand\columnbreak[1][4]{%
   \ifnum\col@number<\tw@
   \PackageError{multicol}%
    {\noexpand\columnbreak outside multicols}%
    {This command can only be used within
     a multicols or multicols* environment.}%
    \else
    \edef\mc@break@pen
{-\ifcase#1\@m\or 3333\or 6666\or 9999\else\@Mv\fi\relax}%
    \ifvmode
     \penalty \mc@break@pen
   \else
     \@bsphack
     \vadjust{\penalty \mc@break@pen}%
     \@esphack
   \fi
  \fi}
\newcommand\newcolumn{%
   \ifnum\col@number<\tw@
   \PackageError{multicol}%
    {\noexpand\newcolumn outside multicols}%
    {This command can only be used within
     a multicols or multicols* environment.}%
  \else
    \ifvmode
     \nobreak\vfill\kern\z@\penalty -\@Mv\relax
   \else
     \@bsphack
     \vadjust{\nobreak\vfill\kern\z@\penalty -\@Mv\relax}%
     \@esphack
   \fi
  \fi}
\newbox\colbreak@box
\def\LR@column@boxes{%
     \process@cols\mult@firstbox{%
       \ifdim\dp\count@>\dimen\tw@
         \global\dimen\tw@\dp\count@ \fi
       \mc@col@status@write
       \box\count@
       \hss{\columnseprulecolor\vrule
              \@width\columnseprule}\hss}%
     \ifdim\dp\mult@rightbox>\dimen\tw@
       \global\dimen\tw@\dp\mult@rightbox \fi
     \mc@lastcol@status@write
     \box\mult@rightbox
}

\def\RL@column@boxes{%
     \process@cols\mult@firstbox{%
       \hskip\hsize
       \hss{\columnseprulecolor\vrule
              \@width\columnseprule}\hss
     }%
     \hskip\hsize
     \process@cols\mult@firstbox{%
       \ifdim\dp\count@>\dimen\tw@
         \global\dimen\tw@\dp\count@ \fi
       \hskip-\hsize
       \mc@col@status@write
       \box\count@
       \hskip-\hsize
       \hskip-\columnsep
     }%
     \ifdim\dp\mult@rightbox>\dimen\tw@
       \global\dimen\tw@\dp\mult@rightbox \fi
     \hskip-\hsize
     \mc@lastcol@status@write
     \box\mult@rightbox
     \hskip-\hsize
     \hskip\full@width
 }
\newcommand\RLmulticolcolumns
    {\let\mc@align@columns
         \RL@column@boxes}
\newcommand\LRmulticolcolumns
    {\let\mc@align@columns
      \LR@column@boxes}
\LRmulticolcolumns
\newcount\mc@col@check@num

\newcommand\docolaction{%
 \ifx\mc@col@status@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@col@check@num\@ne
 \edef\mc@col@type{\expandafter\ifx
   \csname mc@col-\the\mc@col@check@num
   \endcsname\relax
                   0\else
   \csname mc@col-\the\mc@col@check@num
   \endcsname
   \fi}%
 \@ifstar
   {\@docolactionstartrue \@docolaction}%
   {\@docolactionstarfalse\@docolaction}%
}
\newcommand\@docolaction[4][1]{%
 \edef\@docolactioncheck{\write\@auxout
   {\string\mc@set@col@status
     {mc@col-\the\mc@col@check@num}%
     {\mc@col@type}}}%
 \if@docolactionstar \@docolactioncheck \fi
 \ifcase \mc@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
    \ERRORwrongdefaultgiven
  \fi
 \if@docolactionstar \else \@docolactioncheck \fi
}
\newif\if@docolactionstar
\def\mc@col@status#1{%
    \gdef\mc@curr@col@status{#1}}
\def\mc@set@col@status#1#2{%
  \global\expandafter\let\csname #1\endcsname
                         \mc@curr@col@status}
\AtEndDocument{\def\mc@set@col@status#1#2{%
     \ifnum #2=\mc@curr@col@status\else
       \@tempswatrue
     \fi}%
}
\newif\ifmc@firstcol
\mc@firstcoltrue
\endinput
%%
%% End of file `multicol.sty'.