logoalt Hacker News

bayesnetlast Tuesday at 10:11 AM1 replyview on HN

For those interested in typst, Laurenz wrote[0] about the differences between the typst and TeX layout algorithms a while ago. The paragraph layout algorithm is the same but the way it interacts with page placement is quite different.

[0]: https://laurmaedje.github.io/posts/layout-models/


Replies

WillAdamslast Tuesday at 5:50 PM

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