parbox (either used on its own or behind the implementation of cells in ptable) propagate migrating content (typically footnotes) to the upper typesetter. This is what allows us currently to support foonotes in them. The implementation is however somewhat defective.
If the parbox is "stolen" from the typesetter queue (with the "trick" often used with hboxes), the migrating content is still there...
If the parbox is "stolen" for measurement, or e.g. for the purpose of re-sizing it and possibly add a background color or borders (this is typically what we do for table cells), and then re-inserted (pushed back) into the typesetter queue, this problem is less visible, but still exists: the migration content is the before the re-inserted box (= augmenting the risk of the footnotes ending up on the previous page if a page break occurs, etc.)
This "migration material moving" seemed clever at the time of writing, but we need to be more clever than that...
The "box stealing" trick has lived long, but the global picture is somewhat doomed to fail here.
See also https://github.com/sile-typesetter/sile/issues/1648 for some related consideration on hbox - "related" in a general sense: framebox (being an hbox, stolen for measurement, adjustment and re-wrapping before re-insertion) loses its footnotes. And I have often used framed parbox (e.g. to draw a frame around a whole paragraph), meaning footnotes are fully lost too here.
parbox
(either used on its own or behind the implementation of cells inptable
) propagate migrating content (typically footnotes) to the upper typesetter. This is what allows us currently to support foonotes in them. The implementation is however somewhat defective.This "migration material moving" seemed clever at the time of writing, but we need to be more clever than that...
The "box stealing" trick has lived long, but the global picture is somewhat doomed to fail here.
See also https://github.com/sile-typesetter/sile/issues/1648 for some related consideration on
hbox
- "related" in a general sense:framebox
(being an hbox, stolen for measurement, adjustment and re-wrapping before re-insertion) loses its footnotes. And I have often used framed parbox (e.g. to draw a frame around a whole paragraph), meaning footnotes are fully lost too here.