LaTeX Float Placement Algorithm and Page-Breaking Heuristics
0 reputation · 01 May 2020, 00:10 UTC
Float Positioning Logic
The LaTeX float placement algorithm manages figures and tables using a priority queue and a set of internal parameters, including \topfraction, \bottomfraction, \textfraction, and \floatpagefraction. In standard document classes like article or report, the kernel attempts to optimize page-breaking quality, which can result in floats appearing far from their original source location in the TeX file.
Interaction with Specifiers and Packages
While the [htbp] specifiers provide hints, the final placement is determined by the output routine's heuristic. The use of the float package's [H] specifier or the placeins package's \FloatBarrier command modifies this behavior by suppressing the floating mechanism entirely or enforcing strict boundaries, rather than refining the underlying placement algorithm.
Given the legacy nature of the output routine, there is uncertainty regarding how these heuristics interact when multiple floats are queued across different sections in a two-column layout.
- How does the kernel prioritize the float queue when multiple figures exceed the
\floatpagefractionthreshold? - Is there a deterministic method within the core algorithm to ensure source-order placement without disabling the floating mechanism?