Oregami
Repositories/oxedyne/fe2o3

oxedyne/fe2o3/fe2o3_austenite/tests/fixtures/incremental/floats.typ

1.4 KiB, 1 run

created by r1870400018:67949, which is this file's identity for as long as the history lasts, whatever it is later renamed to

download · who wrote it · its history

1// Floats: a figure and blocks placed at the top and the bottom of a page, one too tall for the room that is left and
2// so deferred to the next page, and a reference to the figure from before and after it.
3#set page(width: 220pt, height: 130pt, margin: 16pt, numbering: "1")
4#set text(size: 9pt)
5
6Opening text comes before the first float, with enough words to fill a few lines of the first page of this little document, see @fig-one.
7
8#place(auto, float: true, clearance: 6pt)[#block(width: 100%, height: 44pt, fill: luma(220))[Float one]]
9
10Text follows the float and runs on past it for a while, so that the float is set in the middle of a page before the flow carries on below it.
11
12#place(top + center, float: true, clearance: 6pt)[#block(width: 80%, height: 30pt, fill: luma(200))[Float two]]
13
14Another paragraph arrives here, and the second float will want the top of whichever page this one ends up on, pushing the text down the page.
15
16#figure(placement: auto, rect(width: 60%, height: 26pt, fill: luma(235)), caption: [The figure.]) <fig-one>
17
18The next paragraph talks about the figure again and sends the reader back to @fig-one so that the reference is read from both sides of it.
19
20#place(bottom + center, float: true)[#block(width: 100%, height: 70pt, fill: luma(190))[Float three, tall]]
21
22The last paragraph is here to carry on after the tall float, which is deferred to the next page when the room left on this one is too small for it.