How can I allow for figures to overflow onto subsequent pages when employing a layout which places figures in wide margins?

Hello, I am trying to create a template for the outlines of scientific papers. I’m envisioning an outline as being comprised of single narrow column of text on the left-hand side of the page with margin figures on the right-hand side of the page. I’ve made a mockup of this concept using Marginalia:

A problem arises when too many figures are placed on the same page: the figures get overcrowded and pushed vertically off the page, like so:

The behavior I want to achieve instead is for the figures to, in instances of overcrowding, be pushed into the margins of the subsequent page. Does anyone know if this is possible? Thanks.

Hello, could you post a minimal code sample where the issue appears (a MRE)? It’s hard to guess what the document is doing internally. Thanks!

Certainly. All I’m doing is setting up the Marginalia margins with

    show: marginalia.setup.with(
        inner: ( far: 5mm, width: 15mm, sep: 5mm ),
        outer: ( far: 2cm, width: 7cm, sep: 5mm ),
        top: 2.5cm,
        bottom: 2.5cm,
        book: false,
        clearance: 12pt,
    )

Then drawing the figures in the usual way with Marginalia

      #notefigure(
        image("sample document resources/temperature program.svg"),
        caption: [A margin figure.],
      ) <figure>

The issue can be replicated by drawing several figures in a row, as Marginalia (in my understanding) places each figure on the same page as the most recently occurring body text.

Indeed, it seems that marginalia anchors each note onto the current page and manually calculates some offset based on previously placed notes. I can’t seem to find a way to force it to place notes on different pages, at least not without editing the source. Perhaps @nleanba can confirm whether I’m missing something.

The only alternative I can think of is to measure each note placed, and add a pagebreak if they overflow. However this means that this will cut the text short on each page, too

yeah, there is no way to place notes on other pages, I’m sorry.

this would be a very nice feature to have, but idk how to do it

i have made some experiments with storing overflowing notes into state and then adding them in the page.backgroundon later pages, but it didn’t work; context behaves really weird in that situation and gave nonsense values for coordinates/dimensions etc. and I couldn’t get place to work (it lead to weird overlaps and didn’t converge)

Thanks for the responses, everyone. For now, I suppose I can use aarnent’s suggestion of adding a page-break when necessary. It would be awesome if you ever figure out how to implement this feature, nleanba!