I am writing a thesis with long paragraphs (>1 page especially if there is a figure on that page). Sometimes I reference a figure within this paragraph for the first time.
Now I am faced with the decision of where do I define the figure in the flow. If I do this before my paragraph starts, the figure is places to early, if I do this after the paragraph it is to late.
My ideal way would to define the figure just after my reference and typst then places it close to there.
The problem is that defining a figure always breaks my paragraph and I get one paragraph before and one afterwards, which is not what I want.
#set page("a5")
= Placed to early
#figure(square(), caption: [Hi], placement: auto)<fig:ref1>
#lorem(500)
*@fig:ref1*
#lorem(300)
#pagebreak()
= Placed ok but creates unwanted parbreak
#lorem(500)
*@fig:ref2*
#figure(square(), caption: [Hi], placement: auto)<fig:ref2>
#lorem(300)
#pagebreak()
= Placed to late
#lorem(500)
*@fig:ref3*
#lorem(300)
#figure(square(), caption: [Hi], placement: auto)<fig:ref3>
This might be somewhat related to Delay placement of a figure?.
So holding the placing of the figure back or combining the two paragraphs to one paragraph would be what I want, I just don’t get it running.