% \iffalse
%%File: nidanfloat.dtx
%
% Copyright 1994 ASCII Co.
%
% \fi
% \CheckSum{1666}
%% \CharacterTable
%%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%%   Digits        \0\1\2\3\4\5\6\7\8\9
%%   Exclamation   \!     Double quote  \"     Hash (number) \#
%%   Dollar        \$     Percent       \%     Ampersand     \&
%%   Acute accent  \'     Left paren    \(     Right paren   \)
%%   Asterisk      \*     Plus          \+     Comma         \,
%%   Minus         \-     Point         \.     Solidus       \/
%%   Colon         \:     Semicolon     \;     Less than     \<
%%   Equals        \=     Greater than  \>     Question mark \?
%%   Commercial at \@     Left bracket  \[     Backslash     \\
%%   Right bracket \]     Circumflex    \^     Underscore    \_
%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%%   Right brace   \}     Tilde         \~}
%%
%
% \setcounter{StandardModuleDepth}{1}
%
% \StopEventually{}
%
% \iffalse
% \changes{v1.10}{1994/04/07}{platex2.09$BMQ(B}
% \changes{v2.2}{1997/10/22}{platex2e$BMQ$K=$@5(B}
% \changes{v2.3}{2000/12/20}{$B0lCJH4$-$N%U%m!<%H$r:.$<$k$H%(%i!<$K(B
%    $B$J$k$N$r=$@5!J$"$j$,$H$&!"ARBt!w(BQUIPU$B$5$s!K(B}
% \changes{v2.4}{2001/02/19}{$B:G=*%Z!<%8$G:81&$N9T4V$,B7$o$J$$ItJ,$r=$@5(B}
% \changes{v2.4}{2001/02/19}{$BCl$,=P$J$$$N$r=$@5(B}
% \changes{v2.4}{2001/07/23}{$B%Z!<%8$NBg$-$5$,>.$5$/$J$k$N$r=$@5(B}
% \changes{v2.5}{2001/09/14}{$B%Q%C%1!<%8%*%W%7%g%s(B(balance,nobalance)$B$rDI2C(B}
% \changes{v2.6}{2003/05/15}{\cs{@fstype}$B$r(B\cs{@fstyle}$B$H%?%$%W%_%9$7$F$$$?(B
%    $B$N$r=$@5!J$"$j$,$H$&!"@n>e!w9R6u1'Ch8&5f=j$5$s!K(B}
% \changes{v2.7}{2005/12/09}{$BI,?\%U%)!<%^%C%H%U%!%$%k$r(BpLaTeX2e$B$+$i(BLaTeX2e$B$XJQ99(B}
% \fi
%
% \iffalse
\NeedsTeXFormat{LaTeX2e}
%<*driver>
\ProvidesFile{nidanfloat.dtx}
%</driver>
%<core>\ProvidesPackage{nidanfloat}%
  [2005/12/09 v2.7 Put double-floats at top/bottom within twocolumn mode]
%
%<*driver>
\documentclass{jltxdoc}
\GetFileInfo{nidanfloat.dtx}
\title{TOP, BOTTOM$B;XDj$,2DG=$J#2CJH4$-%U%m!<%H(B\\
  $B%P!<%8%g%s(B \space\fileversion}
\date{$B:n@.F|!'(B\filedate}
\author{$BCfLn(B $B8-(B\footnote{$B3t<02q<R(B $B%"%9%-!<(B $B=PHG5;=QIt(B
  $B!J%a!<%k%"%I%l%9!'(Bken-na at ascii.co.jp$B!K(B}}
\begin{document}
  \maketitle
  \DocInput{nidanfloat.dtx}
\end{document}
%</driver>
% \fi
%
% \begin{abstract}
% \file{nidanfloat}$B%Q%C%1!<%8$O!"FsCJAH;~$KCJH4$-$N%U%m!<%H$r%Z!<%82<It$K$b(B
% $BG[CV2DG=$K$9$k!#(B
% \end{abstract}
%
% \section{$B%3!<%I(B}
%
% \subsection{$B%Q%C%1!<%8%*%W%7%g%s(B}
% \changes{v2.5}{2001/09/14}{$B%Q%C%1!<%8%*%W%7%g%s$rDI2C(B}
% \file{nidanfloat}$B%Q%C%1!<%8$G$O!":G=*%Z!<%8$N:81&%+%i%`$N9b$5$r(B
% $B6Q0l$K?6$jJ,$1$k$h$&$K$7$F$$$k!#$7$+$7!"$3$N5!G=$N1F6A$K$h$j!"(B
% $B:G=*%Z!<%8$G$N(B|\newpage|$B$H(B|\clearpage|$B%3%^%s%I$,@5$7$/F0:n$7$J$$!#(B
% $B$=$3$G!"$3$N5!G=$r;H$&$+$I$&$+$r;XDj$9$k%*%W%7%g%s$rF3F~$7$?!#(B
% $B%Q%C%1!<%8;XDj;~$K%*%W%7%g%s(B``balance''$B$r;XDj$9$k$H!"(B
% $B:G=*%Z!<%8$N<+F0D4@0$r9T$J$&$h$&$K$J$k!#%G%U%)%k%H$G$O9T$J$o$J$$!#(B
%    \begin{macrocode}
%<*core>
\DeclareOption{balance}{\AtEndDocument{\let\clearpage\balanceclearpage}}
\DeclareOption{nobalance}{\relax}
\ExecuteOptions{nobalance}
\ProcessOptions
%    \end{macrocode}
%
% \subsection{$B%U%m!<%H%Q%i%a!<%?(B}
% $B$3$3$G$O!"CJH4$-$N%U%m!<%H$r%Z!<%82<It$KCV$/$?$a$K:n@.$7$?%Q%i%a!<%?$K(B
% $B$D$$$F@bL@$r$9$k!#(B
%
% \begin{macro}{\dblbotfraction}
% $B#2CJAH;~$K%Z!<%82<It$K@j$a$k$3$H$N$G$-$k!"FsCJH4$-%U%m!<%H$N3d9g!#(B
% $B%G%U%)%k%H$O(B0.5$B!"$9$J$o$A%Z!<%8H>J,$r@j$a$k$3$H$,$G$-$k$h$&$K$7$F$$$k!#(B
%    \begin{macrocode}
\newcommand\dblbotfraction{0.5}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\c@dblbotnumber}
% $B%Z!<%82<It$KF~$l$k$3$H$N$G$-$k!"FsCJH4$-%U%m!<%H$N?t!#(B
% $B%G%U%)%k%H$G$O!"Fs$D$N?^$rCV$/$3$H$,$G$-$k$h$&$K$7$F$$$k!#(B
% |\c@dblbotnumber|$B$O%+%&%s%?(B|dblnumber|$B$NFbIt7A<0!#(B
%    \begin{macrocode}
\newcount\c@dblbotnumber
\setcounter{dblbotnumber}{2}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@dblbotroom}
% \begin{macro}{\@dblbotnum}
% |\@dblbotroom|$B$O!"%Z!<%82<It$K@j$a$k$3$H$N$G$-$k!"(B
% $BFsCJH4$-%U%m!<%H$N3d9g$r<($9D9$5JQ?t!#(B
% |\@dblbotnum|$B$O!"%Z!<%82<It$KF~$l$k$3$H$N$G$-$k!"(B
% $BFsCJH4$-%U%m!<%H$N?t$rJ];}$9$k%+%&%s%?!#(B
%    \begin{macrocode}
\newdimen\@dblbotroom
\newcount\@dblbotnum
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\@dblfloatplacement}
% $BFsCJAHMQ$N%U%m!<%H%Q%i%a!<%?$r@_Dj$9$k%^%/%m$r!"?7$?$KDI2C$7$?%Q%i%a!<%?(B
% $B$b@_Dj$9$k$h$&$K:FDj5A$9$k!#(B
%    \begin{macrocode}
\def\@dblfloatplacement{%
   \global\@dbltopnum\c@dbltopnumber
   \global\@dblbotnum\c@dblbotnumber % added
   \global\@dbltoproom\dbltopfraction\@colht
   \global\@dblbotroom\dblbotfraction\@colht % added
   \@textmin\@colht
     \advance\@textmin-\@dbltoproom
     \advance\@textmin-\@dblbotroom % added
   \@fpmin\dblfloatpagefraction\textheight
   \@fptop\@dblfptop
   \@fpsep\@dblfpsep
   \@fpbot\@dblfpbot
}
%    \end{macrocode}
% \end{macro}
%
% \subsection{$B%U%m!<%H%j%9%H$X$NEPO?(B}
% $BFsCJH4$-%U%m!<%H$NDj5A$O!"%/%i%9%U%!%$%k$G!"$D$.$N$h$&$K$7$F9T$J$o$l$k!#(B
% \begin{verbatim}
%    \newenvironment{figure*}
%                   {\@dblfloat{figure}}
%                   {\end@dblfloat}
% \end{verbatim}
% $BJ8>OCf$G(B|figure*|$B4D6-$G0O$^$l$?ItJ,$O!"%U%m!<%HJ];}MQ$N%j%9%H$KEPO?$5$l$k!#(B
% $B$3$N@a$G$O!"CJH4$-%U%m!<%H$r%Z!<%82<It$K$bCV$1$k$h$&$K$9$k$?$a$K3HD%$7$?(B
% $B%^%/%m$K$D$$$F@bL@$r$9$k!#(B
%
% \begin{macro}{\@dblbotlist}
% \begin{macro}{\L@toplist}
% \begin{macro}{\R@toplist}
% \begin{macro}{\L@botlist}
% \begin{macro}{\R@botlist}
% $BFsCJAH$N%Z!<%82<It$KCV$/%U%m!<%H$rJ];}$9$k$?$a$K(B|\@dblbotlist|$B$rDI2C$9$k!#(B
% $B$^$?!"%+%i%`$N>e2<$KCV$/%U%m!<%HMQ$K$O!":8B&$H1&B&$G6hJL$r$9$k$?$a!"(B
% |\L@toplist|, |\R@toplist|, |\L@botlist|, |\R@botlist|$B$rDI2C$9$k!#(B
%    \begin{macrocode}
\gdef\@dblbotlist{}
\gdef\L@toplist{}
\gdef\R@toplist{}
\gdef\L@botlist{}
\gdef\R@botlist{}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\@dblfloat}
% \begin{macro}{\@dbflt}
% \begin{macro}{\end@dblfloat}
% |\@dblfloat|$B$+$i8F$S=P$5$l$k!"(B|\@dbflt|$B$r:FDj5A$7!"0LCV;XDj$,>JN,$5$l$?(B
% $B$H$-$N%Q%i%a!<%?$r(B``tb''$B$H$9$k!#$^$?!"(B|\end@dblfloat|$B$r(B|\end@float|$B$K$7$F!"(B
% $B8=:_%Z!<%8$N2<It$K%U%m!<%H$rCV$1$k$h$&$K$9$k!#(B
%    \begin{macrocode}
\def\@dblfloat{%
  \if@twocolumn\let\reserved@a\@dbflt\else\let\reserved@a\@float\fi
  \reserved@a}
\def\@dbflt#1{\@ifnextchar[{\@xdblfloat{#1}}{\@xdblfloat{#1}[tb]}}
\def\@xdblfloat#1[#2]{%
  \@xfloat{#1}[#2]\hsize\textwidth\linewidth\textwidth}
\let\end@dblfloat\end@float
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\addtocurcol}
% |\@xdblfloat|$B$+$i8F$S=P$5$l$?!"(B|\@xfloat|$B$O0LCV;XDj%*%W%7%g%s$NI>2A$r9T$J$$!"(B
% $B%U%m!<%H%*%V%8%'%/%H$NAH$_N)$F$r3+;O$9$k!#(B
% $B%U%m!<%H%*%V%8%'%/%H$NAH$_N)$F$O(B|\end@float|$B$G=*N;$9$k!#(B
% |\end@float|$B$O!"%Z%J%k%F%#CM$r(B$-10004$$B$K$7$F(B|\output|$B%k!<%A%s$r5/F0$9$k!#(B
% $B$3$NCM$G$N(B|\output|$B%k!<%A%s$O(B|\@specialoutput|$B$r5/F0$9$k!#(B
% |\@specialoutput|$B$O(B|\@addtocurcol|$B$r8F$S=P$7!"%U%m!<%H$NFbMF$r8=:_%Z!<%8$K(B
% $B=PNO$G$-$k$N$J$i$P=PNO$r$9$k!#$=$&$G$J$1$l$P!"JL$N2DG=@-$rC5$k!#(B
%    \begin{macrocode}
\def\@addtocurcol{%
%    \end{macrocode}
% $B$3$N%Q%C%1!<%8$N>l9g!"CJH4$-$N%U%m!<%H$,EO$5$l$k2DG=@-$,$"$k$N$G!"$^$:!"(B
% $B$=$l$r%A%'%C%/$9$k!#%U%m!<%H$NI}$,%+%i%`I}$h$j$bBg$-$$>l9g$O!"6/@)E*$K(B
% $BCJH4$-%U%m!<%H$H$7$F07$&!#(B
%    \begin{macrocode}
  \ifdim\wd\@currbox>\columnwidth
    \@addtodblcol
  \else
%    \end{macrocode}
% $B$=$l0J30$N>l9g$O!"85$NF0:n$H$[$H$s$IF1$8$G$"$k!#(B
%    \begin{macrocode}
    \@insertfalse
    \@setfloattypecounts
    \ifnum\@fpstype=8 % is only `!p'
    \else
      \ifnum\@fpstype=24 % is only `p'
      \else
        \@flsettextmin
        \advance\@textmin\@textfloatsheight
        \@reqcolroom\@pageht
        \ifdim\@textmin>\@reqcolroom \@reqcolroom\@textmin\fi
        \advance\@reqcolroom\ht\@currbox
        \ifdim\@colroom>\@reqcolroom
          \@flsetnum\@colnum
          \ifnum\@colnum>\z@
            \@bitor\@currtype\@deferlist
            \if@test
            \else
%    \end{macrocode}
% $B%Z!<%82<It$N%U%m!<%H$rJ];}$7$F$$$k%U%m!<%H%j%9%H$NL>A0$,0[$J$k!#(B
%    \begin{macrocode}
              \@bitor\@currtype{\L@botlist\R@botlist}%
              \if@test
                \@addtobot
              \else 
                \ifodd\count\@currbox
                  \advance\@reqcolroom\intextsep
                  \ifdim\@colroom>\@reqcolroom
                    \global\advance\@colnum\m@ne
                    \global\advance\@textfloatsheight\ht\@currbox
                    \global\advance\@textfloatsheight 2\intextsep
                    \@cons\@midlist\@currbox
                    \if@nobreak
                      \nobreak
                      \@nobreakfalse
                      \everypar{}%
                    \else
                      \addpenalty \interlinepenalty
                    \fi
                    \vskip\intextsep
                    \box\@currbox 
                    \penalty\interlinepenalty
                    \vskip\intextsep
                    \ifnum\outputpenalty<-\@Mii \vskip-\parskip \fi
                    \outputpenalty\z@ 
                    \@inserttrue
                  \fi
                \fi
                \if@insert\else\@addtotoporbot\fi
              \fi
            \fi
          \fi
        \fi
      \fi
    \fi
    \if@insert\else\@resethfps\@cons\@deferlist\@currbox\fi
  \fi
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@addtotoporbot}
% $B%U%m!<%H$rJ];}$7$F$$$k%j%9%HJQ?t$N=$@5!#(B
% \changes{v2.3}{2000/12/20}{%
%    $B%?%$%W%_%9$N=$@5$H(B\cs{@flcheckspace}$B$N8F$S=P$7$rJQ99(B}
%    \begin{macrocode}
\def\@addtotoporbot{%
  \@getfpsbit \tw@
  \ifodd\@tempcnta
    \@flsetnum\@topnum
    \ifnum\@topnum>\z@
      \@tempswafalse
      \@flcheckspace\@toproom\@toplist\L@toplist\R@toplist
      \if@tempswa
        \@bitor\@currtype{\@midlist\L@botlist\R@botlist}%
        \if@test\else
          \if@firstcolumn
            \@flupdates \@topnum \@toproom \L@toplist
          \else
            \@flupdates \@topnum \@toproom \R@toplist
          \fi
          \@inserttrue
        \fi
      \fi
    \fi
  \fi
  \if@insert\else\@addtobot\fi
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@addtobot}
% $B%U%m!<%H$rJ];}$7$F$$$k%j%9%HJQ?t$N=$@5!#(B
% \changes{v2.3}{2000/12/20}{\cs{@flcheckspace}$B$N8F$S=P$7$rJQ99(B}
%    \begin{macrocode}
\def\@addtobot{%
  \@getfpsbit 4\relax
  \ifodd\@tempcnta
    \@flsetnum\@botnum
    \ifnum\@botnum>\z@
      \@tempswafalse
      \@flcheckspace\@botroom\@botlist\L@botlist\R@botlist
      \if@tempswa
        \global\maxdepth\z@
        \if@firstcolumn
          \@flupdates \@botnum \@botroom \L@botlist
        \else
          \@flupdates \@botnum \@botroom \R@botlist
        \fi
        \@inserttrue
      \fi
    \fi
  \fi
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\org@addtonextcol}
% \begin{macro}{\@addtonextcol}
% $BA^F~$K<:GT$7$?%U%m!<%H$d(B`p'$B;XDj$N%U%m!<%H$r=PNO$9$k$N$K!"(B
% |\@startcolumn|$B$GMQ$$$i$l$k!#$3$N%Q%C%1!<%8$G$O!"%+%i%`I}$h$j$bBg$-$$I}$r(B
% $B;}$D%U%m!<%H$KBP$7$F$O!"CJH4$-%U%m!<%H%j%9%H$H$7$F=PNO$9$k$h$&$K$7$F$$$k!#(B
%    \begin{macrocode}
\let\org@addtonextcol\@addtonextcol
\def\@addtonextcol{%
  \ifdim\wd\@currbox>\columnwidth
    \@addtodblcol
  \else
    \org@addtonextcol
  \fi
}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\@addtodblcol}
% |\@addtodblcol|$B%^%/%m$O!"%U%m!<%H%*%V%8%'%/%H$,8=:_%Z!<%8$KF~$k$+$I$&$+(B
% $B$r3NG'$7!"F~$k$N$G$"$l$P(B|\@addtodbltoporbot|$B$r8F$S=P$9!#$=$&$G$J$1$l$P!"(B
% |\@dbldeferlist|$B$KEPO?$9$k!#(B
%
% $B$^$:(B|@insert|$B%U%i%0$r56$K$9$k!#$=$7$F!"%U%m!<%H%?%$%W$r(B|\@fpstype|$B$KF@$k!#(B
% $B%U%m!<%H%?%$%W$,(B8$B$^$?$O(B24$B$N>l9g!"0LCV%*%W%7%g%s$O(B`!p'$B$+(B`p'$B$@$1$G$"$k$N$G!"(B
% $BL5>r7o$K(B|\@dbldeferlist|$B$K2C$($k!#(B
%    \begin{macrocode}
\def\@addtodblcol{%
  \begingroup
  \@insertfalse
  \@setfloattypecounts
  \ifnum\@fpstype=8 % is only `!p'
  \else
    \ifnum\@fpstype=24 % is only `p'
    \else
%    \end{macrocode}
% $B$=$&$G$J$1$l$P!"F1%?%$%W$N%U%m!<%H$GL$=PNO$N$b$N$,$"$k$+$I$&$+$r3NG'$9$k!#(B
% $BF1%?%$%W$N%U%m!<%H$G$^$@=PNO$7$F$$$J$$$b$N$,$"$k>l9g$O!"8=:_$N%U%m!<%H$r(B
% $B=PNO$7$J$$!#$?$@$7!"F1%?%$%W$G$"$C$F$b%+%i%`I}$N%U%m!<%H$K$D$$$F$O9MN8(B
% $B$7$J$$!#=PNO$9$k$3$H$,$G$-$k$N$J$i$P!"(B|\@addtodblbotortop|$B$r8F$S=P$9!#(B
%    \begin{macrocode}
      \@bitor\@currtype{\@dbldeferlist}
      %\@bitor\@currtype{\@deferlist\@dbldeferlist}
      \if@test
      \else
        \@tempswafalse
        \@checkdblspace
        \if@tempswa
          \@addtodbltoporbot
        \fi
      \fi
    \fi
  \fi
  \if@insert\else\@cons\@dbldeferlist\@currbox\fi
  \endgroup
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@addtodbltoporbot}
% $B$^$:!"(B`t'$B$N;XDj$,$"$k$+$H!"%Z!<%8>eIt$KF~$l$k?t$r1[$($F$$$J$$$+$r3NG'$9$k!#(B
%    \begin{macrocode}
\def\@addtodbltoporbot{%
  \@getfpsbit \tw@
  \ifodd\@tempcnta
    \@flsetnum\@dbltopnum
    \ifnum\@dbltopnum>\z@
%    \end{macrocode}
% $B$=$7$F!"%Z!<%8>eIt$"$k$$$O2<It$KF1%?%$%W$N%U%m!<%H$,=PNO$5$l$k2DG=@-$,(B
% $B$"$k$N$+$rD4$Y$k!#FsCJAH%U%m!<%H$O0lCJAH%U%m!<%H$N>eIt$KCV$+$l$k$3$H$KCm0U!#(B
%    \begin{macrocode}
      \@bitor\@currtype{%
         \L@toplist\R@toplist\L@botlist\R@botlist\@dblbotlist}
      \if@test
      \else
%    \end{macrocode}
% $BG[CV2DG=$J$i$P!"=PNO$9$k$@$1$N%9%Z!<%9$,$"$k$N$+$r3NG'$9$k!#(B
%    \begin{macrocode}
        \@tempswafalse
        \@dblflcheckspace \@dbltoproom \@dbltoplist
%    \end{macrocode}
% $B%9%Z!<%9$,$"$l$P!"CJH4$-%U%m!<%H$,>eIt$K@j$a$k$3$H$N$G$-$k9b$5$+$i!"(B
% $B$=$NJ,$r0z$/!#$^$?!">eIt$KF~$l$kCJH4$-%U%m!<%H$N?t$r8:$i$7!"(B
% $B>eItCJH4$-MQ$N%U%m!<%H%j%9%H$KEPO?$r$9$k!#(B
%    \begin{macrocode}
        \if@tempswa
          \@tempdima-\ht\@currbox
          \advance\@tempdima
           -\ifx\@dbltoplist\@empty \dbltextfloatsep\else\dblfloatsep\fi
          \global\advance\@dbltoproom\@tempdima
          \global\advance\@dbltopnum\m@ne
          \@cons\@dbltoplist\@currbox
%    \end{macrocode}
% $B:8%+%i%`$N$H$-$O!"%+%i%`$N9b$5(B|\@colroom|$B$+$i%U%m!<%HJ,$r0z$/!#(B
%    \begin{macrocode}
          \if@firstcolumn
            \advance\@colroom\@tempdima
            \global\advance\@colroom\maxdepth
%    \end{macrocode}
% $B1&%+%i%`$N$H$-$O!"?75,$NCJH4$-%U%m!<%HJ,$@$1$G$J$/!"$3$l$rA^F~$9$k$3$H(B
% $B$K$h$C$F!":8%+%i%`$+$i0\F0$7$F$/$k%F%-%9%H$N9b$5$b0z$/!#(B
%    \begin{macrocode}
          \else
            \@tempdima\textheight
            \@chkdblfloatht\advance\@tempdima-\@floatht
            \L@chkfloatht\advance\@tempdima-\@floatht
            \vbadness=\@M \splittopskip=\topskip \splitmaxdepth=\maxdepth
            \setbox\z@=\vbox{\unvcopy\@leftcolumn}%
            \setbox\@ne=\vsplit\z@ to\@tempdima
            \advance\@colroom-\ht\z@
            \global\advance\@colroom-\dp\z@
          \fi
%    \end{macrocode}
% $B:G8e$K!"(B|@inert|$B%U%i%0$r??$K$9$k!#(B
%    \begin{macrocode}
          \@inserttrue
        \fi
      \fi
    \fi
  \fi
  \if@insert\else\@addtodblbot\fi
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@addtodblbot}
% $B%Z!<%82<It$KCJH4$-%U%m!<%H$rCV$/$H$-$b!">eIt$HF1$8$G$"$k!#(B
% $B$?$@$7!"FsCJAH%U%m!<%H$O:G2<It$KCV$+$l$k$N$G!"B>$N=PNOMQ%j%9%H$rD4$Y$k(B
% $BI,MW$O$J$$$3$H$,0[$J$k!#(B
%    \begin{macrocode}
\def\@addtodblbot{%
  \@getfpsbit 4\relax
  \ifodd\@tempcnta
    \@flsetnum\@botnum
    \ifnum\@botnum>\z@
      \@tempswafalse
      \@dblflcheckspace \@dbltoproom \@dbltoplist
      \if@tempswa
        \@tempdima-\ht\@currbox \advance\@tempdima
           -\ifx\@dblbotlist\@empty \dbltextfloatsep\else\dblfloatsep\fi
        \global\advance\@dblbotroom\@tempdima
        \global\advance\@dblbotnum\m@ne
        \@cons\@dblbotlist\@currbox
        \if@firstcolumn
          \advance\@colroom\@tempdima
          \global\advance\@colroom\maxdepth
        \else
          \@tempdima\textheight
          \@chkdblfloatht\advance\@tempdima-\@floatht
          \L@chkfloatht\advance\@tempdima-\@floatht
          \vbadness=\@M \splittopskip=\topskip \splitmaxdepth=\maxdepth
          \setbox\z@=\vbox{\unvcopy\@leftcolumn}%
          \setbox\@ne=\vsplit\z@ to\@tempdima
          \advance\@colroom-\ht\z@
          \global\advance\@colroom-\dp\z@
        \fi
        \@inserttrue
      \fi
    \fi
  \fi
}
%    \end{macrocode}
% \end{macro}
%
% \subsection{$B%U%m!<%H$N9b$5$r7W;;$9$k%^%/%m(B}
%
% \begin{macro}{\@floatht}
% |\@floatht|$B$O!"=PNO%j%9%H$K3JG<$5$l$F$$$k%U%m!<%H$N9b$5$r3JG<$9$k$N$KMQ$$$k!#(B
%    \begin{macrocode}
\global\newdimen\@floatht \@floatht\z@
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@flcheckspace}
% \changes{v2.3}{2000/12/20}{$B>u67JL$K>l9g$o$1$9$k$h$&$K$7$?(B}
%     \begin{macrocode}
\def \@flcheckspace #1#2#3#4{%
   \advance \@reqcolroom
  \if@twocolumn
    \if@firstcolumn
      \ifx #3\@empty \textfloatsep \else \floatsep \fi
    \else
      \ifx #4\@empty \textfloatsep \else \floatsep \fi
    \fi
  \else
     \ifx #2\@empty \textfloatsep \else \floatsep \fi
  \fi
   \ifdim \@colroom>\@reqcolroom
     \ifdim #1>\ht\@currbox
       \@tempswatrue
     \else
       \ifnum \@fpstype<\sixt@@n
         \@tempswatrue
       \fi
     \fi
   \fi
}
%     \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@dblflcheckspace}
% $BCJH4$-%U%m!<%H$,%Z!<%8>eIt$"$k$$$O2<It$K@j$a$k$3$H$N$G$-$k3d9g$r1[$($F(B
% $B$$$J$$$+$r%A%'%C%/$9$k!#1[$($F$$$J$1$l$P(B|\@tempswa|$B$r??$K$9$k!#(B
% \changes{v2.6}{2003/05/15}{\cs{@fstype}$B$r(B\cs{@fstyle}$B$H%?%$%W%_%9$7$F$$$?(B}
%    \begin{macrocode}
\def\@dblflcheckspace#1#2{%
  \@tempdima=#1\relax
  \advance\@tempdima
     -\ifx #2\@empty \dbltextfloatsep\else\dblfloatsep\fi
  \ifdim\@tempdima>\ht\@currbox
    \@tempswatrue
  \else
    \ifnum\@fpstype<\sixt@@n
      \advance\@tempdima\@textmin
      \if \@tempdima>\ht\@currbox
        \@tempswatrue
      \fi
    \fi
  \fi
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@checkdblspace}
% $BCJH4$-%U%m!<%H$HCJH4$-%U%m!<%H4V%9%Z!<%9!J$"$k$$$OCJH4$-%U%m!<%H$H%F%-%9%H$H(B
% $B$N4V$N%9%Z!<%9!K$rF~$l$kM>M5$,$"$k$+$rD4$Y$k!#(B
%
% $B$^$:!"8=:_!"AH$_N)$F$F$"$k%F%-%9%H$N9b$5$H!":G>.8BF~$i$J$/$F$O$J$i$J$$(B
% $B%F%-%9%H$NNL$H$rHf3S$7!"Bg$-$$$[$&$r(B|\@tempdima|$B$K3JG<$9$k!#(B
% $B1&%+%i%`$K$$$k$H$-$O!":8%+%i%`$N%F%-%9%H$N9b$5$b2C$($k!#(B
%    \begin{macrocode}
\def\@checkdblspace{%
   \@tempdima\@pageht\advance\@tempdima\@pagedp
   \@tempdimb\textfraction\@colht
   \ifdim\@tempdima<\@tempdimb \@tempdima\@tempdimb\fi
   \if@firstcolumn\else
     \advance\@tempdima\ht\@leftcolumn
     \advance\@tempdima\dp\@leftcolumn
   \fi
%    \end{macrocode}
% $B$=$7$F!"=PNO$9$kM=Dj$N%+%i%`I}%U%m!<%H$HCJH4$-%U%m!<%H$N9b$5$r2C$($k!#(B
% $B$3$N$H$-!"CJH4$-MQ$N%U%m!<%H$N9b$5$OFsG\$9$k!#(B
%    \begin{macrocode}
   \L@chkfloatht\advance\@tempdima\@floatht
   \R@chkfloatht\advance\@tempdima\@floatht
   \@chkdblfloatht\advance\@tempdima\tw@\@floatht
%    \end{macrocode}
% $B$=$l$+$i!"8=:_$N%U%m!<%H$N9b$5$HI,MW$J%9%Z!<%9$r2C$($k!#(B
% $B$3$N$H$-$b!"$=$l$i$N9b$5$rFsG\$9$k!#(B
%    \begin{macrocode}
   \@tempdimb\ht\@currbox\advance\@tempdimb\dp\@currbox
   \advance\@tempdimb
      \ifdim\@floatht>\z@ \dbltextfloatsep\else\dblfloatsep\fi
   \multiply\@tempdimb\tw@ \advance\@tempdima\@tempdimb
%    \end{macrocode}
% $B$3$l$i$9$Y$F$NMWAGJ,$N9b$5$,(B|\textheight|$B$N#2G\$h$j$b>.$5$1$l$P!"(B
% $B8=:_$N%U%m!<%H$rCV$/$3$H$,$G$-$k$HH=CG$9$k!#(B
%    \begin{macrocode}
   \ifdim\@tempdima>\tw@\textheight
     \@tempswafalse
   \else
     \@tempswatrue
   \fi
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\tmp@comflelt}
% \begin{macro}{\tmp@comdblflelt}
% $B=PNO%j%9%H$K3JG<$5$l$F$$$k%U%m!<%H$N9b$5$r7W$k$?$a$KMQ$$$k!#(B
% $B$=$l$>$l!"(B|\@comfelt|, |\@comdblflelt|$B$HF1$8$@$,!"%U%m!<%H$NFbMF$,(B
% $B<:$o$l$J$$$h$&$K(B|\copy|$B$r$7$F$$$k$N$,0[$J$k!#(B
%    \begin{macrocode}
\def\tmp@comflelt#1{%
  \setbox\@tempboxa
  \vbox{\unvbox\@tempboxa\copy #1\vskip\floatsep}%
}
\def\tmp@comdblflelt#1{%
  \setbox\@tempboxa
  \vbox{\unvbox\@tempboxa\copy #1\vskip\dblfloatsep}%
}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\L@chkfloatht}
% \begin{macro}{\R@chkfloatht}
% $B$=$l$>$l!":8%+%i%`$H1&%+%i%`$K=PNO$9$k%U%m!<%H$N9b$5$r7W;;$9$k$N$KMQ$$$k!#(B
% $B7W;;7k2L$O(B|\@floatht|$B$K3JG<$9$k!#(B
%    \begin{macrocode}
\def\L@chkfloatht{\@floatht\z@
  \ifx\L@toplist\@empty\else
    \let\@elt\tmp@comflelt\setbox\@tempboxa\vbox{}\L@toplist
    \setbox\@ne\vbox{\boxmaxdepth\maxdepth
        \unvbox\@tempboxa\vskip-\floatsep\topfigrule\vskip\textfloatsep
        }%
    \let\@elt\relax \advance\@floatht\ht\@ne \advance\@floatht\dp\@ne
  \fi
  \ifx\L@botlist\@empty\else
    \let\@elt\tmp@comflelt\setbox\@tempboxa\vbox{}\L@botlist
    \setbox\@ne\vbox{\boxmaxdepth\maxdepth
        \vskip\textfloatsep\botfigrule\unvbox\@tempboxa\vskip-\floatsep
        }%
    \let\@elt\relax \advance\@floatht\ht\@ne \advance\@floatht\dp\@ne
  \fi
  \global\@floatht\@floatht
}
\def\R@chkfloatht{\@floatht\z@
  \ifx\R@toplist\@empty\else
    \let\@elt\tmp@comflelt\setbox\@tempboxa\vbox{}\R@toplist
    \setbox\@ne\vbox{\boxmaxdepth\maxdepth
        \unvbox\@tempboxa\vskip-\floatsep\topfigrule\vskip\textfloatsep
        }%
    \let\@elt\relax \advance\@floatht\ht\@ne \advance\@floatht\dp\@ne
  \fi
  \ifx\R@botlist\@empty\else
    \let\@elt\tmp@comflelt\setbox\@tempboxa\vbox{}\R@botlist
    \setbox\@ne\vbox{\boxmaxdepth\maxdepth
        \vskip\textfloatsep\botfigrule\unvbox\@tempboxa\vskip-\floatsep
        }%
    \let\@elt\relax \advance\@floatht\ht\@ne \advance\@floatht\dp\@ne
  \fi
  \global\@floatht\@floatht
}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\@chkdblfloatht}
% $B%Z!<%8>eIt$H2<It$K=PNO$9$kCJH4$-%U%m!<%H$N9b$5$r7W;;$7!"(B
% $B7k2L$r(B|\@floatht|$B$K3JG<$9$k!#(B
%    \begin{macrocode}
\def\@chkdblfloatht{\@floatht\z@
  \ifx\@dbltoplist\@empty\else
    \let\@elt\tmp@comdblflelt\setbox\@tempboxa\vbox{}\@dbltoplist
    \setbox\@ne\vbox{\boxmaxdepth\maxdepth
        \unvbox\@tempboxa
        \vskip-\dblfloatsep
        \dblfigrule
        \vskip\dbltextfloatsep
        }%
    \let\@elt\relax \advance\@floatht\ht\@ne \advance\@floatht\dp\@ne
  \fi
  \ifx\@dblbotlist\@empty\else
    \let\@elt\tmp@comdblflelt\setbox\@tempboxa\vbox{}\@dblbotlist
    \setbox\@ne\vbox{\boxmaxdepth\maxdepth
        \vskip\dbltextfloatsep
        \dblfigrule
        \unvbox\@tempboxa
        \vskip-\dblfloatsep
        }%
    \let\@elt\relax \advance\@floatht\ht\@ne \advance\@floatht\dp\@ne
  \fi
  \global\@floatht\@floatht
}
%    \end{macrocode}
% \end{macro}
%
% \subsection{$B%U%m!<%H$H%F%-%9%H$N%^!<%8(B}
%
% \begin{macro}{\@fixht}
% |\@fixht|$B$O!":8%+%i%`$N9b$5$r3JG<$9$k$N$KMQ$$$k!#(B
%    \begin{macrocode}
\global\newdimen\@fixht
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@combinefloats}
% \changes{v2.4}{2001/07/23}{\cs{boxmaxdepth}$B$r(B\cs{maxdepth}$B$K$7$J$$$h$&$K$7$?(B}
% |@combinefloats|$B$O!"%+%i%`C10L$G!"%F%-%9%H$H%U%m!<%H$r%^!<%8$9$k!#(B
% $B$3$N%^%/%m$O1&%+%i%`$N$H$-$K<B9T$9$k!#(B
%    \begin{macrocode}
\def\@combinefloats{%
  %%\boxmaxdepth\maxdepth
  \if@twocolumn
    \if@firstcolumn
    \else
%    \end{macrocode}
% $B:8%+%i%`$N%F%-%9%H!">e2<$N%+%i%`I}%U%m!<%H!">e2<$NCJH4$-%U%m!<%H$N9b$5$N(B
% $B9g7W$r(B|\@fixht|$B$K3JG<$9$k!#(B
%    \begin{macrocode}
      \@fixht\ht\@leftcolumn \advance\@fixht\dp\@leftcolumn
      \@chkdblfloatht \@tempdima\@floatht
      \L@chkfloatht \advance\@tempdima\@floatht
      \advance\@fixht\@tempdima
%    \end{macrocode}
% |\@fixht|$B$N9b$5$,(B|\textheight|$B$h$j$bBg$-$$>l9g!"%F%-%9%H$rJ,3d$7!"F~$i$J$$(B
% $BItJ,$r1&%+%i%`$K0\$9!#(B
%    \begin{macrocode}
      \ifdim\@fixht>\textheight
%    \end{macrocode}
% $B:8%+%i%`$K;D$9ItJ,$N9b$5$r(B|\@fixht|$B$K3JG<$9$k!#(B
%    \begin{macrocode}
        \@fixht\textheight
        \advance\@fixht-\@tempdima
        \advance\@fixht\maxdepth
%    \end{macrocode}
% |\@fixht|$BJ,$N%F%-%9%H$r%\%C%/%9#0$K3JG<$9$k!#(B
%    \begin{macrocode}
        \vbadness=\@M \splittopskip=\topskip \splitmaxdepth=\maxdepth
        \setbox\z@=\vsplit\@leftcolumn to\@fixht
%    \end{macrocode}
% $B0\F0$9$kItJ,$O(B|\@leftcolumn|$B$K;D$C$F$$$k$N$G!"(B
% $B$=$l$r1&%+%i%`!J(B|\@outputbox|$B!K$KF~$l$k!#(B
% $B$^$?!"%\%C%/%9#0$NFbMF$r:8%+%i%`$KLa$9!#(B
% \changes{v2.4}{2001/02/19}{$B9T4V$,B7$o$J$$ItJ,$r=$@5(B}
% \changes{v2.4}{2001/02/19}{$BCl$,=P$J$$$N$r=$@5(B}
%    \begin{macrocode}
        \advance\@fixht-\maxdepth
        \@tempdima\baselineskip \advance\@tempdima-\topskip
        \setbox\@outputbox=\vbox to\@fixht{%
            \ifvoid\@leftcolumn
            \else
              \unvbox\@leftcolumn\vskip\@tempdima
            \fi\relax
            \unvbox\@outputbox\vss}%
%    \end{macrocode}
% \changes{v2.5}{2001/09/14}{\cs{vsplit}$B;~!"(Binfinite$B%(%i!<$K$J$k$N$r=$@5(B}
% |\@leftcolumn|$B$r:n@.$9$k$H$-$KMQ$$$F$$$?(B|\vss|$B$,(B
% \begin{verbatim}
% ! Infinite glue shrinkage found in box being split.
% \end{verbatim}
% $B$N%(%i!<$r5/$3$9$3$H$,$"$k$N$G:o=|$7$?!#(B
%    \begin{macrocode}
        \setbox\@leftcolumn=\vbox to\@fixht{\unvbox\z@}%
      \fi
%    \end{macrocode}
% $B:81&!"$=$l$>$l%F%-%9%H$H%+%i%`I}%U%m!<%H$rAH$_N)$F$k!#(B
%    \begin{macrocode}
      \@fixht\ht\@leftcolumn
        \advance\@fixht\dp\@leftcolumn \advance\@fixht\@floatht
      \ifx\L@toplist\@empty\else\L@cflt\fi
      \ifx\L@botlist\@empty\else\L@cflb\fi
      \ifx\R@toplist\@empty\else\R@cflt\fi
      \ifx\R@botlist\@empty\else\R@cflb\fi
    \fi
%    \end{macrocode}
% $BFsCJAH$G$J$$$H$-$O=>Mh$I$*$j$NF0:n$r$9$k!#(B
%    \begin{macrocode}
  \else
      \ifx\@toplist\@empty\else\@cflt\fi
      \ifx\@botlist\@empty\else\@cflb\fi
  \fi
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\L@cflt}
% \begin{macro}{\L@cflb}
% \begin{macro}{\R@cflt}
% \begin{macro}{\R@cflb}
% $B:8%+%i%`$H1&%+%i%`$rAH$_N)$F$k$N$KMQ$$$k!#(B
% \changes{v2.3}{2000/12/20}{\cs{gdef}$B$r(B\cs{global}\cs{let}$B$KJQ99(B}
%    \begin{macrocode}
\def\L@cflt{%
  \let\@elt\@comflelt\setbox\@tempboxa\vbox{}\L@toplist
  \setbox\@leftcolumn\vbox to\@fixht{\boxmaxdepth\maxdepth
      \unvbox\@tempboxa
      \vskip-\floatsep\topfigrule\vskip\textfloatsep\unvbox\@leftcolumn
      \vss}%
  \let\@elt\relax
  \xdef\@freelist{\@freelist\L@toplist}\global\let\L@toplist\@empty
}
\def\L@cflb{%
  \let\@elt\@comflelt\setbox\@tempboxa\vbox{}\L@botlist
  \setbox\@leftcolumn\vbox to\@fixht{\boxmaxdepth\maxdepth
      \unvbox\@leftcolumn
      \vskip\textfloatsep\botfigrule\unvbox\@tempboxa\vskip-\floatsep
      \vss}%
  \let\@elt\relax
  \xdef\@freelist{\@freelist\L@botlist}\global\let\L@botlist\@empty
}
\def\R@cflt{%
  \let\@elt\@comflelt\setbox\@tempboxa\vbox{}\R@toplist
  \setbox\@outputbox\vbox to\@fixht{\boxmaxdepth\maxdepth
      \unvbox\@tempboxa
      \vskip-\floatsep\topfigrule\vskip\textfloatsep\unvbox\@outputbox
      \vss}%
  \let\@elt\relax
  \xdef\@freelist{\@freelist\R@toplist}\global\let\R@toplist\@empty
}
\def\R@cflb{%
  \let\@elt\@comflelt\setbox\@tempboxa\vbox{}\R@botlist
  \setbox\@outputbox\vbox to\@fixht{\boxmaxdepth\maxdepth
      \unvbox\@outputbox
      \vskip\textfloatsep\botfigrule\unvbox\@tempboxa\vskip-\floatsep
      \vss}%
  \let\@elt\relax
  \xdef\@freelist{\@freelist\R@botlist}\global\let\R@botlist\@empty
}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\@combinedblfloats}
% $B%F%-%9%H$HCJH4$-%U%m!<%H$r%^!<%8$9$k!#$3$N%Q%C%1!<%8$G$O!"%Z!<%82<It$N(B
% $BCJH4$-%U%m!<%H$b%^!<%8$9$k$h$&$K3HD%$7$F$$$k!#(B
%    \begin{macrocode}
%\def\@comdblflelt#1{\setbox\@tempboxa
%      \vbox{\unvbox\@tempboxa\box#1\vskip\dblfloatsep}}
%
\def\@combinedblfloats{%
  \ifx\@dbltoplist\@empty
  \else
    \let\@elt\@comdblflelt\setbox\@tempboxa\vbox{}\@dbltoplist
    \setbox\@outputbox\vbox{\boxmaxdepth\maxdepth
       \unvbox\@tempboxa
       \vskip-\dblfloatsep
       \dblfigrule
       \vskip\dbltextfloatsep
       \box\@outputbox}%
    \let\@elt\relax\xdef\@freelist{\@freelist\@dbltoplist}%
    \global\let\@dbltoplist\@empty
  \fi
  \ifx\@dblbotlist\@empty
  \else
    \let\@elt\@comdblflelt\setbox\@tempboxa\vbox{}\@dblbotlist
    \setbox\@outputbox\vbox{\boxmaxdepth\maxdepth
       \box\@outputbox
       \vskip\dbltextfloatsep
       \dblfigrule
       \unvbox\@tempboxa
       \vskip-\dblfloatsep
       }%
    \let\@elt\relax\xdef\@freelist{\@freelist\@dblbotlist}%
    \global\let\@dblbotlist\@empty
  \fi
  \global\setbox\@outputbox\vbox to\textheight{\unvbox\@outputbox}%
}
%    \end{macrocode}
% \end{macro}
%
% \subsection{$BFsCJAH$N=PNO(B}
%
% \begin{macro}{\if@balance}
% $B:81&$N%+%i%`$r6QEy$K$7$F=PNO$9$k$+$I$&$+$r<($9%U%i%0!#(B
%    \begin{macrocode}
\newif\if@balance \@balancefalse
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@outputdblcol}
% $B:81&$N%+%i%`$rO"7k$7!"=PNO$9$k$N$O(B|\@outputdblcol|$B$,9T$J$&!#(B
% $B$3$N%Q%C%1!<%8$G$O!":81&$N%+%i%`$r6QEy$KJ,3d$9$k$?$a$N%k!<%A%s$r2C$($F$"$k!#(B
%    \begin{macrocode}
\newbox\@combinebox
%    \end{macrocode}
% $B:8%+%i%`$rAH$_N)$F$?$@$1$N;~E@$G$O!"$=$l$r(B|\@leftcolumn|$B$K3JG<$9$k$@$1$G(B
% $B=PNO$O$7$J$$!#(B
% \changes{v2.4}{2001/02/19}{$B:G=*%Z!<%8$G:81&$N9T4V$,B7$o$J$$ItJ,$r=$@5(B}
% \changes{v2.4}{2001/02/19}{$BCl$,=P$J$$$N$r=$@5(B}
%    \begin{macrocode}
\def\@outputdblcol{%
  \if@firstcolumn
    \global\@firstcolumnfalse
    \global\setbox\@leftcolumn\box\@outputbox
    \@colht\textheight
    \@chkdblfloatht\global\advance\@colht-\@floatht
  \else
    \global\@firstcolumntrue
    \if@balance % $B:81&%+%i%`$r6QEy$KJ,3d(B
      \@tempdima\baselineskip
      \advance\@tempdima-\topskip
      % $BO"7k(B
      \setbox\@combinebox=\vbox{%
          \unvbox\@leftcolumn\vskip\@tempdima\unvbox\@outputbox}%
      \@tempdima\ht\@combinebox
      \advance\@tempdima\dp\@combinebox
      \divide\@tempdima\tw@
      % $BJ,3d(B
      \vbadness=\@M \splittopskip=\topskip \splitmaxdepth=\maxdepth
      \setbox\@leftcolumn=\vsplit\@combinebox to\@tempdima
      \setbox\@outputbox=\vtop{\unvbox\@combinebox}
      \setbox\@leftcolumn=\vtop{\unvbox\@leftcolumn}
    \fi
    % $B@07A(B
    \@tempdima\ht\@leftcolumn
    \setbox\@outputbox\vbox to\@tempdima{%
      \hb@xt@\textwidth{%
        \hb@xt@\columnwidth{%
           \vbox to\@tempdima{\box\@leftcolumn\vss}\hss}%
        \hfil
        \vrule width\columnseprule
        \hfil
        \hb@xt@\columnwidth{%
           \vbox to\@tempdima{\box\@outputbox\vss}\hss}%
      }%
      \vss
    }%
    \@combinedblfloats
    \@outputpage
    \begingroup
      \@dblfloatplacement
      \@startdblcolumn
      \@whilesw\if@fcolmade \fi{\@outputpage\@startdblcolumn}%
    \endgroup
  \fi
  \global\@balancefalse
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@startdblcolumn}
% $BFsCJAH$r3+;O$9$k$H$-!"$^$@=PNO$r$7$F$$$J$$%U%m!<%H$r=PNO$9$k!#(B
% $B$=$l$i$O(B|\sdblcolelt|$B$rDL$8$F!"(B|\@addtonextcol|$B$G=PNO$5$l$k!#(B
% $B$3$N%Q%C%1!<%8$G$O!"%+%i%`$N9b$5$r(B|\textheight|$B$+$i%U%m!<%H$N9b$5$r(B
% $B0z$$$?$b$N$K@_Dj$9$k$h$&$K:FDj5A$9$k!#(B
%    \begin{macrocode}
\def\@startdblcolumn{%
  \global\@colht\textheight
  \@tryfcolumn\@dbldeferlist
  \if@fcolmade
  \else
    \begingroup
      \let\reserved@b\@dbldeferlist
      \global\let\@dbldeferlist\@empty
      \let\@elt\@sdblcolelt
      \reserved@b
    \endgroup
  \fi
  \@chkdblfloatht
  \global\advance\@colht-\@floatht
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@doclearpage}
% $B=PNO%U%m!<%HMQ%j%9%H$N=i4|2=$r$9$k$?$a$K!"(B|\@doclearpage|$B$r:FDj5A$9$k!#(B
%    \begin{macrocode}
\def\@doclearpage{%
  \ifvoid\footins
    \setbox\@tempboxa\vsplit\@cclv to\z@ \unvbox\@tempboxa
    \setbox\@tempboxa\box\@cclv
    \xdef\@deferlist{%
       \L@toplist\R@toplist\L@botlist\R@botlist\@deferlist}%
    \global\let\L@toplist\@empty % changed from \@toplist
    \global\let\R@toplist\@empty % added
    \global\let\L@botlist\@empty % changed from \@botlist
    \global\let\R@botlist\@empty % added
    \global\@colroom\@colht
    \ifx\@currlist\@empty
    \else
      \@latexerr{Float(s) lost}\@ehb
        \global\let\@currlist\@empty
    \fi
    \@makefcolumn\@deferlist
    \@whilesw\if@fcolmade \fi{\@opcol\@makefcolumn\@deferlist}%
    \if@twocolumn
      \if@firstcolumn
        % added \@dblbotlist
        \xdef\@dbldeferlist{\@dbltoplist\@dblbotlist\@dbldeferlist}%
        \global\let\@dbltoplist\@empty
        \global\let\@dblbotlist\@empty % added
        \global\@colht\textheight
        \begingroup
          \@dblfloatplacement
          \@makefcolumn\@dbldeferlist
          \@whilesw\if@fcolmade \fi{\@outputpage
                                    \@makefcolumn\@dbldeferlist}%
        \endgroup
      \else
        \vbox{}\clearpage
      \fi
    \fi
  \else
    \setbox\@cclv\vbox{\box\@cclv\vfil}%
    \@makecol\@opcol
    \clearpage
  \fi
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@topnewpage}
% |\@dblbotroom|$B$H(B|dblbotnumber|$B$r=i4|2=$9$k$?$a$K(B|\@topnewpage|$B$r:FDj5A$9$k!#(B
%    \begin{macrocode}
\long\def\@topnewpage[#1]{%
  %\@nodocument
  \@next\@currbox\@freelist{}{}%
  \global\setbox\@currbox
    \color@vbox
      \normalcolor
      \vbox{\hsize\textwidth
            \@parboxrestore
            \col@number\@ne
            #1%
            \vskip-\dbltextfloatsep}%
    \color@endbox
  \ifdim\ht\@currbox>\textheight
    \ht\@currbox\textheight
  \fi
  \global\count\@currbox\tw@
  \@tempdima-\ht\@currbox
  \advance\@tempdima-\dbltextfloatsep
  \global\advance\@colht\@tempdima
  \ifx\@dbltoplist\@empty
  \else
    \@latexerr{Float(s) lost}\@ehb
    \let\@dbltoplist\@empty
  \fi
  \@cons\@dbltoplist\@currbox
  \global\@dbltopnum\m@ne
  \global\@dblbotnum\m@ne % added
  \ifdim\@colht<2.5\baselineskip
    \@latex@warning@no@line {Optional argument of \noexpand\twocolumn
          too tall on page \thepage}%
    \@emptycol
    \if@firstcolumn
    \else
      \@emptycol
    \fi
  \else
    \global\vsize\@colht
    \global\@colroom\@colht
    \@floatplacement
  \fi
  %\global\@dbltoproom\maxdimen
  %\global\@dblbotroom\maxdimen
  %\@addtodblcol
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\balancenewpage}
% \begin{macro}{\balanceclearpage}
% $B%F%-%9%H$r6QEy$KJ,3d$7$F=PNO$9$k$?$a$N%^%/%m!#(B
% $B$?$@$7!"$3$N%^%/%m$rMQ$$$?>l9g!"$=$N%Z!<%8Fb$G$N(B|\newpage|$B$d(B
% |\clearpage|$B%3%^%s%I$,L58z$K$J$k$3$H$KCm0U!#(B
%    \begin{macrocode}
\def\balancenewpage{\par\vfil\global\@balancetrue\penalty-\@M}
\def\balanceclearpage{\balancenewpage
    \write\m@ne{}\vbox{}\global\@balancetrue\penalty-\@Mi}
\endinput
%</core>
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \Finale
%
% \endinput
