From 013bf3bc293cf08e4b4167cb42180bc355f399c0 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Mon, 13 Apr 2015 13:48:08 +0000
Subject: latex2e 2015/01/01

git-svn-id: svn://tug.org/texlive/trunk@36834 c570f23f-e606-0410-a88d-b1316a301751
---
 Master/texmf-dist/source/latex/base/ltoutput.dtx | 1190 ++++++++++++++++++----
 1 file changed, 1013 insertions(+), 177 deletions(-)

(limited to 'Master/texmf-dist/source/latex/base/ltoutput.dtx')

diff --git a/Master/texmf-dist/source/latex/base/ltoutput.dtx b/Master/texmf-dist/source/latex/base/ltoutput.dtx
index 5e2e7d6efb7..05bf6819e8b 100644
--- a/Master/texmf-dist/source/latex/base/ltoutput.dtx
+++ b/Master/texmf-dist/source/latex/base/ltoutput.dtx
@@ -1,6 +1,6 @@
 % \iffalse meta-comment
 %
-% Copyright 1993-2014
+% Copyright 1993-2015
 % The LaTeX3 Project and any individual authors listed elsewhere
 % in this file.
 %
@@ -28,18 +28,16 @@
 % \fi
 % \iffalse
 %%% From File: ltoutput.dtx
-%<def1>\ProvidesFile{autoout1.sty}
 %<flafter>\ProvidesPackage{flafter}
 %<fltrace>\ProvidesPackage{fltrace}
-%<def1,flafter,fltrace>       [2014/04/24 v1.2n
-%<def1>                     Output Routine autoload file]
+%<flafter,fltrace>       [2015/03/12 v1.2m
 %<flafter>                  Standard LaTeX floats after reference (FMi)]
 %<fltrace>                  Tracing LaTeX floats algorithm (FMi)]
 %
 %<*driver>
 % \fi
 \ProvidesFile{ltoutput.dtx}
-             [2014/09/29 v1.2n LaTeX Kernel (Output Routine)]
+             [2015/03/12 v1.2m LaTeX Kernel (Output Routine)]
 % \iffalse
 \documentclass{ltxdoc}
 \GetFileInfo{ltoutput.dtx}
@@ -47,13 +45,14 @@
 \date{\filedate}
 \author{Leslie Lamport, Frank Mittelbach, Chris Rowley}
 \begin{document}
-\maketitle
-\DocInput{\filename}
+ \MaintainedByLaTeXTeam{latex}
+ \maketitle
+ \DocInput{\filename}
 \end{document}
 %</driver>
 % \fi
 %
-% \CheckSum{2799}
+% \CheckSum{3696}
 %
 %
 % \iffalse
@@ -119,6 +118,8 @@
 % \changes{v1.1h}{1994/11/17}
 %         {\cs{@tempa} to \cs{reserved@a}.}
 % \changes{v1.1m}{1995/05/07}{Use \cs{hb@xt@}.}
+% \changes{v1.2n}{2015/02/21}
+%         {Removed autoload code}
 %
 % \StopEventually{}
 %
@@ -142,7 +143,7 @@
 %
 % \begin{oldcomments}
 %    \begin{macrocode}
-%<*2ekernel|autoload>
+%<*2ekernel>
 \message{output,}
 %    \end{macrocode}
 %     ****************************************
@@ -725,6 +726,15 @@
 \gdef\@currlist{}
 \gdef\@deferlist{}
 \gdef\@dbltoplist{}
+%    \begin{macrocode}
+% \changes{v1.2m}{2015/03/12}
+%         {initialise \cs{@dbldeferlist} again}
+%    The new algorithm stores page wide floats together with column floats
+%    in a single |\@deferlist| list. We keep |\@dbldeferlist| 
+%    initialised  as empty so that packages that are testing for
+%    deferred floats can use the same code for old or new float
+%    handling. 
+%    \end{macrocode}
 \gdef\@dbldeferlist{}
 %    \end{macrocode}
 %
@@ -908,14 +918,14 @@
 %    \begin{macrocode}
 \def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else
     \hbox{}\newpage\if@twocolumn\hbox{}\newpage\fi\fi\fi}
-%</2ekernel|autoload>
+%</2ekernel>
 %    \end{macrocode}
 % \end{macro}
 %
 %  \begin{macro}{\onecolumn}
 % \changes{v1.0n}{1994/04/30}{Added setting of \cs{col@number}}
 %    \begin{macrocode}
-%<*2ekernel|autoload|fltrace>
+%<*2ekernel|fltrace>
 \def\onecolumn{%
   \clearpage
   \global\columnwidth\textwidth
@@ -1231,7 +1241,6 @@
     \global \vsize \maxdimen
   \fi
 }
-%</2ekernel|autoload|fltrace>
 %    \end{macrocode}
 %
 % \begin{oldcomments}
@@ -1246,7 +1255,6 @@
 % \end{oldcomments}
 %
 %    \begin{macrocode}
-%<*2ekernel|def1|autoload|fltrace>
 \gdef\@specialoutput{%
    \ifnum \outputpenalty>-\@Mii
      \@doclearpage
@@ -1304,7 +1312,6 @@
              \advance \@pageht \skip\footins
              \advance \@pageht \dp\footins
            \fi
-%<*2ekernel|def1>
            \ifvbox \@kludgeins
 %    \end{macrocode}
 %    We want to make the adjustment due to this insert only if the
@@ -1319,7 +1326,6 @@
 %</trace>
              \fi
            \fi
-%</2ekernel|def1>
 %    \end{macrocode}
 %    This version puts the inserts back just before the additional
 %    material; it could be moved earlier, before unboxing the
@@ -1354,11 +1360,62 @@
      \fi
    \fi
 }
-%</2ekernel|def1|autoload|fltrace>
+%</2ekernel|fltrace>
 %    \end{macrocode}
 %  \end{macro}
 %  \end{macro}
 %
+% \begin{macro}{\@testwrongwidth}
+% \begin{macro}{\f@depth}
+% \changes{v1.2n}{2015/02/21}{macro added(latexrelease)}
+%
+% Test if the float box has the wrong width when trying to place it
+% into some area. (Actually
+% the test is for a conventional depth setting rather than for the
+% width of the float. For that reason the box depth was explicitly
+%   tailored when the float was created).
+%    \begin{macrocode}
+%<latexrelease>\IncludeInRelease{2015/01/01}%
+%<latexrelease>                 {\@testwrongwidth}{float order in 2-column}%
+%<*2ekernel|latexrelease|fltrace>
+%    \end{macrocode}
+%
+%    \begin{macrocode}
+\def\@testwrongwidth #1{%
+  \ifdim\dp#1=\f@depth
+%<*trace>
+    \fl@trace{\string#1 
+              \ifdim\f@depth=\z@ single \else double \fi 
+              column float -- ok}%
+%</trace>
+  \else
+    \global\@testtrue
+%<*trace>
+    \fl@trace{\string#1
+              \ifdim\f@depth=\z@ double \else single \fi
+              column float -- wrong}%
+%</trace>
+  \fi}%
+%    \end{macrocode}
+%
+% Normally looking for single column floats, which have zero depth.
+%    \begin{macrocode}
+\let\f@depth\z@
+%    \end{macrocode}
+%
+%    \begin{macrocode}
+%</2ekernel|latexrelease|fltrace>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease>                 {\@testwrongwidth}{float order in 2-column}%
+%<latexrelease>\let\@testwrongwidth\@undefined
+%<latexrelease>\let\f@depth\@undefined
+%<latexrelease>\EndIncludeInRelease
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
 %  \begin{macro}{\@doclearpage}
 %  \task{CAR/FMi}{Investigate better float clearance}
 %  \task{CAR/FMi}{Put non-boxes back in the `right place', or nowhere?}
@@ -1372,16 +1429,18 @@
 %    for example, a kludge insert will be in quite the wrong place
 %    and, worse, be irremovable and uncancelable.
 %
+% \changes{v1.2n}{2015/01/14}{float order in 2-column (latexrelease)}
+% All the remaining changes are replacing the double column defer list
+% or inserting the extra test |\@testwrongwidth|\marg{box} at suitable
+% places. That is at places where a box is taken off the deferlist.
 %    \begin{macrocode}
-%<*2ekernel|autoload>
+%<latexrelease>\IncludeInRelease{2015/01/01}{\@doclearpage}%
+%<latexrelease>                             {float order in 2-column}%
+%<*2ekernel|latexrelease>
 \def \@doclearpage {%
      \ifvoid\footins
 %    \end{macrocode}
-% \changes{v1.2l}{2004/02/07}{Empty kludgeins box if necessary, pr/3528}
-%    We empty any left over kludge insert box here; this is a temporary fix.
-%    It should perhaps be applied to one page of cleared floats, but
-%    who cares?  The whole of this stuff needs completely redoing for
-%    many such reasons.
+% \changes{v1.2n}{2015/01/14}{Empty kludgeins box if necessary, pr/3528}
 %    \begin{macrocode}
        \ifvbox\@kludgeins
          {\setbox \@tempboxa \box \@kludgeins}%
@@ -1392,47 +1451,121 @@
        \setbox\@tempboxa\vsplit\@cclv to\z@ \unvbox\@tempboxa
        \setbox\@tempboxa\box\@cclv
        \xdef\@deferlist{\@toplist\@botlist\@deferlist}%
-%    \end{macrocode}
-% \changes{v1.0h}{1993/12/12}{defs changed to lets}
-%    \begin{macrocode}
        \global \let \@toplist \@empty
        \global \let \@botlist \@empty
        \global \@colroom \@colht
        \ifx \@currlist\@empty
        \else
           \@latexerr{Float(s) lost}\@ehb
-%    \end{macrocode}
-% \changes{v1.0h}{1993/12/12}{defs changed to lets}
-%    \begin{macrocode}
           \global \let \@currlist \@empty
        \fi
        \@makefcolumn\@deferlist
        \@whilesw\if@fcolmade \fi{\@opcol\@makefcolumn\@deferlist}%
        \if@twocolumn
          \if@firstcolumn
-           \xdef\@dbldeferlist{\@dbltoplist\@dbldeferlist}%
 %    \end{macrocode}
-% \changes{v1.0h}{1993/12/12}{defs changed to lets}
+%
+%    \begin{macrocode}
+           \xdef\@deferlist{\@dbltoplist\@deferlist}%
+%    \end{macrocode}
+%
 %    \begin{macrocode}
            \global \let \@dbltoplist \@empty
            \global \@colht \textheight
            \begingroup
               \@dblfloatplacement
-              \@makefcolumn\@dbldeferlist
+%    \end{macrocode}
+%
+%    \begin{macrocode}
+              \@makefcolumn\@deferlist
               \@whilesw\if@fcolmade \fi{\@outputpage
-                                        \@makefcolumn\@dbldeferlist}%
+                                        \@makefcolumn\@deferlist}%
+%    \end{macrocode}
+%
+%    \begin{macrocode}
            \endgroup
          \else
            \vbox{}\clearpage
          \fi
        \fi
+%    \end{macrocode}
+%    the next line is needed to avoid losing floats in certain
+%    circumstances a single call to the original |\doclearpage|
+%    will now no longer output all floats.
+% \changes{v1.2b}{2000/09/24}{FMi: ensure \cs{doclearpage}
+%     is called again until all floats are output.}
+%    \begin{macrocode}
+       \ifx\@deferlist\@empty \else\clearpage \fi
      \else
        \setbox\@cclv\vbox{\box\@cclv\vfil}%
        \@makecol\@opcol
        \clearpage
      \fi
-}
-%</2ekernel|autoload>
+}%
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}{\@doclearpage}%
+%<latexrelease>                             {float order in 2-column}%
+%<latexrelease>\def \@doclearpage {%
+%<latexrelease>     \ifvoid\footins
+%    \end{macrocode}
+% \changes{v1.2l}{2004/02/07}{Empty kludgeins box if necessary, pr/3528}
+%    We empty any left over kludge insert box here; this is a temporary fix.
+%    It should perhaps be applied to one page of cleared floats, but
+%    who cares?  The whole of this stuff needs completely redoing for
+%    many such reasons.
+%    \begin{macrocode}
+%<latexrelease>       \ifvbox\@kludgeins
+%<latexrelease>         {\setbox \@tempboxa \box \@kludgeins}%
+%<*trace>
+%<latexrelease>         \fl@trace {kludgeins box made void}%
+%</trace>
+%<latexrelease>       \fi
+%<latexrelease>       \setbox\@tempboxa\vsplit\@cclv to\z@ \unvbox\@tempboxa
+%<latexrelease>       \setbox\@tempboxa\box\@cclv
+%<latexrelease>       \xdef\@deferlist{\@toplist\@botlist\@deferlist}%
+%    \end{macrocode}
+% \changes{v1.0h}{1993/12/12}{defs changed to lets}
+%    \begin{macrocode}
+%<latexrelease>       \global \let \@toplist \@empty
+%<latexrelease>       \global \let \@botlist \@empty
+%<latexrelease>       \global \@colroom \@colht
+%<latexrelease>       \ifx \@currlist\@empty
+%<latexrelease>       \else
+%<latexrelease>          \@latexerr{Float(s) lost}\@ehb
+%    \end{macrocode}
+% \changes{v1.0h}{1993/12/12}{defs changed to lets}
+%    \begin{macrocode}
+%<latexrelease>          \global \let \@currlist \@empty
+%<latexrelease>       \fi
+%<latexrelease>       \@makefcolumn\@deferlist
+%<latexrelease>       \@whilesw\if@fcolmade \fi
+%<latexrelease>                     {\@opcol\@makefcolumn\@deferlist}%
+%<latexrelease>       \if@twocolumn
+%<latexrelease>         \if@firstcolumn
+%<latexrelease>           \xdef\@dbldeferlist{\@dbltoplist\@dbldeferlist}%
+%    \end{macrocode}
+% \changes{v1.0h}{1993/12/12}{defs changed to lets}
+%    \begin{macrocode}
+%<latexrelease>           \global \let \@dbltoplist \@empty
+%<latexrelease>           \global \@colht \textheight
+%<latexrelease>           \begingroup
+%<latexrelease>              \@dblfloatplacement
+%<latexrelease>              \@makefcolumn\@dbldeferlist
+%<latexrelease>              \@whilesw\if@fcolmade \fi
+%<latexrelease>                    {\@outputpage\@makefcolumn\@dbldeferlist}%
+%<latexrelease>           \endgroup
+%<latexrelease>         \else
+%<latexrelease>           \vbox{}\clearpage
+%<latexrelease>         \fi
+%<latexrelease>       \fi
+%<latexrelease>     \else
+%<latexrelease>       \setbox\@cclv\vbox{\box\@cclv\vfil}%
+%<latexrelease>       \@makecol\@opcol
+%<latexrelease>       \clearpage
+%<latexrelease>     \fi
+%<latexrelease>  }%
+%<latexrelease>\EndIncludeInRelease
 %    \end{macrocode}
 % \end{macro}
 %
@@ -1443,7 +1576,7 @@
 %    Several changes in detail here.
 %
 %    \begin{macrocode}
-%<*2ekernel|autoload|fltrace>
+%<*2ekernel|fltrace>
 \def \@opcol {%
   \if@twocolumn
     \@outputdblcol
@@ -1466,7 +1599,7 @@
   \global \@mparbottom \z@ \global \@textfloatsheight \z@
   \@floatplacement
 }
-%</2ekernel|autoload|fltrace>
+%</2ekernel|fltrace>
 %    \end{macrocode}
 %  \end{macro}
 %
@@ -1481,7 +1614,7 @@
 %    produced.
 %
 %    \begin{macrocode}
-%<*2ekernel|def1|autoload>
+%<*2ekernel>
 \gdef \@makecol {%
    \ifvoid\footins
      \setbox\@outputbox \box\@cclv
@@ -1542,11 +1675,9 @@
 %    The variations start here in case |\enlargethispage| has
 %    been used.
 %    \begin{macrocode}
-%<*2ekernel|def1>
    \ifvbox\@kludgeins
      \@makespecialcolbox
    \else
-%</2ekernel|def1>
 %    \end{macrocode}
 %    This extra reboxing is only needed to add the
 %    |\@texttop| and |\@textbotttom| but this could be done earlier,
@@ -1588,12 +1719,9 @@
        \vskip -\dimen@
        \@textbottom
        }%
-%<*2ekernel|def1>
    \fi
-%</2ekernel|def1>
    \global \maxdepth \@maxdepth
 }
-%</2ekernel|def1|autoload>
 %    \end{macrocode}
 %  \end{macro}
 %
@@ -1604,13 +1732,12 @@
 %    page.
 %    It has been put into a separate macro to expedite experimentation.
 %    \begin{macrocode}
-%<*2ekernel|def1|autoload>
 \gdef \@reinserts{%
   \ifvoid\footins\else\insert\footins{\unvbox\footins}\fi
-%<+2ekernel|def1>  \ifvbox\@kludgeins\insert\@kludgeins
-%<+2ekernel|def1>                      {\unvbox\@kludgeins}\fi
+  \ifvbox\@kludgeins\insert\@kludgeins
+                      {\unvbox\@kludgeins}\fi
 }
-%</2ekernel|def1|autoload>
+%</2ekernel>
 %    \end{macrocode}
 %  \end{macro}
 %
@@ -1620,7 +1747,7 @@
 % \changes{v1.0b}{1993/11/29}{Command added}
 %    This implements certain variations in page-makeup.
 %    \begin{macrocode}
-%<*2ekernel|def1|fltrace>
+%<*2ekernel|fltrace>
 \gdef \@makespecialcolbox {%
 %<*trace>
    \fl@trace{Kludgeins ht \the\ht\@kludgeins\space
@@ -1731,7 +1858,7 @@
      \fl@trace {kludgeins box made void}%
 %</trace>
 }
-%</2ekernel|def1|fltrace>
+%</2ekernel|fltrace>
 %    \end{macrocode}
 %  \end{macro}
 %
@@ -1739,7 +1866,7 @@
 %  \begin{macro}{\@textbottom}
 %    These do nothing as a default.
 %    \begin{macrocode}
-%<*2ekernel|autoload>
+%<*2ekernel>
 \let \@texttop \relax
 \let \@textbottom \relax
 %    \end{macrocode}
@@ -2147,7 +2274,7 @@
        }%
   \fi
 }
-%</2ekernel|autoload>
+%</2ekernel>
 %    \end{macrocode}
 %  \end{macro}
 %  \end{macro}
@@ -2168,7 +2295,7 @@
 %    The empty-list test has been moved to |\@tryfcolumn|.
 %
 %    \begin{macrocode}
-%<*2ekernel|autoload|fltrace>
+%<*2ekernel|fltrace>
 \def \@startcolumn {%
   \global \@colroom \@colht
   \@tryfcolumn \@deferlist
@@ -2193,29 +2320,53 @@
 %
 %    This one does not need to set |\@colht|.
 %
+% \changes{v1.2n}{2015/01/14}{float order in 2-column (latexrelease)}
 %    \begin{macrocode}
+%</2ekernel|fltrace>
+%<latexrelease|fltrace>\IncludeInRelease{2015/01/01}%
+%<latexrelease|fltrace>  {\@startdblcolumn}{float order in 2-column}%
+%<*2ekernel|latexrelease|fltrace>
 \def \@startdblcolumn {%
+  \@tryfcolumn \@deferlist
+  \if@fcolmade
+%<fltrace>    \fl@trace{PAGE: double float page completed}%
+  \else
+    \begingroup
+      \let \reserved@b \@deferlist
+      \global \let \@deferlist \@empty
+      \let \@elt \@sdblcolelt
+      \reserved@b
+    \endgroup
+  \fi
+}%
+%</2ekernel|latexrelease|fltrace>
+%<latexrelease|fltrace>\EndIncludeInRelease
+%<latexrelease|fltrace>\IncludeInRelease{0000/00/00}%
+%<latexrelease|fltrace>  {\@startdblcolumn}{float order in 2-column}%
+%<latexrelease|fltrace>\def \@startdblcolumn {%
 %    \end{macrocode}
 % Not needed since this always comes after |\@outputpage|:
 %    \begin{macrocode}
-% \global \@colht \textheight
-  \@tryfcolumn \@dbldeferlist
-  \if@fcolmade
+%<latexrelease|fltrace>% \global \@colht \textheight
+%<latexrelease|fltrace>  \@tryfcolumn \@dbldeferlist
+%<latexrelease|fltrace>  \if@fcolmade
 %<*trace>
-    \fl@trace{PAGE: double float page completed}%
+%<latexrelease|fltrace>    \fl@trace{PAGE: double float page completed}%
 %</trace>
-  \else
+%<latexrelease|fltrace>  \else
 %    \end{macrocode}
 % \changes{v1.0h}{1993/12/12}{defs changed to lets}
 %    \begin{macrocode}
-    \begingroup
-      \let \reserved@b \@dbldeferlist
-      \global \let \@dbldeferlist \@empty
-      \let \@elt \@sdblcolelt
-      \reserved@b
-    \endgroup
-  \fi
-}
+%<latexrelease|fltrace>    \begingroup
+%<latexrelease|fltrace>      \let \reserved@b \@dbldeferlist
+%<latexrelease|fltrace>      \global \let \@dbldeferlist \@empty
+%<latexrelease|fltrace>      \let \@elt \@sdblcolelt
+%<latexrelease|fltrace>      \reserved@b
+%<latexrelease|fltrace>    \endgroup
+%<latexrelease|fltrace>  \fi
+%<latexrelease|fltrace>}%
+%<latexrelease|fltrace>\EndIncludeInRelease
+%<*2ekernel|fltrace>
 %    \end{macrocode}
 %  \end{macro}
 %  \end{macro}
@@ -2247,13 +2398,13 @@
     \fi
   \fi
 }
-%</2ekernel|autoload|fltrace>
+%</2ekernel|fltrace>
 %    \end{macrocode}
 %
 %  \end{macro}
 %
 %    \begin{macrocode}
-%<*2ekernel|autoload>
+%<*2ekernel>
 %    \end{macrocode}
 %
 % \begin{macro}{\@scolelt}
@@ -2298,7 +2449,12 @@
 %
 % \begin{macro}{\@xtryfc}
 % \changes{v1.1v}{1996/07/26}{remove \cs{global} before \cs{@test...}}
+% \changes{v1.2n}{2015/01/14}{float order in 2-column (latexrelease)}
 %    \begin{macrocode}
+%</2ekernel>
+%<latexrelease>\IncludeInRelease{2015/01/01}{\@xtryfc}%
+%<latexrelease>                             {float order in 2-column}%
+%<*2ekernel|latexrelease>
 \def\@xtryfc #1{%
   \@next\reserved@a\@trylist{}{}%
   \@currtype \count #1%
@@ -2306,14 +2462,42 @@
   \multiply\@currtype\@xxxii
   \@bitor \@currtype \@failedlist
   \@testfp #1%
+%    \end{macrocode}
+%
+%    \begin{macrocode}
+  \@testwrongwidth #1%
+%    \end{macrocode}
+%
+%    \begin{macrocode}
   \ifdim \ht #1>\@colht
-    \@testtrue
+     \@testtrue
   \fi
   \if@test
     \@cons\@failedlist #1%
   \else
     \@ytryfc #1%
-  \fi}
+  \fi}%
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}{\@xtryfc}%
+%<latexrelease>                             {float order in 2-column}%
+%<latexrelease>\def\@xtryfc #1{%
+%<latexrelease>  \@next\reserved@a\@trylist{}{}%
+%<latexrelease>  \@currtype \count #1%
+%<latexrelease>  \divide\@currtype\@xxxii
+%<latexrelease>  \multiply\@currtype\@xxxii
+%<latexrelease>  \@bitor \@currtype \@failedlist
+%<latexrelease>  \@testfp #1%
+%<latexrelease>  \ifdim \ht #1>\@colht
+%<latexrelease>    \@testtrue
+%<latexrelease>  \fi
+%<latexrelease>  \if@test
+%<latexrelease>    \@cons\@failedlist #1%
+%<latexrelease>  \else
+%<latexrelease>    \@ytryfc #1%
+%<latexrelease>  \fi}%
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
 %    \end{macrocode}
 % \end{macro}
 %
@@ -2340,15 +2524,28 @@
 %
 % \begin{macro}{\@ztryfc}
 % \changes{v1.1v}{1996/07/26}{remove \cs{global} before \cs{@test...}}
+% \changes{v1.2n}{2015/01/14}{float order in 2-column (latexrelease)}
 %    \begin{macrocode}
+%</2ekernel>
+%<latexrelease>\IncludeInRelease{2015/01/01}{@ztryfc}%
+%<latexrelease>                             {float order in 2-column}%
+%<*2ekernel|latexrelease>
 \def\@ztryfc #1{%
-  \@tempcnta \count#1%
+  \@tempcnta\count #1%
   \divide\@tempcnta\@xxxii
   \multiply\@tempcnta\@xxxii
   \@bitor \@tempcnta {\@failedlist \@flfail}%
   \@testfp #1%
+%    \end{macrocode}
+%
+% not in fixfloats?
+%    \begin{macrocode}
+  \@testwrongwidth #1%
+%    \end{macrocode}
+%
+%    \begin{macrocode}
   \@tempdimb\@tempdima
-  \advance\@tempdimb \ht#1%
+  \advance\@tempdimb\ht #1%
   \advance\@tempdimb\@fpsep
   \ifdim \@tempdimb >\@colht
     \@testtrue
@@ -2358,13 +2555,33 @@
   \else
     \@cons\@flsucceed #1%
     \@tempdima\@tempdimb
-  \fi}
+  \fi}%
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}{@ztryfc}%
+%<latexrelease>                             {float order in 2-column}%
+%<latexrelease>\def\@ztryfc #1{%
+%<latexrelease>  \@tempcnta \count#1%
+%<latexrelease>  \divide\@tempcnta\@xxxii
+%<latexrelease>  \multiply\@tempcnta\@xxxii
+%<latexrelease>  \@bitor \@tempcnta {\@failedlist \@flfail}%
+%<latexrelease>  \@testfp #1%
+%<latexrelease>  \@tempdimb\@tempdima
+%<latexrelease>  \advance\@tempdimb \ht#1%
+%<latexrelease>  \advance\@tempdimb\@fpsep
+%<latexrelease>  \ifdim \@tempdimb >\@colht
+%<latexrelease>    \@testtrue
+%<latexrelease>  \fi
+%<latexrelease>  \if@test
+%<latexrelease>    \@cons\@flfail #1%
+%<latexrelease>  \else
+%<latexrelease>    \@cons\@flsucceed #1%
+%<latexrelease>    \@tempdima\@tempdimb
+%<latexrelease>  \fi}%
+%<latexrelease>\EndIncludeInRelease
 %    \end{macrocode}
 % \end{macro}
 %
-%    \begin{macrocode}
-%</2ekernel|autoload>
-%    \end{macrocode}
 %
 % The major changes for float suppression and the changes to the float
 % mechanism to make it conform to the documentation are in these next
@@ -2375,7 +2592,7 @@
 %    Lots of changes.
 %
 %    \begin{macrocode}
-%<*2ekernel|autoload|fltrace>
+%<*2ekernel|fltrace>
 \def \@addtobot {%
 %<*trace>
    \fl@trace{***Start addtobot}%
@@ -2449,7 +2666,7 @@
 %</trace>
          \if@test
 %<*trace>
-           \fl@trace{type already on list: mid or bot---sent to addtobot}%
+         \fl@trace{type already on list: mid or bot---sent to addtobot}%
 %</trace>
          \else
           \@flupdates \@topnum \@toproom \@toplist
@@ -2480,7 +2697,7 @@
      \@addtobot
    \fi
 }
-%</2ekernel|autoload|fltrace>
+%</2ekernel|fltrace>
 %    \end{macrocode}
 %  \end{macro}
 %
@@ -2490,8 +2707,11 @@
 % \task{CAR}{Investigate pagebreak option possibilities}
 %    Lots of changes.
 %
+% \changes{v1.2n}{2015/01/14}{float order in 2-column (latexrelease)}
 %    \begin{macrocode}
-%<*2ekernel|autoload|fltrace|flafter>
+%<latexrelease|fltrace|flafter>\IncludeInRelease{2015/01/01}%
+%<latexrelease|fltrace|flafter>  {\@addtocurcol}{float order in 2-column}%
+%<*2ekernel|latexrelease|fltrace|flafter>
 \def \@addtocurcol {%
 %<*trace>
   \fl@trace{***Start addtocurcol}%
@@ -2546,6 +2766,16 @@
          \@flsetnum \@colnum
          \ifnum \@colnum>\z@
            \@bitor\@currtype\@deferlist
+%    \end{macrocode}
+%    We need to defer the float also if its width
+%    doesn't fit.
+% \changes{v1.2n}{2000/09/24}{FMi: test for wide float was
+%    in wrong place}
+%    \begin{macrocode}
+          \@testwrongwidth\@currbox
+%    \end{macrocode}
+%
+%    \begin{macrocode}
 %<*trace>
            \fl@trace{deferlist: \@deferlist: (addtocurcol-before)}%
 %</trace>
@@ -2579,10 +2809,10 @@
                    \global \advance \@textfloatsheight 2\intextsep
                    \@cons \@midlist \@currbox
 %<*trace>
-                   \fl@trace{***Success: here}%
-                   \fl@trace{textfloatsheight (after-here) =
-                        \the \@textfloatsheight}%
-                   \fl@trace{colnum (after-here) = \the \@colnum}%
+                 \fl@trace{***Success: here}%
+                 \fl@trace{textfloatsheight (after-here) =
+                      \the \@textfloatsheight}%
+                 \fl@trace{colnum (after-here) = \the \@colnum}%
 %</trace>
 %    \end{macrocode}
 %
@@ -2649,18 +2879,18 @@
 %   \texttt{flafter} package. Guess that could have been done a bit
 %   more obvious :-)
 %    \begin{macrocode}
-%<*2ekernel|autoload|fltrace>
+%<*2ekernel|fltrace|latexrelease>
 %<*trace>
                  \fl@trace{not here: sent to addtotoporbot}%
 %</trace>
                  \@addtotoporbot
-%</2ekernel|autoload|fltrace>
-%<*!2ekernel&!autoload&!fltrace>
+%</2ekernel|fltrace|latexrelease>
+%<*!2ekernel&!fltrace>
 %<*trace>
                  \fl@trace{not here: sent to addtobot}%
 %</trace>
                  \@addtobot
-%</!2ekernel&!autoload&!fltrace>
+%</!2ekernel&!fltrace>
                \fi
              \fi
            \fi
@@ -2692,8 +2922,234 @@
      \fl@trace{deferlist: \@deferlist: (addtocurcol-after)}%
 %</trace>
    \fi
-}
-%</2ekernel|autoload|fltrace|flafter>
+}%
+%</2ekernel|latexrelease|fltrace|flafter>
+%<latexrelease|fltrace|flafter>\EndIncludeInRelease
+%<latexrelease|fltrace|flafter>\IncludeInRelease{0000/00/00}%
+%<latexrelease|fltrace|flafter>  {\@addtocurcol}{float order in 2-column}%
+%<latexrelease|fltrace|flafter>\def \@addtocurcol {%
+%<*trace>
+%<latexrelease|fltrace|flafter>  \fl@trace{***Start addtocurcol}%
+%</trace>
+%<latexrelease|fltrace|flafter>   \@insertfalse
+%<latexrelease|fltrace|flafter>   \@setfloattypecounts
+%<latexrelease|fltrace|flafter>   \ifnum \@fpstype=8
+%<*trace>
+%<latexrelease|fltrace|flafter>     \fl@trace{fpstype !p only (addtocurcol):
+%<latexrelease|fltrace|flafter>                            \the \@fpstype = 8?}%
+%</trace>
+%<latexrelease|fltrace|flafter>   \else
+%<latexrelease|fltrace|flafter>     \ifnum \@fpstype=24
+%<*trace>
+%<latexrelease|fltrace|flafter>      \fl@trace{fpstype p only (addtocurcol):
+%<latexrelease|fltrace|flafter>                           \the \@fpstype = 24?}%
+%</trace>
+%<latexrelease|fltrace|flafter>     \else
+%<latexrelease|fltrace|flafter>       \@flsettextmin
+%    \end{macrocode}
+% This is a new adjustment which is quite a major change in
+% functionality; but it implements the documentation.
+% Note that |\@reqcolroom| will include the whole of the
+% page-so-far, and hence includes |\@textfloatsheight| of floats,
+% so before comparing it with |\@textmin|, we add this to
+% |\@textmin| also.
+%    \begin{macrocode}
+%<*trace>
+%<latexrelease|fltrace|flafter>       \fl@trace{textfloatsheight (before) = 
+%<latexrelease|fltrace|flafter>                        \the \@textfloatsheight}%
+%</trace>
+%<latexrelease|fltrace|flafter>       \advance \@textmin \@textfloatsheight
+%<latexrelease|fltrace|flafter>       \@reqcolroom \@pageht
+%    \end{macrocode}
+% This line must be removed since |\@specialoutput| changed.
+%    \begin{macrocode}
+%       \advance \@reqcolroom \@pagedp
+%<*trace>
+%<latexrelease|fltrace|flafter>       \fl@trace{textmin + textfloatsheight:
+%<latexrelease|fltrace|flafter>                                 \the \@textmin}%
+%<latexrelease|fltrace|flafter>       \fl@trace{page-so-far: \the \@reqcolroom}%
+%<latexrelease|fltrace|flafter>
+%</trace>
+%<latexrelease|fltrace|flafter>       \ifdim \@textmin>\@reqcolroom
+%<latexrelease|fltrace|flafter>         \@reqcolroom \@textmin
+%<*trace>
+%<latexrelease|fltrace|flafter>         \fl@trace{ORD? textmin being used}%
+%</trace>
+%<latexrelease|fltrace|flafter>       \fi
+%<latexrelease|fltrace|flafter>       \advance \@reqcolroom \ht\@currbox
+%<*trace>
+%<latexrelease|fltrace|flafter>       \fl@trace{float size = 
+%<latexrelease|fltrace|flafter>               \the \ht \@currbox (addtocurcol)}%
+%<latexrelease|fltrace|flafter>       \fl@trace{colroom =
+%<latexrelease|fltrace|flafter>                   \the \@colroom (addtocurcol)}%
+%<latexrelease|fltrace|flafter>       \fl@trace{reqcolroom =
+%<latexrelease|fltrace|flafter>                \the \@reqcolroom (addtocurcol)}%
+%</trace>
+%<latexrelease|fltrace|flafter>       \ifdim \@colroom>\@reqcolroom
+%<latexrelease|fltrace|flafter>         \@flsetnum \@colnum
+%<latexrelease|fltrace|flafter>         \ifnum \@colnum>\z@
+%<latexrelease|fltrace|flafter>           \@bitor\@currtype\@deferlist
+%<*trace>
+%<latexrelease|fltrace|flafter>           \fl@trace{deferlist:
+%<latexrelease|fltrace|flafter>              \@deferlist: (addtocurcol-before)}%
+%</trace>
+%<latexrelease|fltrace|flafter>           \if@test
+%<*trace>
+%<latexrelease|fltrace|flafter>             \fl@trace{type already on list:
+%<latexrelease|fltrace|flafter>                            defer (addtocurcol)}%
+%</trace>
+%<latexrelease|fltrace|flafter>           \else
+%<latexrelease|fltrace|flafter>             \@bitor\@currtype\@botlist
+%<*trace>
+%<latexrelease|fltrace|flafter>           \fl@trace{botlist: \@botlist:
+%<latexrelease|fltrace|flafter>                           (addtocurcol-before)}%
+%</trace>
+%<latexrelease|fltrace|flafter>             \if@test
+%<*trace>
+%<latexrelease|fltrace|flafter>               \fl@trace{type already on list:
+%<latexrelease|fltrace|flafter>                         bot---sent to addtobot}%
+%</trace>
+%<latexrelease|fltrace|flafter>               \@addtobot
+%<latexrelease|fltrace|flafter>             \else
+%<*trace>
+%<latexrelease|fltrace|flafter>               \fl@trace{fpstype
+%<latexrelease|fltrace|flafter>               \ifodd \@tempcnta OK \else not \fi
+%<latexrelease|fltrace|flafter>               here: \the \@fpstype}%
+%</trace>
+%<latexrelease|fltrace|flafter>               \ifodd \count\@currbox
+%<latexrelease|fltrace|flafter>                 \advance \@reqcolroom \intextsep
+%<latexrelease|fltrace|flafter>                 \ifdim \@colroom>\@reqcolroom
+%<latexrelease|fltrace|flafter>                  \global \advance \@colnum \m@ne
+%<latexrelease|fltrace|flafter>                  \global \advance
+%<latexrelease|fltrace|flafter>                   \@textfloatsheight\ht\@currbox
+%    \end{macrocode}
+% This may sometimes give an overestimate.
+%    \begin{macrocode}
+%<latexrelease|fltrace|flafter>                  \global \advance
+%<latexrelease|fltrace|flafter>                   \@textfloatsheight 2\intextsep
+%<latexrelease|fltrace|flafter>                   \@cons \@midlist \@currbox
+%<*trace>
+%<latexrelease|fltrace|flafter>                 \fl@trace{***Success: here}%
+%<latexrelease|fltrace|flafter>                 \fl@trace{textfloatsheight
+%<latexrelease|fltrace|flafter>                      (after-here) =
+%<latexrelease|fltrace|flafter>                      \the \@textfloatsheight}%
+%<latexrelease|fltrace|flafter>                 \fl@trace{colnum (after-here) =
+%<latexrelease|fltrace|flafter>                          \the \@colnum}%
+%</trace>
+%    \end{macrocode}
+%
+% CHANGE TO |\@addtocurcol|:
+%
+% |\penalty\z@| changed to |\penalty\interlinepenalty| so |\samepage|
+% works properly with figure and table environments.
+% (Changed 23 Oct 86)
+%
+% There is also an |\addpenalty\interlinepenalty| above.
+%
+% Since in 2e |\samepage| is no longer supported, these could be
+% removed.
+%
+% Although it is best to use |\addvspace| in case two h floats come
+% together, this makes other spacing more difficult to adjust; whereas
+% if a user specifies two h floats together then they can more easily
+% get the spacing correct by ad hoc commands.
+%
+% It is necessary to adjust for the addition of |\parskip| here in
+% case the float is added between paragraphs (\ie when in vertical
+% mode).
+%
+% If the nobreak switch is true we need to reset it and clear
+% |\everypar| since the float may not reset the flag and cannot reset
+% the |\everypar| globally.
+% \changes{v1.0l}{1994/03/15}{Changed \cs{addvspace} to \cs{vskip}}
+% \changes{v1.1i}{1994/11/21}
+%   {Added \cs{if@nobreak} test before float box}
+% \changes{v1.1z}{1996/10/24}{Added \cs{nobreak}, etc as appropriate}
+%
+% Typesetting starts here (we are in vertical mode).
+%    \begin{macrocode}
+%<latexrelease|fltrace|flafter>                   \if@nobreak
+%<latexrelease|fltrace|flafter>                     \nobreak
+%<latexrelease|fltrace|flafter>                     \@nobreakfalse
+%<latexrelease|fltrace|flafter>                     \everypar{}%
+%<latexrelease|fltrace|flafter>                   \else
+%<latexrelease|fltrace|flafter>                     \addpenalty\interlinepenalty
+%<latexrelease|fltrace|flafter>                   \fi
+%<latexrelease|fltrace|flafter>                   \vskip \intextsep
+%<latexrelease|fltrace|flafter>                   \box\@currbox
+%<latexrelease|fltrace|flafter>                   \penalty\interlinepenalty
+%<latexrelease|fltrace|flafter>                   \vskip\intextsep
+%<latexrelease|fltrace|flafter>                   \ifnum\outputpenalty 
+%<latexrelease|fltrace|flafter>                               <-\@Mii \vskip
+%<latexrelease|fltrace|flafter>                        -\parskip\fi
+%    \end{macrocode}
+% Typesetting ends here.
+%    \begin{macrocode}
+%<latexrelease|fltrace|flafter>                   \outputpenalty \z@
+%<latexrelease|fltrace|flafter>                   \@inserttrue
+%<*trace>
+%<latexrelease|fltrace|flafter>                 \else
+%<latexrelease|fltrace|flafter>  \fl@trace{Fail---no room at 2nd test of colroom
+%<latexrelease|fltrace|flafter>                (addtocorcol \string\intextsep)}%
+%</trace>
+%<latexrelease|fltrace|flafter>                 \fi
+%<latexrelease|fltrace|flafter>               \fi
+%<latexrelease|fltrace|flafter>               \if@insert
+%<latexrelease|fltrace|flafter>               \else
+%    \end{macrocode}
+%   Next set of docstrip guards are a bit weird, essentially
+%   |\@addtotoporbot| ends up inside the kernel and the
+%   \texttt{fltrace} package and |\@addtotoporbot| shows up in the
+%   \texttt{flafter} package. Guess that could have been done a bit
+%   more obvious :-)
+%    \begin{macrocode}
+%<*2ekernel|fltrace>
+%<*trace>
+%<latexrelease|fltrace|flafter>      \fl@trace{not here: sent to addtotoporbot}%
+%</trace>
+%<latexrelease|fltrace|flafter>                 \@addtotoporbot
+%</2ekernel|fltrace>
+%<*!2ekernel&!autoload&!fltrace>
+%<*trace>
+%<latexrelease|fltrace|flafter>       \fl@trace{not here: sent to addtobot}%
+%</trace>
+%<latexrelease|fltrace|flafter>                 \@addtobot
+%</!2ekernel&!autoload&!fltrace>
+%<latexrelease|fltrace|flafter>               \fi
+%<latexrelease|fltrace|flafter>             \fi
+%<latexrelease|fltrace|flafter>           \fi
+%<*trace>
+%<latexrelease|fltrace|flafter>         \else
+%<latexrelease|fltrace|flafter>         \fl@trace{Fail: colnum = \the \@colnum:
+%<latexrelease|fltrace|flafter>                    fpstype \the \@fpstype=ORD?}%
+%<latexrelease|fltrace|flafter>         \ifnum \@fpstype<\sixt@@n
+%<latexrelease|fltrace|flafter>  \fl@trace{ERROR: BANG float not successful 
+%<latexrelease|fltrace|flafter>                                  (addtocurcol)}%
+%<latexrelease|fltrace|flafter>           \fi
+%</trace>
+%<latexrelease|fltrace|flafter>         \fi
+%<*trace>
+%<latexrelease|fltrace|flafter>       \else
+%<latexrelease|fltrace|flafter>         \fl@trace{Fail---no room: fl box ht: 
+%<latexrelease|fltrace|flafter>               \the \ht \@currbox (addtocurcol)}%
+%</trace>
+%<latexrelease|fltrace|flafter>       \fi
+%<latexrelease|fltrace|flafter>     \fi
+%<latexrelease|fltrace|flafter>   \fi
+%<latexrelease|fltrace|flafter>   \if@insert
+%<latexrelease|fltrace|flafter>   \else
+%<latexrelease|fltrace|flafter>     \@resethfps
+%<*trace>
+%<latexrelease|fltrace|flafter>     \fl@trace{put on deferlist (addtocurcol)}%
+%</trace>
+%<latexrelease|fltrace|flafter>     \@cons\@deferlist\@currbox
+%<*trace>
+%<latexrelease|fltrace|flafter>     \fl@trace{deferlist: \@deferlist:
+%<latexrelease|fltrace|flafter>                          (addtocurcol-after)}%
+%</trace>
+%<latexrelease|fltrace|flafter>   \fi
+%<latexrelease|fltrace|flafter>  }%
+%<latexrelease|fltrace|flafter>\EndIncludeInRelease
 %    \end{macrocode}
 %  \end{macro}
 %
@@ -2701,8 +3157,11 @@
 % \changes{v1.0f}{1993/12/05}{Command changed}
 %    Lots of changes.
 %
+% \changes{v1.2n}{2015/01/14}{float order in 2-column (latexrelease)}
 %    \begin{macrocode}
-%<*2ekernel|autoload|fltrace>
+%<latexrelease|fltrace>\IncludeInRelease{2015/01/01}
+%<latexrelease|fltrace>  {\@addtonextcol}{float order in 2-column}%
+%<*2ekernel|fltrace>
 \def\@addtonextcol{%
   \begingroup
 %<*trace>
@@ -2740,6 +3199,13 @@
 %<*trace>
             \fl@trace{deferlist: \@deferlist: (addtonextcol-before)}%
 %</trace>
+%    \end{macrocode}
+%
+%    \begin{macrocode}
+            \@testwrongwidth\@currbox
+%    \end{macrocode}
+%
+%    \begin{macrocode}
             \if@test
 %<*trace>
               \fl@trace{type already on list: defer (addtonextcol)}%
@@ -2770,23 +3236,124 @@
 %</trace>
    \fi
 %<*trace>
-   \fl@trace{End of addtonextcol -- locally counts:}%
-   \fl@trace{ col: \the \@colnum. top: \the \@topnum. bot: \the \@botnum.}%
+  \fl@trace{End of addtonextcol -- locally counts:}%
+  \fl@trace{col: \the\@colnum. top: \the \@topnum. bot: \the \@botnum.}%
 %</trace>
   \endgroup
 %<*trace>
-  \fl@trace{End of addtonextcol -- globally counts:}%
-  \fl@trace{col: \the \@colnum. top: \the \@topnum. bot: \the \@botnum.}%
+ \fl@trace{End of addtonextcol -- globally counts:}%
+ \fl@trace{col: \the\@colnum. top: \the \@topnum. bot: \the \@botnum.}%
 %</trace>
-}
+}%
+%</2ekernel|fltrace>
+%<latexrelease|fltrace>\EndIncludeInRelease
+%<latexrelease|fltrace>\IncludeInRelease{0000/00/00}%
+%<latexrelease|fltrace>  {\@addtonextcol}{float order in 2-column}%
+%<latexrelease|fltrace>\def\@addtonextcol{%
+%<latexrelease|fltrace>  \begingroup
+%<*trace>
+%<latexrelease|fltrace>   \fl@trace{***Start addtonextcol}%
+%</trace>
+%<latexrelease|fltrace>   \@insertfalse
+%<latexrelease|fltrace>   \@setfloattypecounts
+%<latexrelease|fltrace>   \ifnum \@fpstype=8
+%<*trace>
+%<latexrelease|fltrace>     \fl@trace{fpstype not curcol:
+%<latexrelease|fltrace>                    \the \@fpstype = 8?}%
+%</trace>
+%<latexrelease|fltrace>   \else
+%<latexrelease|fltrace>     \ifnum \@fpstype=24
+%<*trace>
+%<latexrelease|fltrace>       \fl@trace{fpstype not curcol:
+%<latexrelease|fltrace>                       \the \@fpstype = 24?}%
+%</trace>
+%<latexrelease|fltrace>     \else
+%<latexrelease|fltrace>       \@flsettextmin
+%<*trace>
+%<latexrelease|fltrace>       \fl@trace{text-so-far: 0pt (top of col)}%
+%</trace>
+%<latexrelease|fltrace>       \@reqcolroom \ht\@currbox
+%<*trace>
+%<latexrelease|fltrace>       \fl@trace{float size:
+%<latexrelease|fltrace>               \the \@reqcolroom (addtonextcol)}%
+%<latexrelease|fltrace>
+%</trace>
+%<latexrelease|fltrace>       \advance \@reqcolroom \@textmin
+%<*trace>
+%<latexrelease|fltrace>       \fl@trace{colroom =
+%<latexrelease|fltrace>                  \the \@colroom (addtonextcol)}%
+%<latexrelease|fltrace>       \fl@trace{reqcolroom =
+%<latexrelease|fltrace>               \the \@reqcolroom (addtonextcol)}%
+%</trace>
+%<latexrelease|fltrace>       \ifdim \@colroom>\@reqcolroom
+%<latexrelease|fltrace>         \@flsetnum \@colnum
+%<latexrelease|fltrace>         \ifnum\@colnum>\z@
+%<latexrelease|fltrace>            \@bitor\@currtype\@deferlist
+%<*trace>
+%<latexrelease|fltrace>            \fl@trace{deferlist: \@deferlist:
+%<latexrelease|fltrace>                          (addtonextcol-before)}%
+%</trace>
+%<latexrelease|fltrace>            \if@test
+%<*trace>
+%<latexrelease|fltrace>              \fl@trace{type already on list:
+%<latexrelease|fltrace>                           defer (addtonextcol)}%
+%</trace>
+%<latexrelease|fltrace>            \else
+%<*trace>
+%<latexrelease|fltrace>              \fl@trace{sent to addtotoporbot
+%<latexrelease|fltrace>                                 (addtonextcol)}%
+%</trace>
+%<latexrelease|fltrace>              \@addtotoporbot
+%<latexrelease|fltrace>            \fi
+%<latexrelease|fltrace>         \fi
+%<*trace>
+%<latexrelease|fltrace>       \else
+%<latexrelease|fltrace>         \fl@trace{Fail---no room: fl box ht:
+%<latexrelease|fltrace>              \the \ht \@currbox (addtonextcol)}%
+%</trace>
+%<latexrelease|fltrace>       \fi
+%<latexrelease|fltrace>     \fi
+%<latexrelease|fltrace>   \fi
+%<latexrelease|fltrace>   \if@insert
+%<latexrelease|fltrace>   \else
+%<*trace>
+%<latexrelease|fltrace>     \fl@trace{put back on deferlist
+%<latexrelease|fltrace>                                (addtonextcol)}%
+%</trace>
+%<latexrelease|fltrace>     \@cons\@deferlist\@currbox
+%<*trace>
+%<latexrelease|fltrace>     \fl@trace{deferlist: \@deferlist:
+%<latexrelease|fltrace>                           (addtonextcol-after)}%
+%</trace>
+%<latexrelease|fltrace>   \fi
+%<*trace>
+%<latexrelease|fltrace>   \fl@trace{End of addtonextcol --
+%<latexrelease|fltrace>                             locally counts:}%
+%<latexrelease|fltrace>   \fl@trace{col: \the \@colnum. 
+%<latexrelease|fltrace>      top: \the \@topnum. bot: \the \@botnum.}%
+%</trace>
+%<latexrelease|fltrace>  \endgroup
+%<*trace>
+%<latexrelease|fltrace>  \fl@trace{End of addtonextcol --
+%<latexrelease|fltrace>                           globally counts:}%
+%<latexrelease|fltrace>  \fl@trace{col: \the \@colnum.
+%<latexrelease|fltrace>        top: \the \@topnum. bot: \the \@botnum.}%
+%</trace>
+%<latexrelease|fltrace>}%
+%<latexrelease|fltrace>\EndIncludeInRelease
 %    \end{macrocode}
+%
 %  \end{macro}
 %
 %  \begin{macro}{\@addtodblcol}
 % \changes{v1.0f}{1993/12/05}{Command changed}
 %    Lots of changes.
 %
+% \changes{v1.2n}{2015/01/14}{float order in 2-column (latexrelease)}
 %    \begin{macrocode}
+%<latexrelease|fltrace>\IncludeInRelease{2015/01/01}%
+%<latexrelease|fltrace>  {\@addtodblcol}{float order in 2-column}%
+%<*2ekernel|latexrelease|fltrace>
 \def\@addtodblcol{%
   \begingroup
 %<*trace>
@@ -2833,8 +3400,8 @@
            \ifdim \@dbltoproom>\ht\@currbox
              \@tempswatrue
 %<*trace>
-             \fl@trace{Space OK BANG: space on page = \the \@dbltoproom >
-                                              \the \ht \@currbox}%
+             \fl@trace{Space OK BANG: space on page =
+                         \the \@dbltoproom > \the \ht \@currbox}%
            \else
              \fl@trace{fpstype: \the \@fpstype}%
              \fl@trace{Fail---no room dbltoproom-BANG?:}%
@@ -2853,13 +3420,21 @@
          \fi
        \fi
        \if@tempswa
-           \@bitor \@currtype \@dbldeferlist
+           \@bitor \@currtype \@deferlist
 %<*trace>
-           \fl@trace{dbldeferlist: \@dbldeferlist: (before)}%
+           \fl@trace{(dbl)deferlist: \@deferlist: (before)}%
 %</trace>
+%    \end{macrocode}
+%
+% not in fixfloats?
+%    \begin{macrocode}
+          \@testwrongwidth\@currbox
+%    \end{macrocode}
+%
+%    \begin{macrocode}
            \if@test
 %<*trace>
-              \fl@trace{type already on list: dbldefer}%
+              \fl@trace{type already on list: (dbl)defer}%
 %</trace>
            \else
               \@tempdima -\ht\@currbox
@@ -2890,11 +3465,11 @@
    \if@insert
    \else
 %<*trace>
-     \fl@trace{put on dbldeferlist}%
+     \fl@trace{put on deferlist}%
 %</trace>
-     \@cons\@dbldeferlist\@currbox
+     \@cons\@deferlist\@currbox
 %<*trace>
-     \fl@trace{dbldeferlist: \@dbldeferlist: (after)}%
+     \fl@trace{(dbl)deferlist: \@deferlist: (after)}%
 %</trace>
    \fi
 %<*trace>
@@ -2906,8 +3481,140 @@
   \fl@trace{End of addtodblcol -- globally count:}%
   \fl@trace{dbltop: \the \@dbltopnum.}%
 %</trace>
-}
-%</2ekernel|autoload|fltrace>
+}%
+%</2ekernel|latexrelease|fltrace>
+%<latexrelease|fltrace>\EndIncludeInRelease
+%<latexrelease|fltrace>\IncludeInRelease{0000/00/00}%
+%<latexrelease|fltrace>  {\@addtodblcol}{float order in 2-column}%
+%<latexrelease|fltrace>\def\@addtodblcol{%
+%<latexrelease|fltrace>  \begingroup
+%<*trace>
+%<latexrelease|fltrace>  \fl@trace{***Start addtodblcol}%
+%</trace>
+%<latexrelease|fltrace>   \@insertfalse
+%<latexrelease|fltrace>   \@setfloattypecounts
+%<latexrelease|fltrace>   \@getfpsbit \tw@
+%<*trace>
+%<latexrelease|fltrace>   \fl@trace{fpstype \ifodd \@tempcnta OK
+%<latexrelease|fltrace>                \else not \fi dbltop: \the \@fpstype}%
+%</trace>
+%<latexrelease|fltrace>   \ifodd\@tempcnta
+%<latexrelease|fltrace>     \@flsetnum \@dbltopnum
+%<latexrelease|fltrace>     \ifnum \@dbltopnum>\z@
+%<latexrelease|fltrace>       \@tempswafalse
+%<latexrelease|fltrace>       \ifdim \@dbltoproom>\ht\@currbox
+%<latexrelease|fltrace>         \@tempswatrue
+%<*trace>
+%<latexrelease|fltrace>         \fl@trace{Space OK: \@dbltoproom =
+%<latexrelease|fltrace>                \the \@dbltoproom > \the \ht \@currbox
+%<latexrelease|fltrace>                                         (dbltoproom)}%
+%</trace>
+%<latexrelease|fltrace>       \else
+%<*trace>
+%<latexrelease|fltrace>      \fl@trace{fpstype: \the \@fpstype (addtodblcol)}%
+%</trace>
+%<latexrelease|fltrace>         \ifnum \@fpstype<\sixt@@n
+%<*trace>
+%<latexrelease|fltrace>           \fl@trace{BANG float ignoring \@dbltoproom}%
+%<latexrelease|fltrace>           \fl@trace{\@spaces \@dbltoproom =
+%<latexrelease|fltrace>                    \the \@dbltoproom.
+%<latexrelease|fltrace>                    Ht float: \the \ht \@currbox-BANG}%
+%</trace>
+%    \end{macrocode}
+% Need to check that there is room on the page, using the local value
+% of |\@textmin| to make the necessary adjustment to |\@dbltoproom|.
+%    \begin{macrocode}
+%<latexrelease|fltrace>           \advance \@dbltoproom \@textmin
+%<*trace>
+%<latexrelease|fltrace>       \fl@trace{Local value of texmin: \the\@textmin}%
+%<latexrelease|fltrace>       \fl@trace{\@spaces space on page =
+%<latexrelease|fltrace>                   \the \@dbltoproom.
+%<latexrelease|fltrace>                    Ht float: \the \ht \@currbox-BANG}%
+%</trace>
+%<latexrelease|fltrace>           \ifdim \@dbltoproom>\ht\@currbox
+%<latexrelease|fltrace>             \@tempswatrue
+%<*trace>
+%<latexrelease|fltrace>         \fl@trace{Space OK BANG: space on page =
+%<latexrelease|fltrace>                 \the\@dbltoproom > \the\ht\@currbox}%
+%<latexrelease|fltrace>           \else
+%<latexrelease|fltrace>         \fl@trace{fpstype: \the \@fpstype}%
+%<latexrelease|fltrace>         \fl@trace{Fail---no room dbltoproom-BANG?:}%
+%<latexrelease|fltrace>         \fl@trace{\@spaces space on page =
+%<latexrelease|fltrace>                      \the \@dbltoproom.
+%<latexrelease|fltrace>                       Ht float: \the \ht \@currbox}%
+%</trace>
+%<latexrelease|fltrace>           \fi
+%<latexrelease|fltrace>           \advance \@dbltoproom -\@textmin
+%<*trace>
+%<latexrelease|fltrace>         \else
+%<latexrelease|fltrace>           \fl@trace{fpstype: \the \@fpstype}%
+%<latexrelease|fltrace>           \fl@trace{Fail---no room dbltoproom-ORD?:}%
+%<latexrelease|fltrace>           \fl@trace{\@spaces \@dbltoproom =
+%<latexrelease|fltrace>              \the \@dbltoproom.
+%<latexrelease|fltrace>              Ht float: \the \ht \@currbox}%
+%</trace>
+%<latexrelease|fltrace>         \fi
+%<latexrelease|fltrace>       \fi
+%<latexrelease|fltrace>       \if@tempswa
+%<latexrelease|fltrace>           \@bitor \@currtype \@dbldeferlist
+%<*trace>
+%<latexrelease|fltrace>           \fl@trace{dbldeferlist:
+%<latexrelease|fltrace>                      \@dbldeferlist: (before)}%
+%</trace>
+%<latexrelease|fltrace>           \if@test
+%<*trace>
+%<latexrelease|fltrace>             \fl@trace{type already on list: dbldefer}%
+%</trace>
+%<latexrelease|fltrace>           \else
+%<latexrelease|fltrace>              \@tempdima -\ht\@currbox
+%<latexrelease|fltrace>              \advance\@tempdima
+%<latexrelease|fltrace>                -\ifx \@dbltoplist\@empty
+%<latexrelease|fltrace>                      \dbltextfloatsep
+%<latexrelease|fltrace>                 \else \dblfloatsep \fi
+%<latexrelease|fltrace>              \global \advance \@dbltoproom \@tempdima
+%<latexrelease|fltrace>              \global \advance \@colht \@tempdima
+%<latexrelease|fltrace>              \global \advance \@dbltopnum \m@ne
+%<latexrelease|fltrace>              \@cons \@dbltoplist \@currbox
+%<*trace>
+%<latexrelease|fltrace>              \fl@trace{dbltopnum (after) =
+%<latexrelease|fltrace>                                    \the \@dbltopnum}%
+%<latexrelease|fltrace>              \fl@trace{***Success: dbltop}%
+%</trace>
+%<latexrelease|fltrace>              \@inserttrue
+%<latexrelease|fltrace>           \fi
+%<latexrelease|fltrace>       \fi
+%<*trace>
+%<latexrelease|fltrace>     \else
+%<latexrelease|fltrace>       \fl@trace{Fail: dbltopnum = \the \@dbltopnum:
+%<latexrelease|fltrace>                          fpstype \the \@fpstype=ORD?}%
+%<latexrelease|fltrace>       \ifnum \@fpstype<\sixt@@n
+%<latexrelease|fltrace>         \fl@trace{ERROR: !t float not successful
+%<latexrelease|fltrace>                                        (addtodblcol)}%
+%<latexrelease|fltrace>       \fi
+%</trace>
+%<latexrelease|fltrace>     \fi
+%<latexrelease|fltrace>   \fi
+%<latexrelease|fltrace>   \if@insert
+%<latexrelease|fltrace>   \else
+%<*trace>
+%<latexrelease|fltrace>     \fl@trace{put on dbldeferlist}%
+%</trace>
+%<latexrelease|fltrace>     \@cons\@dbldeferlist\@currbox
+%<*trace>
+%<latexrelease|fltrace>     \fl@trace{dbldeferlist: \@dbldeferlist: (after)}%
+%</trace>
+%<latexrelease|fltrace>   \fi
+%<*trace>
+%<latexrelease|fltrace>   \fl@trace{End of addtodblcol -- locally count:}%
+%<latexrelease|fltrace>   \fl@trace{ dbltop: \the \@dbltopnum.}%
+%</trace>
+%<latexrelease|fltrace>  \endgroup
+%<*trace>
+%<latexrelease|fltrace>  \fl@trace{End of addtodblcol -- globally count:}%
+%<latexrelease|fltrace>  \fl@trace{dbltop: \the \@dbltopnum.}%
+%</trace>
+%<latexrelease|fltrace>}%
+%<latexrelease|fltrace>\EndIncludeInRelease
 %    \end{macrocode}
 %  \end{macro}
 %
@@ -2915,7 +3622,7 @@
 %
 % \begin{macro}{\@addmarginpar}
 %    \begin{macrocode}
-%<*2ekernel|autoload>
+%<*2ekernel>
 \def\@addmarginpar{\@next\@marbox\@currlist{\@cons\@freelist\@marbox
     \@cons\@freelist\@currbox}\@latexbug\@tempcnta\@ne
     \if@twocolumn
@@ -2970,7 +3677,6 @@
 %    \begin{macrocode}
     \nointerlineskip
     \hbox{\vrule \@height\z@ \@width\z@ \@depth\@pagedp}}
-%</2ekernel|autoload>
 %    \end{macrocode}
 % \end{macro}
 %
@@ -3012,11 +3718,9 @@
 %    All we need to put into it is the amount by which the pagegoal
 %    should be changed.
 %    \begin{macrocode}
-%<*2ekernel|def1>
 \newinsert \@kludgeins
 \global\dimen\@kludgeins \maxdimen
 \global\count\@kludgeins 1000
-%</2ekernel|def1>
 %    \end{macrocode}
 %  \end{macro}
 %
@@ -3026,7 +3730,6 @@
 % \changes{v0.1c}{1993/11/23}{Commands added}
 %    The user command.
 %    \begin{macrocode}
-%<*2ekernel|def1>
 \gdef \enlargethispage {%
    \@ifstar
      {%
@@ -3040,10 +3743,6 @@
 %</trace>
       \@enlargepage\@empty}%
 }
-%</2ekernel|def1>
-%<*autoload>
-\def\enlargethispage{\@autoload{out1}\enlargethispage}
-%</autoload>
 %    \end{macrocode}
 %  \end{macro}
 %  \end{macro}
@@ -3054,7 +3753,6 @@
 %    This actually inserts the insert, after checking for extreme
 %    values of the change.
 %    \begin{macrocode}
-%<*2ekernel|def1>
 \gdef\@enlargepage#1#2{%
 %<*trace>
    \fl@trace{\@spaces\@spaces by #2}%
@@ -3086,7 +3784,7 @@
      \fi
    \fi
 }
-%</2ekernel|def1>
+%</2ekernel>
 %    \end{macrocode}
 %  \end{macro}
 %
@@ -3157,7 +3855,15 @@
 \def \tracefloatsoff {\let \fl@trace \@gobble}
 \tracefloatsoff
 \def \fl@traceval #1{\fl@trace{\string #1 = \the #1}}
+\IncludeInRelease{2015/01/01}{\tracefloatvals}%
+                          {trace float vals}%
 \def \tracefloatvals{%
+%    \end{macrocode}
+%    As |\@dblfloatplacement| sets |\f@depth| it needs to be run
+%   inside a group, otherwise the float placement will test for the
+%   wrong value.\footnote{This is a somewhat questionable design.}
+%    \begin{macrocode}
+ \begingroup
   \@dblfloatplacement
   \@floatplacement
   \fl@trace{***Float placement parameters:}%
@@ -3177,34 +3883,56 @@
   \fl@trace{midlist: \@midlist}%
   \fl@trace{deferlist: \@deferlist}%
   \fl@trace{dbltoplist: \@dbltoplist}%
+%FMi  \fl@trace{dbldeferlist: \@dbldeferlist}%
+ \endgroup
+}
+\EndIncludeInRelease
+\IncludeInRelease{0000/00/00}{\tracefloatvals}%
+                          {trace float vals}%
+\def \tracefloatvals{%
+ \begingroup
+  \@dblfloatplacement
+  \@floatplacement
+  \fl@trace{***Float placement parameters:}%
+  \fl@traceval\@colnum
+  \fl@traceval\@colroom
+  \fl@traceval\@topnum
+  \fl@traceval\@toproom
+  \fl@traceval\@botnum
+  \fl@traceval\@botroom
+  \fl@traceval\@fpmin
+  \fl@trace{\string\textfraction = \textfraction}%
+  \fl@traceval\@dbltopnum
+  \fl@traceval\@dbltoproom
+  \fl@trace{\string\textfraction = \textfraction}%
+  \fl@trace{toplist: \@toplist}%
+  \fl@trace{botlist: \@botlist}%
+  \fl@trace{midlist: \@midlist}%
+  \fl@trace{deferlist: \@deferlist}%
+  \fl@trace{dbltoplist: \@dbltoplist}%
+% next line only in old releases
   \fl@trace{dbldeferlist: \@dbldeferlist}%
+ \endgroup
 }
+\EndIncludeInRelease
 %    \end{macrocode}
 %    We need to make sure that \texttt{fltrace} comes before
 %    \texttt{flafter} to make the tracing work.
 %    \begin{macrocode}
 \@ifpackageloaded{flafter}
-   {\PackageWarning{fltrace}{Load 'fltrace' before 'flafter'\MessageBreak
-                             Attempting to recover by reloading 'flafter'}%
+ {\PackageWarningNoLine{fltrace}{Load 'fltrace' before 'flafter'\MessageBreak
+                          Attempting to recover by reloading 'flafter'}%
 %    \end{macrocode}
 %    Hide the fact that \texttt{flafter} was already loaded and then
 %    request it anew.
+% \changes{v1.2m}{2015/01/20}{Reset \cs{IncludeInRelease} flags}
 %    \begin{macrocode}
     \expandafter\let\csname ver@flafter.sty\endcsname\relax
+    \def\reserved@a#1{%
+      \expandafter\let\csname\string#1+flafter+IIR\endcsname\relax}%
+    \reserved@a\@addtocurcol
+    \reserved@a\@addtonextcol
     \RequirePackage{flafter}}{}
-%    \end{macrocode}
-%    With the changed algorithm in \texttt{fixltx2e} the situation is
-%    less good, right now the only option is to abort (but that could
-%   change in the future).
-%    \begin{macrocode}
-\AtBeginDocument{\@ifpackageloaded{fixltx2e}{%
-   \PackageError{fltrace}{'fltrace' can't be used together with
-     'fixltx2e'}%
-     {The 'fixltx2e' package has a corrected float algorithm that
-       currently \MessageBreak
-       can't be traced using 'fltrace'. Please remove
-       'fltrace' if you want\MessageBreak
-       to make use of the corrections in 'fixltx2e'.}\stop}{}}
 %</fltrace>
 %    \end{macrocode}
 %    As the code for \texttt{flafter} will contain tracing calls so
@@ -3230,7 +3958,7 @@
 % by an ! specifier.
 %
 %    \begin{macrocode}
-%<*2ekernel|autoload>
+%<*2ekernel>
 \def \suppressfloats {%
    \@ifnextchar [%
      \@flstop
@@ -3275,7 +4003,7 @@
 \newcount \@fpstype
 \newdimen \@reqcolroom
 \newdimen \@textfloatsheight
-%</2ekernel|autoload>
+%</2ekernel>
 %    \end{macrocode}
 %  \end{macro}
 %  \end{macro}
@@ -3297,7 +4025,7 @@
 % \end{verbatim}
 %
 %    \begin{macrocode}
-%<*2ekernel|autoload|fltrace>
+%<*2ekernel|fltrace>
 \def \@fpsadddefault {%
 %<*trace>
    \fl@trace{fps changed from: \@fps}%
@@ -3345,7 +4073,7 @@
   \fi
 %</trace>
 }
-%</2ekernel|autoload|fltrace>
+%</2ekernel|fltrace>
 %    \end{macrocode}
 %  \end{macro}
 %
@@ -3357,7 +4085,7 @@
 % Sets |\@tempcnta| to required bit of |\count\@currbox|.
 %
 %    \begin{macrocode}
-%<*2ekernel|autoload>
+%<*2ekernel>
 \def \@getfpsbit {%
    \@boxfpsbit \@currbox
 }
@@ -3406,7 +4134,7 @@
      \advance \@tempcnta #1\relax
    \fi
 }
-%</2ekernel|autoload>
+%</2ekernel>
 %    \end{macrocode}
 %  \end{macro}
 %
@@ -3424,7 +4152,7 @@
 % originally 1, this does not matter since it is the last thing in
 % |\@addtocurcol|.
 %    \begin{macrocode}
-%<*2ekernel|autoload|fltrace>
+%<*2ekernel|fltrace>
 \def \@resethfps {%
    \let\reserved@a\@empty
    \ifnum \@fpstype=\@ne
@@ -3525,7 +4253,8 @@
    \advance \@reqcolroom
      \ifx #2\@empty \textfloatsep \else \floatsep \fi
 %<*trace>
-   \fl@trace{colroom = \the \@colroom (flcheckspace \string#1 \string#2)}%
+   \fl@trace{colroom = \the \@colroom 
+                                   (flcheckspace \string#1 \string#2)}%
    \fl@trace{reqcolroom = \the \@reqcolroom
                                    (flcheckspace \string#1 \string#2)}%
 %</trace>
@@ -3565,7 +4294,7 @@
 %</trace>
    \fi
 }
-%</2ekernel|autoload|fltrace>
+%</2ekernel|fltrace>
 %    \end{macrocode}
 %  \end{macro}
 %
@@ -3575,7 +4304,7 @@
 %    This updates everything when a float is placed.
 %
 %    \begin{macrocode}
-%<*2ekernel|autoload>
+%<*2ekernel>
 \def \@flupdates #1#2#3{%
    \global \advance #1\m@ne
    \global \advance \@colnum \m@ne
@@ -3586,7 +4315,7 @@
    \global \advance \@colroom \@tempdima
    \@cons #3\@currbox
 }
-%</2ekernel|autoload>
+%</2ekernel>
 %    \end{macrocode}
 %  \end{macro}
 %
@@ -3721,7 +4450,7 @@
 % Only tracing has been added to these.
 %
 %    \begin{macrocode}
-%<*2ekernel|autoload|fltrace>
+%<*2ekernel|fltrace>
 \def\@makefcolumn #1{%
   \begingroup
     \@fpmin \z@
@@ -3730,7 +4459,8 @@
   \endgroup
 %<*trace>
   \if@fcolmade
-    \fl@trace{PAGE: in \string\clearpage \if@twocolumn ---twocolumn\fi---}%
+    \fl@trace{PAGE: in \string\clearpage
+                              \if@twocolumn ---twocolumn\fi---}%
     \fl@trace{----- float column/page completed from \string#1}%
   \fi
 %</trace>
@@ -3743,52 +4473,158 @@
 %
 % Thus again it is essential for |\@textbottom| to have depth 0pt.
 % \changes{1.2g}{2000/07/12}{Ensure that rule is in \cs{normalcolor}}
+% \changes{v1.2m}{2014/12/30}{Command updated (latexrelease)}
+%    \begin{macrocode}
+%</2ekernel|fltrace>
+%<latexrelease|fltrace>\IncludeInRelease{2015/01/01}%
+%<latexrelease|fltrace>  {\@outputdblcol}{2 column marks}%
+%<*2ekernel|fltrace|latexrelease>
+%    \end{macrocode}
+%
+%
+% This is just a change to the single command |\@outputdblcol|
+% so that it saves mark information for the first column and restores
+% it in the second column.
 %    \begin{macrocode}
 \def\@outputdblcol{%
   \if@firstcolumn
-    \global \@firstcolumnfalse
-    \global \setbox\@leftcolumn \box\@outputbox
-%<*trace>
-    \fl@trace{PAGE: first column boxed}%
-%</trace>
+    \global\@firstcolumnfalse
+%    \end{macrocode}
+% Save the left column
+%    \begin{macrocode}
+    \global\setbox\@leftcolumn\copy\@outputbox
+%<fltrace>    \fl@trace{PAGE: first column boxed}%
+%    \end{macrocode}
+%
+% Remember the marks from the first column
+%    \begin{macrocode}
+    \splitmaxdepth\maxdimen
+    \vbadness\maxdimen
+%    \end{macrocode}
+%  In case of |\enlargethispage| we will have infinite negative glue
+%  at the bottom of the page (coming from |\vss|) and that will earn
+%  us an error message if we |\vsplit| to get at the marks.  So we
+%  need to remove thek last glue (if any) at the end of |\@outputbox|
+%  as we are only interested in marks that change doesn't matter.
+% \changes{v1.1o}{2014/04/18}{Handle infinite glue from
+%  \cs{enlargethispage} (pr/4023)}
+%    \begin{macrocode}
+     \setbox\@outputbox\vbox{\unvbox\@outputbox\unskip}%
+     \setbox\@outputbox\vsplit\@outputbox to\maxdimen
+%    \end{macrocode}
+%
+% One minor difference from the current |fixmarks| package, pass the
+% marks through a token register to stop any |#| tokens causing an
+% error in a |\def|.
+%    \begin{macrocode}
+    \toks@\expandafter{\topmark}%
+    \xdef\@firstcoltopmark{\the\toks@}%
+    \toks@\expandafter{\splitfirstmark}%
+    \xdef\@firstcolfirstmark{\the\toks@}%
+%    \end{macrocode}
+%
+% This test does not work if truly empty marks have been inserted, but
+% \LaTeX\ marks should always have (at least) two brace groups.
+% (Except before the first mark is used, when the marks are empty,
+% but that is OK here.)
+%    \begin{macrocode}
+    \ifx\@firstcolfirstmark\@empty
+      \global\let\@setmarks\relax
+    \else
+      \gdef\@setmarks{%
+        \let\firstmark\@firstcolfirstmark
+        \let\topmark\@firstcoltopmark}%
+    \fi
+%    \end{macrocode}
+%
+% End of change
+%    \begin{macrocode}
   \else
-    \global \@firstcolumntrue
-    \setbox\@outputbox \vbox {%
-                         \hb@xt@\textwidth {%
-                           \hb@xt@\columnwidth {%
-                             \box\@leftcolumn \hss}%
-                           \hfil
-                           {\normalcolor\vrule \@width\columnseprule}%
-                           \hfil
-                           \hb@xt@\columnwidth {%
-                             \box\@outputbox \hss}%
-                                             }%
-                              }%
-%<*trace>
-    \fl@trace{PAGE: second column also boxed}%
-%</trace>
-    \@combinedblfloats
+    \global\@firstcolumntrue
+    \setbox\@outputbox\vbox{%
+     \hb@xt@\textwidth{%
+        \hb@xt@\columnwidth{\box\@leftcolumn \hss}%
+        \hfil
+%    \end{macrocode}
+% \changes{v1.1m}{2006/09/13}{Ensure that rule is in \cs{normalcolor}}
+% The color of the \cs{vrule} should be \cs{normalcolor} as to not
+% inherit the color from the column.
+%    \begin{macrocode}
+        {\normalcolor\vrule \@width\columnseprule}%
+        \hfil
+       \hb@xt@\columnwidth{\box\@outputbox \hss}}}%
+%<fltrace>    \fl@trace{PAGE: second column also boxed}%
+  \@combinedblfloats
+%    \end{macrocode}
+% Override current first and top with those of first column if necessary
+%    \begin{macrocode}
+    \@setmarks
+%    \end{macrocode}
+% End of change
+%    \begin{macrocode}
     \@outputpage
-%<*trace>
-    \fl@trace{PAGE: two column page completed}%
-%</trace>
+%<fltrace>    \fl@trace{PAGE: two column page completed}%
     \begingroup
       \@dblfloatplacement
       \@startdblcolumn
+      \@whilesw\if@fcolmade \fi{\@outputpage
+%<fltrace>      \fl@trace{PAGE: double float page completed}%
+     \@startdblcolumn}%
+    \endgroup
+  \fi}%
+%    \end{macrocode}
+%
+%    \begin{macrocode}
+%<latexrelease|fltrace>\EndIncludeInRelease
+%<latexrelease|fltrace>\IncludeInRelease{0000/00/00}%
+%<latexrelease|fltrace>  {\@outputdblcol}{2 column marks}%
+%<latexrelease|fltrace>\def\@outputdblcol{%
+%<latexrelease|fltrace>  \if@firstcolumn
+%<latexrelease|fltrace>    \global \@firstcolumnfalse
+%<latexrelease|fltrace>    \global \setbox\@leftcolumn \box\@outputbox
+%<*trace>
+%<latexrelease|fltrace>    \fl@trace{PAGE: first column boxed}%
+%</trace>
+%<latexrelease|fltrace>  \else
+%<latexrelease|fltrace>    \global \@firstcolumntrue
+%<latexrelease|fltrace>    \setbox\@outputbox \vbox {%
+%<latexrelease|fltrace>                         \hb@xt@\textwidth {%
+%<latexrelease|fltrace>                           \hb@xt@\columnwidth {%
+%<latexrelease|fltrace>                             \box\@leftcolumn \hss}%
+%<latexrelease|fltrace>                           \hfil
+%<latexrelease|fltrace>                           {\normalcolor\vrule
+%<latexrelease|fltrace>                               \@width\columnseprule}%
+%<latexrelease|fltrace>                           \hfil
+%<latexrelease|fltrace>                           \hb@xt@\columnwidth {%
+%<latexrelease|fltrace>                             \box\@outputbox \hss}%
+%<latexrelease|fltrace>                                             }%
+%<latexrelease|fltrace>                              }%
+%<*trace>
+%<latexrelease|fltrace>    \fl@trace{PAGE: second column also boxed}%
+%</trace>
+%<latexrelease|fltrace>    \@combinedblfloats
+%<latexrelease|fltrace>    \@outputpage
+%<*trace>
+%<latexrelease|fltrace>    \fl@trace{PAGE: two column page completed}%
+%</trace>
+%<latexrelease|fltrace>    \begingroup
+%<latexrelease|fltrace>      \@dblfloatplacement
+%<latexrelease|fltrace>      \@startdblcolumn
 %    \end{macrocode}
 %    This loop could be replaced by an |\expandafter| tail
 %    recursion in\\ |\@startdblcolumn|.
 %    \begin{macrocode}
-      \@whilesw\if@fcolmade \fi
-        {\@outputpage
+%<latexrelease|fltrace>      \@whilesw\if@fcolmade \fi
+%<latexrelease|fltrace>        {\@outputpage
 %<*trace>
-      \fl@trace{PAGE: double float page completed}%
+%<latexrelease|fltrace>      \fl@trace{PAGE: double float page completed}%
 %</trace>
-         \@startdblcolumn}%
-    \endgroup
-  \fi
-}
-%</2ekernel|autoload|fltrace>
+%<latexrelease|fltrace>         \@startdblcolumn}%
+%<latexrelease|fltrace>    \endgroup
+%<latexrelease|fltrace>  \fi
+%<latexrelease|fltrace>}%
+%<latexrelease|fltrace>\EndIncludeInRelease
+%</2ekernel|fltrace|latexrelease>
 %    \end{macrocode}
 %
 % \subsubsection{Float placement parameters}
@@ -3806,7 +4642,7 @@
 %    This counter holds the maximum number of
 %    floats that can appear at the top of a text page or column.
 %    \begin{macrocode}
-%<*2ekernel|autoload>
+%<*2ekernel>
 \newcount\c@topnumber
 \setcounter{topnumber}{2}
 %    \end{macrocode}
@@ -4002,7 +4838,7 @@
 \let\topfigrule=\relax
 \let\botfigrule=\relax
 \let\dblfigrule=\relax
-%</2ekernel|autoload>
+%</2ekernel>
 %    \end{macrocode}
 % \end{macro}
 % \end{macro}
-- 
cgit v1.2.3

