#Make an element's height be "The rest of the page"
18 messages · Page 1 of 1 (latest)
I tried the following:
#box([
== Fase de planteamiento y resolución del problema de automatización
#figure(
image("main.png")
, caption: [Programa principal del autómata.])
])
``` But this seems to ignore page margins:
you can use 1fr as a height measurment
each element using fr measurements gets the fraction of the remaining space and all fractional measurements
i.e. if there is one it gets all the remaining space
if there are multiple their fractions are added and they receive their fraction of the remaining space
?render ```
#set page(height: 100pt)
#grid(rows: (1fr, 1fr, 2fr),
block(height: 100%, fill: gray, lorem(10)),
block(height: 100%, fill: red, lorem(10)),
block(height: 100%, fill: green, lorem(10)),
)
hmm, it appears that only works for spacing
so here you can see that the remaining space (100pt) is partitioned into 3 parts with fractional lengths 1:1:2, that means the first 2 elements are the same size and the third one is twice as large as the first/second one
but all space is filled
minus page/grid margin
But that means I would need to set the relationship of height between the heading and the image
No?
Those lengths given in the grid can also be absolute or auto
?render ```
#set page("a4")
#grid(rows: (auto, 1fr),
block(height: 20pt, fill: green, lorem(10)),
block(height: 100%, fill: red, lorem(200)),
)
And if you had two 1fr elements they eoudl split the red part equally