1 % \iffalse meta-comment
4 % The LaTeX3 Project and any individual authors listed elsewhere
7 % This file is part of the LaTeX base system.
8 % -------------------------------------------
10 % It may be distributed and/or modified under the
11 % conditions of the LaTeX Project Public License, either version 1.3c
12 % of this license or (at your option) any later version.
13 % The latest version of this license is in
14 % http://www.latex-project.org/lppl.txt
15 % and version 1.3c or later is part of all distributions of LaTeX
16 % version 2005/12/01 or later.
18 % This file has the LPPL maintenance status "maintained".
20 % The list of all files belonging to the LaTeX base distribution is
21 % given in the file `manifest.txt'. See also `legal.txt' for additional
24 % The list of derived (unpacked) files belonging to the distribution
25 % and covered by LPPL is defined by the unpacking scripts (with
26 % extension .ins) which are part of the distribution.
30 %%% From File: ltoutput.dtx
31 %<flafter>\ProvidesPackage{flafter}
32 %<fltrace>\ProvidesPackage{fltrace}
33 %<flafter,fltrace> [2015/07/12 v1.2n
34 %<flafter> Standard LaTeX floats after reference (FMi)]
35 %<fltrace> Tracing LaTeX floats algorithm (FMi)]
39 \ProvidesFile{ltoutput.dtx}
40 [2015/07/06 v1.2n LaTeX Kernel (Output Routine)]
42 \documentclass{ltxdoc}
43 \GetFileInfo{ltoutput.dtx}
46 \author{Leslie Lamport, Frank Mittelbach, Chris Rowley}
48 \MaintainedByLaTeXTeam{latex}
60 % Copyright (C) 1992 by Leslie Lamport
61 % Copyright (C) 1994-2000 by Leslie Lamport, LaTeX3 project
63 % LaTeX 2e kernel file for the output routine.
65 % Part of this file is the latest (not greatest, it still
66 % deserves its name) version of kludge.sty.
68 % It also contains a few enhancements and many changes (corrections
69 % and tidyings) to the float mechanism and other parts of the output
72 % The tracing in the file at present is mainly to help in testing the
73 % code but it may well be developed into a full float tracing
76 % ============================
79 % \changes{v1.1p}{1995/08/25}{Support autoloading feature (FMi).}
80 % \task{CAR}{Update documentation.}
81 % \changes{v1.0k}{1994/02/08}{Documentation and tasks tidied.}
82 % \changes{v1.0l}{1994/03/15}{Driver added and further tidying.}
83 % \changes{v1.0l}{1994/03/15}{Some boxmaxdepth settings removed.}
84 % \changes{v1.0l}{1994/03/15}{Added some warnings when page gets full of
86 % \changes{v1.0l}{1994/03/15}{Removed duplicated code and corrected
88 % \changes{v1.0m}{1994/04/24}{Removed some long lines and other
90 % \changes{v1.0m}{1994/04/24}{Corrected unverbed commands in
92 % \changes{v1.0m}{1994/04/24}{Changed \cs{@normalsize} to
94 % \changes{v1.0m}{1994/04/24}{Warning messages changed/corrected.}
95 % \changes{v1.0n}{1994/04/30}{Added \cs{col@number}.}
96 % \changes{v1.0n}{1994/04/30}{Fixed bug from \cs{dblfigrule} with
98 % \changes{v1.0n}{1994/04/30}{Documentation tidied.}
99 % \changes{v1.0n}{1994/04/30}{\cs{@activechar@warning} changed to an
101 % \changes{v1.0n}{1994/04/30}{Full of floats action improved.}
102 % \changes{v1.0n}{1994/04/30}{Empty column action added.}
103 % \changes{v1.0o}{1994/05/02}{Code of \cs{@resethfps} shortened.}
104 % \changes{v1.0p}{1994/05/12}{\cs{normalcolor}added in various
106 % \changes{v1.0q}{1994/05/16}{Changed setting of accents (FMi).}
107 % \changes{v1.0s}{1994/05/20}{Added setting of \cs{protect}
108 % during \cs{shipout}.}
109 % \changes{v1.0t}{1994/05/22}{Changed warnings and infos to
111 % \changes{v1.0u}{1994/05/23}{Added \cs{MessageBreak}.}
112 % \changes{v1.0u}{1994/05/23}{Changed resetting of \cs{protect} after
114 % \changes{v1.0v}{1994/05/25}{Extra documentation.}
115 % \changes{v1.0w}{1994/06/01}{Tidied up typesetting.}
117 % \changes{v1.1f}{1994/11/14}{Removed old definition of \cs{@testfp}.}
118 % \changes{v1.1h}{1994/11/17}
119 % {\cs{@tempa} to \cs{reserved@a}.}
120 % \changes{v1.1m}{1995/05/07}{Use \cs{hb@xt@}.}
121 % \changes{v1.2n}{2015/02/21}
122 % {Removed autoload code}
129 % \section{Output Routine}
131 % \subsection{Floats}
133 % The `2ekernel' code ensures that a |\usepackage{autoout1}| is
134 % essentially ignored if a `full' format is being used that has
135 % the autoload file mode already in the format.
139 %<defx>\nfss@catcodes
140 %<2ekernel>\expandafter\let\csname ver@autoout1.sty\endcsname\fmtversion
144 % \begin{oldcomments}
149 % ****************************************
151 % ****************************************
154 % PAGE LAYOUT PARAMETERS
156 % \topmargin : Extra space added to top of page.
157 % @twoside : boolean. T if two-sided printing
158 % \oddsidemargin : IF @twoside = T
159 % THEN extra space added to left of odd-numbered
161 % ELSE extra space added to left of all pages.
162 % \evensidemargin : IF @twoside = T
163 % THEN extra space added to left of even-numbered
165 % \headheight : height of head
166 % \headsep : separation between head and text
167 % \footskip : distance separation between baseline of last
168 % line of text and baseline of foot.
169 % Note difference between \footSKIP and \headSEP.
170 % \textheight : height of text on page, excluding head and foot
171 % \textwidth : width of printing on page
172 % \columnsep : IF @twocolumn = T
173 % THEN width of space between columns
174 % \columnseprule : IF @twocolumn = T
175 % THEN width of rule between columns (0 if none).
176 % \columnwidth : IF @twocolumn = T
177 % THEN (\textwidth - \columnsep)/2
179 % It is set by the \twocolumn and
180 % \onecolumn commands.
181 % \@textbottom : Command executed at bottom of vbox holding text of
182 % page (including figures). The \raggedbottom
183 % command almost \let's this to \vfil (actually sets
184 % it to \vskip \z@ plus.0001fil).
185 % Should have depth 0pt.
187 % \@texttop : Command executed at top of vbox holding text of
188 % page (including figures). Used by letter style;
189 % can also be used to produce centered pages.
190 % Let to \relax by \raggedbottom and \flushbottom.
192 % Page layout must initialize \@colht and \@colroom to \textheight.
194 % PAGE STYLE PARAMETERS:
196 % \floatsep : Space left between floats.
197 % \textfloatsep : Space between last top float or first bottom float
199 % \topfigrule : Command to place rule (or whatever) between floats
200 % at top of page and text. Executed in inner
201 % vertical mode right before the \textfloatsep skip
202 % separating the floats from the text. Must occupy
203 % zero vertical space. (See \footnoterule.)
204 % \botfigrule : Same as \topfigrule, but put after the
205 % \textfloatsep skip separating text from the
206 % floats at bottom of page.
207 % \intextsep : Space left on top and bottom of an in-text float.
208 % \dblfloatsep : Space between double-column floats.
209 % \dbltextfloatsep : Space between top double-column floats
211 % \dblfigrule : Similar to \topfigrule, but for double-column
213 % \@fptop : Glue to go at top of float column -- must be 0pt +
215 % \@fpsep : Glue to go between floats in a float column.
216 % \@fpbot : Glue to go at bottom of float column
219 % \@dblfptop, \@dblfpsep, \@dblfpbot
220 % : Analogous for double-column float page in
223 % FOOTNOTES: As in PLAIN, footnotes use \insert\footins.
225 % PAGE LAYOUT SWITCHES AND MACROS
227 % @twocolumn : Boolean. T if two columns per page globally.
229 % PAGE STYLE MACROS AND SWITCHES
231 % \@oddhead : IF @twoside = T
232 % THEN macro to generate head of odd-numbered
234 % ELSE macro to generate head of all pages.
235 % \@evenhead : IF @twoside = T
236 % THEN macro to generate head of even-numbered
238 % \@oddfoot : IF @twoside = T
239 % THEN macro to generate foot of odd-numbered
241 % ELSE macro to generate foot of all pages.
242 % \@evenfoot : IF @twoside = T
243 % THEN macro to generate foot of even-numbered
245 % @specialpage : boolean. T if current page is to have a special
247 % \@specialstyle : If its value is foo then
248 % IF @specialpage = T
249 % THEN the command \ps@foo is executed to
250 % temporarily reset the page style parameters
251 % before composing the current page.
252 % This command should execute only \def's and
253 % \edef's, making only local definitions.
255 % FLOAT PLACEMENT PARAMETERS
257 % The following parameters are set by the macro \@floatplacement.
258 % When \@floatplacement is called,
259 % \@colht is the height of the page or column being built. I.e.:
260 % * For single-column page it equals \textheight.
261 % * For double-column page it equals \textheight - height
262 % of double-column floats on page.
263 % Note that some are set globally and some locally:
264 % \@topnum :=G Maximum number of floats allowed on the top of a
266 % \@toproom :=G Maximum amount of top of column devoted to floats--
267 % excluding \textfloatsep separation below the floats
268 % and \floatsep separation between them. For
269 % two-column output, should be computed as a function
271 % \@botnum, \@botroom
272 % : Analogous to above.
273 % \@colnum :=G Maximum number of floats allowed in a column,
274 % including in-text floats.
275 % \@textmin :=L Minimum amount of text (excluding footnotes) that
276 % must appear on a text page.
277 % %% 27 Sep 85 : made local to
278 % %% \@addtocurcol and \@addtonextcol
279 % It is now also used locally in processing double
281 % \@fpmin :=L Minimum height of floats in a float column.
283 % The macro \@dblfloatplacement sets the following parameters.
284 % \@dbltopnum :=G Maximum number of double-column floats allowed at
285 % the top of a two-column page.
286 % \@dbltoproom :=G Maximum height of double-column floats allowed at
287 % top of two-column page.
288 % \@fpmin :=L Minimum height of floats in a float column.
289 % It should also perform the following local assignments where necessary
290 % -- i.e., where the new value differs from the old one:
291 % \@fptop :=L \@dblfptop
292 % \@fpsep :=L \@dblfpsep
293 % \@fpbot :=L \@dblfpbot
295 % OUTPUT ROUTINE VARIABLES
297 % \@colht : The total height of the current column. In single column
298 % style, it equals \textheight. In two-column style, it is
299 % \textheight minus the height of the double-column floats
300 % on the current page. MUST BE INITIALIZED TO \textheight.
302 % \@colroom : The height available in the current column for text and
303 % footnotes. It equals \@colht minus the height of all
304 % floats committed to the top and bottom of the current
307 % \@textfloatsheight : The total height of in-text floats on the
310 % \footins : Footnote insertion number.
312 % \@maxdepth : Saved value of TeX's \maxdepth. Must be set
313 % when any routine sets \maxdepth.
315 % CALLING THE OUTPUT ROUTINE
316 % --------------------------
318 % The output routine is called either by TeX's normal page-breaking
319 % mechanism, or by a macro putting a penalty < or = -10000 in the output
320 % list. In the latter case, the penalty indicates why the output
321 % routine was called, using the following code.
327 % -10001 \clearpage (\penalty -10000 \vbox{} \penalty -10001)
328 % -10002 float insertion, called from horizontal mode
329 % -10003 float insertion, called from vertical mode.
330 % -10004 float insertion.
332 % Note: A float or marginpar puts the following sequence in the output
333 % list: (i) a penalty of -10004,
335 % (iii) a penalty of -10002 or -10003.
336 % This solves two special problems:
337 % 1. If the float comes right after a \newpage or \clearpage,
338 % then the first penalty is ignored, but the second one
339 % invokes the output routine.
340 % 2. If there is a split footnote on the page, the second 'page'
341 % puts out the rest of the footnote.
346 % FUNCTIONS USED IN THE OUTPUT ROUTINE:
348 % \@outputpage : Produces an output page with the contents of box
349 % \@outputbox as the text part.
350 % Also sets \@colht :=G \textheight.
351 % The page style is determined as follows.
352 % IF @thispagestyle = true
353 % THEN use \thispagestyle style
354 % ELSE use ordinary page style.
356 % \@tryfcolumn\FLIST : Tries to form a float column composed of floats
357 % from \FLIST (if nonempty) with the following parameters:
358 % \@colht : height of box
359 % \@fpmin : minimum height of floats in the box
360 % \@fpsep : interfloat space
361 % \@fptop : glue at top of box
362 % \@fpbot : glue at bottom of box.
363 % If it succeeds, then it does the following:
364 % * \@outputbox :=L the composed float box.
365 % * @fcolmade :=G true
366 % * \FLIST :=G \FLIST - floats put in box
367 % * \@freelist :=G \@freelist + floats put in box
369 % * @fcolmade :=G false
370 % NOTE: BIT MUST BE A SINGLE TOKEN!
372 % \@makefcolumn \FLIST : Same as \@tryfcolumn except that it
373 % fails to make a float column only if \FLIST is empty.
374 % Otherwise, it makes a float column containing at least
375 % the first box in \FLIST, disregarding \@fpmin.
378 % Calls \@tryfcolumn\@deferlist. If \@tryfcolumn returns with
379 % (globally set) @fcolmade = false, then:
380 % * Globally sets \@toplist and \@botlist to floats
381 % from \@deferlist to go at top and bottom of column,
382 % deleting them from \@deferlist. It does
383 % this using \@colht as the total height, the page
384 % style parameters \@floatsep and \@textfloatsep, and
385 % the float placement parameters \@topnum, \@toproom,
386 % \@botnum, \@botroom, \@colnum and \textfraction.
387 % * Globally sets \@colroom to \@colht minus the height
388 % of the added floats.
391 % Calls \@tryfcolumn\@dbldeferlist{8}. If \@tryfcolumn returns
392 % with (globally set) @fcolmade = false, then:
393 % * Globally sets \@dbltoplist to floats from
394 % \@dbldeferlist to go at top and bottom of column,
395 % deleting them from \@dbldeferlist.
396 % It does this using \textheight as the
397 % total height, and the parameters \@dblfloatsep, etc.
398 % * Globally sets \@colht to \textheight minus the height
399 % of the added floats.
401 % \@combinefloats : Combines the text from box
402 % \@outputbox with the floats from \@toplist and \@botlist,
403 % putting the new box in \@outputbox. It uses \floatsep
404 % and \textfloatsep for the appropriate separations.
405 % It puts the elements of \TOPLIST and \BOTLIST onto
406 % \@freelist, and makes those lists null.
408 % \@makecol : Makes the contents of \box255 plus the accumulated
409 % footnotes, plus the floats in \@toplist and \@botlist,
410 % into a single column of height \@colht (unless the page
411 % height has been locally changed), which it puts
412 % into box \@outputbox. It puts boxes in \@midlist back
413 % onto \@freelist and restores \maxdepth.
415 % \@opcol : Outputs a column whose text is in box \@outputbox
416 % If @twocolumn = false, then it calls \@outputpage,
417 % sets \@colht :=G \textheight, and calls \@floatplacement.
419 % If @twocolumn = true, then:
420 % If @firstcolumn = true, then it puts box \@outputbox
421 % into \@leftcolumn and sets @firstcolumn :=G false.
423 % If @firstcolumn = false, then it puts out the current
424 % two-column page, any possible two-column float pages,
425 % and determines \@dbltoplist for the next page.
429 % USER COMMANDS THAT CALL OR AFFECT THE OUTPUT ROUTINE
430 % ----------------------------------------------------
432 % \newpage == BEGIN \par\vfil\penalty -10000 END
434 % \clearpage == BEGIN \newpage
435 % \write -1{} % Part of hack to make sure no
436 % \vbox{} % \write's get lost.
440 % \cleardoublepage == BEGIN \clearpage
441 % if @twoside = true and c@page is even
442 % then \hbox{} \newpage fi
446 % \twocolumn[BOX] : starts a new page, changing to twocolumn setting
447 % and puts BOX in a parbox of width \textwidth across the top.
448 % Useful for full-width titles for double-column pages.
449 % SURPRISE: The stretch from \@dbltextfloatsep will be inserted
450 % between the BOX and the top of the two columns.
453 % FLOAT-HANDLING MECHANISMS
454 % -------------------------
456 % The float environment obtains an insertion number B from the
457 % \@freelist (see below for a description of list manipulation), puts
458 % the float into box B and sets \count B to a FLOAT SPECIFIER. For
459 % a normal (not double-column) float, it then causes a page break
460 % in one of the following two ways:
461 % - In outer hmode: \vadjust{\penalty -10002}
462 % - In vmode : \penalty -10003.
463 % For a double-column float, it puts B onto the \@dbldeferlist.
464 % The float specifier has two components:
465 % * A PLACEMENT SPECIFICATION, describing where the float may
467 % * A TYPE, which is a power of two--e.g., figures might be
468 % type 1 floats, tables type 2 floats, programs type 4 floats, etc.
469 % The float specifier is encoded as follows, where bit 0 is the least
474 % 0 1 iff the float may go where it appears in the text.
475 % 1 1 iff the float may go on the top of a page.
476 % 2 1 iff the float may go on the bottom of a page.
477 % 3 1 iff the float may go on a float page.
478 % 4 1 unless the PLACEMENT includes a !
479 % 5 1 iff a type 1 float
480 % 6 1 iff a type 2 float
483 % A negative float specifier is used to indicate a marginal note.
485 % MACROS AND DATA STRUCTURES FOR PROCESSING FLOATS
486 % ------------------------------------------------
488 % A FLOAT LIST consisting of the floats in boxes \boxa ... \boxN has
490 % \@elt \boxa ... \@elt \boxN
491 % where \boxI is defined by
493 % Normally, \@elt is \let to \relax. A test can be performed on the
494 % entire float list by locally \def'ing \@elt appropriately and
495 % executing the list.
496 % This is a lot more efficient than looping through the list.
498 % The following macros are used for manipulating float lists.
500 % \@next \CS \LIST {NONEMPTY}{EMPTY} == %% NOTE: ASSUME \@elt = \relax
501 % BEGIN assume that \LIST == \@elt \B1 ... \@elt \Bn
505 % \LIST :=G \@elt \B2 ... \@elt \Bn
511 % \@bitor\NUM\LIST : Globally sets switch @test to the disjunction for
512 % all I of bit log2 \NUM of the float specifiers of all the
514 % I.e., @test is set to true iff there is at least one
515 % float in \LIST having bit log2 \NUM of its float specifier
518 % Note: log2 [(\count I)/32] is the bit number corresponding to the
519 % type of float I. To see if there is any float in \LIST having
520 % the same type as float I, you run \@bitor with
521 % \NUM = [(\count I)/32] * 32.
523 % \@bitor\NUM\LIST ==
526 % { \@elt \CTR == if \NUM <> 0 then
527 % if \count\CTR / \NUM is odd
528 % then @test := true fi fi
534 % \@cons\LIST\NUM : Globally sets \LIST := \LIST * \@elt \NUM
537 % BEGIN { \@elt == \relax
538 % \LIST :=G \LIST \@elt \NUM
541 % BOX LISTS FOR FLOAT-PLACEMENT ALGORITHMS
543 % \@freelist : List of empty boxes for placing new floats.
544 % \@toplist : List of floats to go at top of current column.
545 % \@midlist : List of floats in middle of current column.
546 % \@botlist : List of floats to go at bottom of current column.
547 % \@deferlist : List of floats to go after current column.
548 % \@dbltoplist : List of double-col. floats to go at top of current
550 % \@dbldeferlist : List of double-column floats to go on subsequent
553 % FLOAT-PLACEMENT ALGORITHMS
556 % \@addtobot : Tries to put insert \@currbox on \@botlist.
558 % * \ht BOX < \@colroom
559 % * type of \@currbox not on \@deferlist
562 % If it succeeds, then:
563 % * sets @insert true
564 % * decrements \@botroom by \ht BOX
565 % * decrements \@botnum and \@colnum by 1
566 % * decrements \@colroom by \ht BOX + either \floatsep
567 % or \textfloatsep, as appropriate.
568 % * sets \maxdepth to 0pt
570 % \@addtotoporbot : Tries to put insert \@currbox on \@toplist or
572 % Called only under same conditions as \@addtobot.
573 % If it succeeds, then:
574 % * sets @insert true
575 % * decrements \@toproom or \@botroom by \ht BOX
576 % * decrements \@colnum and either \@topnum or
578 % * decrements \@colroom by \ht BOX + \floatsep
579 % or \textfloatsep, as appropriate.
581 % \@addtocurcol : Tries to add \@currbox to current column, setting
582 % @insert true if it succeeds, false otherwise.
583 % It will add \@currbox to top only if bit 0 of
584 % \count \@currbox is 0, and to the bottom only if
585 % bit 0 = 0 or an earlier float of the same type is
587 % If the float is put in the text, then
588 % \penalty\interlinepenalty is put
589 % right after the float, before the following \vskip,
590 % and \outputpenalty :=L 0.
592 % \@addtonextcol : Tries to add \@currbox to the next column, setting
593 % @insert true if it succeeds, false otherwise.
595 % \@addtodblcol : Tries to add \@currbox to the next double-column page,
596 % adding it to \@dbltoplist if it succeeds and
597 % \@dbldeferlist if it fails.
602 % if \@currlist nonempty
603 % then remove \@marbox from \@currlist
604 % add \@marbox and \@currbox to \@freelist
605 % %% NOTE: \@currbox = left box
606 % else LaTeX error: ? %% shouldn't happen
608 % \@tempcnta := 1 %% 1 = right, -1 = left
609 % if @twocolumn = true
610 % then if @firstcolumn = true
611 % then \@tempcnta := -1
613 % else if @mparswitch = true
615 % else \@tempcnta := -1
618 % if @reversemargin = true
619 % then \@tempcnta := -\@tempcnta
622 % if \@tempcnta < 0 then \box\@marbox :=G \box\@currbox
624 % \@tempdima :=L maximum(\@mparbottom - \@pageht
625 % + ht of \@marbox, 0)
626 % if \@tempdima > 0 then LaTeX warning: 'marginpar moved' fi
627 % \@mparbottom :=G \@pageht + \@tempdima + depth of \@marbox
629 % \@tempdima :=L \@tempdima - ht of \@marbox
630 % \box\@marbox :=G \box\@currbox
631 % \vbox { \vskip \@tempdima
634 % height of \@marbox :=G depth of \@marbox :=G 0
637 % \hbox{ if @tempcnta > 0 then \hskip \columnwidth
638 % \hskip \marginparsep
639 % else \hskip -\marginparsep
640 % \hskip -\marginparwidth
646 % \hbox{\vrule height 0 width 0 depth \@pagedp}
649 % Floats and marginpars add a lot of dead cycles.
659 \def\@next#1#2#3#4{\ifx#2\@empty #4\else
660 \expandafter\@xnext #2\@@#1#2#3\fi}
664 \def\@xnext \@elt #1#2\@@#3#4{\def#3{#1}\gdef#4{#2}}
667 % \changes{v1.1v}{1996/07/26}{put \cs{global} into definition}
669 \def\@testfalse{\global\let\if@test\iffalse}
670 \def\@testtrue {\global\let\if@test\iftrue}
674 % \changes{v1.1v}{1996/07/26}{remove \cs{global} before \cs{@test...}}
676 \def\@bitor#1#2{\@testfalse {\let\@elt\@xbitor
677 \@tempcnta #1\relax #2}}
679 % RmS 91/11/22: Added test for |\count#1 = 0|.
680 % Suggested by Chris Rowley.
683 % \changes{v1.1v}{1996/07/26}{remove \cs{global} before \cs{@test...}}
685 \def\@xbitor #1{\@tempcntb \count#1
686 \ifnum \@tempcnta =\z@
688 \divide\@tempcntb\@tempcnta
689 \ifodd\@tempcntb \@testtrue\fi
693 % DEFINITION OF FLOAT BOXES:
716 \gdef\@freelist{\@elt\bx@A\@elt\bx@B\@elt\bx@C\@elt\bx@D\@elt\bx@E
717 \@elt\bx@F\@elt\bx@G\@elt\bx@H\@elt\bx@I\@elt\bx@J
718 \@elt\bx@K\@elt\bx@L\@elt\bx@M\@elt\bx@N
719 \@elt\bx@O\@elt\bx@P\@elt\bx@Q\@elt\bx@R}
730 % \changes{v1.2m}{2015/03/12}
731 % {initialise \cs{@dbldeferlist} again}
732 % The new algorithm stores page wide floats together with column floats
733 % in a single |\@deferlist| list. We keep |\@dbldeferlist|
734 % initialised as empty so that packages that are testing for
735 % deferred floats can use the same code for old or new float
738 \gdef\@dbldeferlist{}
741 % PAGE LAYOUT PARAMETERS
744 \newdimen\oddsidemargin
745 \newdimen\evensidemargin
746 \let\@themargin=\oddsidemargin
752 \newdimen\columnwidth
754 \newdimen\columnseprule
755 \newdimen\marginparwidth
756 \newdimen\marginparsep
757 \newdimen\marginparpush
761 % \begin{macro}{\AtBeginDvi}
762 % \changes{v1.1c}{1994/11/05}
764 % \begin{macro}{\@begindvibox}
765 % \changes{v1.1c}{1994/11/05}
767 % \changes{v1.1f}{1994/11/14}{Use normal box register: why a box?}
768 % \changes{v1.1l}{1995/04/24}{Add \cs{vbox} latex/1392}
770 % We use a box register in which to put
771 % stuff that must appear before anything else in the
774 % The stuff in the box should not add any typeset material to the
775 % page when it is unboxed.
778 \def \AtBeginDvi #1{%
779 \global \setbox \@begindvibox
780 \vbox{\unvbox \@begindvibox #1}%
786 % \begin{macro}{\@maxdepth}
787 % This is not the right place to set this; it needs to be set in a
788 % class/style file when |\maxdepth| is set.
790 % Also, many settings to |\maxdepth| should be to |\@maxdepth|,
792 % \task{All}{Sort out maxdepth: both should be set in the class files.}
795 \@maxdepth = \maxdepth
798 % \begin{macro}{\paperheight}
799 % \changes{v0.1a}{1993/11/23}{Register added}
800 % \begin{macro}{\paperwidth}
801 % \changes{v0.1a}{1993/11/23}{Register added}
802 % New |\paper|\ldots\ registers.
804 \newdimen\paperheight
810 % \begin{macro}{\if@insert}
811 % \begin{macro}{\if@fcolmade}
812 % \begin{macro}{\if@specialpage}
813 % \begin{macro}{\if@firstcolumn}
814 % \begin{macro}{\if@twocolumn}
815 % \begin{macro}{\if@twoside}
816 % \begin{macro}{\if@reversemarginpar}
817 % \begin{macro}{\if@mparswitch}
818 % \begin{macro}{\col@number}
819 % \changes{v1.0n}{1994/04/30}{Added \cs{col@number}}
820 % Local switches first:
824 % These should definitely be global:
827 \newif \if@specialpage \@specialpagefalse
829 % These should be global but are not always set globally in other
832 \newif \if@firstcolumn \@firstcolumntrue
833 \newif \if@twocolumn \@twocolumnfalse
835 % Not sure about these: two questions.
836 % Should things which must apply to a whole document be local or
837 % global (they probably should be `preamble only' commands)?
838 % Are these three such things?
840 \newif \if@twoside \@twosidefalse
841 \newif \if@reversemargin \@reversemarginfalse
842 \newif \if@mparswitch \@mparswitchfalse
844 % This counter has been imported from `multicol'.
846 \newcount \col@number
859 % \begin{oldcomments}
866 \newdimen\@dbltoproom
876 \newdimen\@mparbottom \@mparbottom\z@
884 \def\@thehead{\@oddhead} % initialization
885 \def\@thefoot{\@oddfoot}
889 % \begin{macro}{\clearpage}
890 % \changes{v1.1r}{1995/10/11}{Added a check so that it does not lose
891 % the argument of \cs{twocolumn[...]}}
893 % The tests at the beginning are an experimental attempt to avoid a
894 % completely empty page after a |\twocolumn[...]|. This prevents the
895 % text from the argument vanishing into a float box, never to be seen
896 % again. We hope that it does not produce wrong formatting in other
898 % \changes{v1.1v}{1996/07/26}{add number of missing percents}
902 \ifnum \@dbltopnum =\m@ne
903 \ifdim \pagetotal <\topskip
916 % \begin{macro}{\cleardoublepage}
919 \def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else
920 \hbox{}\newpage\if@twocolumn\hbox{}\newpage\fi\fi\fi}
925 % \begin{macro}{\onecolumn}
926 % \changes{v1.0n}{1994/04/30}{Added setting of \cs{col@number}}
931 \global\columnwidth\textwidth
932 \global\hsize\columnwidth
933 \global\linewidth\columnwidth
934 \global\@twocolumnfalse
940 % \begin{macro}{\newpage}
941 % \changes{v1.1x}{1996/09/29}{Checks for noskipsec and inlabel added}
942 % \changes{v1.1x}{1996/09/29}{Checks for noskipsec and inlabel added}
943 % \changes{v1.1y}{1996/09/30}{Checks for noskipsec and inlabel removed
944 % pending further tests}
945 % \changes{v1.1z}{1996/10/24}{Better checks for noskipsec and
946 % inlabel added, plus nobreak}
947 % \changes{v1.2a}{1996/10/25}{Reset all flags explicitly}
948 % The two checks at the beginning ensure that an item label or
949 % run-in section title immediately before a |\newpage| get printed
950 % on the correct page, the one before the page break.
952 % All three tests are largely to make error processing more robust;
953 % that is why they all reset the flags explicitly, even when it
954 % would appear that this would be done by a |\leavevmode|.
958 \ifx \@nodocument\relax
960 \global \@noskipsecfalse
965 \global \@inlabelfalse
967 \if@nobreak \@nobreakfalse \everypar{}\fi
974 % \begin{macro}{\@emptycol}
975 % \changes{v1.0n}{1994/04/30}{Empty column action added:
977 % It may be better to use an invisible rule rather than an empty
980 \def \@emptycol {\vbox{}\penalty -\@M}
984 % \begin{macro}{\twocolumn}
985 % \begin{macro}{\@topnewpage}
986 % \changes{v1.0f}{1993/12/05}{Commands changed}
987 % \changes{v1.0g}{1993/12/06}{\cs{@floatplacement} placement bug
989 % \changes{v1.0j}{1993/12/17}{check for vsize too small added}
990 % \changes{v1.2c}{1997/11/09}{Documentation of vsize check enhanced}
991 % There are several bug fixes to the two-column stuff here.
993 % \changes{v1.0n}{1994/04/30}{Added setting of \cs{col@number}}
997 \global\columnwidth\textwidth
998 \global\advance\columnwidth-\columnsep
999 \global\divide\columnwidth\tw@
1000 \global\hsize\columnwidth
1001 \global\linewidth\columnwidth
1002 \global\@twocolumntrue
1003 \global\@firstcolumntrue
1006 % There is no reason to put a |\@dblfloatplacement| here since
1007 % |\@topnewpage| ignores these settings.
1008 % The |\@floatplacement| is needed in case this comes after some
1010 % \changes{v1.0h}{1993/12/12}{braces removed}
1012 \@ifnextchar [\@topnewpage\@floatplacement
1016 % Note that here, getting a box from the freelist can assume
1017 % success since this comes just after a |\clearpage|.
1018 % \changes{v1.0n}{1994/04/30}{Added setting of \cs{col@number}}
1019 % \changes{v1.1a}{1994/10/31}
1020 % {(DPC/CAR) Use \cs{color@begingroup} for colour}
1021 % \changes{v1.1a}{1994/10/31}
1022 % {(DPC/CAR) Use \cs{normalcolor}}
1023 % \changes{v1.1a}{1994/10/31}
1024 % {(DPC/CAR) Extra box added to remove colour resetting from vmode}
1025 % \changes{v1.1b}{1994/11/05}
1026 % {Use new \cs{color@hbox} concept.}
1027 % \changes{v1.1i}{1994/11/21}{Changed to \cs{color@vbox}}
1028 % \changes{v1.1z}{1996/10/24}{Added \cs{@nodocument} to trap
1029 % \cs{twocolumn} in the preamble}
1031 \long\def \@topnewpage [#1]{%
1033 \@next\@currbox\@freelist{}{}%
1034 \global \setbox\@currbox
1042 \vskip -\dbltextfloatsep
1046 % Added size test and warning message; perhaps we should use
1048 % \changes{v1.0l}{1994/03/15}{Corrected and amended warning message}
1049 % \changes{v1.0m}{1994/04/24}{Warning message removed as it will be
1052 \ifdim \ht\@currbox>\textheight
1053 \ht\@currbox \textheight
1056 % This next line is not essential but it is more robust to make this
1057 % value non-zero, in case of weird errors.
1059 % This next bit is what is needed from |\@addtodblcol|, plus some
1060 % extra checks for error trapping.
1062 \global \count\@currbox \tw@
1063 \@tempdima -\ht\@currbox
1064 \advance \@tempdima -\dbltextfloatsep
1065 \global \advance \@colht \@tempdima
1066 \ifx \@dbltoplist \@empty
1068 \@latexerr{Float(s) lost}\@ehb
1069 \let \@dbltoplist \@empty
1071 \@cons \@dbltoplist \@currbox
1073 % This setting of |\@dbltopnum| is used only to change the
1074 % typesetting in\\ |\@combinedblfloats|.
1076 \global \@dbltopnum \m@ne
1078 \fl@trace{dbltopnum set to -1 (= \the \@dbltopnum) (topnewpage)}%
1081 % At points such as this we need to check that there is still a
1082 % minimal amount of room left on the page; this uses an arbitrary
1083 % small value at present; but note that this value is larger than
1084 % that used when checking that page is too full of normal floats.
1086 % If there is little room left we just force a page-break, OK?
1087 % This involves producing two empty columns. The second empty
1088 % column may be produced by |\output|, in which case an extra,
1089 % misleading, warning will be generated, OK? (This happens only
1090 % when there is too little room left on the page for any float.)
1091 % Otherwise (\ie if the size is such that it is allowed as a normal
1092 % float) the extra |\@emptycol| will be invoked in the second
1093 % column by the conditional code guarded by the |\if@firstcolumn|
1096 % I now think that the cut-off point here should be |3\baselineskip|,
1097 % but we make it a bit less so that 3 lines of text will be
1100 % Since this happens only when there is nothing on the page but the
1101 % `top-box', the empty box should not cause any problem other than
1102 % some overfull box messages, which is not entirely misleading.
1104 % Here we need two page-ends since both columns need to be empty.
1105 % \task{???}{Make it less arbitrary?}
1106 % \changes{v1.0j}{1993/12/17}{Page room test added}
1107 % \changes{v1.0l}{1994/03/15}{Warning added: it should be improved}
1108 % \changes{v1.0m}{1994/04/24}{Message changed to give more info}
1109 % \changes{v1.0n}{1994/04/30}{Message changed for Frank}
1110 % \changes{v1.0n}{1994/04/30}{Empty column action added:
1112 % \changes{v1.0n}{1994/04/30}{Cut-off point changed to
1113 % 3\cs{baselineskip}}
1114 % \changes{v1.1t}{1996/05/24}{Cut-off point changed to
1115 % 2.5\cs{baselineskip}}
1117 \ifdim \@colht<2.5\baselineskip
1118 \@latex@warning@no@line {Optional argument of \noexpand\twocolumn
1119 too tall on page \thepage}%
1126 \global \vsize \@colht
1127 \global \@colroom \@colht
1136 % \begin{macro}{\output}
1137 % \changes{v1.0f}{1993/12/05}{Command changed}
1138 % \begin{macro}{\@specialoutput}
1139 % \changes{v0.1c}{1993/11/23}{Command changed}
1140 % \changes{v1.0f}{1993/12/06}{Unboxing of 255 added to rescue writes}
1141 % This needs some small adjustments. We cannot
1142 % guarantee that the float mechanism will interact correctly with
1143 % this stuff, but that mechanism does not always work properly
1144 % with footnotes already.
1148 % added reset of |\par| to the output routine.
1149 % This avoids problems when the output routine is
1150 % called within a list where |\par| may be a no-op.
1155 \ifnum \outputpenalty<-\@M
1161 % Moved to |\@opcol|: |\@floatplacement|.
1165 % This loop could be replaced by an |\expandafter| tail
1166 % recursion in |\@startcolumn|.
1168 \@whilesw \if@fcolmade \fi
1171 \fl@trace{PAGE: float \if@twocolumn column \else page \fi
1174 \@opcol\@startcolumn}%
1176 \ifnum \outputpenalty>-\@Miv
1178 % At points such as this we need to check that there is still a
1179 % minimal amount of room left on the page; this uses an arbitrary
1180 % small value at present. If there is little room left we just
1181 % force a page-break, OK?
1183 % This bit is essential only if a float has just been processed so
1184 % maybe it should be moved; but this is the natural place at which
1185 % to set the vsize and a test would need to be done anyway. A
1186 % check has been added to ensure that there really has been a
1187 % change in the value of |\@colroom|.
1189 % Since this happens only when there is nothing on the page but
1190 % floats, the empty box should not cause any problem other than
1191 % some overfull box messages, which is not entirely misleading.
1193 % The twocolumn case does not need any extra code here since this
1194 % is the |\output| itself; in the second column there will still
1195 % not be enough room left so |\@emptycol| will be executed again
1196 % when the OR is called by the-page builder when it gets to the
1197 % penalty inserted by the first execution. (The page-builder is
1198 % never invoked whilst the OR is being executed since it builds a
1199 % inner vlist; thus any conditional code for the two-column case
1200 % within |\output| may not get executed with the correct value of
1201 % |\if@firstcolumn|.
1203 % \task{???}{Make it less arbitrary?}
1204 % \changes{v1.0j}{1993/12/17}{Page room test added}
1205 % \changes{v1.0m}{1994/04/24}{Message changed to give more info and
1207 % \changes{v1.0n}{1994/04/30}{Extra empty column added for
1208 % twocolumn case (wrong, see below)}
1209 % \changes{v1.0n}{1994/04/30}{Extra empty column added for
1211 % \changes{v1.0n}{1994/04/30}{Empty column action added:
1213 % \changes{v1.0n}{1994/04/30}{Cut-off point changed to
1214 % 2\cs{baselineskip}}
1215 % \changes{v1.1t}{1996/05/24}{Cut-off point changed to
1216 % 1.5\cs{baselineskip}}
1217 % \changes{v1.1t}{1996/05/24}{Check that \cs{@colroom} is less
1218 % than \cs{vsize}, indicating that a float has been added}
1219 % \changes{v1.1u}{1996/05/25}{Correct the above check}
1220 % \changes{v1.2c}{1997/11/09}{Remove incorrect code: only one
1221 % \cs{@emptycol} is needed here}
1223 \ifdim \@colroom<1.5\baselineskip
1224 \ifdim \@colroom<\textheight
1225 \@latex@warning@no@line {Text page \thepage\space
1226 contains only floats}%
1235 \global \vsize \@colroom
1238 \global \vsize \@colroom
1241 \global \vsize \maxdimen
1246 % \begin{oldcomments}
1247 % CHANGES TO \@specialoutput:
1248 % * \penalty\z@ changed to \penalty\interlinepenalty so \samepage
1249 % works properly with figure and table environments.
1250 % (Changed 23 Oct 86)
1252 % * Definition of \@specialoutput changed 26 Feb 88 so \@pageht and
1253 % \@pagedp aren't changed for a marginal note.
1254 % (Change suggested by Chris Rowley.)
1258 \gdef\@specialoutput{%
1259 \ifnum \outputpenalty>-\@Mii
1262 \ifnum \outputpenalty<-\@Miii
1263 \ifnum \outputpenalty<-\@MM \deadcycles \z@ \fi
1264 \global \setbox\@holdpg \vbox {\unvbox\@cclv}%
1267 % Note that |\boxmaxdepth| should not be set here since we wish to
1268 % record the natural depth of the holdpg box.
1270 % This is changed so as to not lose anything, such as writes
1271 % and marks, which may get into box 255 and should be returned to
1272 % the list. This should only happen when the first penalty in the
1273 % mechanism is discarded and therefore |\@holdpg| should always be
1274 % void in this case. This can happen because a penalty is
1275 % discarded whenever there is no box on the list.
1277 % It was just: |\setbox\@tempboxa \box \@cclv|.
1279 % The last box which is removed is the box put there by the
1280 % double-penalty mechanism. The |\unskip| then removes the
1281 % |\topskip| which is put there since the box is the first on the
1283 % \task{CAR/FMi}{Is it more efficient to check whether the holdpg box
1284 % is void and then act accordingly?}
1286 \global \setbox\@holdpg \vbox{%
1290 % We must now remove the box added by the float mechanism and the
1291 % |\topskip| glue therefore added above it by \TeX.
1293 \setbox\@tempboxa \lastbox
1297 % These two are needed as separate dimensions only by
1298 % |\@addmarginpar|; for other purposes we put the whole size into
1299 % |\@pageht| (see below).
1301 \@pagedp \dp\@holdpg
1302 \@pageht \ht\@holdpg
1304 \@next\@currbox\@currlist{%
1305 \ifnum \count\@currbox>\z@
1307 % Putting the whole size into |\@pageht| (see above).
1309 \advance \@pageht \@pagedp
1310 \ifvoid\footins \else
1311 \advance \@pageht \ht\footins
1312 \advance \@pageht \skip\footins
1313 \advance \@pageht \dp\footins
1317 % We want to make the adjustment due to this insert only if the
1318 % non-star form is used. The *-form will probably not work with
1319 % floats, but maybe it still could make some adjustment here even
1322 \ifdim \wd\@kludgeins=\z@
1323 \advance \@pageht \ht\@kludgeins
1325 \fl@trace {Extra size added: \the \ht\@kludgeins}%
1330 % This version puts the inserts back just before the additional
1331 % material; it could be moved earlier, before unboxing the
1332 % page-so-far. Neither is guaranteed not to put things on the wrong
1333 % page. This version is similar to the original version.
1343 % A 2e change: use |\addpenalty| instead of |\penalty| here. Some
1344 % penalty is needed to create a potential break-point immediately
1345 % after the reinserts (or the marginal). Otherwise there can be no
1346 % possibility to break here and this can cause the reinserts or the
1347 % marginal to appear on the next page (which is often incorrect).
1348 % However, if the nobreak flag is true, a |\nobreak| must be
1350 % \changes{v1.1i}{1994/11/21}{Added \cs{if@nobreak} test}
1351 % \changes{v1.1z}{1996/10/24}{Added \cs{nobreak} as appropriate}
1353 \ifnum \outputpenalty<\z@
1357 \addpenalty \interlinepenalty
1363 %</2ekernel|fltrace>
1368 % \begin{macro}{\@testwrongwidth}
1369 % \begin{macro}{\f@depth}
1370 % \changes{v1.2n}{2015/02/21}{macro added(latexrelease)}
1372 % Test if the float box has the wrong width when trying to place it
1373 % into some area. (Actually
1374 % the test is for a conventional depth setting rather than for the
1375 % width of the float. For that reason the box depth was explicitly
1376 % tailored when the float was created).
1378 %<latexrelease>\IncludeInRelease{2015/01/01}%
1379 %<latexrelease> {\@testwrongwidth}{float order in 2-column}%
1380 %<*2ekernel|latexrelease|fltrace>
1384 \def\@testwrongwidth #1{%
1385 \ifdim\dp#1=\f@depth
1388 \ifdim\f@depth=\z@ single \else double \fi
1389 column float -- ok}%
1395 \ifdim\f@depth=\z@ double \else single \fi
1396 column float -- wrong}%
1401 % Normally looking for single column floats, which have zero depth.
1407 %</2ekernel|latexrelease|fltrace>
1408 %<latexrelease>\EndIncludeInRelease
1409 %<latexrelease>\IncludeInRelease{0000/00/00}%
1410 %<latexrelease> {\@testwrongwidth}{float order in 2-column}%
1411 %<latexrelease>\let\@testwrongwidth\@undefined
1412 %<latexrelease>\let\f@depth\@undefined
1413 %<latexrelease>\EndIncludeInRelease
1419 % \begin{macro}{\@doclearpage}
1420 % \task{CAR/FMi}{Investigate better float clearance}
1421 % \task{CAR/FMi}{Put non-boxes back in the `right place', or nowhere?}
1422 % This is a very much an emergency action, just dumping everything:
1423 % footnotes first then floats. A more sophisticated version is
1424 % needed; but even more urgent is a bug-free version (see, for
1425 % example, pr/3528).
1427 % Also, it puts any left-over non-boxes (writes, specials, etc.) back
1428 % after any float pages created: this is a very bad bug since,
1429 % for example, a kludge insert will be in quite the wrong place
1430 % and, worse, be irremovable and uncancelable.
1432 % \changes{v1.2n}{2015/01/14}{float order in 2-column (latexrelease)}
1433 % All the remaining changes are replacing the double column defer list
1434 % or inserting the extra test |\@testwrongwidth|\marg{box} at suitable
1435 % places. That is at places where a box is taken off the deferlist.
1437 %<latexrelease>\IncludeInRelease{2015/01/01}{\@doclearpage}%
1438 %<latexrelease> {float order in 2-column}%
1439 %<*2ekernel|latexrelease>
1440 \def \@doclearpage {%
1443 % \changes{v1.2n}{2015/01/14}{Empty kludgeins box if necessary, pr/3528}
1446 {\setbox \@tempboxa \box \@kludgeins}%
1448 \fl@trace {kludgeins box made void}%
1451 \setbox\@tempboxa\vsplit\@cclv to\z@ \unvbox\@tempboxa
1452 \setbox\@tempboxa\box\@cclv
1453 \xdef\@deferlist{\@toplist\@botlist\@deferlist}%
1454 \global \let \@toplist \@empty
1455 \global \let \@botlist \@empty
1456 \global \@colroom \@colht
1457 \ifx \@currlist\@empty
1459 \@latexerr{Float(s) lost}\@ehb
1460 \global \let \@currlist \@empty
1462 \@makefcolumn\@deferlist
1463 \@whilesw\if@fcolmade \fi{\@opcol\@makefcolumn\@deferlist}%
1469 \xdef\@deferlist{\@dbltoplist\@deferlist}%
1473 \global \let \@dbltoplist \@empty
1474 \global \@colht \textheight
1480 \@makefcolumn\@deferlist
1481 \@whilesw\if@fcolmade \fi{\@outputpage
1482 \@makefcolumn\@deferlist}%
1492 % the next line is needed to avoid losing floats in certain
1493 % circumstances a single call to the original |\doclearpage|
1494 % will now no longer output all floats.
1495 % \changes{v1.2b}{2000/09/24}{FMi: ensure \cs{doclearpage}
1496 % is called again until all floats are output.}
1498 \ifx\@deferlist\@empty \else\clearpage \fi
1500 \setbox\@cclv\vbox{\box\@cclv\vfil}%
1505 %</2ekernel|latexrelease>
1506 %<latexrelease>\EndIncludeInRelease
1507 %<latexrelease>\IncludeInRelease{0000/00/00}{\@doclearpage}%
1508 %<latexrelease> {float order in 2-column}%
1509 %<latexrelease>\def \@doclearpage {%
1510 %<latexrelease> \ifvoid\footins
1512 % \changes{v1.2l}{2004/02/07}{Empty kludgeins box if necessary, pr/3528}
1513 % We empty any left over kludge insert box here; this is a temporary fix.
1514 % It should perhaps be applied to one page of cleared floats, but
1515 % who cares? The whole of this stuff needs completely redoing for
1516 % many such reasons.
1518 %<latexrelease> \ifvbox\@kludgeins
1519 %<latexrelease> {\setbox \@tempboxa \box \@kludgeins}%
1521 %<latexrelease> \fl@trace {kludgeins box made void}%
1524 %<latexrelease> \setbox\@tempboxa\vsplit\@cclv to\z@ \unvbox\@tempboxa
1525 %<latexrelease> \setbox\@tempboxa\box\@cclv
1526 %<latexrelease> \xdef\@deferlist{\@toplist\@botlist\@deferlist}%
1528 % \changes{v1.0h}{1993/12/12}{defs changed to lets}
1530 %<latexrelease> \global \let \@toplist \@empty
1531 %<latexrelease> \global \let \@botlist \@empty
1532 %<latexrelease> \global \@colroom \@colht
1533 %<latexrelease> \ifx \@currlist\@empty
1534 %<latexrelease> \else
1535 %<latexrelease> \@latexerr{Float(s) lost}\@ehb
1537 % \changes{v1.0h}{1993/12/12}{defs changed to lets}
1539 %<latexrelease> \global \let \@currlist \@empty
1541 %<latexrelease> \@makefcolumn\@deferlist
1542 %<latexrelease> \@whilesw\if@fcolmade \fi
1543 %<latexrelease> {\@opcol\@makefcolumn\@deferlist}%
1544 %<latexrelease> \if@twocolumn
1545 %<latexrelease> \if@firstcolumn
1546 %<latexrelease> \xdef\@dbldeferlist{\@dbltoplist\@dbldeferlist}%
1548 % \changes{v1.0h}{1993/12/12}{defs changed to lets}
1550 %<latexrelease> \global \let \@dbltoplist \@empty
1551 %<latexrelease> \global \@colht \textheight
1552 %<latexrelease> \begingroup
1553 %<latexrelease> \@dblfloatplacement
1554 %<latexrelease> \@makefcolumn\@dbldeferlist
1555 %<latexrelease> \@whilesw\if@fcolmade \fi
1556 %<latexrelease> {\@outputpage\@makefcolumn\@dbldeferlist}%
1557 %<latexrelease> \endgroup
1558 %<latexrelease> \else
1559 %<latexrelease> \vbox{}\clearpage
1562 %<latexrelease> \else
1563 %<latexrelease> \setbox\@cclv\vbox{\box\@cclv\vfil}%
1564 %<latexrelease> \@makecol\@opcol
1565 %<latexrelease> \clearpage
1568 %<latexrelease>\EndIncludeInRelease
1572 % \begin{macro}{\@opcol}
1573 % \changes{v1.0f}{1993/12/05}{Command changed}
1574 % \changes{v1.0f}{1993/12/05}{Hook added}
1575 % \changes{v1.0j}{1993/12/17}{Hook removed}
1576 % Several changes in detail here.
1579 %<*2ekernel|fltrace>
1586 \fl@trace{PAGE: one column (float? see above) page completed}%
1589 % Not needed since it comes after |\@outputpage|:
1591 % \global\@colht\textheight
1594 % These do not need to be done every time |\@opcol| is used: they
1595 % should be grouped together since they all need to be done at the
1596 % end of the non-special output routine, or at the end of a clearpage
1599 \global \@mparbottom \z@ \global \@textfloatsheight \z@
1602 %</2ekernel|fltrace>
1607 % \begin{macro}{\@makecol}
1608 % \changes{v0.1c}{1993/11/23}{Command changed}
1609 % \changes{v1.0b}{1993/11/29}{\cs{@makespecialcolbox} added}
1610 % We must rewrite this macro to alllow for variations in page-makeup
1611 % required by changes in page-length.
1613 % This uses a different macro if a special-length column is being
1620 \setbox\@outputbox \box\@cclv
1622 \setbox\@outputbox \vbox {%
1624 % This |\boxmaxdepth| setting is to ensure that deep footnotes
1625 % do not overwrite the footer (on account of the negative skip
1626 % added later): it should use |\@maxdepth| otherwise the change is
1627 % pointless when there are footnotes.
1628 % \task{CAR}{Investigate providing an option to put the footnotes
1629 % below the bottom floats.}
1631 % But see also its use when combining floats.
1632 % \changes{v1.0l}{1994/03/15}{\cs{maxdepth} changed to \cs{@maxdepth}}
1634 \boxmaxdepth \@maxdepth
1637 % \changes{v1.2e}{1999/01/06}{Added negative vskip, as when processing
1638 % outputbox below: suggested by Fred Bartlett pr/2892}
1639 % \changes{1.2i}{2000/07/12}{Removed negative vskip, as it gives
1640 % unacceptable results when the depth is large: pr/3189}
1641 % \changes{v1.2m}{2004/10/20}{Removed dead code}
1642 % \task{CAR}{As can be seen from the above two changes, getting a good
1643 % layout here is difficult: fix!}
1645 % \@tempdima\dp\@cclv
1648 \vskip \skip\footins
1650 % \changes{v1.1a}{1994/10/31}
1651 % {(DPC/CAR) Colour resetting moved to here}
1661 % The h floats have now been finally committed to this page so we
1662 % can reset their list. The top and bottom floats are then added
1664 % \changes{v1.2k}{2003/12/16}{Ensure that \cs{@elt} has a defined
1668 \xdef\@freelist{\@freelist\@midlist}%
1670 % \changes{v1.0h}{1993/12/12}{defs changed to lets}
1672 \global \let \@midlist \@empty
1675 % The variations start here in case |\enlargethispage| has
1682 % This extra reboxing is only needed to add the
1683 % |\@texttop| and |\@textbotttom| but this could be done earlier,
1684 % when the floats are added.
1686 % The |\boxmaxdepth| resetting here will have no effect unless
1687 % |\@textbottom| ends with a box or rule. So is this (or possibly
1688 % |\@maxdepth|) the correct value?
1690 % The |\vskip -\dimen@|
1691 % ensures that the visible depth of the box does not
1692 % affect the placement of anything on the page.
1693 % Thus very deep pages will overprint the footer; but these should
1694 % have been prevented by suitable settings of the maxdepths at
1695 % appropriate times.
1697 % If |\@textbottom| ends with a box or rule of non-zero depth
1698 % then this skip adjustment should be done again after it.
1700 % I think that the final boxing of the main text page could have a
1701 % common ending which may make it simpler to see what is going on.
1703 % This needs further investigation, especially in the `special
1705 % \task{CAR}{Further investigation of makecol}
1707 % Also, the |\boxmaxdepth| setting here affects what happens within
1708 % |\@texttop| and |\@textbottom|, should it? Is it needed at all?
1709 % \changes{v1.0l}{1994/03/15}{Removed boxmaxdepth setting.}
1711 % RmS 91/10/22: Replaced |\dimen128| by |\dimen@|.
1714 \setbox\@outputbox \vbox to\@colht {%
1715 % \boxmaxdepth \maxdepth %??
1717 \dimen@ \dp\@outputbox
1723 \global \maxdepth \@maxdepth
1728 % \begin{macro}{\@reinserts}
1729 % \changes{v1.0e}{1993/12/01}{Command added}
1730 % This is the code which reinserts the inserts. It puts them all
1731 % in one place; this can make some of them come out on the wrong
1733 % It has been put into a separate macro to expedite experimentation.
1736 \ifvoid\footins\else\insert\footins{\unvbox\footins}\fi
1737 \ifvbox\@kludgeins\insert\@kludgeins
1738 {\unvbox\@kludgeins}\fi
1746 % \begin{macro}{\@makespecialcolbox}
1747 % \changes{v1.0b}{1993/11/29}{Command added}
1748 % This implements certain variations in page-makeup.
1750 %<*2ekernel|fltrace>
1751 \gdef \@makespecialcolbox {%
1753 \fl@trace{Kludgeins ht \the\ht\@kludgeins\space
1754 dp \the\dp\@kludgeins\space
1755 wd \the\wd\@kludgeins}%
1758 % First we find the natural height of the column.
1760 % See above for discussion of what is happening here.
1762 % This needs further investigation, especially in this `special
1764 % \changes{v1.0k}{1994/02/08}{boxmaxdepth setting removed}
1766 \setbox\@outputbox \vbox {%
1768 \dimen@ \dp\@outputbox
1773 \ifdim \wd\@kludgeins>\z@
1775 % Note that in this case (the *-version), the height of the
1776 % |\@kludgeins| box is not used since its value is somewhat
1777 % arbitrary: it need only be big enough to ensure that the
1778 % page-break is not taken prematurely.
1780 % Here we calculate how much vertical space needs to be added in
1781 % order to enable the column to fit into a box of size |\@colht|
1782 % using the best information we have about the amount of shrink
1783 % available (another thing which is known internally about a box,
1784 % but cannot be accessed at the \TeX{} level!).
1786 % This needs \TeX3 otherwise |\pageshrink| is zero anyway; it may
1787 % not be exactly the figure we wish as it is the total available
1788 % from the all the material collected before the page-break
1789 % decision is made. It will, we think, always be an overestimate
1790 % of the actual shrink in the box; therefore this should always
1791 % force the shortest possible column with the possibility of an
1794 % This should work for bothe flush- and ragged-bottom setting since
1795 % it makes the contents no smaller than the size (|\@colht|) of the
1796 % box into which they are put.
1798 % Their should perhaps be an upper limit, of 0pt?, on the extra
1799 % space added to force shrinking.
1800 % \task{CAR}{Further investigation of kludge-* space}
1802 % See above for a discussion of the |\boxmaxdepth| setting here.
1804 % \changes{v1.0k}{1994/02/08}{boxmaxdepth setting added}
1805 % \changes{v1.0l}{1994/03/15}{Removed boxmaxdepth setting.}
1807 \advance \@tempdima -\ht\@outputbox
1808 \advance \@tempdima \pageshrink
1810 \fl@trace {Natural ht of col: \the \ht\@outputbox}%
1811 \fl@trace {\string \@colht: \the \@colht}%
1812 \fl@trace {Pageshrink added: \the \pageshrink}%
1813 \fl@trace {Hence, space added: \the \@tempdima}%
1815 \setbox\@outputbox \vbox to \@colht {%
1816 % \boxmaxdepth \maxdepth
1822 % For the unstarred version, the final size of the page is
1823 % precisely specified. Therefore, at least for the flush-bottom
1824 % case, we need to ensure that, visually, it has this size exactly.
1826 % Thus we calculate this size and set the material in a box of this
1827 % size, which is then put into a box of size |\@colht| with |\vss|
1831 \advance \@tempdima -\ht\@kludgeins
1833 \fl@trace {Natural ht of col: \the \ht\@outputbox}%
1834 \fl@trace {\string \@colht: \the \@colht}%
1835 \fl@trace {Extra size added: -\the \ht \@kludgeins}%
1836 \fl@trace {Hence, height of inner box: \the \@tempdima}%
1837 \fl@trace {Max? pageshrink available: \the \pageshrink}%
1840 % This type of final packaging could be done always; this may
1841 % simplify all of this page-makeup.
1843 % It is not necessary to set |\boxmaxdepth| here since the
1844 % |\@outputbox| ends with glue.
1845 % \changes{v1.0k}{1994/02/03}{correct mistakes in the documentation}
1847 \setbox \@outputbox \vbox to \@colht {%
1848 \vbox to \@tempdima {%
1854 % Finally we need to explicitly make the insert box void.
1856 {\setbox \@tempboxa \box \@kludgeins}%
1858 \fl@trace {kludgeins box made void}%
1861 %</2ekernel|fltrace>
1865 % \begin{macro}{\@texttop}
1866 % \begin{macro}{\@textbottom}
1867 % These do nothing as a default.
1870 \let \@texttop \relax
1871 \let \@textbottom \relax
1876 % \begin{macro}{\@resetactivechars}
1877 % \begin{macro}{\@activechar@info}
1879 % \changes{v1.0n}{1994/04/30}{\cs{@activechar@warning} changed to
1880 % \cs{@activechar@info}}
1882 % added hook to protect against certain active characters in the
1883 % output routine. Default checks are for active space and end-of-line.
1884 % \changes{v1.0u}{1994/05/23}{Added \cs{MessageBreak}}
1886 \def\@activechar@info #1{%
1887 \@latex@info@no@line {Active #1 character found while
1888 output routine is active
1890 This may be a bug in a package file
1895 % Do not put any spaces in this next bit!
1896 % \changes{1.2f}{1999/10/09}{Reset definition of active prime
1897 % character (used in math mode)}
1900 \obeylines\obeyspaces%
1902 \gdef\@resetactivechars{%
1903 \def^^M{\@activechar@info{EOL}\space}%
1904 \def {\@activechar@info{space}\space}%
1905 \let'\active@math@prime}%
1911 % \begin{macro}{\@outputpage}
1912 % \changes{v1.0f}{1993/12/05}{Command changed}
1913 % \begin{macro}{\@shipoutsetup}
1914 % \changes{v1.0f}{1993/12/05}{Command added}
1915 % \changes{v1.1s}{1995/11/10}{Command removed}
1916 % \begin{macro}{\@writesetup}
1917 % \changes{v1.1s}{1995/11/10}{Command removed}
1918 % \changes{v1.1o}{1995/07/21}{Command added}
1919 % \changes{v1.0f}{1993/12/05}{\cs{@startpagehook} added}
1920 % \changes{v1.0j}{1993/12/17}{---and then removed}
1921 % \changes{v1.0p}{1994/05/12}{\cs{normalcolor}added}
1922 % \changes{v1.0s}{1994/05/20}{Added setting of \cs{protect}
1923 % during \cs{shipout}.}
1924 % \changes{v1.0u}{1994/05/23}{Changed resetting of \cs{protect} after
1925 % shipout to use \cs{aftergroup}}
1926 % \changes{v1.1b}{1994/11/05}
1927 % {Use new \cs{color@hbox} concept.}
1928 % \changes{v1.1b}{1994/11/05}
1929 % {Change protect settings for new-style, protect-free
1931 % \changes{v1.1c}{1994/11/05}
1932 % {Add new \cs{AtBeginDvi} concept}
1933 % \changes{v1.1e}{1994/11/10}
1934 % {Modify \cs{protect} setting}
1935 % \changes{v1.1f}{1994/11/14}
1936 % {Modify new \cs{AtBeginDvi} concept}
1937 % \changes{v1.1o}{1995/07/21}
1938 % {New, experimental, versions: need in-lining}
1939 % \changes{v1.1s}{1995/11/10}{In-lined}
1940 % \changes{v1.1w}{1996/09/21}{Added \cs{@parboxrestore} and made
1941 % consequent deletions: wait for the howls of protest}
1943 % The |\color@hbox| hooks here are used to avoid putting just a
1944 % colour special into an otherwise empty box (in a header or
1945 % footer). These boxes are often set to be completely empty and so
1946 % adding a special produces a very underfull box message.
1948 % There has been extensive tidying up of the old code here;
1949 % including the removal of a level of grouping.
1951 % The setting of |\protect| immediately before the |\shipout|
1952 % is needed so that protected commands within |\write|s are
1953 % handled correctly.
1955 % Within shipout's vbox it is reset to its default value, |\relax|.
1957 % Resetting it to its default value after the shipout has been
1958 % completed (and the contents of the writes have been expanded)
1959 % must be done by use of |\aftergroup|.
1960 % This is because it must have the value |\relax|
1961 % before macros coming from other uses of |\aftergroup| within
1962 % this box are expanded.
1964 % Putting this into the |\aftergroup| token list does not affect
1965 % the definition used in expanding the |\write|s because the
1966 % aftergroup token list is only constructed when popping the
1967 % save-stack, it is not expanded until after the shipout is
1970 % Question: should things from an |\aftergroup| within the shipped
1971 % out box be executed in the environment set up for the writes, or
1972 % after it finishes?
1974 % A lot of this code has been in-lined tp prevent mis-use of
1975 % internal commands as hooks.
1978 \begingroup % the \endgroup is put in by \aftergroup
1980 % Now all the set-up stuff has been in-lined for Frank.
1982 % First the stuff for the writes.
1984 % From here \ldots\ was in the command |\@writesetup|.
1986 \let \protect \noexpand
1989 % RmS 93/08/19: Redefined accents to allow changes in font encoding;
1990 % but exactly why was this needed?
1992 % The |\catcode`\ = 10| was removed as it was considered useless
1993 % (presumably because nothing gets tokenised during shipout).
1995 % This was put in as some error produced active spaces in a mark, I
1998 % Why was the hyphen reset?
2003 % If a page break happens between the start of a list and its first
2004 % item the |@newlist| will be true and this will mess up any list
2005 % that is used in the header or footer of the page. So we have to
2007 % \changes{v1.2h}{2000/07/19}
2008 % {Reset and restore \cs{@if@newlist} for internal/3231}
2009 % \changes{v1.2j}{2001/01/07}
2010 % {And do it in the right macro! (pr/3286)}
2012 \global\let\@@if@newlist\if@newlist
2013 \global\@newlistfalse
2016 % \changes{v1.0q}{1994/05/16}{Changed setting of accents (FMi):
2017 % with the new encoding setup they can use \cs{let}.
2018 % It could also use the new internal commands?}
2019 % \changes{v1.1l}{1995/04/24}{Reset \cmd\\ latex/1451 (DPC)}
2020 % This next hook replaces the following:
2023 % \let\'\@acci\let\`\@accii\let\=\@acciii
2025 % \let\par\@@par %% 15 Sep 87 (this was once inside the box)
2027 % and it does more than they did; in particular it sets:
2034 % \parfillskip\@flushglue
2035 % \lineskip\normallineskip
2036 % \baselineskip\normalbaselineskip
2043 % \ldots\ to here was in the command |\@writesetup|.
2046 \set@typeset@protect
2047 \aftergroup \endgroup
2048 \aftergroup \set@typeset@protect
2049 % correct? or just restore by ending
2052 % This first bit has been moved inside the shipped out box.
2054 % Now the setup inside the shipped out box; this should contain all
2055 % the stuff that could only affect typesetting; other stuff may need
2056 % to be reset for the writes also.
2058 % From here \ldots\ was in the command |\@shipoutsetup|.
2061 \global\@specialpagefalse\@nameuse{ps@\@specialstyle}%
2064 \ifodd\count\z@ \let\@thehead\@oddhead \let\@thefoot\@oddfoot
2065 \let\@themargin\oddsidemargin
2066 \else \let\@thehead\@evenhead
2067 \let\@thefoot\@evenfoot \let\@themargin\evensidemargin
2072 % The rest was always inside the box.
2074 % RmS 91/08/15: aded this line:
2078 % RmS 93/08/06 Added |\lineskiplimit=0pt| to guard against it being
2079 % nonzero: e.g. by |\offinterlineskip| being in effect.
2081 % There are probably lots of other things that may need resetting.
2086 % Reset the space factors.
2087 % \changes{v1.2b}{1997/04/14}
2088 % {Call \cs{normalsfcodes} (from patch file) latex/2404}
2093 % Reset these here (previously reset separately for head and foot)
2094 % \changes{v1.2b}{1997/04/14}
2095 % {Move \cs{label} and \cs{index} (from patch file)}
2099 \let\glossary\@gobble
2103 \baselineskip\z@skip \lineskip\z@skip \lineskiplimit\z@
2105 % \ldots\ to here was in the command |\@shipoutsetup|.
2109 \moveright\@themargin \vbox {%
2110 \setbox\@tempboxa \vbox to\headheight{%
2114 \hb@xt@\textwidth{\@thehead}%
2121 \baselineskip \footskip
2124 \hb@xt@\textwidth{\@thefoot}%
2129 % |\endgroup| now inserted by |\aftergroup|
2131 % Restore |\if@newlist|
2133 \global\let\if@newlist\@@if@newlist
2137 \global \@colht \textheight
2140 % It is now clear that this does something useful, thanks to Piet
2141 % van Oostrum. It is needed because a float page is made without
2142 % using TeX's page-builder; thus the output routine is never called
2143 % so the marks are not updated.
2145 \let\firstmark\botmark
2152 % \begin{macro}{\@begindvi}
2153 % \changes{v1.1c}{1994/11/05}
2155 % \changes{v1.1f}{1994/11/14}{Use normal box register: why a box?}
2157 % This unboxes stuff that must appear before anything else in the
2158 % |.dvi| file, then returns that box register to the free list and
2161 % The stuff in the box should not add any typeset material to the
2165 \unvbox \@begindvibox
2166 \global\let \@begindvi \@empty
2171 % \begin{macro}{\@combinefloats}
2172 % \begin{macro}{\@cflt}
2173 % \changes{v1.0h}{1993/12/12}{name changed}
2174 % \begin{macro}{\@cflb}
2175 % The |\boxmaxdepth| setting here was not made local to
2176 % a box so was dangerous. It is needed only within the box made
2177 % by |\@cflt| (and not normally even there), so it has been
2178 % moved there; this also agrees with the original pseudocode.
2180 % \changes{v1.0h}{1993/12/12}{boxmaxdepth setting moved}
2182 \def \@combinefloats {%
2183 % \boxmaxdepth \maxdepth
2184 \ifx \@toplist\@empty \else \@cflt \fi
2185 \ifx \@botlist\@empty \else \@cflb \fi
2189 % \changes{v1.0h}{1993/12/12}{defs changed to lets}
2192 \let \@elt \@comflelt
2193 \setbox\@tempboxa \vbox{}%
2195 \setbox\@outputbox \vbox{%
2196 \boxmaxdepth \maxdepth
2200 \vskip \textfloatsep
2204 \xdef\@freelist{\@freelist\@toplist}%
2205 \global\let\@toplist\@empty
2212 \setbox\@tempboxa \vbox{}%
2214 \setbox\@outputbox \vbox{%
2216 \vskip \textfloatsep
2222 \xdef\@freelist{\@freelist\@botlist}%
2223 \global \let \@botlist\@empty
2230 % \begin{macro}{\@comflelt}
2231 % \begin{macro}{\@comdblflelt}
2232 % \begin{macro}{\@combinedblfloats}
2235 \def\@comflelt#1{\setbox\@tempboxa
2236 \vbox{\unvbox\@tempboxa\box #1\vskip\floatsep}}
2240 \def\@comdblflelt#1{\setbox\@tempboxa
2241 \vbox{\unvbox\@tempboxa\box #1\vskip\dblfloatsep}}
2245 \def \@combinedblfloats{%
2246 \ifx \@dbltoplist \@empty
2248 \setbox\@tempboxa \vbox{}%
2249 \let \@elt \@comdblflelt
2252 \xdef \@freelist {\@freelist\@dbltoplist}%
2253 \global\let \@dbltoplist \@empty
2254 \setbox\@outputbox \vbox to\textheight
2257 % The setting of |\boxmaxdepth| here has no effect since the
2258 % |\@outputbox| should already have depth zero. Even so, it would
2259 % have no effect on the layout of the page.
2260 % \changes{v1.0l}{1994/03/15}{Removed boxmaxdepth setting.}
2262 {%\boxmaxdepth\maxdepth %% probably not needed, CAR
2263 \unvbox\@tempboxa\vskip-\dblfloatsep
2265 % Here we need different typesetting if the top float comes from
2267 % \changes{v1.0n}{1994/04/30}{Removed rule in topnewpage case}
2269 \ifnum \@dbltopnum>\m@ne
2272 \vskip \dbltextfloatsep
2284 % \begin{macro}{\@startcolumn}
2285 % \changes{v1.0f}{1993/12/05}{Command changed}
2286 % \begin{macro}{\@startdblcolumn}
2287 % \changes{v1.0f}{1993/12/05}{Command changed}
2289 % We could combine (most of) these two into |\@startcol <list>|.
2290 % Note that |\@xstartcol| was only used once (\ie in
2291 % |\@startcolumn|); it has therefore been removed. This is not quite
2292 % as efficient but it now has the same structure as
2293 % |\@startdblcolumn|.
2295 % The empty-list test has been moved to |\@tryfcolumn|.
2298 %<*2ekernel|fltrace>
2299 \def \@startcolumn {%
2300 \global \@colroom \@colht
2301 \@tryfcolumn \@deferlist
2304 \fl@trace{PAGE: float \if@twocolumn column \else page \fi
2309 % \changes{v1.0h}{1993/12/12}{defs changed to lets}
2312 \let \reserved@b \@deferlist
2313 \global \let \@deferlist \@empty
2314 \let \@elt \@scolelt
2321 % This one does not need to set |\@colht|.
2323 % \changes{v1.2n}{2015/01/14}{float order in 2-column (latexrelease)}
2325 %</2ekernel|fltrace>
2326 %<latexrelease|fltrace>\IncludeInRelease{2015/01/01}%
2327 %<latexrelease|fltrace> {\@startdblcolumn}{float order in 2-column}%
2328 %<*2ekernel|latexrelease|fltrace>
2329 \def \@startdblcolumn {%
2330 \@tryfcolumn \@deferlist
2332 %<fltrace> \fl@trace{PAGE: double float page completed}%
2335 \let \reserved@b \@deferlist
2336 \global \let \@deferlist \@empty
2337 \let \@elt \@sdblcolelt
2342 %</2ekernel|latexrelease|fltrace>
2343 %<latexrelease|fltrace>\EndIncludeInRelease
2344 %<latexrelease|fltrace>\IncludeInRelease{0000/00/00}%
2345 %<latexrelease|fltrace> {\@startdblcolumn}{float order in 2-column}%
2346 %<latexrelease|fltrace>\def \@startdblcolumn {%
2348 % Not needed since this always comes after |\@outputpage|:
2350 %<latexrelease|fltrace>% \global \@colht \textheight
2351 %<latexrelease|fltrace> \@tryfcolumn \@dbldeferlist
2352 %<latexrelease|fltrace> \if@fcolmade
2354 %<latexrelease|fltrace> \fl@trace{PAGE: double float page completed}%
2356 %<latexrelease|fltrace> \else
2358 % \changes{v1.0h}{1993/12/12}{defs changed to lets}
2360 %<latexrelease|fltrace> \begingroup
2361 %<latexrelease|fltrace> \let \reserved@b \@dbldeferlist
2362 %<latexrelease|fltrace> \global \let \@dbldeferlist \@empty
2363 %<latexrelease|fltrace> \let \@elt \@sdblcolelt
2364 %<latexrelease|fltrace> \reserved@b
2365 %<latexrelease|fltrace> \endgroup
2366 %<latexrelease|fltrace> \fi
2367 %<latexrelease|fltrace>}%
2368 %<latexrelease|fltrace>\EndIncludeInRelease
2369 %<*2ekernel|fltrace>
2374 % \begin{macro}{\@tryfcolumn}
2375 % \changes{v1.0f}{1993/12/05}{Command changed}
2376 % Now tests if its list is empty before any further exertion.
2379 \def \@tryfcolumn #1{%
2380 \global \@fcolmadefalse
2384 \fl@trace{PAGE: try float \if@twocolumn column/page\else page\fi
2386 \fl@trace{----- \string #1: #1}%
2389 % \changes{v1.0h}{1993/12/12}{defs changed to lets}
2392 \global \let \@failedlist \@empty
2394 \let \@elt \@xtryfc \@trylist
2401 %</2ekernel|fltrace>
2410 % \begin{macro}{\@scolelt}
2412 \def\@scolelt#1{\def\@currbox{#1}\@addtonextcol}
2416 % \begin{macro}{\@sdblcolelt}
2418 \def\@sdblcolelt#1{\def\@currbox{#1}\@addtodblcol}
2422 % \begin{macro}{\@vtryfc}
2423 % \changes{v1.2d}{1997/11/19}{Reindent code, to be understandable(DPC).}
2426 \global\setbox\@outputbox\vbox{}%
2429 \global\setbox\@outputbox \vbox to\@colht{%
2435 \xdef #1{\@failedlist\@flfail}%
2436 \xdef\@freelist{\@freelist\@flsucceed}}
2440 % \begin{macro}{\@wtryfc}
2443 \global\setbox\@outputbox\vbox{%
2450 % \begin{macro}{\@xtryfc}
2451 % \changes{v1.1v}{1996/07/26}{remove \cs{global} before \cs{@test...}}
2452 % \changes{v1.2n}{2015/01/14}{float order in 2-column (latexrelease)}
2455 %<latexrelease>\IncludeInRelease{2015/01/01}{\@xtryfc}%
2456 %<latexrelease> {float order in 2-column}%
2457 %<*2ekernel|latexrelease>
2459 \@next\reserved@a\@trylist{}{}%
2460 \@currtype \count #1%
2461 \divide\@currtype\@xxxii
2462 \multiply\@currtype\@xxxii
2463 \@bitor \@currtype \@failedlist
2468 \@testwrongwidth #1%
2472 \ifdim \ht #1>\@colht
2476 \@cons\@failedlist #1%
2480 %</2ekernel|latexrelease>
2481 %<latexrelease>\EndIncludeInRelease
2482 %<latexrelease>\IncludeInRelease{0000/00/00}{\@xtryfc}%
2483 %<latexrelease> {float order in 2-column}%
2484 %<latexrelease>\def\@xtryfc #1{%
2485 %<latexrelease> \@next\reserved@a\@trylist{}{}%
2486 %<latexrelease> \@currtype \count #1%
2487 %<latexrelease> \divide\@currtype\@xxxii
2488 %<latexrelease> \multiply\@currtype\@xxxii
2489 %<latexrelease> \@bitor \@currtype \@failedlist
2490 %<latexrelease> \@testfp #1%
2491 %<latexrelease> \ifdim \ht #1>\@colht
2492 %<latexrelease> \@testtrue
2494 %<latexrelease> \if@test
2495 %<latexrelease> \@cons\@failedlist #1%
2496 %<latexrelease> \else
2497 %<latexrelease> \@ytryfc #1%
2498 %<latexrelease> \fi}%
2499 %<latexrelease>\EndIncludeInRelease
2504 % \begin{macro}{\@ytryfc}
2508 \gdef\@flsucceed{\@elt #1}%
2509 \global\let\@flfail\@empty
2513 \ifdim \@tempdima >\@fpmin
2514 \global\@fcolmadetrue
2516 \@cons\@failedlist #1%
2525 % \begin{macro}{\@ztryfc}
2526 % \changes{v1.1v}{1996/07/26}{remove \cs{global} before \cs{@test...}}
2527 % \changes{v1.2n}{2015/01/14}{float order in 2-column (latexrelease)}
2530 %<latexrelease>\IncludeInRelease{2015/01/01}{@ztryfc}%
2531 %<latexrelease> {float order in 2-column}%
2532 %<*2ekernel|latexrelease>
2534 \@tempcnta\count #1%
2535 \divide\@tempcnta\@xxxii
2536 \multiply\@tempcnta\@xxxii
2537 \@bitor \@tempcnta {\@failedlist \@flfail}%
2543 \@testwrongwidth #1%
2547 \@tempdimb\@tempdima
2548 \advance\@tempdimb\ht #1%
2549 \advance\@tempdimb\@fpsep
2550 \ifdim \@tempdimb >\@colht
2556 \@cons\@flsucceed #1%
2557 \@tempdima\@tempdimb
2559 %</2ekernel|latexrelease>
2560 %<latexrelease>\EndIncludeInRelease
2561 %<latexrelease>\IncludeInRelease{0000/00/00}{@ztryfc}%
2562 %<latexrelease> {float order in 2-column}%
2563 %<latexrelease>\def\@ztryfc #1{%
2564 %<latexrelease> \@tempcnta \count#1%
2565 %<latexrelease> \divide\@tempcnta\@xxxii
2566 %<latexrelease> \multiply\@tempcnta\@xxxii
2567 %<latexrelease> \@bitor \@tempcnta {\@failedlist \@flfail}%
2568 %<latexrelease> \@testfp #1%
2569 %<latexrelease> \@tempdimb\@tempdima
2570 %<latexrelease> \advance\@tempdimb \ht#1%
2571 %<latexrelease> \advance\@tempdimb\@fpsep
2572 %<latexrelease> \ifdim \@tempdimb >\@colht
2573 %<latexrelease> \@testtrue
2575 %<latexrelease> \if@test
2576 %<latexrelease> \@cons\@flfail #1%
2577 %<latexrelease> \else
2578 %<latexrelease> \@cons\@flsucceed #1%
2579 %<latexrelease> \@tempdima\@tempdimb
2580 %<latexrelease> \fi}%
2581 %<latexrelease>\EndIncludeInRelease
2586 % The major changes for float suppression and the changes to the float
2587 % mechanism to make it conform to the documentation are in these next
2590 % \begin{macro}{\@addtobot}
2591 % \changes{v1.0f}{1993/12/05}{Command changed}
2595 %<*2ekernel|fltrace>
2598 \fl@trace{***Start addtobot}%
2602 \fl@trace{fpstype \ifodd \@tempcnta OK \else not \fi bot:
2609 \@flcheckspace \@botroom \@botlist
2612 % This next line means that this page is produced with box 255
2613 % having depth zero, rather than the normal maxdepth: is this
2615 % \task{CAR/FMi}{Investigate resetting of maxdepth: I do not think it is
2616 % necessary here; Frank does.}
2618 \global \maxdepth \z@
2619 \@flupdates \@botnum \@botroom \@botlist
2621 \fl@trace{colroom (after-bot) = \the \@colroom}%
2622 \fl@trace{colnum (after-bot) = \the \@colnum}%
2623 \fl@trace{botnum (after-bot) = \the \@botnum}%
2624 \fl@trace{***Success: bot}%
2630 \fl@trace{Fail: botnum = \the \@botnum:
2631 fpstype \the \@fpstype=ORD?}%
2632 \ifnum \@fpstype<\sixt@@n
2633 \fl@trace{ERROR: !b float not successful (addtobot)}%
2642 % \begin{macro}{\@addtotoporbot}
2643 % \changes{v1.0f}{1993/12/05}{Command changed}
2647 \def \@addtotoporbot {%
2649 \fl@trace{***Start addtotoporbot}%
2653 \fl@trace{fpstype \ifodd \@tempcnta OK \else not \fi top:
2660 \@flcheckspace \@toproom \@toplist
2662 \@bitor\@currtype{\@midlist\@botlist}%
2664 \fl@trace{(mid+bot)list: \@midlist, \@botlist:
2665 (addtotoporbot-before)}%
2669 \fl@trace{type already on list: mid or bot---sent to addtobot}%
2672 \@flupdates \@topnum \@toproom \@toplist
2674 \fl@trace{colroom (after-top) = \the \@colroom}%
2675 \fl@trace{colnum (after-top) = \the \@colnum}%
2676 \fl@trace{topnum (after-top) = \the \@topnum}%
2677 \fl@trace{***Success: top}%
2684 \fl@trace{Fail: topnum = \the \@topnum: fpstype
2685 \the \@fpstype=ORD?}%
2686 \ifnum \@fpstype<\sixt@@n
2687 \fl@trace{ERROR: !t float not successful (addtotoporbot)}%
2695 \fl@trace{sent to addtobot (addtotoporbot)}%
2700 %</2ekernel|fltrace>
2704 % \begin{macro}{\@addtocurcol}
2705 % \changes{v1.0f}{1993/12/05}{Command changed}
2706 % \task{CAR}{Add rules around h floats for FMi}
2707 % \task{CAR}{Investigate pagebreak option possibilities}
2710 % \changes{v1.2n}{2015/01/14}{float order in 2-column (latexrelease)}
2712 %<latexrelease|fltrace|flafter>\IncludeInRelease{2015/01/01}%
2713 %<latexrelease|fltrace|flafter> {\@addtocurcol}{float order in 2-column}%
2714 %<*2ekernel|latexrelease|fltrace|flafter>
2715 \def \@addtocurcol {%
2717 \fl@trace{***Start addtocurcol}%
2720 \@setfloattypecounts
2723 \fl@trace{fpstype !p only (addtocurcol): \the \@fpstype = 8?}%
2728 \fl@trace{fpstype p only (addtocurcol): \the \@fpstype = 24?}%
2733 % This is a new adjustment which is quite a major change in
2734 % functionality; but it implements the documentation.
2735 % Note that |\@reqcolroom| will include the whole of the
2736 % page-so-far, and hence includes |\@textfloatsheight| of floats,
2737 % so before comparing it with |\@textmin|, we add this to
2741 \fl@trace{textfloatsheight (before) = \the \@textfloatsheight}%
2743 \advance \@textmin \@textfloatsheight
2744 \@reqcolroom \@pageht
2746 % This line must be removed since |\@specialoutput| changed.
2748 % \advance \@reqcolroom \@pagedp
2750 \fl@trace{textmin + textfloatsheight: \the \@textmin}%
2751 \fl@trace{page-so-far: \the \@reqcolroom}%
2753 \ifdim \@textmin>\@reqcolroom
2754 \@reqcolroom \@textmin
2756 \fl@trace{ORD? textmin being used}%
2759 \advance \@reqcolroom \ht\@currbox
2761 \fl@trace{float size = \the \ht \@currbox (addtocurcol)}%
2762 \fl@trace{colroom = \the \@colroom (addtocurcol)}%
2763 \fl@trace{reqcolroom = \the \@reqcolroom (addtocurcol)}%
2765 \ifdim \@colroom>\@reqcolroom
2768 \@bitor\@currtype\@deferlist
2770 % We need to defer the float also if its width
2772 % \changes{v1.2n}{2000/09/24}{FMi: test for wide float was
2775 \@testwrongwidth\@currbox
2780 \fl@trace{deferlist: \@deferlist: (addtocurcol-before)}%
2784 \fl@trace{type already on list: defer (addtocurcol)}%
2787 \@bitor\@currtype\@botlist
2789 \fl@trace{botlist: \@botlist: (addtocurcol-before)}%
2793 \fl@trace{type already on list: bot---sent to addtobot}%
2798 \fl@trace{fpstype \ifodd \@tempcnta OK \else not \fi
2799 here: \the \@fpstype}%
2801 \ifodd \count\@currbox
2802 \advance \@reqcolroom \intextsep
2803 \ifdim \@colroom>\@reqcolroom
2804 \global \advance \@colnum \m@ne
2805 \global \advance \@textfloatsheight \ht\@currbox
2807 % This may sometimes give an overestimate.
2809 \global \advance \@textfloatsheight 2\intextsep
2810 \@cons \@midlist \@currbox
2812 \fl@trace{***Success: here}%
2813 \fl@trace{textfloatsheight (after-here) =
2814 \the \@textfloatsheight}%
2815 \fl@trace{colnum (after-here) = \the \@colnum}%
2819 % CHANGE TO |\@addtocurcol|:
2821 % |\penalty\z@| changed to |\penalty\interlinepenalty| so |\samepage|
2822 % works properly with figure and table environments.
2823 % (Changed 23 Oct 86)
2825 % There is also an |\addpenalty\interlinepenalty| above.
2827 % Since in 2e |\samepage| is no longer supported, these could be
2830 % Although it is best to use |\addvspace| in case two h floats come
2831 % together, this makes other spacing more difficult to adjust; whereas
2832 % if a user specifies two h floats together then they can more easily
2833 % get the spacing correct by ad hoc commands.
2835 % It is necessary to adjust for the addition of |\parskip| here in
2836 % case the float is added between paragraphs (\ie when in vertical
2839 % If the nobreak switch is true we need to reset it and clear
2840 % |\everypar| since the float may not reset the flag and cannot reset
2841 % the |\everypar| globally.
2842 % \changes{v1.0l}{1994/03/15}{Changed \cs{addvspace} to \cs{vskip}}
2843 % \changes{v1.1i}{1994/11/21}
2844 % {Added \cs{if@nobreak} test before float box}
2845 % \changes{v1.1z}{1996/10/24}{Added \cs{nobreak}, etc as appropriate}
2847 % Typesetting starts here (we are in vertical mode).
2854 \addpenalty \interlinepenalty
2858 \penalty\interlinepenalty
2860 \ifnum\outputpenalty <-\@Mii \vskip -\parskip\fi
2862 % Typesetting ends here.
2868 \fl@trace{Fail---no room at 2nd test of colroom
2869 (addtocorcol \string\intextsep)}%
2876 % Next set of docstrip guards are a bit weird, essentially
2877 % |\@addtotoporbot| ends up inside the kernel and the
2878 % \texttt{fltrace} package and |\@addtobot| shows up in the
2879 % \texttt{flafter} package. Guess that could have been done a bit
2882 %<*2ekernel|fltrace|latexrelease>
2884 \fl@trace{not here: sent to addtotoporbot}%
2887 %</2ekernel|fltrace|latexrelease>
2888 %<*!2ekernel&!fltrace&!latexrelease>
2890 \fl@trace{not here: sent to addtobot}%
2893 %</!2ekernel&!fltrace&!latexrelease>
2899 \fl@trace{Fail: colnum = \the \@colnum:
2900 fpstype \the \@fpstype=ORD?}%
2901 \ifnum \@fpstype<\sixt@@n
2902 \fl@trace{ERROR: BANG float not successful (addtocurcol)}%
2908 \fl@trace{Fail---no room: fl box ht: \the \ht \@currbox
2918 \fl@trace{put on deferlist (addtocurcol)}%
2920 \@cons\@deferlist\@currbox
2922 \fl@trace{deferlist: \@deferlist: (addtocurcol-after)}%
2926 %</2ekernel|latexrelease|fltrace|flafter>
2927 %<latexrelease|fltrace|flafter>\EndIncludeInRelease
2928 %<latexrelease|fltrace|flafter>\IncludeInRelease{0000/00/00}%
2929 %<latexrelease|fltrace|flafter> {\@addtocurcol}{float order in 2-column}%
2930 %<latexrelease|fltrace|flafter>\def \@addtocurcol {%
2932 %<latexrelease|fltrace|flafter> \fl@trace{***Start addtocurcol}%
2934 %<latexrelease|fltrace|flafter> \@insertfalse
2935 %<latexrelease|fltrace|flafter> \@setfloattypecounts
2936 %<latexrelease|fltrace|flafter> \ifnum \@fpstype=8
2938 %<latexrelease|fltrace|flafter> \fl@trace{fpstype !p only (addtocurcol):
2939 %<latexrelease|fltrace|flafter> \the \@fpstype = 8?}%
2941 %<latexrelease|fltrace|flafter> \else
2942 %<latexrelease|fltrace|flafter> \ifnum \@fpstype=24
2944 %<latexrelease|fltrace|flafter> \fl@trace{fpstype p only (addtocurcol):
2945 %<latexrelease|fltrace|flafter> \the \@fpstype = 24?}%
2947 %<latexrelease|fltrace|flafter> \else
2948 %<latexrelease|fltrace|flafter> \@flsettextmin
2950 % This is a new adjustment which is quite a major change in
2951 % functionality; but it implements the documentation.
2952 % Note that |\@reqcolroom| will include the whole of the
2953 % page-so-far, and hence includes |\@textfloatsheight| of floats,
2954 % so before comparing it with |\@textmin|, we add this to
2958 %<latexrelease|fltrace|flafter> \fl@trace{textfloatsheight (before) =
2959 %<latexrelease|fltrace|flafter> \the \@textfloatsheight}%
2961 %<latexrelease|fltrace|flafter> \advance \@textmin \@textfloatsheight
2962 %<latexrelease|fltrace|flafter> \@reqcolroom \@pageht
2964 % This line must be removed since |\@specialoutput| changed.
2966 % \advance \@reqcolroom \@pagedp
2968 %<latexrelease|fltrace|flafter> \fl@trace{textmin + textfloatsheight:
2969 %<latexrelease|fltrace|flafter> \the \@textmin}%
2970 %<latexrelease|fltrace|flafter> \fl@trace{page-so-far: \the \@reqcolroom}%
2971 %<latexrelease|fltrace|flafter>
2973 %<latexrelease|fltrace|flafter> \ifdim \@textmin>\@reqcolroom
2974 %<latexrelease|fltrace|flafter> \@reqcolroom \@textmin
2976 %<latexrelease|fltrace|flafter> \fl@trace{ORD? textmin being used}%
2978 %<latexrelease|fltrace|flafter> \fi
2979 %<latexrelease|fltrace|flafter> \advance \@reqcolroom \ht\@currbox
2981 %<latexrelease|fltrace|flafter> \fl@trace{float size =
2982 %<latexrelease|fltrace|flafter> \the \ht \@currbox (addtocurcol)}%
2983 %<latexrelease|fltrace|flafter> \fl@trace{colroom =
2984 %<latexrelease|fltrace|flafter> \the \@colroom (addtocurcol)}%
2985 %<latexrelease|fltrace|flafter> \fl@trace{reqcolroom =
2986 %<latexrelease|fltrace|flafter> \the \@reqcolroom (addtocurcol)}%
2988 %<latexrelease|fltrace|flafter> \ifdim \@colroom>\@reqcolroom
2989 %<latexrelease|fltrace|flafter> \@flsetnum \@colnum
2990 %<latexrelease|fltrace|flafter> \ifnum \@colnum>\z@
2991 %<latexrelease|fltrace|flafter> \@bitor\@currtype\@deferlist
2993 %<latexrelease|fltrace|flafter> \fl@trace{deferlist:
2994 %<latexrelease|fltrace|flafter> \@deferlist: (addtocurcol-before)}%
2996 %<latexrelease|fltrace|flafter> \if@test
2998 %<latexrelease|fltrace|flafter> \fl@trace{type already on list:
2999 %<latexrelease|fltrace|flafter> defer (addtocurcol)}%
3001 %<latexrelease|fltrace|flafter> \else
3002 %<latexrelease|fltrace|flafter> \@bitor\@currtype\@botlist
3004 %<latexrelease|fltrace|flafter> \fl@trace{botlist: \@botlist:
3005 %<latexrelease|fltrace|flafter> (addtocurcol-before)}%
3007 %<latexrelease|fltrace|flafter> \if@test
3009 %<latexrelease|fltrace|flafter> \fl@trace{type already on list:
3010 %<latexrelease|fltrace|flafter> bot---sent to addtobot}%
3012 %<latexrelease|fltrace|flafter> \@addtobot
3013 %<latexrelease|fltrace|flafter> \else
3015 %<latexrelease|fltrace|flafter> \fl@trace{fpstype
3016 %<latexrelease|fltrace|flafter> \ifodd \@tempcnta OK \else not \fi
3017 %<latexrelease|fltrace|flafter> here: \the \@fpstype}%
3019 %<latexrelease|fltrace|flafter> \ifodd \count\@currbox
3020 %<latexrelease|fltrace|flafter> \advance \@reqcolroom \intextsep
3021 %<latexrelease|fltrace|flafter> \ifdim \@colroom>\@reqcolroom
3022 %<latexrelease|fltrace|flafter> \global \advance \@colnum \m@ne
3023 %<latexrelease|fltrace|flafter> \global \advance
3024 %<latexrelease|fltrace|flafter> \@textfloatsheight\ht\@currbox
3026 % This may sometimes give an overestimate.
3028 %<latexrelease|fltrace|flafter> \global \advance
3029 %<latexrelease|fltrace|flafter> \@textfloatsheight 2\intextsep
3030 %<latexrelease|fltrace|flafter> \@cons \@midlist \@currbox
3032 %<latexrelease|fltrace|flafter> \fl@trace{***Success: here}%
3033 %<latexrelease|fltrace|flafter> \fl@trace{textfloatsheight
3034 %<latexrelease|fltrace|flafter> (after-here) =
3035 %<latexrelease|fltrace|flafter> \the \@textfloatsheight}%
3036 %<latexrelease|fltrace|flafter> \fl@trace{colnum (after-here) =
3037 %<latexrelease|fltrace|flafter> \the \@colnum}%
3041 % CHANGE TO |\@addtocurcol|:
3043 % |\penalty\z@| changed to |\penalty\interlinepenalty| so |\samepage|
3044 % works properly with figure and table environments.
3045 % (Changed 23 Oct 86)
3047 % There is also an |\addpenalty\interlinepenalty| above.
3049 % Since in 2e |\samepage| is no longer supported, these could be
3052 % Although it is best to use |\addvspace| in case two h floats come
3053 % together, this makes other spacing more difficult to adjust; whereas
3054 % if a user specifies two h floats together then they can more easily
3055 % get the spacing correct by ad hoc commands.
3057 % It is necessary to adjust for the addition of |\parskip| here in
3058 % case the float is added between paragraphs (\ie when in vertical
3061 % If the nobreak switch is true we need to reset it and clear
3062 % |\everypar| since the float may not reset the flag and cannot reset
3063 % the |\everypar| globally.
3064 % \changes{v1.0l}{1994/03/15}{Changed \cs{addvspace} to \cs{vskip}}
3065 % \changes{v1.1i}{1994/11/21}
3066 % {Added \cs{if@nobreak} test before float box}
3067 % \changes{v1.1z}{1996/10/24}{Added \cs{nobreak}, etc as appropriate}
3069 % Typesetting starts here (we are in vertical mode).
3071 %<latexrelease|fltrace|flafter> \if@nobreak
3072 %<latexrelease|fltrace|flafter> \nobreak
3073 %<latexrelease|fltrace|flafter> \@nobreakfalse
3074 %<latexrelease|fltrace|flafter> \everypar{}%
3075 %<latexrelease|fltrace|flafter> \else
3076 %<latexrelease|fltrace|flafter> \addpenalty\interlinepenalty
3077 %<latexrelease|fltrace|flafter> \fi
3078 %<latexrelease|fltrace|flafter> \vskip \intextsep
3079 %<latexrelease|fltrace|flafter> \box\@currbox
3080 %<latexrelease|fltrace|flafter> \penalty\interlinepenalty
3081 %<latexrelease|fltrace|flafter> \vskip\intextsep
3082 %<latexrelease|fltrace|flafter> \ifnum\outputpenalty
3083 %<latexrelease|fltrace|flafter> <-\@Mii \vskip
3084 %<latexrelease|fltrace|flafter> -\parskip\fi
3086 % Typesetting ends here.
3088 %<latexrelease|fltrace|flafter> \outputpenalty \z@
3089 %<latexrelease|fltrace|flafter> \@inserttrue
3091 %<latexrelease|fltrace|flafter> \else
3092 %<latexrelease|fltrace|flafter> \fl@trace{Fail---no room at 2nd test of colroom
3093 %<latexrelease|fltrace|flafter> (addtocorcol \string\intextsep)}%
3095 %<latexrelease|fltrace|flafter> \fi
3096 %<latexrelease|fltrace|flafter> \fi
3097 %<latexrelease|fltrace|flafter> \if@insert
3098 %<latexrelease|fltrace|flafter> \else
3100 % Next set of docstrip guards are a bit weird, essentially
3101 % |\@addtotoporbot| ends up inside the kernel and the
3102 % \texttt{fltrace} package and |\@addtotoporbot| shows up in the
3103 % \texttt{flafter} package. Guess that could have been done a bit
3106 %<*2ekernel|fltrace>
3108 %<latexrelease|fltrace|flafter> \fl@trace{not here: sent to addtotoporbot}%
3110 %<latexrelease|fltrace|flafter> \@addtotoporbot
3111 %</2ekernel|fltrace>
3112 %<*!2ekernel&!autoload&!fltrace>
3114 %<latexrelease|fltrace|flafter> \fl@trace{not here: sent to addtobot}%
3116 %<latexrelease|fltrace|flafter> \@addtobot
3117 %</!2ekernel&!autoload&!fltrace>
3118 %<latexrelease|fltrace|flafter> \fi
3119 %<latexrelease|fltrace|flafter> \fi
3120 %<latexrelease|fltrace|flafter> \fi
3122 %<latexrelease|fltrace|flafter> \else
3123 %<latexrelease|fltrace|flafter> \fl@trace{Fail: colnum = \the \@colnum:
3124 %<latexrelease|fltrace|flafter> fpstype \the \@fpstype=ORD?}%
3125 %<latexrelease|fltrace|flafter> \ifnum \@fpstype<\sixt@@n
3126 %<latexrelease|fltrace|flafter> \fl@trace{ERROR: BANG float not successful
3127 %<latexrelease|fltrace|flafter> (addtocurcol)}%
3128 %<latexrelease|fltrace|flafter> \fi
3130 %<latexrelease|fltrace|flafter> \fi
3132 %<latexrelease|fltrace|flafter> \else
3133 %<latexrelease|fltrace|flafter> \fl@trace{Fail---no room: fl box ht:
3134 %<latexrelease|fltrace|flafter> \the \ht \@currbox (addtocurcol)}%
3136 %<latexrelease|fltrace|flafter> \fi
3137 %<latexrelease|fltrace|flafter> \fi
3138 %<latexrelease|fltrace|flafter> \fi
3139 %<latexrelease|fltrace|flafter> \if@insert
3140 %<latexrelease|fltrace|flafter> \else
3141 %<latexrelease|fltrace|flafter> \@resethfps
3143 %<latexrelease|fltrace|flafter> \fl@trace{put on deferlist (addtocurcol)}%
3145 %<latexrelease|fltrace|flafter> \@cons\@deferlist\@currbox
3147 %<latexrelease|fltrace|flafter> \fl@trace{deferlist: \@deferlist:
3148 %<latexrelease|fltrace|flafter> (addtocurcol-after)}%
3150 %<latexrelease|fltrace|flafter> \fi
3151 %<latexrelease|fltrace|flafter> }%
3152 %<latexrelease|fltrace|flafter>\EndIncludeInRelease
3156 % \begin{macro}{\@addtonextcol}
3157 % \changes{v1.0f}{1993/12/05}{Command changed}
3160 % \changes{v1.2n}{2015/01/14}{float order in 2-column (latexrelease)}
3162 %<latexrelease|fltrace>\IncludeInRelease{2015/01/01}
3163 %<latexrelease|fltrace> {\@addtonextcol}{float order in 2-column}%
3164 %<*2ekernel|fltrace>
3165 \def\@addtonextcol{%
3168 \fl@trace{***Start addtonextcol}%
3171 \@setfloattypecounts
3174 \fl@trace{fpstype not curcol: \the \@fpstype = 8?}%
3179 \fl@trace{fpstype not curcol: \the \@fpstype = 24?}%
3184 \fl@trace{text-so-far: 0pt (top of col)}%
3186 \@reqcolroom \ht\@currbox
3188 \fl@trace{float size: \the \@reqcolroom (addtonextcol)}%
3190 \advance \@reqcolroom \@textmin
3192 \fl@trace{colroom = \the \@colroom (addtonextcol)}%
3193 \fl@trace{reqcolroom = \the \@reqcolroom (addtonextcol)}%
3195 \ifdim \@colroom>\@reqcolroom
3198 \@bitor\@currtype\@deferlist
3200 \fl@trace{deferlist: \@deferlist: (addtonextcol-before)}%
3205 \@testwrongwidth\@currbox
3211 \fl@trace{type already on list: defer (addtonextcol)}%
3215 \fl@trace{sent to addtotoporbot (addtonextcol)}%
3222 \fl@trace{Fail---no room: fl box ht: \the \ht \@currbox
3231 \fl@trace{put back on deferlist (addtonextcol)}%
3233 \@cons\@deferlist\@currbox
3235 \fl@trace{deferlist: \@deferlist: (addtonextcol-after)}%
3239 \fl@trace{End of addtonextcol -- locally counts:}%
3240 \fl@trace{col: \the\@colnum. top: \the \@topnum. bot: \the \@botnum.}%
3244 \fl@trace{End of addtonextcol -- globally counts:}%
3245 \fl@trace{col: \the\@colnum. top: \the \@topnum. bot: \the \@botnum.}%
3248 %</2ekernel|fltrace>
3249 %<latexrelease|fltrace>\EndIncludeInRelease
3250 %<latexrelease|fltrace>\IncludeInRelease{0000/00/00}%
3251 %<latexrelease|fltrace> {\@addtonextcol}{float order in 2-column}%
3252 %<latexrelease|fltrace>\def\@addtonextcol{%
3253 %<latexrelease|fltrace> \begingroup
3255 %<latexrelease|fltrace> \fl@trace{***Start addtonextcol}%
3257 %<latexrelease|fltrace> \@insertfalse
3258 %<latexrelease|fltrace> \@setfloattypecounts
3259 %<latexrelease|fltrace> \ifnum \@fpstype=8
3261 %<latexrelease|fltrace> \fl@trace{fpstype not curcol:
3262 %<latexrelease|fltrace> \the \@fpstype = 8?}%
3264 %<latexrelease|fltrace> \else
3265 %<latexrelease|fltrace> \ifnum \@fpstype=24
3267 %<latexrelease|fltrace> \fl@trace{fpstype not curcol:
3268 %<latexrelease|fltrace> \the \@fpstype = 24?}%
3270 %<latexrelease|fltrace> \else
3271 %<latexrelease|fltrace> \@flsettextmin
3273 %<latexrelease|fltrace> \fl@trace{text-so-far: 0pt (top of col)}%
3275 %<latexrelease|fltrace> \@reqcolroom \ht\@currbox
3277 %<latexrelease|fltrace> \fl@trace{float size:
3278 %<latexrelease|fltrace> \the \@reqcolroom (addtonextcol)}%
3279 %<latexrelease|fltrace>
3281 %<latexrelease|fltrace> \advance \@reqcolroom \@textmin
3283 %<latexrelease|fltrace> \fl@trace{colroom =
3284 %<latexrelease|fltrace> \the \@colroom (addtonextcol)}%
3285 %<latexrelease|fltrace> \fl@trace{reqcolroom =
3286 %<latexrelease|fltrace> \the \@reqcolroom (addtonextcol)}%
3288 %<latexrelease|fltrace> \ifdim \@colroom>\@reqcolroom
3289 %<latexrelease|fltrace> \@flsetnum \@colnum
3290 %<latexrelease|fltrace> \ifnum\@colnum>\z@
3291 %<latexrelease|fltrace> \@bitor\@currtype\@deferlist
3293 %<latexrelease|fltrace> \fl@trace{deferlist: \@deferlist:
3294 %<latexrelease|fltrace> (addtonextcol-before)}%
3296 %<latexrelease|fltrace> \if@test
3298 %<latexrelease|fltrace> \fl@trace{type already on list:
3299 %<latexrelease|fltrace> defer (addtonextcol)}%
3301 %<latexrelease|fltrace> \else
3303 %<latexrelease|fltrace> \fl@trace{sent to addtotoporbot
3304 %<latexrelease|fltrace> (addtonextcol)}%
3306 %<latexrelease|fltrace> \@addtotoporbot
3307 %<latexrelease|fltrace> \fi
3308 %<latexrelease|fltrace> \fi
3310 %<latexrelease|fltrace> \else
3311 %<latexrelease|fltrace> \fl@trace{Fail---no room: fl box ht:
3312 %<latexrelease|fltrace> \the \ht \@currbox (addtonextcol)}%
3314 %<latexrelease|fltrace> \fi
3315 %<latexrelease|fltrace> \fi
3316 %<latexrelease|fltrace> \fi
3317 %<latexrelease|fltrace> \if@insert
3318 %<latexrelease|fltrace> \else
3320 %<latexrelease|fltrace> \fl@trace{put back on deferlist
3321 %<latexrelease|fltrace> (addtonextcol)}%
3323 %<latexrelease|fltrace> \@cons\@deferlist\@currbox
3325 %<latexrelease|fltrace> \fl@trace{deferlist: \@deferlist:
3326 %<latexrelease|fltrace> (addtonextcol-after)}%
3328 %<latexrelease|fltrace> \fi
3330 %<latexrelease|fltrace> \fl@trace{End of addtonextcol --
3331 %<latexrelease|fltrace> locally counts:}%
3332 %<latexrelease|fltrace> \fl@trace{col: \the \@colnum.
3333 %<latexrelease|fltrace> top: \the \@topnum. bot: \the \@botnum.}%
3335 %<latexrelease|fltrace> \endgroup
3337 %<latexrelease|fltrace> \fl@trace{End of addtonextcol --
3338 %<latexrelease|fltrace> globally counts:}%
3339 %<latexrelease|fltrace> \fl@trace{col: \the \@colnum.
3340 %<latexrelease|fltrace> top: \the \@topnum. bot: \the \@botnum.}%
3342 %<latexrelease|fltrace>}%
3343 %<latexrelease|fltrace>\EndIncludeInRelease
3348 % \begin{macro}{\@addtodblcol}
3349 % \changes{v1.0f}{1993/12/05}{Command changed}
3352 % \changes{v1.2n}{2015/01/14}{float order in 2-column (latexrelease)}
3354 %<latexrelease|fltrace>\IncludeInRelease{2015/01/01}%
3355 %<latexrelease|fltrace> {\@addtodblcol}{float order in 2-column}%
3356 %<*2ekernel|latexrelease|fltrace>
3360 \fl@trace{***Start addtodblcol}%
3363 \@setfloattypecounts
3366 \fl@trace{fpstype \ifodd \@tempcnta OK \else not \fi dbltop:
3370 \@flsetnum \@dbltopnum
3371 \ifnum \@dbltopnum>\z@
3373 \ifdim \@dbltoproom>\ht\@currbox
3376 \fl@trace{Space OK: \@dbltoproom =
3377 \the \@dbltoproom > \the \ht \@currbox
3382 \fl@trace{fpstype: \the \@fpstype (addtodblcol)}%
3384 \ifnum \@fpstype<\sixt@@n
3386 \fl@trace{BANG float ignoring \@dbltoproom}%
3387 \fl@trace{\@spaces \@dbltoproom = \the \@dbltoproom.
3388 Ht float: \the \ht \@currbox-BANG}%
3391 % Need to check that there is room on the page, using the local value
3392 % of |\@textmin| to make the necessary adjustment to |\@dbltoproom|.
3394 \advance \@dbltoproom \@textmin
3396 \fl@trace{Local value of texmin: \the\@textmin}%
3397 \fl@trace{\@spaces space on page = \the \@dbltoproom.
3398 Ht float: \the \ht \@currbox-BANG}%
3400 \ifdim \@dbltoproom>\ht\@currbox
3403 \fl@trace{Space OK BANG: space on page =
3404 \the \@dbltoproom > \the \ht \@currbox}%
3406 \fl@trace{fpstype: \the \@fpstype}%
3407 \fl@trace{Fail---no room dbltoproom-BANG?:}%
3408 \fl@trace{\@spaces space on page = \the \@dbltoproom.
3409 Ht float: \the \ht \@currbox}%
3412 \advance \@dbltoproom -\@textmin
3415 \fl@trace{fpstype: \the \@fpstype}%
3416 \fl@trace{Fail---no room dbltoproom-ORD?:}%
3417 \fl@trace{\@spaces \@dbltoproom = \the \@dbltoproom.
3418 Ht float: \the \ht \@currbox}%
3423 \@bitor \@currtype \@deferlist
3425 \fl@trace{(dbl)deferlist: \@deferlist: (before)}%
3431 \@testwrongwidth\@currbox
3437 \fl@trace{type already on list: (dbl)defer}%
3440 \@tempdima -\ht\@currbox
3442 -\ifx \@dbltoplist\@empty \dbltextfloatsep \else
3444 \global \advance \@dbltoproom \@tempdima
3445 \global \advance \@colht \@tempdima
3446 \global \advance \@dbltopnum \m@ne
3447 \@cons \@dbltoplist \@currbox
3449 \fl@trace{dbltopnum (after) = \the \@dbltopnum}%
3450 \fl@trace{***Success: dbltop}%
3457 \fl@trace{Fail: dbltopnum = \the \@dbltopnum: fpstype
3458 \the \@fpstype=ORD?}%
3459 \ifnum \@fpstype<\sixt@@n
3460 \fl@trace{ERROR: !t float not successful (addtodblcol)}%
3468 \fl@trace{put on deferlist}%
3470 \@cons\@deferlist\@currbox
3472 \fl@trace{(dbl)deferlist: \@deferlist: (after)}%
3476 \fl@trace{End of addtodblcol -- locally count:}%
3477 \fl@trace{ dbltop: \the \@dbltopnum.}%
3481 \fl@trace{End of addtodblcol -- globally count:}%
3482 \fl@trace{dbltop: \the \@dbltopnum.}%
3485 %</2ekernel|latexrelease|fltrace>
3486 %<latexrelease|fltrace>\EndIncludeInRelease
3487 %<latexrelease|fltrace>\IncludeInRelease{0000/00/00}%
3488 %<latexrelease|fltrace> {\@addtodblcol}{float order in 2-column}%
3489 %<latexrelease|fltrace>\def\@addtodblcol{%
3490 %<latexrelease|fltrace> \begingroup
3492 %<latexrelease|fltrace> \fl@trace{***Start addtodblcol}%
3494 %<latexrelease|fltrace> \@insertfalse
3495 %<latexrelease|fltrace> \@setfloattypecounts
3496 %<latexrelease|fltrace> \@getfpsbit \tw@
3498 %<latexrelease|fltrace> \fl@trace{fpstype \ifodd \@tempcnta OK
3499 %<latexrelease|fltrace> \else not \fi dbltop: \the \@fpstype}%
3501 %<latexrelease|fltrace> \ifodd\@tempcnta
3502 %<latexrelease|fltrace> \@flsetnum \@dbltopnum
3503 %<latexrelease|fltrace> \ifnum \@dbltopnum>\z@
3504 %<latexrelease|fltrace> \@tempswafalse
3505 %<latexrelease|fltrace> \ifdim \@dbltoproom>\ht\@currbox
3506 %<latexrelease|fltrace> \@tempswatrue
3508 %<latexrelease|fltrace> \fl@trace{Space OK: \@dbltoproom =
3509 %<latexrelease|fltrace> \the \@dbltoproom > \the \ht \@currbox
3510 %<latexrelease|fltrace> (dbltoproom)}%
3512 %<latexrelease|fltrace> \else
3514 %<latexrelease|fltrace> \fl@trace{fpstype: \the \@fpstype (addtodblcol)}%
3516 %<latexrelease|fltrace> \ifnum \@fpstype<\sixt@@n
3518 %<latexrelease|fltrace> \fl@trace{BANG float ignoring \@dbltoproom}%
3519 %<latexrelease|fltrace> \fl@trace{\@spaces \@dbltoproom =
3520 %<latexrelease|fltrace> \the \@dbltoproom.
3521 %<latexrelease|fltrace> Ht float: \the \ht \@currbox-BANG}%
3524 % Need to check that there is room on the page, using the local value
3525 % of |\@textmin| to make the necessary adjustment to |\@dbltoproom|.
3527 %<latexrelease|fltrace> \advance \@dbltoproom \@textmin
3529 %<latexrelease|fltrace> \fl@trace{Local value of texmin: \the\@textmin}%
3530 %<latexrelease|fltrace> \fl@trace{\@spaces space on page =
3531 %<latexrelease|fltrace> \the \@dbltoproom.
3532 %<latexrelease|fltrace> Ht float: \the \ht \@currbox-BANG}%
3534 %<latexrelease|fltrace> \ifdim \@dbltoproom>\ht\@currbox
3535 %<latexrelease|fltrace> \@tempswatrue
3537 %<latexrelease|fltrace> \fl@trace{Space OK BANG: space on page =
3538 %<latexrelease|fltrace> \the\@dbltoproom > \the\ht\@currbox}%
3539 %<latexrelease|fltrace> \else
3540 %<latexrelease|fltrace> \fl@trace{fpstype: \the \@fpstype}%
3541 %<latexrelease|fltrace> \fl@trace{Fail---no room dbltoproom-BANG?:}%
3542 %<latexrelease|fltrace> \fl@trace{\@spaces space on page =
3543 %<latexrelease|fltrace> \the \@dbltoproom.
3544 %<latexrelease|fltrace> Ht float: \the \ht \@currbox}%
3546 %<latexrelease|fltrace> \fi
3547 %<latexrelease|fltrace> \advance \@dbltoproom -\@textmin
3549 %<latexrelease|fltrace> \else
3550 %<latexrelease|fltrace> \fl@trace{fpstype: \the \@fpstype}%
3551 %<latexrelease|fltrace> \fl@trace{Fail---no room dbltoproom-ORD?:}%
3552 %<latexrelease|fltrace> \fl@trace{\@spaces \@dbltoproom =
3553 %<latexrelease|fltrace> \the \@dbltoproom.
3554 %<latexrelease|fltrace> Ht float: \the \ht \@currbox}%
3556 %<latexrelease|fltrace> \fi
3557 %<latexrelease|fltrace> \fi
3558 %<latexrelease|fltrace> \if@tempswa
3559 %<latexrelease|fltrace> \@bitor \@currtype \@dbldeferlist
3561 %<latexrelease|fltrace> \fl@trace{dbldeferlist:
3562 %<latexrelease|fltrace> \@dbldeferlist: (before)}%
3564 %<latexrelease|fltrace> \if@test
3566 %<latexrelease|fltrace> \fl@trace{type already on list: dbldefer}%
3568 %<latexrelease|fltrace> \else
3569 %<latexrelease|fltrace> \@tempdima -\ht\@currbox
3570 %<latexrelease|fltrace> \advance\@tempdima
3571 %<latexrelease|fltrace> -\ifx \@dbltoplist\@empty
3572 %<latexrelease|fltrace> \dbltextfloatsep
3573 %<latexrelease|fltrace> \else \dblfloatsep \fi
3574 %<latexrelease|fltrace> \global \advance \@dbltoproom \@tempdima
3575 %<latexrelease|fltrace> \global \advance \@colht \@tempdima
3576 %<latexrelease|fltrace> \global \advance \@dbltopnum \m@ne
3577 %<latexrelease|fltrace> \@cons \@dbltoplist \@currbox
3579 %<latexrelease|fltrace> \fl@trace{dbltopnum (after) =
3580 %<latexrelease|fltrace> \the \@dbltopnum}%
3581 %<latexrelease|fltrace> \fl@trace{***Success: dbltop}%
3583 %<latexrelease|fltrace> \@inserttrue
3584 %<latexrelease|fltrace> \fi
3585 %<latexrelease|fltrace> \fi
3587 %<latexrelease|fltrace> \else
3588 %<latexrelease|fltrace> \fl@trace{Fail: dbltopnum = \the \@dbltopnum:
3589 %<latexrelease|fltrace> fpstype \the \@fpstype=ORD?}%
3590 %<latexrelease|fltrace> \ifnum \@fpstype<\sixt@@n
3591 %<latexrelease|fltrace> \fl@trace{ERROR: !t float not successful
3592 %<latexrelease|fltrace> (addtodblcol)}%
3593 %<latexrelease|fltrace> \fi
3595 %<latexrelease|fltrace> \fi
3596 %<latexrelease|fltrace> \fi
3597 %<latexrelease|fltrace> \if@insert
3598 %<latexrelease|fltrace> \else
3600 %<latexrelease|fltrace> \fl@trace{put on dbldeferlist}%
3602 %<latexrelease|fltrace> \@cons\@dbldeferlist\@currbox
3604 %<latexrelease|fltrace> \fl@trace{dbldeferlist: \@dbldeferlist: (after)}%
3606 %<latexrelease|fltrace> \fi
3608 %<latexrelease|fltrace> \fl@trace{End of addtodblcol -- locally count:}%
3609 %<latexrelease|fltrace> \fl@trace{ dbltop: \the \@dbltopnum.}%
3611 %<latexrelease|fltrace> \endgroup
3613 %<latexrelease|fltrace> \fl@trace{End of addtodblcol -- globally count:}%
3614 %<latexrelease|fltrace> \fl@trace{dbltop: \the \@dbltopnum.}%
3616 %<latexrelease|fltrace>}%
3617 %<latexrelease|fltrace>\EndIncludeInRelease
3623 % \begin{macro}{\@addmarginpar}
3626 \def\@addmarginpar{\@next\@marbox\@currlist{\@cons\@freelist\@marbox
3627 \@cons\@freelist\@currbox}\@latexbug\@tempcnta\@ne
3629 \if@firstcolumn \@tempcnta\m@ne \fi
3632 \ifodd\c@page \else\@tempcnta\m@ne \fi
3634 \if@reversemargin \@tempcnta -\@tempcnta \fi
3636 \ifnum\@tempcnta <\z@ \global\setbox\@marbox\box\@currbox \fi
3637 \@tempdima\@mparbottom
3638 \advance\@tempdima -\@pageht
3639 \advance\@tempdima\ht\@marbox
3640 \ifdim\@tempdima >\z@
3641 \@latex@warning@no@line {Marginpar on page \thepage\space moved}%
3645 \global\@mparbottom\@pageht
3646 \global\advance\@mparbottom\@tempdima
3647 \global\advance\@mparbottom\dp\@marbox
3648 \global\advance\@mparbottom\marginparpush
3649 \advance\@tempdima -\ht\@marbox
3651 % Putting box movement inside the `marbox':
3653 \global\setbox \@marbox
3654 \vbox {\vskip \@tempdima
3656 \global \ht\@marbox \z@
3657 \global \dp\@marbox \z@
3659 % Sticking (rather than gluing:-) the `marbox' to the line above,
3660 % changed vskip to kern:
3665 {\ifnum \@tempcnta >\z@
3666 \hskip\columnwidth \hskip\marginparsep
3668 \hskip -\marginparsep \hskip -\marginparwidth
3672 % For this reason the following code can vanish:
3674 % \nobreak %% No longer needed. CAR92/12
3675 % \vskip -\@tempdima %% No longer needed. CAR92/12
3679 \hbox{\vrule \@height\z@ \@width\z@ \@depth\@pagedp}}
3683 % \subsubsection{Kludgeins}
3685 % This part of the file is part of the implementation of the following
3686 % two new commands for \LaTeX2e{}.
3690 % \enlargethispage{<dim>}
3693 % Adds |<dim>| to the height of the current column only. On the printed
3694 % page the bottom of this column is extended downwards by exactly
3695 % |<dim>| without having any effect on the placement of the footer; this
3696 % may result in an overprinting.
3699 % \enlargethispage*{<dim>}
3702 % Similar to |\enlargethispage| but it tries to squeeze the column to
3703 % be printed in as small a space as possible, ie it uses any
3704 % shrinkability in the column. If the column was not explicitly broken
3705 % (\eg with |\pagebreak|) this may result in an overfull box message but
3706 % execpt for this it will come out as expected (if you know what to
3709 % The star form of this command is dedicated to Leslie Lamport, the
3710 % other we need for ourselves (FMi, CAR).
3712 % These commands may well have unwanted effects if used soon
3713 % before a |\clearpage|: please give keep them clear of such places.
3715 % \begin{macro}{\@kludgeins}
3716 % \changes{v0.1c}{1993/11/23}{Insert added}
3717 % The insert which makes \TeX{} do a lot of the necessary work.
3718 % All we need to put into it is the amount by which the pagegoal
3719 % should be changed.
3721 \newinsert \@kludgeins
3722 \global\dimen\@kludgeins \maxdimen
3723 \global\count\@kludgeins 1000
3728 % \begin{macro}{\enlargethispage}
3729 % \begin{macro}{\enlargethispage*}
3730 % \changes{v0.1c}{1993/11/23}{Commands added}
3733 \gdef \enlargethispage {%
3737 \fl@trace{Enlarging page height * }%
3739 \@enlargepage{\hbox{\kern\p@}}}%
3742 \fl@trace{Enlarging page height exactly---}%
3744 \@enlargepage\@empty}%
3751 % \begin{macro}{\@enlargepage}
3752 % \changes{v0.1c}{1993/11/23}{Command added}
3753 % This actually inserts the insert, after checking for extreme
3754 % values of the change.
3756 \gdef\@enlargepage#1#2{%
3758 \fl@trace{\@spaces\@spaces by #2}%
3761 \ifdim \@tempskipa>.5\maxdimen
3762 \@latexerr{Suggested\space extra\space height\space
3763 (\the\@tempskipa)\space dangerously\space
3766 \ifdim \vsize<.5\maxdimen
3768 \fl@trace {Kludgeins added--pagegoal before: \the\pagegoal}%
3771 \insert\@kludgeins{#1\vskip-\@tempskipa}%
3774 % This next bit is for tracing only:
3778 \fl@trace {Kludgeins added--pagegoal after: \the \pagegoal}%
3782 \@latexerr{Page\space height\space already\space
3783 too\space large}\@eha
3791 % \subsubsection{Float control}
3793 % This part implements controllable floats and other changes
3794 % to the float mechanism.
3796 % It provides, at the document level, the following command for
3797 % inclusion in \LaTeX2e{}.
3803 % This suppresses all further floats on the current page.
3805 % With an optional argument it suppresses only floats only in certain
3806 % positions on the current page.
3808 % |[t]|\quad suppresses only floats at the top of the page
3809 % |[b]|\quad suppresses only floats at the bottom of the page
3812 % It also enables the use of an extra specifier, {\tt !}, in the
3813 % location optional argument of a float. If this is present then,
3814 % just for this particular float, whenever it is processed by the float
3815 % mechanism the followinhg are ignored:
3818 % \item all restrictions on the number of floats which can appear;
3819 % \item all explicit restrictions on the amount of space which should
3820 % (not) be occupied by floats and/or text.
3823 % The mechanism will still attempt to ensure that pages are not
3826 % These specifiers override, for the single float, the suppression
3827 % commands described above.
3830 % In its current form, it also supplies a reasonably exhaustive, and
3831 % somewhat baroque, means of tracing some aspects of the float
3835 % \begin{macro}{\fl@trace}
3836 % \begin{macro}{\tracefloatsoff}
3837 % \begin{macro}{\tracefloats}
3838 % \begin{macro}{\fl@traceval}
3839 % \begin{macro}{\tracefloatvals}
3840 % \begin{macro}{\fl@tracemessage}
3841 % \changes{v1.0c}{1993/11/30}{Commands added}
3842 % \changes{v1.0h}{1993/12/12}{Commands changed}
3843 % \changes{v1.0j}{1993/12/17}{tracefloatvals made a document command}
3844 % Set-up tracing for floats independent of other tracing as it
3845 % produces mega-output. Default is no tracing.
3846 % \changes{v1.1j}{1995/04/24}
3847 % {Do not add to kernel unless `trace' specified}
3848 % \changes{v1.2n}{2014/04/24}
3849 % {Renamed internal trace commands; provide as package}
3853 \def \fl@tracemessage #1{{\let\@elt\@empty\typeout{LaTeX2e: #1}}}
3854 \def \tracefloats{\let \fl@trace \fl@tracemessage}
3855 \def \tracefloatsoff {\let \fl@trace \@gobble}
3857 \def \fl@traceval #1{\fl@trace{\string #1 = \the #1}}
3858 \IncludeInRelease{2015/01/01}{\tracefloatvals}%
3860 \def \tracefloatvals{%
3862 % As |\@dblfloatplacement| sets |\f@depth| it needs to be run
3863 % inside a group, otherwise the float placement will test for the
3864 % wrong value.\footnote{This is a somewhat questionable design.}
3869 \fl@trace{***Float placement parameters:}%
3870 \fl@traceval\@colnum
3871 \fl@traceval\@colroom
3872 \fl@traceval\@topnum
3873 \fl@traceval\@toproom
3874 \fl@traceval\@botnum
3875 \fl@traceval\@botroom
3877 \fl@trace{\string\textfraction = \textfraction}%
3878 \fl@traceval\@dbltopnum
3879 \fl@traceval\@dbltoproom
3880 \fl@trace{\string\textfraction = \textfraction}%
3881 \fl@trace{toplist: \@toplist}%
3882 \fl@trace{botlist: \@botlist}%
3883 \fl@trace{midlist: \@midlist}%
3884 \fl@trace{deferlist: \@deferlist}%
3885 \fl@trace{dbltoplist: \@dbltoplist}%
3886 %FMi \fl@trace{dbldeferlist: \@dbldeferlist}%
3889 \EndIncludeInRelease
3890 \IncludeInRelease{0000/00/00}{\tracefloatvals}%
3892 \def \tracefloatvals{%
3896 \fl@trace{***Float placement parameters:}%
3897 \fl@traceval\@colnum
3898 \fl@traceval\@colroom
3899 \fl@traceval\@topnum
3900 \fl@traceval\@toproom
3901 \fl@traceval\@botnum
3902 \fl@traceval\@botroom
3904 \fl@trace{\string\textfraction = \textfraction}%
3905 \fl@traceval\@dbltopnum
3906 \fl@traceval\@dbltoproom
3907 \fl@trace{\string\textfraction = \textfraction}%
3908 \fl@trace{toplist: \@toplist}%
3909 \fl@trace{botlist: \@botlist}%
3910 \fl@trace{midlist: \@midlist}%
3911 \fl@trace{deferlist: \@deferlist}%
3912 \fl@trace{dbltoplist: \@dbltoplist}%
3913 % next line only in old releases
3914 \fl@trace{dbldeferlist: \@dbldeferlist}%
3917 \EndIncludeInRelease
3919 % We need to make sure that \texttt{fltrace} comes before
3920 % \texttt{flafter} to make the tracing work.
3922 \@ifpackageloaded{flafter}
3923 {\PackageWarningNoLine{fltrace}{Load 'fltrace' before 'flafter'\MessageBreak
3924 Attempting to recover by reloading 'flafter'}%
3926 % Hide the fact that \texttt{flafter} was already loaded and then
3928 % \changes{v1.2m}{2015/01/20}{Reset \cs{IncludeInRelease} flags}
3930 \expandafter\let\csname ver@flafter.sty\endcsname\relax
3932 \expandafter\let\csname\string#1+flafter+IIR\endcsname\relax}%
3933 \reserved@a\@addtocurcol
3934 \reserved@a\@addtonextcol
3935 \RequirePackage{flafter}}{}
3938 % As the code for \texttt{flafter} will contain tracing calls so
3939 % that it works in conjunction with \texttt{fltrace} we need to
3940 % provide a dummy definition for |\fl@trace| in that package.
3943 \providecommand\fl@trace[1]{}
3953 % \begin{macro}{\suppressfloats}
3954 % \begin{macro}{\@flstop}
3955 % \changes{v1.0f}{1993/12/05}{Commands added}
3956 % Float suppression commands: these set the relevant counter
3957 % globally to zero. Thus they are overridden for a particular float
3958 % by an ! specifier.
3962 \def \suppressfloats {%
3965 {\global \@colnum \z@}%
3968 % Maybe this should be a loop over |#1|?
3970 \def \@flstop [#1]{%
3972 \global \@topnum \z@
3975 \global \@botnum \z@
3983 % Manipulation of float placement and type; both their strings and the
3984 % corresponding count registers.
3986 % \begin{macro}{\@fpstype}
3987 % \begin{macro}{\@reqcolroom}
3988 % \begin{macro}{\@textfloatsheight}
3989 % \changes{v1.0f}{1993/12/05}{Commands added}
3990 % First a new count register to go with |\@currtype|.
3992 % Then a new skip register, for information needed to remove the
3993 % |\@maxsep| conservatism: it is possible that this could use a
3994 % temporary register.
3996 % Finally a dimension register to hold the total height of in-text
3997 % floats on the current page. This is needed to implement a
3998 % major change in the functionality of |\@addtocurcol| which is,
3999 % nevertheless, a bug fix.
4000 % It is not local and therefore cannot be a temporary register.
4004 \newdimen \@reqcolroom
4005 \newdimen \@textfloatsheight
4012 % \begin{macro}{\@fpsadddefault}
4013 % \changes{v1.0f}{1993/12/05}{Command added}
4014 % Adds the default placement to what is already there.
4016 % Should not need to change this, but could do it as follows:
4018 %\def \@fpsadddefault {%
4019 % \@temptokena \expandafter\expandafter\expandafter
4020 % {\csname fps@\@captype \endcsname}%
4021 % \edef \reserved@a {\the\@temptokena}%
4022 % \@onelevel@sanitize \reserved@a
4023 % \edef \@fps {\@fps\reserved@a}%
4028 %<*2ekernel|fltrace>
4029 \def \@fpsadddefault {%
4031 \fl@trace{fps changed from: \@fps}%
4033 \edef \@fps {\@fps\csname fps@\@captype \endcsname}%
4035 No positions in optional float specifier.\MessageBreak
4036 Default added (so using `\@fps')}%
4041 % \begin{macro}{\@setfloattypecounts}
4042 % \changes{v1.0f}{1993/12/05}{Command added}
4043 % Sets counters |\@fpstype| and |\@currtype|.
4045 % BANG $==$ bit4 of $|\count\@currbox| = 0$.
4048 \def \@setfloattypecounts {%
4049 \@currtype \count\@currbox
4050 \@fpstype \count\@currbox
4051 \divide\@currtype\@xxxii \multiply\@currtype\@xxxii
4052 \advance \@fpstype -\@currtype
4054 \fl@trace{(mod 32) fpstype: \the \@fpstype}%
4055 \fl@trace{(mult of 32) currtype: \the \@currtype}%
4056 % Tracing only: but some should be changed into real errors/warnings?
4057 \ifnum \@fpstype<\sixt@@n
4058 \ifnum \@fpstype=\z@
4059 \fl@trace{ERROR: no PLACEMENT, fpstype = \the \@fpstype = 0?}%
4061 \ifnum \@fpstype=\@ne
4062 \fl@trace{WARNING: only h, fpstype = \the \@fpstype = 1?}%
4064 \fl@trace{BANG float}%
4066 \ifnum \@fpstype=\sixt@@n
4067 \fl@trace{ERROR: no PLACEMENT, fpstype = \the \@fpstype = 16?}%
4070 \fl@trace{WARNING: only h, fpstype = \the \@fpstype = 17?}%
4072 \fl@trace{ORD float}%
4076 %</2ekernel|fltrace>
4080 % Macros for getting, testing and setting bits of the fps.
4083 % \begin{macro}{\@getfpsbit}
4084 % \changes{v1.0f}{1993/12/05}{Command added}
4085 % Sets |\@tempcnta| to required bit of |\count\@currbox|.
4090 \@boxfpsbit \@currbox
4096 % \begin{macro}{\@boxfpsbit}
4097 % \changes{v1.0f}{1993/12/05}{Command added}
4100 \def \@boxfpsbit #1#2{%
4101 \@tempcnta \count#1%
4102 \divide \@tempcnta #2\relax
4107 % \begin{macro}{\@testfp}
4108 % \changes{v1.0f}{1993/12/05}{Command added}
4109 % New definition of the float page test.
4111 % \changes{v1.1v}{1996/07/26}{remove \cs{global} before \cs{@test...}}
4114 \@boxfpsbit #18\relax % Really `#1 8' for human readers!
4124 % \begin{macro}{\@setfpsbit}
4125 % \changes{v1.0f}{1993/12/05}{Command added}
4126 % Sets required bit of |\@tempcnta| (to 1).
4129 \def \@setfpsbit #1{%
4130 \@tempcntb \@tempcnta
4131 \divide \@tempcntb #1\relax
4134 \advance \@tempcnta #1\relax
4142 % \begin{macro}{\@resethfps}
4143 % \changes{v1.0f}{1993/12/05}{Command added}
4144 % \changes{v1.0h}{1993/12/12}{Warnings added: minimal}
4145 % \changes{v1.0m}{1994/04/24}{Warning changed}
4146 % \changes{v1.0m}{1994/04/24}{Number 2 changed to \cs{tw@}}
4147 % \changes{v1.0o}{1994/05/02}{Code shortened}
4148 % Globally adds t as a possible location for an h or !h only placement:
4149 % this must be done using the count.
4151 % Although it will leave |\@fpstype| set to 17 even if it was
4152 % originally 1, this does not matter since it is the last thing in
4155 %<*2ekernel|fltrace>
4157 \let\reserved@a\@empty
4158 \ifnum \@fpstype=\@ne
4159 \def \reserved@a {!}%
4163 \global \advance \count\@currbox \tw@
4164 \@latex@warning@no@line {%
4165 `\reserved@a h' float specifier changed to `\reserved@a ht'}%
4168 `t' added to `\reserved@a h'- new Count: \the \count\@currbox}%
4176 % Special stuff for BANG floats.
4178 % \begin{macro}{\@flsetnum}
4179 % \changes{v1.0f}{1993/12/05}{Command added}
4181 % Ignores any zero float counter value in case BANG.
4183 % It uses a local assignment to the normally global counter: a bit
4186 % These assignments are safe so long as the counter involved is only
4187 % consulted once (\ie only for the `bang float') with the changed value.
4188 % This is the case within |\@addtocurcol| because it is used only
4189 % once within a call of the output routine (which forms a group).
4191 % For |\@addtonextcol| this is achieved by putting a group around its
4192 % code; this is needed because it is called (by |\@startcolumn|) for
4193 % each float which was on the deferlist. Almost identical
4194 % considerations pertain to |\@addtodblcol|. There may be more
4195 % efficient ways to handle this, but the group seems to be the simplest.
4197 % \changes{v1.0n}{1994/04/30}{Rogue space removed}
4199 \def \@flsetnum #1{%
4201 \fl@trace{fpstype: \the \@fpstype (flsetnum \string#1)}%
4203 \ifnum \@fpstype<\sixt@@n
4206 \fl@trace{BANG float resetting \string#1 to 1}%
4212 \fl@trace{#1 (before) = \the #1}%
4219 % \begin{macro}{\@flsettextmin}
4220 % \changes{v1.0f}{1993/12/05}{Command added}
4221 % This ignores |\textfraction| space restriction in case BANG.
4224 \def \@flsettextmin {%
4226 \fl@trace{fpstype: \the \@fpstype (flsettextmin)}%
4228 \ifnum \@fpstype<\sixt@@n
4230 \fl@trace{BANG ignoring textmin}%
4234 \@textmin \textfraction\@colht
4236 \fl@trace{ORD textmin = \the \@textmin}%
4244 % \begin{macro}{\@flcheckspace}
4245 % \changes{v1.0f}{1993/12/05}{Command added}
4246 % This ignores space restriction in case BANG; this is still slightly
4247 % conservative since it does not allow for the fact that, if there is
4248 % no text in the column then |\textfloatsep| is not needed.
4249 % Sets |@tempswa| true if there is room for |\@currbox|.
4252 \def \@flcheckspace #1#2{%
4253 \advance \@reqcolroom
4254 \ifx #2\@empty \textfloatsep \else \floatsep \fi
4256 \fl@trace{colroom = \the \@colroom
4257 (flcheckspace \string#1 \string#2)}%
4258 \fl@trace{reqcolroom = \the \@reqcolroom
4259 (flcheckspace \string#1 \string#2)}%
4261 \ifdim \@colroom>\@reqcolroom
4262 \ifdim #1>\ht\@currbox
4265 \fl@trace{Space OK: #1 = \the #1 > \the \ht \@currbox
4266 (flcheckspace \string#1 \string#2)}%
4270 \fl@trace{fpstype: \the \@fpstype
4271 (flcheckspace \string#1 \string#2)}%
4273 \ifnum \@fpstype<\sixt@@n
4275 \fl@trace{BANG float ignoring #1
4276 (flcheckspace \string#1 \string#2):}%
4277 \fl@trace{\@spaces #1 = \the #1. Ht float: \the \ht \@currbox
4283 \fl@trace{Fail---no room (flcheckspace \string#1 \string#2)
4284 (fpstype \the \@fpstype=ORD?):}%
4285 \fl@trace{\@spaces #1 = \the #1. Ht float: \the \ht \@currbox
4292 \fl@trace{Fail---no room at 2nd test of colroom
4293 (flcheckspace \string#1 \string#2)}%
4297 %</2ekernel|fltrace>
4302 % \begin{macro}{\@flupdates}
4303 % \changes{v1.0f}{1993/12/05}{Command added}
4304 % This updates everything when a float is placed.
4308 \def \@flupdates #1#2#3{%
4309 \global \advance #1\m@ne
4310 \global \advance \@colnum \m@ne
4311 \@tempdima -\ht\@currbox
4313 -\ifx #3\@empty \textfloatsep \else \floatsep \fi
4314 \global \advance #2\@tempdima
4315 \global \advance \@colroom \@tempdima
4323 % Interesting facts about float mechanisms past and present, together
4324 % with a summary of various features, some unresolved:
4327 % \item The value |\textfraction| does not affect the processing
4328 % of doublecol floats: this seems sensible, but should be
4330 % \item |\twocolumn| floatplacement was wrong: dbl not needed, ord
4332 % \item |\@floatplacement| was not called after |\@startdblcol|
4333 % or |\@topnewpage|. This has been changed; it is clearly a bug
4335 % \item The use |\@topnewpage| when |\dblfigrule| is non-trivial
4336 % produced a rule in the wrong place. This has been fixed by not
4337 % using |\dblfigrule| when processing the `float' from
4339 % \item If the specifier was just h and the float could not be put
4340 % here, it went on the deferlist and stayed there until a clearpage.
4341 % It now gets changed to a `th': this is only an error-recovery
4342 % action, putting just h or !h should be deprecated.
4343 % \item |\@dblmaxsep| was `the maximum of |\dblfloatsep| and
4344 % |\dbltexfloatsep|'. But it was never used! Now gone completely,
4346 % \item After an h float is put on a page, it was counted as text when
4347 % applying the |\textfraction| test; this is possibly too big a
4348 % change although it is a bug fix?
4349 % \item Two consecutive h floats are separated by twice |\intextsep|:
4350 % this could be changed to one by use of |\addvspace|, OK?
4351 % Note that it would also mean that less space is put in if an h
4352 % float immediately follows other spaces. This is also possibly
4353 % too big a change, at least for compatibility mode?
4354 % Or it may be simply wrong! It has not been changed.
4355 % \item Now |\@addtocurcol| checks first for just p fps. I think
4356 % that this is an increase in efficiency, but maybe the coding
4357 % should be made even more efficient.
4358 % \item |\@tryfcolumn| now tests if the list is empty first, otherwise
4359 % lots of wasted time! Thus this test has been removed from
4361 % As Frank pointed out, this makes |\@startcolumn| less
4362 % efficient. But it is now the same as |\@startdblcolumn|: I can
4363 % see no reason why they should be different, but which is best?
4364 % \item Why is |\@colroom| set in |\@doclearpage|?
4365 % \item Footnotes. Check what |\clearpage| does when footnotes are
4366 % left over. Footnotes are not put on float pages and, also,
4367 % |\@addtonextcol| ignores the existence of held-over footnotes
4368 % in deciding what floats can go on the page. Not changed.
4369 % \item |\clearpage| can still lose non-boxes, at least when floats
4370 % are involved. It also moves some to the `wrong page', but this
4371 % may be a coding problem.
4372 % \item The ! option makes it necessary to check in |\output| that
4373 % there is enough room left on the page after adding a float. (This
4374 % would have been necessary anyway if anyone set |\@textmin| too
4375 % close to zero! A similar danger existed also if the text in a
4376 % |\twocolumn[text]| entity gets too large.)
4377 % The current implementation of this also makes the normal case a
4378 % little less efficient, OK?
4379 % Not enough room means, at present, less than |\baselineskip|,
4380 % with a warning: is this OK? Should it be made generic (another
4382 % \item There are four possibilities for supporting this:
4384 % |\twocolumn[\maketitle more text]|
4387 % |\maketitle| slightly to allow this. Another is to change
4388 % |\@topnewpage| so that more than one |\twocolumn[]| command is
4389 % allowed; in this case |\maketitle\twocolumn[more text]| will work.
4390 % The former is more robust from the user's viewpoint, but makes the
4391 % code for |\maketitle| rather ad hoc (maybe it is already?).
4392 % Another is to misuse the global twocolumn flag locally within
4394 % Yet another is to move the column count register from the multicol
4395 % package into the kernel. This has been done.
4396 % \item Where should the reinserts be put to maximise the
4397 % probability that footmotes come out on the correct page?
4398 % Or should we go for as much compatibility as possible (but see
4400 % \item Should we continue to support (as much as possible)
4401 % |\samepage|? Some of its intended functionality is now advertised
4402 % as being provided by |\enlargethispage|. Use of either is likely
4403 % to result in wrongly placed footnotes, marginals, etc.
4404 % Which should have priority: obeying the pagination instructions,
4405 % or correct placement of notes/marginalia?
4406 % \item Is the adjustment of space to cause shrinking in the
4407 % kludge-* case correct? Should it be limited to 0pt?
4408 % \item Is the setting of |\boxmaxdepth| in makecol and friends
4409 % needed? It only has any effect if |\@textbottom| ends with a box
4410 % or rule, in which case the vskip to allow for its depth should
4411 % also be added. If it is kept, it should probably be the last
4412 % thing in the box. It has now been removed.
4414 % It would perhaps be better to document that |\@textbottom|
4415 % and |\@texttop| must have natural height 0pt.
4416 % \item I cannot see why the vskip adjustment for the depth
4417 % is needed if boxmaxdepth is used to ensure that there is never
4419 % \item The value of |\boxmaxdepth| should be explicitly set
4420 % whenever necessary: it is too risky to assume that it has any
4421 % particular value. Care is needed in deciding what to set it to.
4423 % It is interesting to note that the value of |\boxmaxdepth| is
4424 % unique in being read before the local settings for the box group
4425 % are reset; all other parameter settings which affect the box
4426 % construction use their values outside the box group.
4427 % \item Should |\@maxdepth| store the setting of |\maxdepth| from
4428 % lplain? Or should we provide a proper interface to class files
4429 % for setting these?
4432 % An analysis of various other macros.
4434 % |\@opcol| should do |\@floatplacement|, but where? Right at the
4435 % end, since it always occurs at the start of a column.
4438 % % Why is this done first?
4439 % \global \@mparbottom \z@
4444 % % This is not needed since it is done at the end of
4446 % \global \@colht \textheight
4450 % Only tracing has been added to these.
4453 %<*2ekernel|fltrace>
4454 \def\@makefcolumn #1{%
4457 \let \@testfp \@gobble
4462 \fl@trace{PAGE: in \string\clearpage
4463 \if@twocolumn ---twocolumn\fi---}%
4464 \fl@trace{----- float column/page completed from \string#1}%
4469 % This will line up the last baselines in the two
4470 % columns provided they are constructed in the normal way: \ie ending
4471 % in a skip of minus the original depth, with |\@textbottom| adding
4474 % Thus again it is essential for |\@textbottom| to have depth 0pt.
4475 % \changes{1.2g}{2000/07/12}{Ensure that rule is in \cs{normalcolor}}
4476 % \changes{v1.2m}{2014/12/30}{Command updated (latexrelease)}
4478 %</2ekernel|fltrace>
4479 %<latexrelease|fltrace>\IncludeInRelease{2015/01/01}%
4480 %<latexrelease|fltrace> {\@outputdblcol}{2 column marks}%
4481 %<*2ekernel|fltrace|latexrelease>
4485 % This is just a change to the single command |\@outputdblcol|
4486 % so that it saves mark information for the first column and restores
4487 % it in the second column.
4489 \def\@outputdblcol{%
4491 \global\@firstcolumnfalse
4493 % Save the left column
4495 \global\setbox\@leftcolumn\copy\@outputbox
4496 %<fltrace> \fl@trace{PAGE: first column boxed}%
4499 % Remember the marks from the first column
4501 \splitmaxdepth\maxdimen
4504 % In case of |\enlargethispage| we will have infinite negative glue
4505 % at the bottom of the page (coming from |\vss|) and that will earn
4506 % us an error message if we |\vsplit| to get at the marks. So we
4507 % need to remove thek last glue (if any) at the end of |\@outputbox|
4508 % as we are only interested in marks that change doesn't matter.
4509 % \changes{v1.1o}{2014/04/18}{Handle infinite glue from
4510 % \cs{enlargethispage} (pr/4023)}
4512 \setbox\@outputbox\vbox{\unvbox\@outputbox\unskip}%
4513 \setbox\@outputbox\vsplit\@outputbox to\maxdimen
4516 % One minor difference from the current |fixmarks| package, pass the
4517 % marks through a token register to stop any |#| tokens causing an
4518 % error in a |\def|.
4520 \toks@\expandafter{\topmark}%
4521 \xdef\@firstcoltopmark{\the\toks@}%
4522 \toks@\expandafter{\splitfirstmark}%
4523 \xdef\@firstcolfirstmark{\the\toks@}%
4526 % This test does not work if truly empty marks have been inserted, but
4527 % \LaTeX\ marks should always have (at least) two brace groups.
4528 % (Except before the first mark is used, when the marks are empty,
4529 % but that is OK here.)
4531 \ifx\@firstcolfirstmark\@empty
4532 \global\let\@setmarks\relax
4535 \let\firstmark\@firstcolfirstmark
4536 \let\topmark\@firstcoltopmark}%
4543 \global\@firstcolumntrue
4544 \setbox\@outputbox\vbox{%
4546 \hb@xt@\columnwidth{\box\@leftcolumn \hss}%
4549 % \changes{v1.1m}{2006/09/13}{Ensure that rule is in \cs{normalcolor}}
4550 % The color of the \cs{vrule} should be \cs{normalcolor} as to not
4551 % inherit the color from the column.
4553 {\normalcolor\vrule \@width\columnseprule}%
4555 \hb@xt@\columnwidth{\box\@outputbox \hss}}}%
4556 %<fltrace> \fl@trace{PAGE: second column also boxed}%
4559 % Override current first and top with those of first column if necessary
4566 %<fltrace> \fl@trace{PAGE: two column page completed}%
4570 \@whilesw\if@fcolmade \fi{\@outputpage
4571 %<fltrace> \fl@trace{PAGE: double float page completed}%
4578 %<latexrelease|fltrace>\EndIncludeInRelease
4579 %<latexrelease|fltrace>\IncludeInRelease{0000/00/00}%
4580 %<latexrelease|fltrace> {\@outputdblcol}{2 column marks}%
4581 %<latexrelease|fltrace>\def\@outputdblcol{%
4582 %<latexrelease|fltrace> \if@firstcolumn
4583 %<latexrelease|fltrace> \global \@firstcolumnfalse
4584 %<latexrelease|fltrace> \global \setbox\@leftcolumn \box\@outputbox
4586 %<latexrelease|fltrace> \fl@trace{PAGE: first column boxed}%
4588 %<latexrelease|fltrace> \else
4589 %<latexrelease|fltrace> \global \@firstcolumntrue
4590 %<latexrelease|fltrace> \setbox\@outputbox \vbox {%
4591 %<latexrelease|fltrace> \hb@xt@\textwidth {%
4592 %<latexrelease|fltrace> \hb@xt@\columnwidth {%
4593 %<latexrelease|fltrace> \box\@leftcolumn \hss}%
4594 %<latexrelease|fltrace> \hfil
4595 %<latexrelease|fltrace> {\normalcolor\vrule
4596 %<latexrelease|fltrace> \@width\columnseprule}%
4597 %<latexrelease|fltrace> \hfil
4598 %<latexrelease|fltrace> \hb@xt@\columnwidth {%
4599 %<latexrelease|fltrace> \box\@outputbox \hss}%
4600 %<latexrelease|fltrace> }%
4601 %<latexrelease|fltrace> }%
4603 %<latexrelease|fltrace> \fl@trace{PAGE: second column also boxed}%
4605 %<latexrelease|fltrace> \@combinedblfloats
4606 %<latexrelease|fltrace> \@outputpage
4608 %<latexrelease|fltrace> \fl@trace{PAGE: two column page completed}%
4610 %<latexrelease|fltrace> \begingroup
4611 %<latexrelease|fltrace> \@dblfloatplacement
4612 %<latexrelease|fltrace> \@startdblcolumn
4614 % This loop could be replaced by an |\expandafter| tail
4615 % recursion in\\ |\@startdblcolumn|.
4617 %<latexrelease|fltrace> \@whilesw\if@fcolmade \fi
4618 %<latexrelease|fltrace> {\@outputpage
4620 %<latexrelease|fltrace> \fl@trace{PAGE: double float page completed}%
4622 %<latexrelease|fltrace> \@startdblcolumn}%
4623 %<latexrelease|fltrace> \endgroup
4624 %<latexrelease|fltrace> \fi
4625 %<latexrelease|fltrace>}%
4626 %<latexrelease|fltrace>\EndIncludeInRelease
4627 %</2ekernel|fltrace|latexrelease>
4630 % \subsubsection{Float placement parameters}
4631 % \changes{v1.0i}{1993/12/14}{Section added to declare all parameters}
4633 % The main purpose of this section is to ensure that all the
4634 % float-placement parameters which need to be set in a class file or
4635 % package have been declared. It also describes their use and sets
4636 % values for them which are reasonable for typical documents using
4637 % US letter or A4 sized paper.
4639 % \paragraph{Limits for the placement of floating objects}
4641 % \begin{macro}{\c@topnumber}
4642 % This counter holds the maximum number of
4643 % floats that can appear at the top of a text page or column.
4646 \newcount\c@topnumber
4647 \setcounter{topnumber}{2}
4651 % \begin{macro}{\topfraction}
4652 % This macro holds the maximum proportion (as a decimal number) of
4653 % a text page or column that can be occupied by floats at the top.
4655 \newcommand\topfraction{.7}
4659 % \begin{macro}{\c@bottomnumber}
4660 % This counter holds the maximum number of
4661 % floats that can appear at the bottom of a text page or column.
4663 \newcount\c@bottomnumber
4664 \setcounter{bottomnumber}{1}
4668 % \begin{macro}{\bottomfraction}
4669 % This macro holds the maximum proportion (as a decimal number) of
4670 % a text page or column that can be occupied by floats at the bottom.
4672 \newcommand\bottomfraction{.3}
4676 % \begin{macro}{\c@totalnumber}
4677 % This counter holds the maximum number of floats that can appear on
4678 % any text page or column.
4680 \newcount\c@totalnumber
4681 \setcounter{totalnumber}{3}
4685 % \begin{macro}{\textfraction}
4686 % This macro holds the minimum proportion (as a decimal number) of
4687 % a text page or column that must be occupied by text.
4689 \newcommand\textfraction{.2}
4693 % \begin{macro}{\floatpagefraction}
4694 % This macro holds the minimum proportion (as a decimal number) of
4695 % a page or column that must be occupied by floating objects before a
4696 % `float page' is produced.
4698 \newcommand\floatpagefraction{.5}
4702 % \begin{macro}{\c@dbltopnumber}
4703 % This counter holds the maximum number of double-column floats that
4704 % can appear on the top of a two-column text page.
4706 \newcount\c@dbltopnumber
4707 \setcounter{dbltopnumber}{2}
4711 % \begin{macro}{\dbltopfraction}
4712 % This macro holds the maximum proportion (as a decimal number) of
4713 % a two-column text page that can be occupied by double-column floats
4716 \newcommand\dbltopfraction{.7}
4720 % \begin{macro}{\dblfloatpagefraction}
4721 % This macro holds the minimum proportion (as a decimal number) of
4722 % a page that must be occupied by double-column floating objects
4723 % before a `double-column float page' is produced.
4725 \newcommand\dblfloatpagefraction{.5}
4729 % \paragraph{Floats on a text page}
4731 % \begin{macro}{\floatsep}
4732 % \begin{macro}{\textfloatsep}
4733 % \begin{macro}{\intextsep}
4734 % When a floating object is placed on a page with text, these
4735 % parameters control the separation between the float and the other
4736 % objects on the page. These parameters are used for both
4737 % one-column mode and single-column floats in two-column mode.
4738 % They are all rubber lengths.
4740 % |\floatsep| is the space between adjacent floats that are placed
4741 % at the top or bottom of the text page or column.
4743 % |\textfloatsep| is the space between the main text and floats
4744 % at the top or bottom of the page or column.
4746 % |\intextsep| is the space between in-text floats and the text.
4749 \newskip\textfloatsep
4751 \setlength\floatsep {12\p@ \@plus 2\p@ \@minus 2\p@}
4752 \setlength\textfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@}
4753 \setlength\intextsep {12\p@ \@plus 2\p@ \@minus 2\p@}
4759 % \begin{macro}{\dblfloatsep}
4760 % \begin{macro}{\dbltextfloatsep}
4761 % When double-column floats (floating objects that span the whole
4762 % |\textwidth|) are placed at the top of a text page in two-column
4763 % mode, the separation between the float and the text is controlled
4764 % by |\dblfloatsep| and |\dbltextfloatsep|. They are rubber lengths.
4766 % |\dblfloatsep| is the space between adjacent double-column floats
4767 % placed at the top of the text page.
4769 % |\dbltextfloatsep| is the space between the main text and
4770 % double-column floats at the top of the page.
4772 \newskip\dblfloatsep
4773 \newskip\dbltextfloatsep
4774 \setlength\dblfloatsep {12\p@ \@plus 2\p@ \@minus 2\p@}
4775 \setlength\dbltextfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@}
4780 % \paragraph{Floats on their own page or column}
4782 % \begin{macro}{\@fptop}
4783 % \begin{macro}{\@fpsep}
4784 % \begin{macro}{\@fpbot}
4785 % When floating objects are placed on a separate page or column,
4786 % called a `float page', the layout of the page is controlled by
4787 % these parameters, which are rubber lengths.
4789 % At the top of the page |\@fptop| is inserted;
4790 % typically this supplies some stretchable whitespace.
4791 % At the bottom of the page |\@fpbot| ais inserted.
4792 % Between adjacent floats |\@fpsep| is inserted.
4794 % These parameters are used for all floating objects on a
4795 % `float page' in one-column mode, and for single-column
4796 % floats in two-column mode.
4798 % Note that at least one of the two parameters |\@fptop| and
4799 % |\@fpbot| should contain a |plus ...fil| so as to fill the
4800 % remaining empty space.
4805 \setlength\@fptop{0\p@ \@plus 1fil}
4806 \setlength\@fpsep{8\p@ \@plus 2fil}
4807 \setlength\@fpbot{0\p@ \@plus 1fil}
4813 % \begin{macro}{\@dblfptop}
4814 % \begin{macro}{\@dblfpsep}
4815 % \begin{macro}{\@dblfpbot}
4816 % Double-column `float pages' in two-column mode use similar
4822 \setlength\@dblfptop{0\p@ \@plus 1fil}
4823 \setlength\@dblfpsep{8\p@ \@plus 2fil}
4824 \setlength\@dblfpbot{0\p@ \@plus 1fil}
4830 % \begin{macro}{\topfigrule}
4831 % \begin{macro}{\botfigrule}
4832 % \begin{macro}{\dblfigrule}
4833 % The macros can be used to put in rules between floats and text;
4834 % whatever they insert should be vertical mode material which takes
4836 % \task{CAR}{Add more rules (for Frank in addtocurcol)}
4838 \let\topfigrule=\relax
4839 \let\botfigrule=\relax
4840 \let\dblfigrule=\relax