How to include content in a `place` function that spans more than one page?

Based upon the Tutorial, I am trying to create a two-column document that has a one-column outline (table of contents) at the top. The outline is long enough so as to require more than one page.

However, I seem to be running into a limitation of place function. The outline ends at the bottom of the first page. The two-column body text, which should begin just below wherever the outline should end, simply starts at the top of the second page:

Summary
#set page(
    columns: 2,
    numbering: "1",
)

#place(
  top + center,
  float: true,
  scope: "parent",
  clearance: 2em,
)[#outline()]

= Test 1 #lorem(40)
#lorem(30)

= Test 2 #lorem(40)
#lorem(30)

= Test 3 #lorem(40)
#lorem(30)

= Test 4 #lorem(40)
#lorem(30)

= Test 5 #lorem(40)
#lorem(30)

= Test 6 #lorem(40)
#lorem(30)

= Test 7 #lorem(40)
#lorem(30)

= Test 8 #lorem(40)
#lorem(30)

= Test 9 #lorem(40)
#lorem(30)

= Test 10 #lorem(40)
#lorem(30)

= Test 11 #lorem(40)
#lorem(30)

= Test 12 #lorem(40)
#lorem(30)

= Test 13 #lorem(40)
#lorem(30)

= Test 14 #lorem(40)
#lorem(30)

= Test 14 #lorem(40)
#lorem(30)

= Test 15 #lorem(40)
#lorem(30)

= Test 16 #lorem(40)
#lorem(30)

= Test 17 #lorem(40)
#lorem(30)

= Test 18 #lorem(40)
#lorem(30)

= Test 19 #lorem(40)
#lorem(30)

= Test 20 #lorem(40)
#lorem(30)

I’d be grateful for any guidance or alternative solutions. Thank you.

Assuming this is the only way to put a 2-column content in the document flow, I think it is a bug.

#set page(columns: 2, numbering: "1")
#place(top, float: true, scope: "parent", outline())
#for n in range(1, 60) [
  = Test #n #lorem(13)
  #lorem(30)
]

It also doesn’t just continue down, it is stuck at the bottom of the page with is not desired in any situation.

I filed a bug report on Typst’s github. It was then clarified that this not a bug but intended behaviour. The report was transformed to a feature request for floating elements that can break across multiple pages.

1 Like