Open vringar opened 9 months ago
That's quite strange indeed. In the meantime, maybe try putting #v(1fr)
at the top of your slide's content.
I've found that the cause of this bug is that, in slide, body
is wrapped in pad(x, y, ...)
rather than block(inset: (x, y), ...)
. I'm planning to figure out how to make a PR for that in a couple days, but just changing that isn't too big a deal for now.
So I tried @Andrew-Schwartz's solution and it didn't seem to work for me. I changed line 106 of themes/university.typ to let body = block(inset: (x: 2em, y: .5em), body)
and tested with the following slide:
#slide(
title: [Testing],
align(horizon, [Testing])
)
The result was that the text was still not horizontally aligned. If I remove line 106 and leave body
just as it is passed to the function the text becomes horizontally aligned but the content goes right to the edges of the page (as you'd expect without padding).
I'm not quite savvy enough about the internals of Typst to know how we can apply the align function to the outside of the pad function. Any thoughts?
Hey, when trying to use
#align
in the university theme like this:The text would continue to stick to the top of the slides like this:
However, when using the simple theme, this would work. Unfortunately, I don't understand enough Typst to debug, why this doesn't work. Can someone help?