typos
May 8, 2026, 1:20pm
1
Dear Typists,
I have a simple letter template.
The footer is only visible on page 1 and respects page margins as its height is calculated.
Now I want to add a top-space to the footer (without moving it downwards), respected by the body text so that footer and body won’t touch.
How is this possible?
As page 1 isn’t a title page, #pagebreak() + another #page() function won’t help.
Also, place or block within the footer don’t work as the body text overflows them.
Your ideas are very welcome. Thanks a lot!
#let footer-content = [
Content \
Content \
Content
]
#set page(
footer: context {
if counter(page).get().first() == 1 {
let footer-height = measure(footer-content).height
v(-footer-height)
footer-content
}
}
)
#lorem(1800)
Is there any reason this has to be a footer? Since it only appears on one page, you could use place:
#place(bottom, footer-content, float: true)
The issue with this approach is that as of yet, typst doesn’t support writing into the margins so the whitespace may be off (you can kind of adjust this with the dy parameter). See more info about writing in the margins here: "Real" absolute option for `place` (or alternative function) · Issue #5233 · typst/typst · GitHub
There is also the marginalia package that allows you to write inside margins, if you need this functionality.
2 Likes
sijo
May 8, 2026, 2:22pm
3
Yeah floating the content to the bottom with place seems like the right solution. If I understand “respects page margins” correctly, it should do the right thing. If you want to sink the “footer” a bit into the bottom margin, you can use something like pad(bottom: -1cm, footer-content) to free some space for the page text (compared to using dy: 1cm in the place call, which would shift the “footer” down but without letting the main text use the space).
3 Likes
typos
May 9, 2026, 8:15am
4
Thank you very much, guys!
This works perfectly for my use case. Thanks.
No. I’m just not familiar enough with typst and thought there was an “official” way to use the footer here.
This works for the original footer solution. Thanks.
There is also footer-descent, which makes this even easier.
#set page(
margin: (2.7cm),
footer-descent: 2cm,
footer: context [
My footer content
]
)