TeX - LaTeX Asked by Dan Levin on August 7, 2021
I’ve gotten an expected result with a vplit
on a box with leaders. The leaders have a fixed amount of glue, plus stretch and shrink. The fixed amount seems to be ignored in the size calculation, or else TeX is shrinking to get more in the split box than it needs to. Consider:
setbox1=vbox{
vbox to 50pt{}
nobreak
leaders hbox{} vskip25pt plus 100pt minus 25pt
allowbreak
nointerlineskip
vbox to 50pt{}
nobreak
leaders hbox{} vskip25pt plus 100pt minus 25pt
allowbreak
nointerlineskip
vbox to 50pt{}
nobreak
leaders hbox{} vskip25pt plus 100pt minus 25pt
allowbreak}
Then:
setbox3=vsplit1 to 150pt
showbox3
> box3=
vbox(150.0+0.0)x0.0, glue set - 1.0
.vbox(50.0+0.0)x0.0
.penalty 10000
.leaders 25.0 plus 100.0 minus 25.0
..hbox(0.0+0.0)x0.0
.penalty 0
.vbox(50.0+0.0)x0.0
.penalty 10000
.leaders 25.0 plus 100.0 minus 25.0
..hbox(0.0+0.0)x0.0
.penalty 0
.vbox(50.0+0.0)x0.0
.penalty 10000
.leaders 25.0 plus 100.0 minus 25.0
..hbox(0.0+0.0)x0.0
.penalty 0
As you can see, TeX puts all three of the inner boxes in box3
, although their natural height, including the leaders is 225pt. There’s plenty of stretch to include just two of the inner boxes and get a box whose height is 150pt. So my question is: why isn’t TeX respecting the leader
‘s fixed amount of glue in the above example?
(I’m not aware of a tracingsplits
, analogous to tracingpages
, which shows the calculation.)
TeX doesn't use the stretch because there is enough shrink to fit all three boxes, leaving nothing in the original box.
Note that there is an implicit penalty -10000
at the end of the vertical material from the box being split [TeXbook page 124].
Answered by Donald Arseneau on August 7, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP