Dynamic between-paragraph spacing for stretching content across the whole page.
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 56.1k
- Forks
- 1.7k
- Avg merge
- 3d 10h
- Merged PRs (30d)
- 22
Description
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)
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)
(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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the provided Typst examples and comparing the resulting page lengths and paragraph spacing. Investigate the pagination and layout behavior responsible for widow and orphan prevention; done means multipage text can dynamically adjust paragraph spacing to produce consistently filled pages without disrupting existing layout rules.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100