Omikhleia / ptable.sile

Paragraph boxes, framed boxes and table packages for the SILE typesetting system
MIT License
10 stars 2 forks source link

Footnote in parbox/ptable inconsistency, and lost in framebox #2

Closed Omikhleia closed 1 year ago

Omikhleia commented 1 year ago

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.

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.