Debian Codegraph @

texmf-dist/source/latex/sttools/stfloats.dtx

raw
1 % \iffalse meta-comment/*% \end{macrocode}*/
2 %
3 % Copyright (C) 2025 by Sigitas Tolu\v{s}is <[email protected]>
4 % ---------------------------------------------------------------------------
5 % This work may be distributed and/or modified under the
6 % conditions of the LaTeX Project Public License, either version 1.3
7 % of this license or (at your option) any later version.
8 % The latest version of this license is in
9 % http://www.latex-project.org/lppl.txt
10 % and version 1.3 or later is part of all distributions of LaTeX
11 % version 2005/12/01 or later.
12 %
13 % This work has the LPPL maintenance status `maintained'.
14 %
15 % The Current Maintainer of this work is Sigitas Tolu\v{s}is.
16 %
17 % This work consists of the files stfloats.dtx and stfloats.ins
18 % and the derived filebase stfloats.sty.
19 %
20 % \fi
21 %
22 % \iffalse
23 %<*internal>
24 \begingroup
25 %</internal>
26 %<*batchfile>
27 \input docstrip.tex
28 \keepsilent\askforoverwritefalse
29 \preamble
30 %%
31 %% This is file `stfloats.sty',
32 %% generated with the docstrip utility.
33 %%
34 %% The original source files were:
35 %%
36 %% stfloats.dtx (with options: `package')
37 %%
38 \endpreamble
39 \generate{\file{stfloats.sty}{\from{stfloats.dtx}{package}}}
40 %</batchfile>
41 %<batchfile>\endbatchfile
42 %<*internal>
43 \generate{\file{stfloats.ins}{\from{stfloats.dtx}{batchfile}}}
44 \endgroup
45 %</internal>
46 %<*driver>
47 \ProvidesFile{stfloats.dtx}
48 %</driver>
49 %<*package>
50 %% Copyright (C) 1997-2025 by Sigitas Tolu\v{s}is <[email protected]>
51 %% VTeX UAB, Mokslininku 2a, Vilnius, Lithuania
52 %% --------------------------------------------------------------------------
53 %% This work may be distributed and/or modified under the
54 %% conditions of the LaTeX Project Public License, either version 1.3
55 %% of this license or (at your option) any later version.
56 %% The latest version of this license is in
57 %% http://www.latex-project.org/lppl.txt
58 %% and version 1.3 or later is part of all distributions of LaTeX
59 %% version 2005/12/01 or later.
60 %%
61 %% PURPOSE: Improve float mechanism and baselineskip settings
62 %%
63 %</package>
64 %<package>\NeedsTeXFormat{LaTeX2e}[2015/12/01]
65 %<package>\ProvidesPackage{stfloats}
66 %<*package>
67 [2025/06/18 v3.4 Improve float mechanism and baselineskip settings]
68 %</package>
69 %
70 %<*driver>
71 \documentclass{ltxdoc}
72 \usepackage{stfloats}[2025/06/18]
73 \EnableCrossrefs
74 \CodelineIndex
75 \RecordChanges
76 \begin{document}
77 \DocInput{stfloats.dtx}
78 %%\PrintChanges
79 %%\PrintIndex
80 \end{document}
81 %</driver>
82 % \fi
83 %
84 % \CheckSum{933}
85 %
86 % \CharacterTable
87 % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
88 % Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
89 % Digits \0\1\2\3\4\5\6\7\8\9
90 % Exclamation \! Double quote \" Hash (number) \#
91 % Dollar \$ Percent \% Ampersand \&
92 % Acute accent \' Left paren \( Right paren \)
93 % Asterisk \* Plus \+ Comma \,
94 % Minus \- Point \. Solidus \/
95 % Colon \: Semicolon \; Less than \<
96 % Equals \= Greater than \> Question mark \?
97 % Commercial at \@ Left bracket \[ Backslash \\
98 % Right bracket \] Circumflex \^ Underscore \_
99 % Grave accent \` Left brace \{ Vertical bar \|
100 % Right brace \} Tilde \~}
101 %
102 %
103 % \changes{v0.1}{1997/08/25}{first version}
104 % \changes{v0.2}{1997/09/10}{standard LaTeX2e macros are used for dblfloats at top}
105 % \changes{v1.0}{1997/10/01}{new commands: \cs{fnbelowfloat} and \cs{fnunderfloat}}
106 % \changes{v2.0}{1998/09/21}{new commands: \cs{setbaselinefloat} and \cs{setbaselinefixed}}
107 % \changes{v2.1}{1999/10/04}{changed dblfloat's output}
108 % \changes{v2.2}{1999/10/22}{changed cs{output} for older LaTeX distributions}
109 % \changes{v3.0}{2012/05/29}{Converted to DTX file}
110 % \changes{v3.1}{2016/02/08}{Compatibility with 2015 latexrelease}
111 % \changes{v3.2}{2016/06/28}{Compatibility bugfix with 2015 latexrelease}
112 % \changes{v3.3}{2017/03/27}{Compatibility bugfix with 2017-05-01 latexrelease}
113 % \changes{v3.4}{2025/06/18}{Compatibility with 2025-06-01 latexrelease}
114 %
115 % \DoNotIndex{\newcommand,\newenvironment}
116 %
117 % \providecommand*{\url}{\texttt}
118 % \GetFileInfo{stfloats.dtx}
119 % \title{The \textsf{stfloats} package}
120 % \author{Sigitas Tolu\v{s}is \\ \url{[email protected]}}
121 % \date{\fileversion~from \filedate}
122 %
123 % \maketitle
124 %
125 % \section{Introduction}
126 %
127 % The package improves dblfloat(s) and footnotes placements mechanism and baselineskip
128 % glue settings.
129 %
130 % With newer \LaTeX\ release from 2015/01/01 using this package two improvements are
131 % available out of the box:
132 % \begin{enumerate}
133 % \item Float output keeps order for the
134 % same type of floats even with top or bottom dblfloat items.
135 % \item Dblfloats will appear on the same page where
136 % they are defined if they are defined on left column and
137 % enought free place is available on the current column/page.
138 % \end{enumerate}
139 %
140 % \section{Usage}
141 %
142 % To place dblfloat(s) on top or bottom of the page just use optional
143 % [t] or [b].
144 %
145 % \leftline{Example (to place figure at the page bottom):}
146 %
147 % \begin{verbatim}
148 % \begin{figure*}[b]
149 % ...
150 % \end{figure*}
151 % \end{verbatim}
152 %
153 % \DescribeMacro{\fnbelowfloat}
154 % Puts footnotes below the bottom floats
155 %
156 % \medskip
157 % \DescribeMacro{\fnunderfloat} (default and standard)
158 % Puts footnotes under the bottom floats.
159 %
160 % \medskip
161 % \DescribeMacro{\setbaselinefloat}
162 % Allows |\baselineskip| to stretch and shrink if the |\baselineskip|
163 % is set internally with command |\@setfontsize| (|\linespread| and
164 % |\fontsize| at user level). The settings are calculated and activated
165 % with command |\selectfont| (|\size@update|).
166 %
167 % \medskip
168 % Example:
169 %
170 % \medskip
171 % |\@setfontsize\normalsize\@xpt{12pt plus .1pt minus .1pt}| |\normalsize|%
172 %
173 % \medskip
174 % \DescribeMacro{\setbaselinefixed} (default and standard)
175 % Disables baselineskip to stretch and shrink even if the |\baselineskip|
176 % is set with command |\@setfontsize| as in the previous example in case that
177 % |\baselinestretch| is not empty.
178 %
179 % \medskip
180 % Then line spreading is not used |\baselineskip| glue can be
181 % controlled by ordinary |\baselinestretch| definition:
182 %
183 % \begin{itemize}
184 % \item
185 % |\def\baselinestretch{1}| - removes |\baselineskip| glue.
186 % \item
187 % |\def\baselinestretch{}| - keeps |\baselineskip| glue.
188 % \end{itemize}
189 %
190 % \StopEventually{}
191 %
192 % \section{Implementation}
193 %
194 % \iffalse
195 %<*package>
196 % \fi
197 %
198 %
199 % \begin{macro}{\if@kernel@version@MMXXV}
200 % This conditional code is used to check for the 2025 \LaTeX\ release.
201 % \begin{macrocode}
202 \newif\if@kernel@version@MMXXV
203 \@ifundefined{@makespecialcolbox}{\@kernel@version@MMXXVtrue}{}
204 % \end{macrocode}
205 % \end{macro}
206 %
207 %
208 % \begin{macro}{\@dblbotlist}
209 % Used for dblfloat(s) to be placed at the page bottom.
210 % \begin{macrocode}
211 \gdef\@dblbotlist{}
212 % \end{macrocode}
213 % \end{macro}
214 %
215 % Additional counters for dblfloat(s) support at the page bottom.
216 % \begin{macrocode}
217 \newcount\@dblbotnum
218 \newcount\c@dblbotnumber
219 % \end{macrocode}
220 %
221 % This code is used to check the \LaTeX\ release is too old.
222 % \begin{macrocode}
223 \@defaultunits\expandafter\c@dblbotnumber\fmtversion\relax\@nnil
224 \ifnum\c@dblbotnumber<2015\relax
225 \@latex@error{Too old LaTeX format (<2015)!\MessageBreak
226 Update LaTeX system!}\@ehd
227 \fi
228 % \end{macrocode}
229 %
230 % \begin{macrocode}
231 \setcounter{dblbotnumber}{2}
232 % \end{macrocode}
233 %
234 %
235 % \begin{macro}{\@dbflt}
236 % With extended set of default args: |[tp] -> [tbp]|
237 % \begin{macrocode}
238 \def\@dbflt#1{\@ifnextchar[{\@xdblfloat{#1}}{\@xdblfloat{#1}[tbp]}}
239 % \end{macrocode}
240 % \end{macro}
241 %
242 %
243 % \begin{macro}{\@dblfloatplacement}
244 % \begin{macrocode}
245 \g@addto@macro\@dblfloatplacement{\global\@dblbotnum\c@dblbotnumber}
246 % \end{macrocode}
247 % \end{macro}
248 %
249 %
250 % \begin{macro}{\@addtodblcol}
251 % With adds to support dblfoat(s) placement on the current page and at the page bottom.
252 % \begin{macrocode}
253 \def\@addtodblcol{%
254 \begingroup
255 \@insertfalse
256 \@setfloattypecounts
257 \@getfpsbit \tw@
258 \ifodd\@tempcnta
259 \@flsetnum \@dbltopnum
260 \ifnum \@dbltopnum>\z@
261 \@tempswafalse
262 \ifdim \@dbltoproom>\ht\@currbox
263 \@tempswatrue
264 \else
265 \ifnum \@fpstype<\sixt@@n
266 \advance \@dbltoproom \@textmin
267 \ifdim \@dbltoproom>\ht\@currbox
268 \@tempswatrue
269 \fi
270 \advance \@dbltoproom -\@textmin
271 \fi
272 \fi
273 \if@tempswa
274 \@bitor \@currtype \@deferlist
275 \@testwrongwidth\@currbox
276 \if@test
277 \else
278 %% [[ stfloats adds
279 \@bitor \@currtype \@dblbotlist
280 \if@test
281 \else
282 %% stfloats adds ]]
283 \@tempdima -\ht\@currbox
284 \advance\@tempdima
285 -\ifx \@dbltoplist\@empty \dbltextfloatsep \else
286 \dblfloatsep \fi
287 \global \advance \@dbltoproom \@tempdima
288 \global \advance \@colht \@tempdima
289 \global \advance \@dbltopnum \m@ne
290 \@cons \@dbltoplist \@currbox
291 \@inserttrue
292 %% [[ stfloats adds
293 \fi
294 %% stfloats adds ]]
295 \fi
296 \fi
297 \fi
298 \fi
299 \if@insert
300 \else
301 %% [[ stfloats adds
302 \@getfpsbit 4\relax
303 \ifodd\@tempcnta
304 \@flsetnum \@dblbotnum
305 \ifnum \@dblbotnum>\z@
306 \@tempswafalse
307 \ifdim \@dbltoproom>\ht\@currbox
308 \@tempswatrue
309 \else
310 \ifnum \@fpstype<\sixt@@n
311 \advance \@dbltoproom \@textmin
312 \ifdim \@dbltoproom>\ht\@currbox
313 \@tempswatrue
314 \fi
315 \advance \@dbltoproom -\@textmin
316 \fi
317 \fi
318 \if@tempswa
319 \@bitor \@currtype \@deferlist
320 \@testwrongwidth\@currbox
321 \if@test
322 \else
323 \@tempdima -\ht\@currbox
324 \advance\@tempdima
325 -\ifx \@dblbotlist\@empty \dbltextfloatsep \else
326 \dblfloatsep \fi
327 \global \advance \@dbltoproom \@tempdima
328 \global \advance \@colht \@tempdima
329 \global \advance \@dblbotnum \m@ne
330 \@cons \@dblbotlist \@currbox
331 \@inserttrue
332 \fi
333 \fi
334 \fi
335 \fi
336 \if@insert
337 \else
338 %% stfloats adds ]]
339 \@cons\@deferlist\@currbox
340 %% [[ stfloats adds
341 \fi
342 %% stfloats adds ]]
343 \fi
344 \endgroup
345 }
346 % \end{macrocode}
347 % \end{macro}
348 %
349 %
350 % \begin{macro}{\@addtocurcol}
351 % With adds to support dblfoat(s) placement on the current page and at the page bottom.
352 % \begin{macrocode}
353 \def\@addtocurcol{%
354 \@insertfalse
355 \@setfloattypecounts
356 \ifnum \@fpstype=8
357 \else
358 \ifnum \@fpstype=24
359 \else
360 \@flsettextmin
361 \advance \@textmin \@textfloatsheight
362 \@reqcolroom \@pageht
363 \ifdim \@textmin>\@reqcolroom
364 \@reqcolroom \@textmin
365 \fi
366 \advance \@reqcolroom \ht\@currbox
367 \if@kernel@version@MMXXV \saved@reqcolroom \@reqcolroom\fi %% stfloats adds
368 \ifdim \@colroom>\@reqcolroom
369 \@flsetnum \@colnum
370 \ifnum \@colnum>\z@
371 \@bitor\@currtype\@deferlist
372 %% \@testwrongwidth\@currbox % moved deeper
373 \if@test
374 \else
375 %% [[ stfloats adds
376 \@testwrongwidth\@currbox
377 \if@test
378 \if@firstcolumn
379 \@getfpsbit \tw@
380 \ifodd\@tempcnta
381 \@flsetnum \@dbltopnum
382 \ifnum \@dbltopnum>\z@
383 \@tempswafalse
384 \ifdim \@dbltoproom>\ht\@currbox
385 \@tempswatrue
386 \else
387 \ifnum \@fpstype<\sixt@@n
388 \advance \@dbltoproom \@textmin
389 \ifdim \@dbltoproom>\ht\@currbox
390 \@tempswatrue
391 \fi
392 \advance \@dbltoproom -\@textmin
393 \fi
394 \fi
395 \if@tempswa
396 \@bitor\@currtype{\@toplist\@midlist\@botlist\@dblbotlist}%
397 \if@test
398 \else
399 \@tempdima -\ht\@currbox
400 \advance\@tempdima
401 -\ifx \@dbltoplist\@empty \dbltextfloatsep \else
402 \dblfloatsep \fi
403 \global \advance \@dbltoproom \@tempdima
404 \global \advance \@colht \@tempdima
405 \global \advance \@colroom \@tempdima
406 \global \advance \@dbltopnum \m@ne
407 \@cons \@dbltoplist \@currbox
408 \@inserttrue
409 \fi
410 \fi
411 \fi
412 \else
413 \@getfpsbit 4\relax
414 \ifodd\@tempcnta
415 \@flsetnum \@dblbotnum
416 \ifnum \@dblbotnum>\z@
417 \@tempswafalse
418 \ifdim \@dbltoproom>\ht\@currbox
419 \@tempswatrue
420 \else
421 \ifnum \@fpstype<\sixt@@n
422 \advance \@dbltoproom \@textmin
423 \ifdim \@dbltoproom>\ht\@currbox
424 \@tempswatrue
425 \fi
426 \advance \@dbltoproom -\@textmin
427 \fi
428 \fi
429 \if@tempswa
430 \@tempdima -\ht\@currbox
431 \advance\@tempdima
432 -\ifx \@dblbotlist\@empty \dbltextfloatsep \else
433 \dblfloatsep \fi
434 \global \advance \@dbltoproom \@tempdima
435 \global \advance \@colht \@tempdima
436 \global \advance \@colroom \@tempdima
437 \global \advance \@dblbotnum \m@ne
438 \@cons \@dblbotlist \@currbox
439 \@inserttrue
440 \fi
441 \fi
442 \fi
443 \fi
444 \fi
445 \else
446 %% stfloats adds ]]
447 \@bitor\@currtype\@botlist
448 \if@test
449 \@addtobot
450 \else
451 \ifodd \count\@currbox
452 \advance \@reqcolroom \intextsep
453 \ifdim \@colroom>\@reqcolroom
454 \global \advance \@colnum \m@ne
455 \global \advance \@textfloatsheight \ht\@currbox
456 \global \advance \@textfloatsheight 2\intextsep
457 \@cons \@midlist \@currbox
458 \if@nobreak
459 \nobreak
460 \@nobreakfalse
461 \everypar{}%
462 \else
463 \addpenalty \interlinepenalty
464 \fi
465 \vskip \intextsep
466 \box\@currbox
467 \penalty\interlinepenalty
468 \vskip\intextsep
469 \ifnum\outputpenalty <-\@Mii \vskip -\parskip\fi
470 \outputpenalty \z@
471 \@inserttrue
472 \fi
473 \fi
474 \if@insert
475 \else
476 \@addtotoporbot
477 \fi
478 \fi
479 \fi
480 \fi
481 \fi
482 \fi
483 \fi
484 \fi
485 \if@insert
486 \else
487 \@resethfps
488 \@cons\@deferlist\@currbox
489 \fi
490 }%
491 % \end{macrocode}
492 % \end{macro}
493 %
494 %
495 % \begin{macro}{\@addtotoporbot}
496 % With adds to support dblfoat(s) placement on the current page and at the page bottom.
497 % \begin{macrocode}
498 \def\@addtotoporbot{%
499 \@getfpsbit \tw@
500 \ifodd \@tempcnta
501 \@flsetnum \@topnum
502 \ifnum \@topnum>\z@
503 \@tempswafalse
504 \@flcheckspace \@toproom \@toplist
505 \if@tempswa
506 %% [[ stfloats adds
507 %% \@bitor\@currtype{\@midlist\@botlist}%
508 \@bitor\@currtype{\@midlist\@botlist\@dblbotlist}%
509 %% stfloats adds ]]
510 \if@test
511 \else
512 \@flupdates \@topnum \@toproom \@toplist
513 \@inserttrue
514 \fi
515 \fi
516 \fi
517 \fi
518 \if@insert
519 \else
520 \@addtobot
521 \fi
522 }
523 % \end{macrocode}
524 % \end{macro}
525 %
526 %
527 % \begin{macro}{\@addtobot}
528 % With adds to support dblfoat(s) placement on the current page and at the page bottom.
529 % \begin{macrocode}
530 \def\@addtobot{%
531 \@getfpsbit 4\relax
532 \ifodd \@tempcnta
533 \@flsetnum \@botnum
534 \ifnum \@botnum>\z@
535 \@tempswafalse
536 \@flcheckspace \@botroom \@botlist
537 \if@tempswa
538 %% [[ stfloats adds
539 \@bitor\@currtype{\@dblbotlist}%
540 \if@test
541 \else
542 \if@kernel@version@MMXXV\else \global \maxdepth \z@\fi
543 %% stfloats adds ]]
544 \@flupdates \@botnum \@botroom \@botlist
545 \@inserttrue
546 %% [[ stfloats adds
547 \fi
548 %% stfloats adds ]]
549 \fi
550 \fi
551 \fi
552 }
553 % \end{macrocode}
554 % \end{macro}
555 %
556 %
557 % \begin{macro}{\@doclearpage}
558 % With adds to support dblfoat(s) placement on the current page and at the page bottom.
559 % \begin{macrocode}
560 \def\@doclearpage{%
561 \ifvoid\footins
562 \ifvbox\@kludgeins
563 {\setbox \@tempboxa \box \@kludgeins}%
564 \fi
565 \setbox\@tempboxa\vsplit\@cclv to\z@ \unvbox\@tempboxa
566 \setbox\@tempboxa\box\@cclv
567 \xdef\@deferlist{\@toplist\@botlist\@deferlist}%
568 \global \let \@toplist \@empty
569 \global \let \@botlist \@empty
570 \global \@colroom \@colht
571 \ifx \@currlist\@empty
572 \else
573 \@latexerr{Float(s) lost}\@ehb
574 \global \let \@currlist \@empty
575 \fi
576 \@makefcolumn\@deferlist
577 \@whilesw\if@fcolmade \fi{\@opcol\@makefcolumn\@deferlist}%
578 \if@twocolumn
579 \if@firstcolumn
580 %% [[ stfloats adds
581 %%\xdef\@deferlist{\@dbltoplist\@deferlist}%
582 \xdef\@deferlist{\@dbltoplist\@dblbotlist\@deferlist}%
583 \global \let \@dblbotlist \@empty
584 %% stfloats adds ]]
585 \global \let \@dbltoplist \@empty
586 \global \@colht \textheight
587 \begingroup
588 \@dblfloatplacement
589 \@makefcolumn\@deferlist
590 \@whilesw\if@fcolmade \fi{\@outputpage
591 \@makefcolumn\@deferlist}%
592 \endgroup
593 \else
594 \vbox{}\clearpage
595 \fi
596 \fi
597 \ifx\@deferlist\@empty \else\clearpage \fi
598 \else
599 \setbox\@cclv\vbox{\box\@cclv\vfil}%
600 \@makecol\@opcol
601 \clearpage
602 \fi
603 }
604 % \end{macrocode}
605 % \end{macro}
606 %
607 %
608 % \begin{macro}{\@combinedblfloats}
609 % Combines outputbox with top and bottom placed dblfloat(s).
610 % \begin{macrocode}
611 \def\@combinedblfloats{%
612 \ifx \@dbltoplist\@empty \else \@cdblflt \fi %% kernel \@combinedblfloats version
613 \ifx \@dblbotlist\@empty \else \@cdblflb \fi
614 }
615 % \end{macrocode}
616 % \end{macro}
617 %
618 %
619 % \begin{macro}{\@cdblflt}
620 % Combines outputbox with top placed dblfloat(s).
621 % \begin{macrocode}
622 \def\@cdblflt{%
623 \setbox\@tempboxa \vbox{}%
624 \let \@elt \@comdblflelt
625 \@dbltoplist
626 \let \@elt \relax
627 \xdef \@freelist {\@freelist\@dbltoplist}%
628 \global\let \@dbltoplist \@empty
629 %% [[ stfloats adds
630 %% \setbox\@outputbox \vbox to\textheight
631 \setbox\@outputbox \vbox% to\textheight
632 %% stfloats adds ]]
633 {%
634 \unvbox\@tempboxa\vskip-\dblfloatsep
635 \ifnum \@dbltopnum>\m@ne
636 \dblfigrule
637 \fi
638 \vskip \dbltextfloatsep
639 \unvbox \@outputbox
640 }%
641 }
642 % \end{macrocode}
643 % \end{macro}
644 %
645 %
646 % \begin{macro}{\@cdblflb}
647 % Combines outputbox with bottom placed dblfloat(s).
648 % \begin{macrocode}
649 \def\@cdblflb{%
650 \setbox\@tempboxa \vbox{}%
651 \let \@elt \@comdblflelt
652 \@dblbotlist
653 \let \@elt \relax
654 \xdef \@freelist {\@freelist\@dblbotlist}%
655 \global\let \@dblbotlist \@empty
656 \setbox\@outputbox \vbox% to\textheight
657 {%
658 \unvbox\@outputbox
659 \vskip \dbltextfloatsep
660 \ifnum \@dblbotnum>\m@ne
661 \dblfigrule
662 \fi
663 \unvbox\@tempboxa
664 \vskip -\dblfloatsep
665 }%
666 }
667 % \end{macrocode}
668 % \end{macro}
669 %
670 % Makes |\@makecol| current definition copy to |\org@makecol@stfloats|.
671 % \begin{macrocode}
672 \global\let\org@makecol@stfloats\@makecol
673 % \end{macrocode}
674 %
675 % \begin{macro}{\fn@makecol}
676 % Redefined macro |\@makecol| which puts footnotes below the bottom floats for the LaTeX release prior 2025.
677 % \begin{macrocode}
678 \gdef\fn@makecol{%
679 \setbox\@outputbox \box\@cclv
680 \let\@elt\relax
681 \xdef\@freelist{\@freelist\@midlist}%
682 \global \let \@midlist \@empty
683 \@combinefloats
684 \ifvoid\footins
685 \else
686 \setbox\@outputbox \vbox {%
687 \boxmaxdepth \@maxdepth
688 \unvbox \@outputbox
689 \vskip \skip\footins
690 \color@begingroup
691 \normalcolor
692 \footnoterule
693 \unvbox \footins
694 \color@endgroup
695 }%
696 \fi
697 \ifvbox\@kludgeins
698 \@makespecialcolbox
699 \else
700 \setbox\@outputbox \vbox to\@colht {%
701 \@texttop
702 \dimen@ \dp\@outputbox
703 \unvbox \@outputbox
704 \vskip -\dimen@
705 \@textbottom
706 }%
707 \fi
708 \global \maxdepth \@maxdepth
709 }
710 % \end{macrocode}
711 % \end{macro}
712 %
713 %
714 % \begin{macro}{\fnbelowfloat}
715 % Switch to put footnotes below the bottom floats.
716 % \begin{macrocode}
717 \def\fnbelowfloat{%
718 %% available Socket Plugs: floats-space-footnotes, space-floats-footnotes
719 \kernel@ifnextchar[{\fn@below@float}{\fn@below@float[floats-footnotes]}%
720 }
721 \def\fn@below@float[#1]{%
722 \if@kernel@version@MMXXV
723 \AssignSocketPlug{build/column/outputbox}{#1}%
724 \else
725 \global\let\@makecol\fn@makecol
726 \fi
727 }
728 % \end{macrocode}
729 % \end{macro}
730 %
731 %
732 % \begin{macro}{\fnunderfloat}
733 % Switch to put footnotes under the bottom floats.
734 % \begin{macrocode}
735 \def\fnunderfloat{%
736 %% available Socket Plugs: space-footnotes-floats, footnotes-space-floats, footnotes-floats
737 \kernel@ifnextchar[{\fn@under@float}{\fn@under@float[footnotes-floats-legacy]}%
738 }
739 \def\fn@under@float[#1]{%
740 \if@kernel@version@MMXXV
741 \AssignSocketPlug {build/column/outputbox}{#1}%
742 \else
743 \global\let\@makecol\org@makecol@stfloats
744 \fi
745 }
746 % \end{macrocode}
747 % With 2025 \LaTeX\ release optional arguments are available to choose appropriate Socket Plugins.
748 % |floats-space-footnotes|, |space-floats-footnotes| or |floats-footnotes| (default) in the case of \cs{fnbelowfloat}
749 % and |space-footnotes-floats|, |footnotes-space-floats|, |footnotes-floats| or |footnotes-floats-legacy| (default)
750 % in the case of \cs{fnunderfloat}.
751 % \end{macro}
752 %
753 %
754 % \begin{macro}{\set@floatfontsize}
755 % Such definition |\baselineskip\f@linespread\baselineskip| removes
756 % any glue from the |\baselineskip| in the case |\f@linespread| is
757 % not empty. To prevent this |\size@update| is redefined.
758 % \begin{macrocode}
759 \def\set@floatfontsize#1#2#3{%
760 \@defaultunits\@tempdimb#2\p@\relax\@nnil
761 \edef\f@size{\strip@pt\@tempdimb}%
762 \@defaultunits\@tempskipa#3\p@\relax\@nnil
763 \edef\f@baselineskip{\the\@tempskipa}%
764 \edef\f@linespread{#1}%
765 \let\baselinestretch\f@linespread
766 \def\size@update{%
767 % \end{macrocode}
768 % Saving of the |\baselineskip| glue.
769 % \begin{macrocode}
770 \baselineskip\f@baselineskip
771 \@tempskipa\baselineskip\relax\baselineskip=1\baselineskip
772 \advance\@tempskipa by-\baselineskip\baselineskip\f@baselineskip
773 % \end{macrocode}
774 % Removes the |\baselineskip| glue in case |\f@linespread| not empty.
775 % \begin{macrocode}
776 \baselineskip\f@linespread\baselineskip
777 % \end{macrocode}
778 % Restoring of the |\baselineskip| glue.
779 % \begin{macrocode}
780 \advance\@tempskipa by\baselineskip\baselineskip\@tempskipa
781 \normalbaselineskip\baselineskip
782 \setbox\strutbox\hbox{%
783 \vrule\@height.7\baselineskip
784 \@depth.3\baselineskip
785 \@width\z@}%
786 \let\size@update\relax
787 }%
788 }
789 % \end{macrocode}
790 % \end{macro}
791 %
792 % Simple copy of the previous original |\set@fontsize| definition in |\set@@@fontsize|.
793 %
794 % \begin{macrocode}
795 \let\set@@@fontsize\set@fontsize
796 % \end{macrocode}
797 %
798 %
799 % \begin{macro}{\setbaselinefloat}
800 % It allows |\baselineskip| to be set to the value with glue.
801 % \begin{macrocode}
802 \def\setbaselinefloat{\let\set@fontsize\set@floatfontsize}
803 % \end{macrocode}
804 % \end{macro}
805 %
806 %
807 % \begin{macro}{\setbaselinefixed}
808 % It is used to restore macro definition |\set@fontsize| to the
809 % original one. It means that |\baselineskip| is set to the value
810 % without glue in the case |\baselinestretch| is not empty.
811 % \begin{macrocode}
812 \def\setbaselinefixed{%
813 \@tempdima=\baselinestretch\p@
814 \edef\baselinestretch{\strip@pt\@tempdima}%
815 \let\set@fontsize\set@@@fontsize
816 }
817 % \end{macrocode}
818 % \end{macro}
819 %
820 %
821 % \begin{macro}{\output}
822 % It is removed from this package as the duplicate of the same
823 % definition in kernel since the macro definition change
824 % v.1.2c at 1997/11/09 in |ltoutput|.
825 % \end{macro}
826 %
827 %
828 % \begin{macrocode}
829 %\endinput
830 % \end{macrocode}
831 %
832 % \iffalse
833 %</package>
834 % \fi
835 %
836 % \Finale