summaryrefslogtreecommitdiff
path: root/tests/suite/layout/layout.typ
blob: 257e478b495d52b8a193077801540a704b29717b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
--- layout-in-fixed-size-block ---
// Layout inside a block with certain dimensions should provide those dimensions.
#set page(height: 120pt)
#block(width: 60pt, height: 80pt, layout(size => [
  This block has a width of #size.width and height of #size.height
]))

--- layout-in-page-call ---
// Layout without any container should provide the page's dimensions, minus its margins.
#page(width: 100pt, height: 100pt, {
  layout(size => [This page has a width of #size.width and height of #size.height ])
  h(1em)
  place(left, rect(width: 80pt, stroke: blue))
})