From 013bf3bc293cf08e4b4167cb42180bc355f399c0 Mon Sep 17 00:00:00 2001 From: Karl Berry 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 -%\ProvidesFile{autoout1.sty} %\ProvidesPackage{flafter} %\ProvidesPackage{fltrace} -% [2014/04/24 v1.2n -% Output Routine autoload file] +% [2015/03/12 v1.2m % Standard LaTeX floats after reference (FMi)] % 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} % % \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} -% +% % \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 } -% % \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 @@ % \fi \fi -% % \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 } -% +% % \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} +%\IncludeInRelease{2015/01/01}% +% {\@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}% +% + \else + \global\@testtrue +%<*trace> + \fl@trace{\string#1 + \ifdim\f@depth=\z@ double \else single \fi + column float -- wrong}% +% + \fi}% +% \end{macrocode} +% +% Normally looking for single column floats, which have zero depth. +% \begin{macrocode} +\let\f@depth\z@ +% \end{macrocode} +% +% \begin{macrocode} +% +%\EndIncludeInRelease +%\IncludeInRelease{0000/00/00}% +% {\@testwrongwidth}{float order in 2-column}% +%\let\@testwrongwidth\@undefined +%\let\f@depth\@undefined +%\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> +%\IncludeInRelease{2015/01/01}{\@doclearpage}% +% {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 -} -% +}% +% +%\EndIncludeInRelease +%\IncludeInRelease{0000/00/00}{\@doclearpage}% +% {float order in 2-column}% +%\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. +% \begin{macrocode} +% \ifvbox\@kludgeins +% {\setbox \@tempboxa \box \@kludgeins}% +%<*trace> +% \fl@trace {kludgeins box made void}% +% +% \fi +% \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} +% \global \let \@dbltoplist \@empty +% \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 +% }% +%\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 } -% +% % \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 -% % \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 -% \global \maxdepth \@maxdepth } -% % \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 } -% +% % \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}% % } -% +% % \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 } -% +% % \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} +% +%\IncludeInRelease{2015/01/01}% +% {\@startdblcolumn}{float order in 2-column}% +%<*2ekernel|latexrelease|fltrace> \def \@startdblcolumn {% + \@tryfcolumn \@deferlist + \if@fcolmade +% \fl@trace{PAGE: double float page completed}% + \else + \begingroup + \let \reserved@b \@deferlist + \global \let \@deferlist \@empty + \let \@elt \@sdblcolelt + \reserved@b + \endgroup + \fi +}% +% +%\EndIncludeInRelease +%\IncludeInRelease{0000/00/00}% +% {\@startdblcolumn}{float order in 2-column}% +%\def \@startdblcolumn {% % \end{macrocode} % Not needed since this always comes after |\@outputpage|: % \begin{macrocode} -% \global \@colht \textheight - \@tryfcolumn \@dbldeferlist - \if@fcolmade +%% \global \@colht \textheight +% \@tryfcolumn \@dbldeferlist +% \if@fcolmade %<*trace> - \fl@trace{PAGE: double float page completed}% +% \fl@trace{PAGE: double float page completed}% % - \else +% \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 -} +% \begingroup +% \let \reserved@b \@dbldeferlist +% \global \let \@dbldeferlist \@empty +% \let \@elt \@sdblcolelt +% \reserved@b +% \endgroup +% \fi +%}% +%\EndIncludeInRelease +%<*2ekernel|fltrace> % \end{macrocode} % \end{macro} % \end{macro} @@ -2247,13 +2398,13 @@ \fi \fi } -% +% % \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} +% +%\IncludeInRelease{2015/01/01}{\@xtryfc}% +% {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}% +% +%\EndIncludeInRelease +%\IncludeInRelease{0000/00/00}{\@xtryfc}% +% {float order in 2-column}% +%\def\@xtryfc #1{% +% \@next\reserved@a\@trylist{}{}% +% \@currtype \count #1% +% \divide\@currtype\@xxxii +% \multiply\@currtype\@xxxii +% \@bitor \@currtype \@failedlist +% \@testfp #1% +% \ifdim \ht #1>\@colht +% \@testtrue +% \fi +% \if@test +% \@cons\@failedlist #1% +% \else +% \@ytryfc #1% +% \fi}% +%\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} +% +%\IncludeInRelease{2015/01/01}{@ztryfc}% +% {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}% +% +%\EndIncludeInRelease +%\IncludeInRelease{0000/00/00}{@ztryfc}% +% {float order in 2-column}% +%\def\@ztryfc #1{% +% \@tempcnta \count#1% +% \divide\@tempcnta\@xxxii +% \multiply\@tempcnta\@xxxii +% \@bitor \@tempcnta {\@failedlist \@flfail}% +% \@testfp #1% +% \@tempdimb\@tempdima +% \advance\@tempdimb \ht#1% +% \advance\@tempdimb\@fpsep +% \ifdim \@tempdimb >\@colht +% \@testtrue +% \fi +% \if@test +% \@cons\@flfail #1% +% \else +% \@cons\@flsucceed #1% +% \@tempdima\@tempdimb +% \fi}% +%\EndIncludeInRelease % \end{macrocode} % \end{macro} % -% \begin{macrocode} -% -% \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 @@ % \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}% % \else \@flupdates \@topnum \@toproom \@toplist @@ -2480,7 +2697,7 @@ \@addtobot \fi } -% +% % \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> +%\IncludeInRelease{2015/01/01}% +% {\@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)}% % @@ -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}% % % \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}% % \@addtotoporbot -% -%<*!2ekernel&!autoload&!fltrace> +% +%<*!2ekernel&!fltrace> %<*trace> \fl@trace{not here: sent to addtobot}% % \@addtobot -% +% \fi \fi \fi @@ -2692,8 +2922,234 @@ \fl@trace{deferlist: \@deferlist: (addtocurcol-after)}% % \fi -} -% +}% +% +%\EndIncludeInRelease +%\IncludeInRelease{0000/00/00}% +% {\@addtocurcol}{float order in 2-column}% +%\def \@addtocurcol {% +%<*trace> +% \fl@trace{***Start addtocurcol}% +% +% \@insertfalse +% \@setfloattypecounts +% \ifnum \@fpstype=8 +%<*trace> +% \fl@trace{fpstype !p only (addtocurcol): +% \the \@fpstype = 8?}% +% +% \else +% \ifnum \@fpstype=24 +%<*trace> +% \fl@trace{fpstype p only (addtocurcol): +% \the \@fpstype = 24?}% +% +% \else +% \@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> +% \fl@trace{textfloatsheight (before) = +% \the \@textfloatsheight}% +% +% \advance \@textmin \@textfloatsheight +% \@reqcolroom \@pageht +% \end{macrocode} +% This line must be removed since |\@specialoutput| changed. +% \begin{macrocode} +% \advance \@reqcolroom \@pagedp +%<*trace> +% \fl@trace{textmin + textfloatsheight: +% \the \@textmin}% +% \fl@trace{page-so-far: \the \@reqcolroom}% +% +% +% \ifdim \@textmin>\@reqcolroom +% \@reqcolroom \@textmin +%<*trace> +% \fl@trace{ORD? textmin being used}% +% +% \fi +% \advance \@reqcolroom \ht\@currbox +%<*trace> +% \fl@trace{float size = +% \the \ht \@currbox (addtocurcol)}% +% \fl@trace{colroom = +% \the \@colroom (addtocurcol)}% +% \fl@trace{reqcolroom = +% \the \@reqcolroom (addtocurcol)}% +% +% \ifdim \@colroom>\@reqcolroom +% \@flsetnum \@colnum +% \ifnum \@colnum>\z@ +% \@bitor\@currtype\@deferlist +%<*trace> +% \fl@trace{deferlist: +% \@deferlist: (addtocurcol-before)}% +% +% \if@test +%<*trace> +% \fl@trace{type already on list: +% defer (addtocurcol)}% +% +% \else +% \@bitor\@currtype\@botlist +%<*trace> +% \fl@trace{botlist: \@botlist: +% (addtocurcol-before)}% +% +% \if@test +%<*trace> +% \fl@trace{type already on list: +% bot---sent to addtobot}% +% +% \@addtobot +% \else +%<*trace> +% \fl@trace{fpstype +% \ifodd \@tempcnta OK \else not \fi +% here: \the \@fpstype}% +% +% \ifodd \count\@currbox +% \advance \@reqcolroom \intextsep +% \ifdim \@colroom>\@reqcolroom +% \global \advance \@colnum \m@ne +% \global \advance +% \@textfloatsheight\ht\@currbox +% \end{macrocode} +% This may sometimes give an overestimate. +% \begin{macrocode} +% \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}% +% +% \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} +% \if@nobreak +% \nobreak +% \@nobreakfalse +% \everypar{}% +% \else +% \addpenalty\interlinepenalty +% \fi +% \vskip \intextsep +% \box\@currbox +% \penalty\interlinepenalty +% \vskip\intextsep +% \ifnum\outputpenalty +% <-\@Mii \vskip +% -\parskip\fi +% \end{macrocode} +% Typesetting ends here. +% \begin{macrocode} +% \outputpenalty \z@ +% \@inserttrue +%<*trace> +% \else +% \fl@trace{Fail---no room at 2nd test of colroom +% (addtocorcol \string\intextsep)}% +% +% \fi +% \fi +% \if@insert +% \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> +% \fl@trace{not here: sent to addtotoporbot}% +% +% \@addtotoporbot +% +%<*!2ekernel&!autoload&!fltrace> +%<*trace> +% \fl@trace{not here: sent to addtobot}% +% +% \@addtobot +% +% \fi +% \fi +% \fi +%<*trace> +% \else +% \fl@trace{Fail: colnum = \the \@colnum: +% fpstype \the \@fpstype=ORD?}% +% \ifnum \@fpstype<\sixt@@n +% \fl@trace{ERROR: BANG float not successful +% (addtocurcol)}% +% \fi +% +% \fi +%<*trace> +% \else +% \fl@trace{Fail---no room: fl box ht: +% \the \ht \@currbox (addtocurcol)}% +% +% \fi +% \fi +% \fi +% \if@insert +% \else +% \@resethfps +%<*trace> +% \fl@trace{put on deferlist (addtocurcol)}% +% +% \@cons\@deferlist\@currbox +%<*trace> +% \fl@trace{deferlist: \@deferlist: +% (addtocurcol-after)}% +% +% \fi +% }% +%\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> +%\IncludeInRelease{2015/01/01} +% {\@addtonextcol}{float order in 2-column}% +%<*2ekernel|fltrace> \def\@addtonextcol{% \begingroup %<*trace> @@ -2740,6 +3199,13 @@ %<*trace> \fl@trace{deferlist: \@deferlist: (addtonextcol-before)}% % +% \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 @@ % \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.}% % \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.}% % -} +}% +% +%\EndIncludeInRelease +%\IncludeInRelease{0000/00/00}% +% {\@addtonextcol}{float order in 2-column}% +%\def\@addtonextcol{% +% \begingroup +%<*trace> +% \fl@trace{***Start addtonextcol}% +% +% \@insertfalse +% \@setfloattypecounts +% \ifnum \@fpstype=8 +%<*trace> +% \fl@trace{fpstype not curcol: +% \the \@fpstype = 8?}% +% +% \else +% \ifnum \@fpstype=24 +%<*trace> +% \fl@trace{fpstype not curcol: +% \the \@fpstype = 24?}% +% +% \else +% \@flsettextmin +%<*trace> +% \fl@trace{text-so-far: 0pt (top of col)}% +% +% \@reqcolroom \ht\@currbox +%<*trace> +% \fl@trace{float size: +% \the \@reqcolroom (addtonextcol)}% +% +% +% \advance \@reqcolroom \@textmin +%<*trace> +% \fl@trace{colroom = +% \the \@colroom (addtonextcol)}% +% \fl@trace{reqcolroom = +% \the \@reqcolroom (addtonextcol)}% +% +% \ifdim \@colroom>\@reqcolroom +% \@flsetnum \@colnum +% \ifnum\@colnum>\z@ +% \@bitor\@currtype\@deferlist +%<*trace> +% \fl@trace{deferlist: \@deferlist: +% (addtonextcol-before)}% +% +% \if@test +%<*trace> +% \fl@trace{type already on list: +% defer (addtonextcol)}% +% +% \else +%<*trace> +% \fl@trace{sent to addtotoporbot +% (addtonextcol)}% +% +% \@addtotoporbot +% \fi +% \fi +%<*trace> +% \else +% \fl@trace{Fail---no room: fl box ht: +% \the \ht \@currbox (addtonextcol)}% +% +% \fi +% \fi +% \fi +% \if@insert +% \else +%<*trace> +% \fl@trace{put back on deferlist +% (addtonextcol)}% +% +% \@cons\@deferlist\@currbox +%<*trace> +% \fl@trace{deferlist: \@deferlist: +% (addtonextcol-after)}% +% +% \fi +%<*trace> +% \fl@trace{End of addtonextcol -- +% locally counts:}% +% \fl@trace{col: \the \@colnum. +% top: \the \@topnum. bot: \the \@botnum.}% +% +% \endgroup +%<*trace> +% \fl@trace{End of addtonextcol -- +% globally counts:}% +% \fl@trace{col: \the \@colnum. +% top: \the \@topnum. bot: \the \@botnum.}% +% +%}% +%\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} +%\IncludeInRelease{2015/01/01}% +% {\@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)}% % +% \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}% % \else \@tempdima -\ht\@currbox @@ -2890,11 +3465,11 @@ \if@insert \else %<*trace> - \fl@trace{put on dbldeferlist}% + \fl@trace{put on deferlist}% % - \@cons\@dbldeferlist\@currbox + \@cons\@deferlist\@currbox %<*trace> - \fl@trace{dbldeferlist: \@dbldeferlist: (after)}% + \fl@trace{(dbl)deferlist: \@deferlist: (after)}% % \fi %<*trace> @@ -2906,8 +3481,140 @@ \fl@trace{End of addtodblcol -- globally count:}% \fl@trace{dbltop: \the \@dbltopnum.}% % -} -% +}% +% +%\EndIncludeInRelease +%\IncludeInRelease{0000/00/00}% +% {\@addtodblcol}{float order in 2-column}% +%\def\@addtodblcol{% +% \begingroup +%<*trace> +% \fl@trace{***Start addtodblcol}% +% +% \@insertfalse +% \@setfloattypecounts +% \@getfpsbit \tw@ +%<*trace> +% \fl@trace{fpstype \ifodd \@tempcnta OK +% \else not \fi dbltop: \the \@fpstype}% +% +% \ifodd\@tempcnta +% \@flsetnum \@dbltopnum +% \ifnum \@dbltopnum>\z@ +% \@tempswafalse +% \ifdim \@dbltoproom>\ht\@currbox +% \@tempswatrue +%<*trace> +% \fl@trace{Space OK: \@dbltoproom = +% \the \@dbltoproom > \the \ht \@currbox +% (dbltoproom)}% +% +% \else +%<*trace> +% \fl@trace{fpstype: \the \@fpstype (addtodblcol)}% +% +% \ifnum \@fpstype<\sixt@@n +%<*trace> +% \fl@trace{BANG float ignoring \@dbltoproom}% +% \fl@trace{\@spaces \@dbltoproom = +% \the \@dbltoproom. +% Ht float: \the \ht \@currbox-BANG}% +% +% \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} +% \advance \@dbltoproom \@textmin +%<*trace> +% \fl@trace{Local value of texmin: \the\@textmin}% +% \fl@trace{\@spaces space on page = +% \the \@dbltoproom. +% Ht float: \the \ht \@currbox-BANG}% +% +% \ifdim \@dbltoproom>\ht\@currbox +% \@tempswatrue +%<*trace> +% \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?:}% +% \fl@trace{\@spaces space on page = +% \the \@dbltoproom. +% Ht float: \the \ht \@currbox}% +% +% \fi +% \advance \@dbltoproom -\@textmin +%<*trace> +% \else +% \fl@trace{fpstype: \the \@fpstype}% +% \fl@trace{Fail---no room dbltoproom-ORD?:}% +% \fl@trace{\@spaces \@dbltoproom = +% \the \@dbltoproom. +% Ht float: \the \ht \@currbox}% +% +% \fi +% \fi +% \if@tempswa +% \@bitor \@currtype \@dbldeferlist +%<*trace> +% \fl@trace{dbldeferlist: +% \@dbldeferlist: (before)}% +% +% \if@test +%<*trace> +% \fl@trace{type already on list: dbldefer}% +% +% \else +% \@tempdima -\ht\@currbox +% \advance\@tempdima +% -\ifx \@dbltoplist\@empty +% \dbltextfloatsep +% \else \dblfloatsep \fi +% \global \advance \@dbltoproom \@tempdima +% \global \advance \@colht \@tempdima +% \global \advance \@dbltopnum \m@ne +% \@cons \@dbltoplist \@currbox +%<*trace> +% \fl@trace{dbltopnum (after) = +% \the \@dbltopnum}% +% \fl@trace{***Success: dbltop}% +% +% \@inserttrue +% \fi +% \fi +%<*trace> +% \else +% \fl@trace{Fail: dbltopnum = \the \@dbltopnum: +% fpstype \the \@fpstype=ORD?}% +% \ifnum \@fpstype<\sixt@@n +% \fl@trace{ERROR: !t float not successful +% (addtodblcol)}% +% \fi +% +% \fi +% \fi +% \if@insert +% \else +%<*trace> +% \fl@trace{put on dbldeferlist}% +% +% \@cons\@dbldeferlist\@currbox +%<*trace> +% \fl@trace{dbldeferlist: \@dbldeferlist: (after)}% +% +% \fi +%<*trace> +% \fl@trace{End of addtodblcol -- locally count:}% +% \fl@trace{ dbltop: \the \@dbltopnum.}% +% +% \endgroup +%<*trace> +% \fl@trace{End of addtodblcol -- globally count:}% +% \fl@trace{dbltop: \the \@dbltopnum.}% +% +%}% +%\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}} -% % \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 -% % \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 @@ % \@enlargepage\@empty}% } -% -%<*autoload> -\def\enlargethispage{\@autoload{out1}\enlargethispage} -% % \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 } -% +% % \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}{}} % % \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 -% +% % \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 % } -% +% % \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 } -% +% % \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)}% % @@ -3565,7 +4294,7 @@ % \fi } -% +% % \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 } -% +% % \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 % @@ -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} +% +%\IncludeInRelease{2015/01/01}% +% {\@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}% -% + \global\@firstcolumnfalse +% \end{macrocode} +% Save the left column +% \begin{macrocode} + \global\setbox\@leftcolumn\copy\@outputbox +% \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}% -% - \@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}}}% +% \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}% -% +% \fl@trace{PAGE: two column page completed}% \begingroup \@dblfloatplacement \@startdblcolumn + \@whilesw\if@fcolmade \fi{\@outputpage +% \fl@trace{PAGE: double float page completed}% + \@startdblcolumn}% + \endgroup + \fi}% +% \end{macrocode} +% +% \begin{macrocode} +%\EndIncludeInRelease +%\IncludeInRelease{0000/00/00}% +% {\@outputdblcol}{2 column marks}% +%\def\@outputdblcol{% +% \if@firstcolumn +% \global \@firstcolumnfalse +% \global \setbox\@leftcolumn \box\@outputbox +%<*trace> +% \fl@trace{PAGE: first column boxed}% +% +% \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}% +% +% \@combinedblfloats +% \@outputpage +%<*trace> +% \fl@trace{PAGE: two column page completed}% +% +% \begingroup +% \@dblfloatplacement +% \@startdblcolumn % \end{macrocode} % This loop could be replaced by an |\expandafter| tail % recursion in\\ |\@startdblcolumn|. % \begin{macrocode} - \@whilesw\if@fcolmade \fi - {\@outputpage +% \@whilesw\if@fcolmade \fi +% {\@outputpage %<*trace> - \fl@trace{PAGE: double float page completed}% +% \fl@trace{PAGE: double float page completed}% % - \@startdblcolumn}% - \endgroup - \fi -} -% +% \@startdblcolumn}% +% \endgroup +% \fi +%}% +%\EndIncludeInRelease +% % \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 -% +% % \end{macrocode} % \end{macro} % \end{macro} -- cgit v1.2.3