How to continue balanced column layout on the last page?

I think most existing workarounds assume that you use the columns(...) function, but if your document has a multi-column layout the recommendation is to set page(columns: ...) instead. The page setup guide recommends using a colbreak() in that case, but that doesn’t work when you’re e.g. displaying a bibliography on the last page, and the colbreak would need to be in the middle of it.

If you’re in a situation like that, here’s another workaround that requires manual balancing, but lets you handle basically any situation where the automatic balancing runs into edge cases:

#set page(paper: "a4", columns: 2)

#lorem(400)

#figure(
  rect(height: 5cm),
  caption: [a],
)

#lorem(400)

#place(bottom, float: true, scope: "parent", v(14cm))

Basically, this reserves the space at the bottom of the page for a large empty block, and thus forces Typst to put the content into the other columns.

1 Like