logoalt Hacker News

WillAdamslast Tuesday at 5:50 PM1 replyview on HN

Yeah, one of the things which I always wished for when doing page composition was a way to visualize which paragraphs could be set a line or two longer or shorter while still being set reasonably nicely.

In decades of typesetting, I've had a chapter fall out almost perfectly with nicely pages and appropriately placed figures exactly once (fastest 40 minutes of my life) --- for the rest, it was:

- style the text and place the figures

- check the last page and see if it would be helped by paging tight or loose

- review all the pages and their figure placement to see which was the most problematic/egregious --- fix it

- starting at the beginning, adjust paragraph tightness as necessary, trying to get pages to balance and if need be, figures and references to be placed where the specs call for them --- if need be, adjust figure size/height/placement/style

- if one reaches the end and the selected strategy did not have the desired result, revert back to the initially styled and placed version and try the other strategy

- repeat until everything worked and everything panned out and all pages are balanced and all references/figure placements


Replies

gucci-on-fleeklast Wednesday at 11:20 AM

> Yeah, one of the things which I always wished for when doing page composition was a way to visualize which paragraphs could be set a line or two longer or shorter while still being set reasonably nicely.

I wrote a LaTeX package [0] that does exactly this. The default settings automatically lengthen paragraphs as necessary, but you can configure it to only tell you which paragraphs can be easily lengthened [1] without actually lengthening any of them.

[0]: https://www.ctan.org/pkg/lua-widow-control

[1]: https://tug.org/TUGboat/tb43-3/tb135chernoff-lwc.pdf

show 2 replies