Skip to content

Dynamic between-paragraph spacing for stretching content across the whole page. #6042

@jounathaen

Description

@jounathaen

Description

Currently, the widow and orphan prevention in Typst leads to different lengths of the pages, similar to the \raggedbottom behavior in LaTeX.
For books, thesis, and other multipage texts, I'd prefer, if the spacing between paragraphs could be dynamically adjusted, to keep the length of a page consistent, similar to \flushbottom in LaTeX.

Example showing the spacing at the bottom of the page:

#set par(justify: true)
#set page(footer: line(length: 100%), footer-descent: 0cm)

#lorem(525)

#lorem(140)

#lorem(100)

Image

And with a different word count, so that there is no spacing at the bottom:

#set par(justify: true)
#set page(footer: line(length: 100%), footer-descent: 0cm)

#lorem(525)

#lorem(140)

#lorem(100)

Image

(My apologies, if this is a duplicate, but I could not find anything related to this in the issues)

Use Case

As mentioned before, books and other long texts look cleaner with "flushed" pages.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions