#Justify vertically / fill entire page

25 messages · Page 1 of 1 (latest)

sage iris
#

What is the best way to stretch the page content across the entire page?
I would like to have a uniform margin at the bottom.

frank wren
#

?r t=l pagesize=default

top
#v(1fr)
bottom
frank wren
#

this will create vertical space that fills as much as it can

#

for a uniform bottom margin, you can also just set a margin with #set page() ofc

sage iris
#

Thanks for the anwser.
Putting #v(1fr) between each paragraph works, but feels a bit messy.

I believe that this is a one line command in latex for the entire document.

#

This is quite an extreme example. But I would like to put this on all of my pages, so that the bottom line will not be jagged.

#

setting the margin did not fix this issue

timid cobalt
#

Glue in Typst basically

quartz flame
#

?r t=l pagesize=default

#show par: set block(below: 1fr, above: 1fr)

#lorem(50)

#lorem(50)

#lorem(50)

#lorem(50)

#lorem(50)

#lorem(50)
quartz flame
#

You can achieve something like this, but it kind of looks odd when you only have 2 paragraphs on a page, i.e.

#

?r t=l pagesize=default

#show par: set block(below: 1fr, above: 1fr)

#lorem(50)

#lorem(50)
quartz flame
#

Or you could do something a little cumbersome like this:

#

?r t=l pagesize=default

#let spaced_page(first, content) = page([
  #first
  #show par: set block(above: 1fr)

  #content
])

#spaced_page[
  //First paragraph
  #lorem(50)
][
  #lorem(50)
  
  #lorem(50)
  
  #lorem(50)
  
  #lorem(50)
  
  #lorem(50)
]
quartz flame
#

Which is basically just, put the first paragraph, then put a 1fr above every paragraph after that for the page

sage iris
#

Thanks for all your answers.

The below/above solution seems to not play nicely with my header, and other page content :/.

The other one is indeed quite cumbersome.

My goal was to mimic the layout of my double sided latex paper which uses the \flushbottom command to space pages evenly.

From what I understand there is no such thing in typst currently, which is fine.

timid cobalt
#

The main argument against it in the issue seems to be "looks bad, therefore it shouldn't be possible"

#

seems to presuppose that vertical justification would be a forced feature and that there wouldn't be any other uses for stretching/shrinking

sharp ice
timid cobalt
#

Agreed